Zoltan Kochan
50fbecae7d
refactor(env): pnpm env use now delegates to pnpm add --global ( #10666 )
...
This PR overhauls `pnpm env` use to route through pnpm's own install machinery instead of maintaining a parallel code path with manual symlink/shim/hardlink logic.
```
pnpm env use -g <version>
```
now runs:
```
pnpm add --global node@runtime:<version>
```
via `@pnpm/exec.pnpm-cli-runner`. All manual symlink, hardlink, and cmd-shim code in `envUse.ts` is gone (~1000 lines removed across the package).
### Changes
**npm and npx shims on all platforms**
Added `getNodeBinsForCurrentOS(platform)` to `@pnpm/constants`, returning a `Record<string, string>` with the correct relative paths for `node`, `npm`, and `npx` inside a Node.js distribution. `BinaryResolution.bin` is widened from `string` to `string | Record<string, string>` in `@pnpm/resolver-base` and `@pnpm/lockfile.types`, so the node resolver can set all three entries and pnpm's bin-linker creates shims for each automatically.
**Windows npm/npx fix**
`addFilesFromDir` was skipping root-level `node_modules/` (to avoid storing a package's own dependencies), which stripped the bundled `npm` from Node.js Windows zip archives. Added an `includeNodeModules` option and enabled it from the binary fetcher so Windows distributions keep their full contents.
**Removed subcommands**
`pnpm env add` and `pnpm env remove` are removed. `pnpm env use` handles both installing and activating a version. `pnpm env list` now always lists remote versions (the `--remote` flag is no longer required, though it is kept for backwards compatibility).
**musl support**
On Alpine Linux and other musl-based systems, the musl variant of Node.js is automatically downloaded from [unofficial-builds.nodejs.org](https://unofficial-builds.nodejs.org ).
2026-02-22 12:06:34 +01:00
Zoltan Kochan
c55c6146d9
feat!: bump store version to v11 ( #10506 )
2026-01-24 21:36:39 +01:00
Zoltan Kochan
71de2b3f2b
feat!: remove use-node-version CLI option and pnpm.executionEnv.nodeVersion manifest field ( #10373 )
2025-12-27 22:41:53 +01:00
Khải
075aa993bb
feat(config): global yaml ( #10145 )
...
* feat(config): global `rc.yaml`
* fix: undefined `rawConfig`
* test: add a test
* feat: re-export `isSupportedNpmConfig`
* feat: return `'compat'` to distinguish compatibility reason
* docs: `isSupportedNpmConfig`
* fix: eslint
* docs: clarify the case of the config key
* feat(cli/config/set): target yaml for pnpm-specific settings
* fix: read the correct file
* fix: write to the correct directory
* refactor: remove disabled code
* refactor: get `configDir` directly
* docs: remove outdated documentation
* test: fix a test
* test: rename
* fix: explicitly tell npm the config file path
* test: add a test
* test: add a test
* test: fix a test
* fix: local config dir
* fix: `managingAuthSettings`
* test: rename
* test: fix
* test: add a test
* test: demonstrate choosing config files
* test: fix
* docs: yet another consideration
* test: demonstrate choosing config files
* fix: correct local config file names in test helper
* test: demonstrate choosing config files
* test: use the helper
* test: add a test
* test: correct a test
* test: fix
* test: fix
* fix: eslint
* test: remove duplicate
* feat: validate `rc.yaml`
* docs: changeset
* test: fix `configDelete.test.ts`
* feat: other `npm` call-sites
* fix: make optional again
* feat: remove the change from `publish`
* fix: eslint
* refactor: just one is sufficient
* refactor: replace type union with 3 functions
* refactor(test): extract helper functions
* fix: add `rc.yaml` to `rawConfig`
* test: keep workspace settings out of `rc.yaml`
* test: fix `spawn ENOENT`
* chore(git): revert invalid change
This reverts commit 1ff6fe2323 .
* feat: rename `rc.yaml` to `config.yaml`
* refactor: replace `acceptNonRc` with `!globalSettingsOnly`
* feat!: remove compat completely
* refactor: rename a function
* fix: no actual catalogs
* refactor: replace bool flag with preemptive filter
* feat!: filter global config keys
* test: fix
* fix: exclude `deploy-all-files`
* fix: reverse schema merge order
* feat(cli/config/set): validate global config yaml key
* test: remove duplicated assertion
* docs: correct
* docs: goal changed
2025-11-11 11:24:06 +01:00
Zoltan Kochan
6365bc4c3a
fix: location of full metadata cache ( #9967 )
...
close #9963
2025-09-13 19:00:56 +02:00
Zoltan Kochan
86b33e91ea
feat: support installing Bun runtime ( #9815 )
...
* feat: support installing Bun runtime
* feat: support installing Bun runtime
* fix: cache libc resolution
* refactor: shasum file fetching
* docs: add changesets
* feat: installing the right artifact
* test: supported architectures
* test: fix on Windows
2025-07-31 13:46:13 +02:00
Zoltan Kochan
d1edf732ad
feat: support installing Deno runtime ( #9791 )
...
* feat: support installing Deno runtime
* refactor: use npm registry to resolve deno version
* feat: wip
* feat: installing deno runtime
* style: fix
* test: fix
* test: deno
* test: fix
* feat: deno
* feat: deno
* feat: create zip fetcher
* style: fix
* refactor: node fetch
* feat: support a new binary fetcher
* test: fix
* feat: rename zip-fetcher to binary-fetcher
* refactor: change naming
* fix: windows
* refactor: rename packages
* refactor: deno resolver
* refactor: runtime resolvers
* refactor: binary fetcher
* refactor: runtime resolvers
* refactor: runtime resolvers
* refactor: create SingleResolution
* refactor: remove not needed change
* refactor: package requester
* docs: add changesets
* refactor: use VariationsResolution and AtomicResolution
* refactor: implement CR suggestions
* docs: add changesets
* fix: address comment in CR
* feat: update formatting of pnpm-lock.yaml
2025-07-30 11:27:07 +02:00
Zoltan Kochan
1a07b8fc7c
feat: install Node.js runtime as a dependency ( #9755 )
2025-07-19 15:11:40 +02:00
Khải
9a44e6ce87
fix(deploy): inherit pnpm from the root manifest ( #8991 )
...
* fix(deploy): inherit `pnpm` from the root manifest
* fix: eslint
* refactor: share code
* test: add
* fix: eslint
* fix: remove duplicate dep from package.json
2025-01-26 17:26:16 +01:00
Zoltan Kochan
fb9e3b4ee0
feat!: drop lockfile v6 support
2024-12-15 15:38:20 +01:00
Zoltan Kochan
d2e83b0f3e
feat: bump metadata cache version
2024-12-01 10:40:09 +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
Zoltan Kochan
c4f5231761
feat!: bump store version to v10 ( #8709 )
2024-10-28 03:54:58 +01:00
Zoltan Kochan
30b1fabd26
refactor: move store version to constants
2024-10-27 22:19:19 +01:00
Zoltan Kochan
8108680794
refactor!: changed the format of the side-effects cache key ( #8694 )
2024-10-26 12:26:30 +02:00
Khải
83681daf57
fix: install packages with incompatible libc ( #8569 )
...
close #7362
2024-09-27 22:46:16 +02:00
Zoltan Kochan
0170b0faaf
feat: add cache command ( #8512 )
2024-09-18 04:14:13 +02:00
Zoltan Kochan
501133d30b
refactor: bump lockfile version to v9 instead of v7 ( #7861 )
...
In order to align the lockfile version with pnpm version that ships it.
2024-04-06 17:12:37 +02:00
Zoltan Kochan
7db98cae0f
feat!: bump lockfile to v7 ( #7666 )
2024-02-17 12:57:58 +01:00
Zoltan Kochan
c692f802f4
feat!: bump lockfile to v6.1 ( #7643 )
2024-02-13 01:41:51 +01:00
Zoltan Kochan
d381a6001c
feat!: use dependency path format from lockfile v6 ( #7470 )
...
Drop lockfile v5 support.
2024-01-08 11:57:44 +01:00
Zoltan Kochan
302ebffc54
fix: downgrade lockfile version to 6.0 ( #6664 )
...
close #6648
2023-06-11 21:31: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
3ebce5db7a
feat!: lockfile format v6 ( #5810 )
2023-01-09 14:37:05 +02:00
Zoltan Kochan
1267e4eff4
feat: lockfile version bumped to v5.4
2022-04-14 22:45:05 +03:00
Zoltan Kochan
6871d74b2b
feat: track transitive peer dependencies in the lockfile ( #3186 )
2021-02-25 21:24:22 +02:00
Zoltan Kochan
f2bb5cbeba
feat: reduce directory nesting in virtual store directory ( #3117 )
...
ref #3115
2021-02-04 02:18:09 +02:00
Zoltan Kochan
fcdad632f0
fix: recursive peer dependency
...
ref #2919
PR #2926
2020-10-19 02:40:31 +03:00
Zoltan Kochan
2d8bd5c538
Revert "fix: recursive peer dependency"
...
This reverts commit 93177dfef2 .
2020-10-15 01:23:07 +03:00
Zoltan Kochan
93177dfef2
fix: recursive peer dependency
...
ref #2919
PR #2926
2020-10-14 16:26:27 +03:00
Zoltan Kochan
4f5801b1c0
fix!: change lockfile version to 5.1
...
Two avoid unnecessary updates, the lockfile
version will remain 5.1 in pnpm v5.
2020-05-22 01:44:14 +03:00
Zoltan Kochan
ca9f50844f
feat: bump lockfile version to 5.2
2020-05-16 20:22:51 +03:00
Zoltan Kochan
b5f66c0f2b
perf: less dirs in the virtual store directory
...
Reduce the number of directories in the virtual store directory.
Don't create a subdirectory for the package version. Append the
package version to the package name directory.
close #2521
PR #2531
2020-05-06 02:15:55 +03:00
Zoltan Kochan
35a702c6e0
feat: configurable virtual store directory
...
New config setting: virtual-store-dir
Breaking changes in: @pnpm/lockfile-file, @pnpm/constants
close #2078
PR #2091
2019-10-19 03:18:41 +03:00
Zoltan Kochan
03f745ff98
feat: .pnpm/pnpm-lock.yaml=>.pnpm/lock.yaml
...
ref #2018
2019-09-21 20:13:36 +03:00
Zoltan Kochan
187a0186b0
feat: move .pnpm-lock.yaml to .pnpm/pnpm-lock.yaml
...
PR #2018
BREAKING CHANGE:
node_modules/.pnpm-lock.yaml => node_modules/.pnpm/pnpm-lock.yaml
2019-09-21 00:10:49 +03:00
Zoltan Kochan
febfb746fe
feat: bump node_modules layout version to 3
...
PR #2003
BREAKING CHANGE: new node_modules layout
2019-09-09 14:21:45 +03:00
Zoltan Kochan
ac684d0e14
feat: upgrade lockfile version to 5.1
2019-06-08 16:12:03 +03:00
Zoltan Kochan
a60030fa8f
feat: bump the node_modules layout version
2019-03-07 17:00:26 +02:00
Zoltan Kochan
5489e8c4e1
refactor: rename shrinkwrap variables
2019-03-07 02:47:59 +02:00
Zoltan Kochan
5fdfd13bbb
refactor: rename constants that contain the work SHRINKWRAP
2019-03-06 23:13:51 +02:00
Zoltan Kochan
856536bb0f
feat: rename lockfile from shrinkwrap.yaml to pnpm-lock.yaml
...
BREAKING CHANGE: new lockfile name
close #1635
2019-03-04 02:48:02 +02:00
Zoltan Kochan
41b6f6b82c
refactor: create @pnpm/constants
2019-03-02 18:02:04 +02:00