Commit Graph

67 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
Zoltan Kochan
c8a6ea8ae9 refactor: rename tarball-worker to worker 2023-08-26 17:26:21 +03:00
Zoltan Kochan
f2009d1756 perf: use a worker pool to link packages (#6950)
ref #6808
2023-08-24 20:05:53 +03:00
Song Gao
a992cecc0d chore: remove useless async keyword (#6918)
Co-authored-by: Song Gao <songgao@microsoft.com>
2023-08-07 15:19:25 +03:00
Zoltan Kochan
ecad8a724d fix: install --frozen-lockfile --lockfile-only should work (#6915)
close #6913
2023-08-06 12:17:02 +03:00
David Baynard
5e7ee2473a fix: negate error on install without lockfile (#6851)
Change the error message to indicate the wanted lockfile is absent, not
present. This now reflects the actual error.

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-07-30 03:00:52 +03:00
Khải
388a13b56a feat: sort keys before calculating checksum (#6839)
close #6824
2023-07-19 15:19:27 +03:00
Zoltan Kochan
5ce333519d refactor: rename cafs to store.cafs 2023-07-19 01:53:42 +03:00
await-ovo
b8cb91cf48 fix: treat the linked dependency which version type is tag as update-to-date (#6791)
* fix(core): treat the linked dependency which version type is tag as update-to-date

* docs: add changeset

* chore: code style
2023-07-12 03:58:54 +03:00
Khải
4d63f5ff78 chore: remove an empty file (#6797) 2023-07-11 17:17:00 +03:00
Zoltan Kochan
dddb8ad713 fix: link local bins created by postinstall scripts (#6728)
close #1801
2023-06-29 11:59:56 +03:00
btea
0d65d62c95 style: add restrict-template-expressions comment avoid eslint error (#6677) 2023-06-15 03:08:05 +03:00
Zoltan Kochan
302ebffc54 fix: downgrade lockfile version to 6.0 (#6664)
close #6648
2023-06-11 21:31:11 +03:00
await-ovo
d9da627cd3 fix: should always treat local file dependency as new dependency (#6623)
close #5381
close #6502
2023-06-08 20:12:18 +03:00
Zoltan Kochan
4b97f1f07a perf: don't use await inside loops (#6617) 2023-06-05 12:12:47 +03:00
Zoltan Kochan
a53ef4d196 fix: don't print that lockfile is up to date when it is not (#6574)
close #6544
2023-05-23 18:41:11 +03:00
Zoltan Kochan
9c4ae87bd1 feat: include some settings as fields in the lockfile (#6557)
ref #6312
2023-05-21 02:40:39 +03:00
Zoltan Kochan
d58cdb9629 fix: print more info when lockfile is outdated (#6536)
ref #6526
2023-05-14 23:23:48 +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
Zoltan Kochan
e6b83c84e5 fix: don't create an empty node_modules directory (#6482) 2023-04-28 03:08:38 +03:00
Zoltan Kochan
71a3ee77b9 feat: resolution-only (#6411)
close #1944
ref #4679
2023-04-17 22:06:53 +03:00
Brandon Cheng
6706a7d176 feat: add internal lockfileCheck option for lockfile only diff installs (#6404) 2023-04-16 21:58:03 +03:00
Zoltan Kochan
ece5a1aeb9 refactor: create a package for hook types (#6380) 2023-04-12 11:47:28 +03:00
Zoltan Kochan
72ba638e34 feat: don't add linked in deps to the lockfile when excludeLinksFromLockfile is set to true (#6369) 2023-04-09 17:41:00 +03:00
Dominic Elm
c36c87c1ce feat(hooks): pass registries to preResolution hook (#6326) 2023-03-31 02:43:43 +03:00
Jake Bailey
e2cb4b63d2 feat: add ignore-workspace-cycles to silence workspace cycle warning (#6308) 2023-03-29 23:18:27 +03:00
Daniel-Khodabakhsh
e87754df1f fix: make the FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE error and hint messages more clear (#6304)
Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-03-29 22:51:33 +03:00
Zoltan Kochan
3f0ea1defa fix: dedupe direct deps after hoisting (#6286) 2023-03-27 05:28:52 +03:00
Zoltan Kochan
2a2032810f fix: don't write pnpm-lock.yaml if it has no changes (#6260)
close #6158
2023-03-23 04:40:42 +02:00
Zoltan Kochan
158d8cf22f feat!: only allow lockfile v6 (#6240) 2023-03-19 04:23:51 +02:00
Zoltan Kochan
ee61ca4cb7 style: update eslint (#6236) 2023-03-18 14:57:29 +02:00
Zoltan Kochan
54591c6867 feat!: dedupe-peer-dependents is true by default (#6185) 2023-03-06 02:44:35 +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
5c31fa8be6 feat: dedupe packages that have peers when dedupe-peer-dependents is true (#6153) 2023-03-03 08:31:41 +02:00
Zoltan Kochan
ea460e51e3 Merge branch 'main' into v8 2023-02-20 22:46:24 +02:00
Zoltan Kochan
972de58abf fix: update the lockfile if a new project is added to the workspace with no deps (#6110) 2023-02-20 11:39:58 +02:00
Zoltan Kochan
8b49472833 Merge branch 'main' into v8 2023-02-19 16:02:45 +02:00
Zoltan Kochan
f17ca4218d fix: don't try to fix a lockfile that did not exist (#6091) 2023-02-16 13:29:42 +02:00
Brandon Cheng
c7fb372433 refactor(core): rename lockfileIsUpToDate to lockfileIsNotUpToDate (#6071) 2023-02-11 13:24:00 +02:00
Zoltan Kochan
b3d31838d6 fix: give priority to packages installed in the root, when deduping (#6054) 2023-02-08 15:39:16 +02:00
Zoltan Kochan
029143cfff fix: give priority to packages installed in the root, when deduping (#6054) 2023-02-08 13:19:40 +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
74b535f192 fix: improve deduplication (#6026) 2023-02-04 01:17:22 +02:00
Zoltan Kochan
59ee536787 feat: lowest-direct resolution mode (#6004) 2023-02-01 04:48:05 +02:00
await-ovo
6348f59314 fix: update without specify --latest should not update tag version (#5996) 2023-02-01 03:02:04 +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