Commit Graph

67 Commits

Author SHA1 Message Date
Zoltan Kochan
c9db742824 fix: update typescript to v5.4 (#7905) 2024-04-12 14:03:45 +02:00
Khải
e8fc6139ea refactor(install): type checking perf (#7877) 2024-04-09 16:23:44 +02:00
Colin Casey
d4e13ca969 fix(prune): add --ignore-scripts arg to prune command (#7836)
close #5030
2024-03-28 00:05:07 +01:00
Khải
316c18aba4 feat(cli): forbid combining specs and --latest (#7567)
---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-01-27 16:37:17 +01:00
Khải
0ec0a44da7 fix(update): stop downgrading prereleases (#7466)
close #7436

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-01-27 14:41:58 +01:00
Daniel Maricic
38e3c53697 fix(install-help): add ignore-workspace (#7509) 2024-01-10 12:32:04 +01:00
Brandon Cheng
064aeb681e feat: accept install command line options as dedupe options (#7473)
* refactor: reuse OPTIONS.ignoreScripts in dedupe help

* feat: accept install command line options as dedupe options

* test: add test to ensure .npmrc is used by pnpm dedupe

* test: add test for "pnpm dedupe --store-dir=..."

* test: ensure pnpm dedupe does not accidentally inherit --frozen-lockfile

* revert: remove newly added e2e tests in dedupe

* test: add unit test to check contents of dedupe cliOptionTypes
2024-01-02 00:47:46 +01:00
Andrey Sitnik
619e9ed6f4 fix: update --interactive for light theme (#7454)
close #7439
2023-12-24 01:48:19 +01:00
Zoltan Kochan
6558d1865f fix: dedupe commands of direct dependencies (#7359) 2023-12-05 16:39:52 +01:00
Zoltan Kochan
3db0db8d12 revert: "feat: use-experimental-npmjs-files-index option (#7177)"
This reverts commit a2bf6a0e96.
2023-11-22 02:01:27 +02:00
Tristan Knight
a2bf6a0e96 feat: use-experimental-npmjs-files-index option (#7177)
close #1328
2023-11-19 02:45:33 +02:00
Zoltan Kochan
e56207df65 refactor: rootProjectManifestDir 2023-10-24 15:30:06 +03:00
Zoltan Kochan
d6592964f0 refactor: rootProjectManifestDir is a required option 2023-10-24 15:14:33 +03:00
Zoltan Kochan
46dc34dcc8 fix: reading settings from package.json when shared-workspace-lockfile is false (#7202)
close #7184
2023-10-15 12:46:56 +03:00
await-ovo
bc83798d46 refactor(plugin-commands-installation): optimize cli output after select dependencies when update (#7125)
* refactor(plugin-commands-installation): optimize cli output after select dependencies when update

* docs: add changeset

* chore: set dep group choice to disabled

* fix: test case

* feat: filter out dep group choice in prompt output

* docs: update changesets

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-10-13 22:36:08 +03:00
Zoltan Kochan
d774a3196c feat: onlyBuiltDependenciesFile (#7167)
close #7137
2023-10-08 01:50:47 +03:00
Alvis Tang
12f45a83d2 fix: honor never/only-built-dependencies in workspace setup (#7141)
close #7135
close #5407

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-10-03 19:42:13 +03:00
Jannis Morgenstern
832e288263 feat: add disallow-workspace-cycles option to error on cyclic dependencies (#7144)
* feat: add `no-cyclic` option to error on cyclic dependencies

* refactor: rename no-cyclic to disallow-workspace-cycles
2023-10-03 19:25:22 +03:00
LaicZhang
41b5eb7a5b perf: replace startsWith with === (#7138) 2023-09-27 16:32:05 +03:00
Bryan Lee
ba48fe0bc4 feat: add pnpm dedupe --ignore-scripts (#7103)
close #7102
2023-09-19 02:09:09 +03:00
Brandon Cheng
e9aa6f682a chore(deps): update TypeScript 5.1.6 -> 5.2.2 (#7016)
* test: use sha512 integrity in fixtures to fix ci break

* test: update snapshots for sha512 fixture change

* chore(deps): remove unneeded peer dependency exception

The `peerDependencyRules.allowedVersions` exception on
`@typescript-eslint/eslint-plugin` no longer seems to be necessary.
Removing it does not introduce any new peer dependency errors on
`pnpm install`.

I suspect this was needed for the
`eslint-config-standard-with-typescript` dependency in the past, but a
@typescript-eslint/eslint-plugin upgrade made it no longer necessary.

* chore(deps): update @typescript-eslint dependencies 5.62.0 -> 6.5.0

@typescript-eslint 6.5.0 is the first version to introduce support for
TypeScript 5.2.

https://github.com/typescript-eslint/typescript-eslint/releases/tag/v6.5.0

```
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <5.2.0

YOUR TYPESCRIPT VERSION: 5.2.2

Please only submit bug reports when using the officially supported version.
```

* chore(deps): update eslint-config-standard-with-typescript 37.0.0 -> 39.0.0

Version 38.0.0 is the first version to support @typescript-eslint v6.
https://github.com/standard/eslint-config-standard-with-typescript/releases/tag/v38.0.0

Otherwise the following error appears.

```
> eslint "src/**/*.ts" "test/**/*.ts" "--fix"

Oops! Something went wrong! :(

ESLint: 8.47.0

Error: ../../.eslintrc.json » @pnpm/eslint-config » eslint-config-standard-with-typescript:
        Configuration for rule "@typescript-eslint/restrict-plus-operands" is invalid:
        Value {"checkCompoundAssignments":true} should NOT have additional properties.

    at ConfigValidator.validateRuleOptions (/Users/gluxon/Developer/pnpm/node_modules/.pnpm/@eslint+eslintrc@2.1.2/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2039:23)
    at /Users/gluxon/Developer/pnpm/node_modules/.pnpm/@eslint+eslintrc@2.1.2/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2094:18
```

* chore: remove unnecessary disables for restrict-template-expressions

The `@typescript-eslint/restrict-template-expressions` rule relaxed
what types are allowed in template expressions.

c13ce0b4f7 (diff-b852e1e199d2976eee1183fc84ac12a5d42fc61f0ae4b1c290dd54d621546db0)

Many of these disables were for interpolated values that had an `any`
type.

* chore: remove unnecessary disables for restrict-plus-operands

The original error was:

```
Invalid operand for a '+' operation. Operands must each be a number or string. Got `any`. eslint@typescript-eslint/restrict-plus-operands
```

It look like the newer version now allows `any`.

* style: fix errors of prefer-optional-chain and prefer-nullish-coalescing

The `@typescript-eslint/prefer-optional-chain` and
`@typescript-eslint/prefer-nullish-coalescing` rules got a bit
smarter. This commit applies autofixes. I believe the changes should be
equivalent to what existed before.

Example of the new `@typescript-eslint/prefer-optional-chain` lints.

```
pnpm/pkg-manifest/exportable-manifest/src/index.ts
  71:10  error  Prefer using an optional chain expression instead, as it's more concise and easier to read  @typescript-eslint/prefer-optional-chain
  87:10  error  Prefer using an optional chain expression instead, as it's more concise and easier to read  @typescript-eslint/prefer-optional-chain
```

Example of the new `@typescript-eslint/prefer-nullish-coalescing` lints.

```
pnpm/fs/find-packages/src/index.ts
  32:38  error  Prefer using nullish coalescing operator (`??`) instead of a ternary expression, as it is simpler to read  @typescript-eslint/prefer-nullish-coalescing
```

* chore(deps): update TypeScript 5.1.6 -> 5.2.2

* chore(deps): update @yarnpkg/core->@types/lodash override to 4.14.197

This fixes a compilation error that appears on TypeScript 5.2.2. This
error was fixed in a later version of `@types/lodash`.

https://github.com/DefinitelyTyped/DefinitelyTyped/pull/66123

```
../node_modules/.pnpm/@types+lodash@4.14.181/node_modules/@types/lodash/index.d.ts:45:15 - error TS2428: All declarations of 'WeakMap' must have identical type parameters.

45     interface WeakMap<K extends object, V> { }
                 ~~~~~~~

Found 4 errors.
```
2023-08-31 16:27:01 +03:00
Clark Tomlinson
81e5ada3a9 feat(interactive-update): group dependancies by type, add package url column (#6978)
* feat(interactive-update): group dependancies by type, add package url column

Partially resolves https://github.com/pnpm/pnpm/issues/6314

* refactor: update

* docs: update changeset

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-08-30 22:26:39 +03:00
Khải
ef3609049f feat(install): use side effect cache when rebuild (#7003)
close #6890
close #6996
2023-08-30 17:14:18 +03:00
Nacho Aldama
e0474bc4c3 fix: warn when linking a package with peerDeps (#6956)
close #615
2023-08-22 12:58:38 +03:00
Nacho Aldama
bf21c9bf3a fix: add support for npm lockfile v3 in import (#6931)
closes #6233

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-08-17 16:51:30 +03:00
await-ovo
12b0f09768 fix(plugin-commands-patching): patch should works correctly when shared-workspace-file is false (#6889) 2023-08-03 02:53:06 +03:00
await-ovo
78d43a8627 fix(deploy): ensure that the deploy target is generated in the same directory (#6859)
close #6858

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-07-29 18:44:55 +03:00
Zoltan Kochan
0b830f947a fix: pnpm update --global --latest (#6671)
close #3779
2023-06-14 07:41:16 +03:00
Zoltan Kochan
955d07394a refactor: rename find-workspace-packages package 2023-06-09 16:27:00 +03:00
Zoltan Kochan
1989a068b3 chore(deps): update 2023-06-03 22:41:42 +03:00
await-ovo
04a279881a fix: should respect ignore patterns in updateConfig.ignoreDependencies (#6590)
close #6548
2023-05-26 03:14:44 +03:00
Zoltan Kochan
ce61f8d3c2 test: improvements 2023-05-24 16:56:58 +03:00
Josh Goldberg ✨
ee429b300b feat: expanded missing command error, including 'did you mean' (#6496)
close #6492

Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-05-15 03:22:26 +03:00
Zoltan Kochan
d5c40b556c fix(link): don't update version specs in package.json (#6513)
close #4341
2023-05-09 15:34:02 +03:00
Zoltan Kochan
1ffedcb8d7 fix(deploy): always purge modules directory (#6511)
close #6510
2023-05-07 12:51:56 +03:00
Zoltan Kochan
42902ef851 feat: the installation API should return installation stats (#6490) 2023-05-02 12:45:29 +03:00
Khoo Hao Yit
a810fe5801 feat(pnpm fetch): add shortAlias -D and -P (#6489) 2023-04-30 22:31:45 +03:00
Zoltan Kochan
71a3ee77b9 feat: resolution-only (#6411)
close #1944
ref #4679
2023-04-17 22:06:53 +03:00
Brandon Cheng
6850bb135e feat: add pnpm dedupe --check (#6409) 2023-04-16 20:00:04 +00:00
Brandon Cheng
6706a7d176 feat: add internal lockfileCheck option for lockfile only diff installs (#6404) 2023-04-16 21:58:03 +03:00
Brandon Cheng
8e7a86dd95 refactor: call installDeps directly in dedupe command handler (#6403)
* refactor: call installDeps directly in dedupe command handler

This allows the dedupe command to pass options to the `installDeps`
function that aren't available on the pnpm install command line or
config interface.

This better matches the setup in the `add` and `update` command
handlers, which also call `installDeps` directly. The previous setup
mimicked the `prune` command. Keeping the dedupe and install commands as
similar as possible was the original goal of having the dedupe command
reuse the install command handler, but this may not be necessary due to
how small the install command handler is. Small logic related to what
dependency fields to use was copied over.

There should be no expected behavior changes in this commit. The
`frozenLockfile` setting was not necessary to copy the `dedupe` option
skips all frozen lockfile logic.

* break: remove unused dedupe argument on install command handler

This becomes unnecessary now that the dedupe command handler no longer
calls the install command handler directly.
2023-04-16 15:55:46 +03:00
Jake Bailey
e2cb4b63d2 feat: add ignore-workspace-cycles to silence workspace cycle warning (#6308) 2023-03-29 23:18:27 +03:00
Zoltan Kochan
51445f9557 fix: dedupe-peer-dependents should not remove peer deps from workspace root (#6280)
close #6154
2023-03-26 02:46:07 +02:00
Zoltan Kochan
cae85dbb19 feat!: throw a not implemented error on the ci command (#6261)
ref #6100
2023-03-23 04:18:01 +02:00
Zoltan Kochan
ee61ca4cb7 style: update eslint (#6236) 2023-03-18 14:57:29 +02:00
Zoltan Kochan
1f81e70e1a Merge branch 'main' into v8 2023-03-05 15:06:47 +02:00
Zoltan Kochan
670bea8440 fix: update on a subset of projects should work with dedupe-peer-dependents (#6178) 2023-03-05 12:01:52 +02:00
Zoltan Kochan
b11fa7093c fix: dedupe-peer-dependents when running a command inside a workspace project (#6175)
ref #6171
2023-03-04 19:20:09 +02:00
Zoltan Kochan
690bead267 fix: dedupe-peer-dependents on a subset of projects (#6173)
close #6171
2023-03-04 04:39:42 +02:00
Zoltan Kochan
ea460e51e3 Merge branch 'main' into v8 2023-02-20 22:46:24 +02:00