Commit Graph
8513 Commits
Author SHA1 Message Date
Zoltan Kochan 46cecfc60f chore(release): libs 2023-09-06 21:59:31 +03:00
Zoltan Kochan b3947185c6 fix: unpacking tarballs that contain hard links (#7062) 2023-09-06 21:48:06 +03:00
Zoltan Kochan d194baeb50 chore(release): 8.7.4 v8.7.4 2023-09-06 01:08:56 +03:00
Zoltan Kochan d92070876d revert: "feat(deploy): apply publishConfig to all packages during deploy (#6943)" (#7058)
This reverts commit d57e4de6dc.

This reverts #6943

This will solve:

- https://github.com/pnpm/pnpm/issues/7040
- https://github.com/pnpm/pnpm/issues/6994
2023-09-06 01:05:47 +03:00
Zoltan Kochan b548f2f438 fix: don't hang while reading package.json from the store
close #7051
2023-09-05 19:32:54 +03:00
await-ovo b962c27ae6 fix(plugin-commands-script-runner): allow create scoped package with preferred version (#7055)
close #7053
2023-09-05 18:20:19 +03:00
Brandon Cheng 548768e092 fix(server): fix a potential deadlock when requesting a tarball worker (#7041) 2023-09-05 17:32:47 +03:00
Zoltan Kochan 4a1a9431dc fix(directory-fetcher): return the fetched package's manifest (#7052) 2023-09-05 11:57:18 +03:00
Zoltan Kochan 0da8703063 chore(release): 8.7.3 v8.7.3 2023-09-04 18:14:32 +03:00
Zoltan Kochan 3187b1ba62 ci: release pnpm with latest v8 of pnpm v8.7.2 2023-09-04 17:41:06 +03:00
Zoltan Kochan 89de73a27d ci: fix release 2023-09-04 17:33:45 +03:00
Zoltan Kochan 89302a4d30 chore(release): 8.7.2 2023-09-04 15:45:36 +03:00
Zoltan Kochan f48113eac8 refactor: improve the way workers are finished (#7039) 2023-09-04 15:15:20 +03:00
Zoltan Kochan 494f875449 refactor: package requester (#7036)
ref https://github.com/pnpm/pnpm/issues/6808
2023-09-04 00:55:27 +03:00
Zoltan Kochan 70b2830acc refactor: worker (#7033) 2023-09-03 02:30:08 +03:00
Brandon Cheng cc785f7e19 fix: report correct errors when using the pnpm server (#7032) 2023-09-02 22:28:59 +03:00
Brandon Cheng d1bd5871c3 test: make it easier to tell which line in server tests hang (#7030)
* test: add timeouts to execPnpm and execPnpx commands

* refactor: use expect .resolves for promises in tests

* test: add 3 minute default timeout to execPnpmSync and execPnpxSync
2023-09-02 22:28:24 +03:00
Zoltan Kochan 69430e13ae perf: verify package integrity with a worker (#7022) 2023-09-02 19:34:19 +03:00
Brandon Cheng 10ef088fbc test: set logErrorsBeforeRetry to debug failing retries (#7028) 2023-09-02 19:05:25 +03:00
Brandon Cheng a4986bca18 test: ensure server stops after test failure (#7029) 2023-09-02 02:25:06 +03:00
Brandon Cheng 6d30ff221c chore: remove unused eslint-disable directive (#7009)
```
❯ pnpm lint:ts

> monorepo-root@ lint:ts /Users/gluxon/Developer/pnpm2
> eslint "**/src/**/*.ts" "**/test/**/*.ts"

/Users/gluxon/pnpm2/pkg-manifest/read-project-manifest/src/index.ts
  217:46  warning  Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-explicit-any')

✖ 1 problem (0 errors, 1 warning)
  0 errors and 1 warning potentially fixable with the `--fix` option.
```
2023-09-01 03:11:44 +03:00
Brandon Cheng f9052d9d89 build: fix Jest code block misalignment by setting sourceMap option to true (#7021)
* test: fix Jest code block misalignment in pnpm tests

* Revert "test: fix Jest code block misalignment in pnpm tests"

This reverts commit 691bc722825b31c97bc6e0fa624ac2337491355d.

* build: set sourceMap option to true for `pnpm/tsconfig.json`

This allows Jest test failure messages to properly reference the correct
source location. These were confusingly misaligned before this change.
2023-09-01 03:11:08 +03:00
Zoltan Kochan 6f9bcdba51 chore(release): 8.7.1 v8.7.1 2023-08-31 18:43:41 +03:00
Zoltan Kochan 524e54fa43 test(cli): make use-node-version test consistent 2023-08-31 18:25:28 +03:00
await-ovo d4ee98f838 fix: remove unused logger.info (#7019)
close #7005
2023-08-31 18:24:45 +03:00
Zoltan Kochan a335032080 fix(publish): reduce concurrency in the publish command (#7020)
close #6968
2023-08-31 18:22:36 +03:00
Zoltan Kochan 9eddf19692 fix: extracting tarballs that have prefixes with spaces (#7013)
close #6991
2023-08-31 16:35:24 +03:00
Brandon Cheng 45b1684d1f test: fix ENOENT break on ci checks by using sha512 integrity in fixtures (#7015)
* test: use sha512 integrity in fixtures to fix ci break

* test: update snapshots for sha512 fixture change
2023-08-31 16:29:06 +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.

https://github.com/typescript-eslint/typescript-eslint/commit/c13ce0b4f7a74a6d8fecf78d25ebd8181f7a9119#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 TomlinsonandZoltan Kochan 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
Zoltan Kochan 6abd24ef05 chore(release): 8.7.0 v8.7.0 2023-08-26 21:15:19 +03:00
Zoltan Kochan cb8bcc8df1 feat: resolution-mode is highest by default (#6987)
close #6463
2023-08-26 18:28:50 +03:00
Zoltan Kochan c8a6ea8ae9 refactor: rename tarball-worker to worker 2023-08-26 17:26:21 +03:00
Zoltan Kochan e6353f964c perf: fetch directories to CAFS in worker (#6984) 2023-08-26 15:43:32 +03:00
Zoltan Kochan c1c5eb9aef test: don't use additional verdaccio 2023-08-25 23:55:30 +03:00
Zoltan Kochan 4c959b7122 test: do not finish the workers after each test run 2023-08-25 18:13:41 +03:00
Zoltan Kochan 667891991d test(cafs): fix on Windows 2023-08-25 15:07:05 +03:00
await-ovo 77e24d3415 fix(resolve-dependencies): dedupe deps with the same alias in direct dependencies (#6974)
close #6966
2023-08-25 13:06:45 +03:00
Zoltan Kochan 3fdaf9c60c chore(release): 8.7.0-2 2023-08-25 02:17:35 +03:00
Jacob LeyandZoltan Kochan d57e4de6dc feat(deploy): apply publishConfig to all packages during deploy (#6943)
When deploying packages, the package.json of the deployed package
(as well as any other locally defined dependencies)
should be treated as if it published, and mutate the package.json
according to `publishConfig` and local `workspace:` dependencies.

close #6693

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-08-25 02:13:29 +03:00
0fd9e6a6c4 fix(store): don't prematurely bail out of adding source files if ENOENT is thrown (#6932)
Broken symbolic links will cause a `stat'-call to throw resulting in an
arbitrary amount of promises that won't get to settle before the index is
returned.

Processing subdirectories in the following iteration in the event loop makes
this consistently reproducible.

---------

Co-authored-by: Martin Madsen <mj@blackbird.online>
Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-08-25 00:41:49 +03:00
Zoltan Kochan f2009d1756 perf: use a worker pool to link packages (#6950)
ref #6808
2023-08-24 20:05:53 +03:00
Zoltan Kochan ee7fbb0673 chore(release): default-reporter 2023-08-23 18:38:30 +03:00
Zoltan Kochan fe322b6781 feat(reporting): an option for hiding lifecycle output (#6979) 2023-08-22 21:34:10 +03:00
Nacho Aldama e0474bc4c3 fix: warn when linking a package with peerDeps (#6956)
close #615
2023-08-22 12:58:38 +03:00
Zoltan Kochan f432cb11ac fix: don't prefix output for dlx 2023-08-21 17:52:39 +03:00
Zoltan Kochan bc5d3ceda9 feat(reporting): an option to hide directory location 2023-08-21 17:52:39 +03:00
Zoltan Kochan f55c468dc0 chore: fix test-pkgs-main script 2023-08-20 00:35:41 +03:00
Zoltan Kochan 9584e5e86d fix(deps): update 2023-08-19 18:13:57 +03:00