Commit Graph

47 Commits

Author SHA1 Message Date
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
await-ovo
0377d93678 feat: add --report-summary option for pnpm exec and pnpm run (#6098)
close #6008
2023-02-20 03:36:35 +02:00
await-ovo
7a0ce1df08 feat!: deploy with local dependencies (#6016)
Co-authored-by: Zoltan Kochan <z@kochan.io>

Close #5911
Close #5961
2023-02-19 04:23:31 +02:00
Zoltan Kochan
05f835446e fix: update --no-save with resolution-mode=lowest-direct 2023-02-07 05:13:23 +02:00
Zoltan Kochan
113f0ae266 feat!: resolution-mode is lowest-direct by default (#6047) 2023-02-07 05:12:11 +02:00
Zoltan Kochan
47e45d717d feat!: breaking config changes in v8 (#6035)
* auto-install-peers=true
* save-workspace-protocol=rolling
* publishConfig.linkDirectory true by default
* resolve-peers-from-workspace-root is true by default
* set dedupeDirectDeps to true by default in @pnpm/core.
2023-02-05 11:43:22 +02:00
Zoltan Kochan
583e3954be fix: remove suppressImplicitAnyIndexErrors from typescript settings (#5991) 2023-01-28 18:19:26 +02:00
Brandon Cheng
e8f6ab6833 feat: add pnpm dedupe command (#5958) 2023-01-23 12:27:42 +02:00
bohan
4655dd41e1 docs(install): supplementary explanation of --force (#5932)
Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-01-16 03:48:24 +02:00
Zoltan Kochan
3ebce5db7a feat!: lockfile format v6 (#5810) 2023-01-09 14:37:05 +02:00
Zoltan Kochan
1fad508b07 feat: resolve peer dependencies from workspace root (#5882)
partially reverts #4469
2023-01-05 15:13:40 +02:00
Pascal Jufer
08ceaf3fcb chore(deps): replace is-ci by ci-info (#5862) 2023-01-01 20:53:07 +02:00
Zoltan Kochan
d71dbf230b fix: only the add command should fail if there is no bin directory in PATH (#5842)
close #5841
2022-12-27 23:23:00 +02:00
Zoltan Kochan
7030cc26e8 refactor: use Object.fromEntries instead of Ramda.fromPairs 2022-12-21 03:23:10 +02:00
await-ovo
49f6c917fb fix: should not replace workspace:* when update (#5764)
close #5317
close #5303
close #5312
close #5726
2022-12-09 20:51:03 +02:00
thinkhalo
4097af6b5c feat: support $ in overrides instead of specific version #5703 (#5704)
Co-authored-by: Zoltan Kochan <z@kochan.io>
2022-11-29 02:32:03 +02:00
Jordan
868f2fb163 fix: --lockfile-only and readPackage hook modifying workspace packages (#5678)
close #5670
2022-11-26 20:31:57 +02:00
Zoltan Kochan
4ca53b0b50 refactor: group projects in different subdirectories (#5659) 2022-11-20 01:35:22 +02:00