




pnpm 11.26 brings the JavaScript CLI level with what pnpm 12 gained over the
past two weeks: workspace: ranges in catalogs, the supply-chain flags on
remove and update, pnpm change check for CI, and pnpm deploy without
injected dependencies.
workspace: rangeA catalog entry may now be a
workspace: range, so the version a workspace dependency is linked by lives in
pnpm-workspace.yaml with every other version:
pnpm-workspace.yaml
catalog:
'@example/utils': workspace:^
Both protocols are replaced on publish.
remove and updatepnpm remove and
pnpm update accept
--trust-lockfile, --no-trust-lockfile, --trust-policy,
--trust-policy-exclude, and --trust-policy-ignore-after. pnpm remove
checks the whole lockfile against the active policies unless --trust-lockfile
is set, because removing a package rewrites it.
pnpm change checkpnpm change check validates the versions already
committed in the workspace against the versioning.epics bands and
versioning.fixed groups, without reading any change intent. That makes it the
step to run on every pull request: a version that drifted out of its band is
caught where it was introduced rather than at release time, and every violation
is listed at once.
pnpm deploy without injected dependenciespnpm deploy no longer requires injectWorkspacePackages. Where
a workspace dependency's peer has more than one possible version in the deployed
graph the binding is ambiguous, and the deploy fails with
ERR_PNPM_DEPLOY_AMBIGUOUS_PEER naming the conflicting versions. Pin the peer
with overrides to deploy without injection
(#9386).
pnpm add --allow-build=!<pkg> now denies a build rather than dropping the
decision, global installs included. Previously pnpm add -g left the package
undecided, so the post-install prompt offered the very build you had just
rejected.
pnpm approve-builds <pkg> and
pnpm approve-builds !<pkg> also save a decision when nothing is awaiting
approval, warning about a package that is not awaiting one instead of erroring
out (#14067).
pnpm audit excludes ignored advisories from the vulnerability totals and
severity counts, and reports them separately
(#14535). --fix works without a
value and when another flag follows it, and --fix=override respects
saveExact and savePrefix
(#13261,
#11523).pnpm install accepts a symlinked lockfile again when config dependencies are
unchanged, the arrangement Bazel and Nix use. Writes through a symlinked
lockfile stay blocked, and a lockfile with a byte order mark survives a config
dependency update (#14372).pnpm install relinks workspace packages when publishConfig.linkDirectory
changes; a frozen install asks for the lockfile to be regenerated
(#14488).pnpm install --node-linker=hoisted no longer downloads skipped optional
dependencies when node_modules already exists
(#14139).pnpm self-update, pnpm with, and automatic version switching no longer
wait through registry retries when a configured registry has no signatures and
registry.npmjs.org is unavailable
(#14483).nodeDownloadMirrors carry the URL-scoped npm
credentials, bearer tokens, basic auth, and tokenHelper included
(#14334).scriptShell paths resolve from the workspace root; a bare command
name such as bash still goes through PATH
(#14422).shellEmulator preserves trailing
backslashes, line breaks, and literal shell expressions
(#14548).pnpm import preserves the project-local lockfile when lockfileDir points
elsewhere, and restores the destination lockfile on failure
(#14563).catalogMode and --save-catalog no longer move local paths, tarballs, or
workspace:<path> specifiers into catalogs
(#14437).--side-effects-cache, --no-side-effects-cache, and
PNPM_CONFIG_SIDE_EFFECTS_CACHE toggle only the local cache, leaving a remote
cache configured in sideEffectsCache in place.pnpm unpublish handles a registry's two-factor challenge through web
authentication or a one-time password prompt
(#14464).pnpm outdated and pnpm update follow GitHub Actions referenced with the
self-repository syntax, uses: $/.github/actions/setup.pnpm remove accepts --unsafe-perm.For the complete list of changes, see the v11.26.0 release notes.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。