Commit Graph

394 Commits

Author SHA1 Message Date
Zoltan Kochan
878ea8c43b feat!: use an allow list of built dependencies by default (#8897) 2024-12-24 14:06:50 +01:00
Zoltan Kochan
4771813309 feat: store ignored dependencies list in modules state file (#8903) 2024-12-24 03:01:35 +01:00
Zoltan Kochan
516c4b301b fix: improve how ignored lifecycle scripts are reported (#8899) 2024-12-22 21:22:06 +01:00
Zoltan Kochan
38eb97a8b3 chore(release): libs 2024-12-18 13:40:41 +01:00
Zoltan Kochan
3278c588cd chore(release): 10.0.0-rc.0 2024-12-16 02:31:45 +01:00
Zoltan Kochan
a76da0c53c feat!: remove conversion of lockfile v6 to v9 (#8866) 2024-12-15 14:39:19 +01:00
Zoltan Kochan
d47c4266db perf: faster repeat install (#8838) 2024-12-08 23:42:33 +01:00
Zoltan Kochan
3fe70e7897 refactor!: all lib versions should start with pnpm major version 2024-11-29 01:04:45 +01:00
Zoltan Kochan
9fcc7e808e chore(release): 10.0.0-beta.0 2024-11-28 12:35:01 +01:00
Zoltan Kochan
7d7c51ecd6 feat!: dlx should use exact versions of packages in the cache key (#8811)
close #8722
2024-11-27 09:04:42 +01:00
Zoltan Kochan
7997ed4ae2 fix: running install automatically before run (#8805) 2024-11-25 14:02:17 +01:00
Zoltan Kochan
39c53852ea fix: some commands should not fail if a different package manager is set in package.json (#8802)
close #7959
2024-11-25 10:13:23 +01:00
Zoltan Kochan
4dd27a894f feat: add an option to install dependencies before running scripts (#8781) 2024-11-25 09:02:12 +01:00
Zoltan Kochan
e200728e0b fix: parameters should be passed down to the executed script when running pnpm t (#8776) 2024-11-17 22:55:04 +01:00
btea
ef7c10221c fix: pnpm exec should specify command (#8774) 2024-11-17 17:07:32 +01:00
Khải
19d5b51558 feat(exec): check dependencies before running scripts (#8645)
* refactor: break a long line into multiple lines

* feat: cache that tracks workspace structures

* feat: handle hash collisions

* docs(changeset): packages-list-cache

* feat(packages-list-cache): store mtime

* fix(packages-list-cache): JSON5 and YAML manifests

* feat(packages-list-cache): add catalogs

* style: sort fields alphabetically

* fix: actually fix it

* lint: fix

* lint: fix

* test(packages-list-cache): test

* feat(exec): check deps before run scripts

Resolves https://github.com/pnpm/pnpm/issues/8585

* style: fix eslint

* feat: use a single lastValidatedTimestamp

* refactor: rearrange

* perf: don't do pointless comparisons

* perf: optimize non-workspace

* perf: optimize sharedWorkspaceLockfile=false

* perf: remove unnecessary fs reads

* refactor: statManifestFile

* perf: skip comparing manifest to lockfile by stats

* feat: add wantedLockfileDir to error message

* refactor: shorten a function name

* refactor: rename a function

* docs: improve wordings

* feat: export `linkedPackagesAreUpToDate`

* feat: make sure lockfile specs satisfy manifest (wip)

* docs: todo

* fix: projectId

* feat: skip install-related scripts

* fix: type errors

* refactor: use tagged union

* refactor: remove unnecessary type expression

* docs: todo

* feat: add linkedPackagesAreUpToDate (wip)

* refactor: rearrange fields

* refactor: remove a temporary variable

* feat: export `getWorkspacePackagesByDirectory`

* feat: make workspacePackages optional

* feat: complete `linkedPackagesAreUpToDate`

* docs: remove unapplicable todo

* docs: explain why check is skipped

* feat: load allProjects and try again

* refactor: remove unused dependencies

* refactor: remove commented-out code

* refactor: replace `else if` with `return`

* feat: use-case without workspace manifest

* perf: skip unnecessary work

* feat: add a guard

* fix: eslint

* refactor: move code to new package

* refactor: sort dependencies

* test: outline

* refactor: extract assertLockfilesEqual for testing

* test: skip failing tests for now

* fix: eslint

* test: assertLockfilesEqual

* refactor: extract statManifestFile for testing

* test: todo

* test: statManifestFile

* test: shouldRunCheck

* refactor: rename a test file

* test: add

* test: todo

* docs: remove a commented-out code

* test: create groups

* test: todo

* test: add

* test: platform agnostic

* test: remove unnecessary scripts

* test: use `assert.strictEqual` instead

* test: export bin locations

* test: nested `pnpm run`

* test: todo

* test: add `cwd` option to `execPnpmSync`

* test: add

* fix: recursive

* test: add

* test: fix package names

* fix: catalogs comparison

* test: add

* refactor: just use ramda filter

* test: add

* test: mutations

* fix: package.json

* fix: jest

* feat(packages-list): debug logs

* feat: add debug messages

* fix: eslint

* test: check debug messages in other case

* docs: add next step

* test: mtime updates without modification

* docs: correct test description

* test: mtime changes

* test: check should be skipped

* docs: remove fulfilled todos

* fix: remove `.only`

* docs: todo

* docs: correct test names

* test: workspace structure changes

* test: packages list cache

* test: add

* refactor: divide a test file into 2

* docs: consistent wordings

* refactor: clearer error messages

* fix: ignore check in recursive nested scripts

* test: no dependencies

* test: print error messages on failures

* test: improve stdout/stderr in error messages

* docs: consistent wordings

* docs: clarify what did what

* test: nested script

* docs: consistent test descriptions

* docs(changeset): correction

* fix: save catalogs to packages list

* test: catalogs

* test: fix

* test: fix windows

* refactor: remove unused option field

* refactor: prefer `!= null`

* feat: use `node_modules` instead

* refactor: rename a package

* refactor: apply suggestion

* refactor: remove workspaceDir

* refactor: move `shouldRunCheck` to `exec`

* feat: rename config key

* refactor: rename a test dir

* refactor: correct grammar

* refactor: make loadPackagesList sync

* test: multiple lockfiles

* feat: prevent deletion of `node_modules`

* feat: skip checking on filtered install

* fix: accidentally dropping catalogs

* refactor: remove unnecessary `Promise.all`

* refactor: use `virtualStoreDir` from config

* refactor: split `opts` into `ctx` and `opts`

* test: fix

* style: fix eslint

* test: fix windows

* feat(exec): add `verifyDepsBeforeRun` to `exec`

* refactor: sync stat

* feat: stop ignoring filtered install

* test: filtered install

* refactor: rearrange imports

* feat: rename "packages list" to "workspace state"

* test: fix

* fix: workspace state on failed install
2024-11-15 01:01:09 +01:00
Jonathan Hefner
8c3de19fc1 fix(dlx): ENOENT when symlink=false (#8732) (#8733)
Prior to this commit, if `symlink` was set to `false` (such as in an RC
file), `dlx` would throw `ENOENT` because it expected the
`node_modules/the-package` symlink to exist:

  ```console
  $ pnpm config get symlink
  false

  $ rm -rf ~/.cache/pnpm/

  $ pnpm dlx the-package
  Packages: +1
  +
  Progress: resolved 1, reused 1, downloaded 0, added 1, done
   ENOENT  ENOENT: no such file or directory, open '/home/${USER}/.cache/pnpm/dlx/.../
                                                    node_modules/the-package/package.json'
  ```

This commit filters the `symlink` option before installing the package,
allowing the symlink to be created, preventing the error.

Fixes #8732.
2024-11-06 10:43:35 +01:00
btea
934f1836f1 fix: script command regular parameters do not support the v flag (#8711) 2024-11-03 21:32:40 +01:00
Khải
f76ff6389b fix(dlx): race condition (#8712) 2024-10-29 12:15:00 +01:00
Zoltan Kochan
26a910cbf8 chore(release): 10.0.0-alpha.0 2024-10-28 04:16:49 +01:00
Zoltan Kochan
32613a05af Merge remote-tracking branch 'origin/main' into v10 2024-10-28 04:01:43 +01:00
Zoltan Kochan
0309365fda chore(release): 9.12.3 2024-10-28 03:11:09 +01:00
Zoltan Kochan
30b1fabd26 refactor: move store version to constants 2024-10-27 22:19:19 +01:00
Zoltan Kochan
298e5dcafd feat!: create a separate directory in the store for index files (#8700) 2024-10-27 21:00:28 +01:00
Zoltan Kochan
8108680794 refactor!: changed the format of the side-effects cache key (#8694) 2024-10-26 12:26:30 +02:00
Zoltan Kochan
790ce1e869 Merge branch 'main' into v10 2024-10-25 22:24:10 +02:00
Zoltan Kochan
1dd419cbb4 test: fix killing the registry mock server on teardown (#8695) 2024-10-25 21:24:08 +02:00
Zoltan Kochan
50c3aaf46f Merge branch 'main' into v10 2024-10-23 14:08:15 +02:00
Zoltan Kochan
744711c8b3 chore(release): 9.12.2 2024-10-16 16:09:10 +02:00
Zoltan Kochan
099e6af9e1 feat!: don't duplicate all file entries in the side effects section of the index file (#8636) 2024-10-14 11:01:23 +02:00
Zoltan Kochan
b33f153b36 Merge branch 'main' into v10 2024-10-12 03:21:03 +02:00
Zoltan Kochan
74c6dd3cca fix!: the test command should pass all args to the underlying script (#8619) 2024-10-09 01:36:00 +02:00
Zoltan Kochan
d994f5178b chore(release): 9.12.1 2024-10-07 15:08:25 +02:00
Zoltan Kochan
aae0808b35 Merge remote-tracking branch 'origin/main' into v10 2024-10-05 02:24:28 +02:00
Khải
fb77d4e2fa fix: prevent EBUSY caused by parallel dlx (#8604) 2024-10-04 04:06:58 +02:00
Zoltan Kochan
5da5e75e08 chore(release): 9.12.0 2024-10-02 12:19:20 +02:00
Khải
c43386031d refactor: break a long line into multiple lines (#8592) 2024-10-01 13:33:13 +02:00
btea
9797a1e889 refactor: remove useless parameters from the catch statement (#8583) 2024-09-29 12:08:48 +02:00
Khải
83681daf57 fix: install packages with incompatible libc (#8569)
close #7362
2024-09-27 22:46:16 +02:00
Khải
87a98af40e docs(exec): add more options to exec's help (#8564)
close #8520
2024-09-24 09:44:13 +02:00
Zoltan Kochan
e9985b6f21 feat!: default value of virtual-store-dir-max-length set to 60 on Windows (#8556) 2024-09-23 09:30:45 +02:00
Zoltan Kochan
b6206dd492 Merge remote-tracking branch 'origin/main' into v10 2024-09-22 13:43:06 +02:00
Zoltan Kochan
7f80c4f156 chore(release): 9.11.0 2024-09-20 12:21:07 +02:00
Zoltan Kochan
5284f9d8c0 Merge remote-tracking branch 'origin/main' into v10 2024-09-18 10:25:17 +02:00
Khải
24ad47cfb8 refactor: replace array.reduce (#8537) 2024-09-18 04:41:35 +02:00
Zoltan Kochan
0170b0faaf feat: add cache command (#8512) 2024-09-18 04:14:13 +02:00
Zoltan Kochan
f10256d088 feat!: use SHA256 for creating cache keys for dlx (#8531) 2024-09-16 02:36:06 +02:00
Zoltan Kochan
d433cb9c9f feat: adding the package name into the index file name (#8510)
close #8204
2024-09-15 18:26:28 +02:00
Zoltan Kochan
fe996fee1d chore(release): 9.10.0 2024-09-09 15:43:02 +02:00
Zoltan Kochan
db420ab592 refactor(cafs): create a separate function for creating index file path (#8508) 2024-09-08 14:43:09 +02:00