* fix(installation): skip pnpm exe when no Node.js is on PATH
When pnpm is installed as @pnpm/exe (a Single Executable Application
that bundles Node.js into the pnpm binary) and the user has no separate
Node.js on PATH, `which('node')` fails and `getNodeExecPath` used to
fall back to `process.execPath` - which in @pnpm/exe is the pnpm binary
itself, not a Node binary. That path got baked into generated global
bin shims via nodeExecPath, so running any globally-installed CLI
invoked pnpm with the target script as its first positional arg,
producing `ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND` from the current
working directory.
Detect the @pnpm/exe case via `detectIfCurrentPkgIsExecutable` and
return undefined from the fallback so the shim emits a plain
`exec node <target>` instead.
Closes#11291
Refs #4645
* Update pkg-manager/plugin-commands-installation/src/nodeExecPath.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
When enabled, peer dependency suffixes use version-only identifiers
(name@version) instead of full dep paths, eliminating nested suffixes
like (foo@1.0.0(bar@2.0.0)). Transitive peers are still tracked but
identified by version instead of full dep path.
Backport of #11071 to v10.
Closes#11070
When CI=true, pnpm automatically enables frozen-lockfile mode. Previously,
this could only be overridden via .npmrc files or CLI flags because the
code checked rawLocalConfig (which excludes env vars and hook changes).
Now checks the fully resolved config values (frozenLockfile and
preferFrozenLockfile) instead of rawLocalConfig, allowing:
- Environment variables (pnpm_config_frozen_lockfile=false)
- updateConfig hook in .pnpmfile.cjs
- .npmrc files (already worked)
- CLI flags (already worked)
Fixes#9861
This fixes an issue where pnpm fetch would fail in Docker builds when
local directory dependencies (file: protocol) were not available.
The fix adds an ignoreLocalPackages option that is passed from the fetch
command to skip local dependencies during graph building, since pnpm
fetch only downloads packages from the registry and doesn't need local
packages that won't be available in Docker builds.
close#10460
This is an addition to https://github.com/pnpm/pnpm/pull/8190. The global virtual store isn't a good choice for CI. So, we disable it even if the setting sets `enableGlobalVirtualStore` to `true`.
* feat: add new `catalogMode` setting
Add new `catalogMode` setting for automatically adding new dependencies to
the default catalog.
Closes pnpm#8876, Closes pnpm#8308
* fix: catalogs don't only store semver ranges and versions
---------
Co-authored-by: Zoltan Kochan <z@kochan.io>
* refactor: set the default `workspaceConcurrency` to `Math.min(os.availableParallelism(), 4)`
* feat(plugin-commands-publishing): add `workspace-concurrency` cli option for pack and publish
* feat(recursive): add support for `recursive pack`
* feat: get default workspaceConcurrency from config package
* test(config): mock cpus to support Node.js 18
* test: add catalog test for --filter and dedupe-peer-dependents=false
* fix: disable dedupe-injected-deps when deploying
* fix: catalog snapshots removed with dedupe-peer-dependents=false
* fix: reference root manifest directory instead of the dependent dir
This fixes https://github.com/pnpm/pnpm/issues/9066.
* refactor: link test
* docs: add changeset
---------
Co-authored-by: Zoltan Kochan <z@kochan.io>