`pnpm update` gains a `--changeset` flag, an `update.changeset` default in pnpm-workspace.yaml, and a `--no-changeset` override. After the update, both the TypeScript CLI and pacquet write one .changeset/pnpm-update-<suffix>.md declaring a release for every workspace package whose published dependency contract changed. Rationale: the scheduled-update pnpm/update action generates changesets by git-diffing package.json files, which cannot see catalog-driven updates -- when `pnpm update` bumps a catalog entry in pnpm-workspace.yaml, the consuming manifests only say `catalog:` and never change. Only pnpm can map a changed catalog entry to its consumers, so the generation lives here. Semantics: - changed dependencies / optionalDependencies specs -> patch; - changed peerDependencies specs -> major (they can invalidate consumers); - changed catalog specs are attributed to every production or peer consumer, including packages outside the --filter selection; - resolution-only and devDependencies-only movement produces nothing; - private, unnamed, and changeset-config-ignored packages are skipped; - missing .changeset/config.json warns and skips; malformed config fails with a stable ERR_PNPM_INVALID_CHANGESET_CONFIG error; a symlinked .changeset directory is refused and generated files use exclusive creation. Design notes: - Both engines snapshot dependency specs and workspace catalogs before their shared update pipeline and diff the on-disk state afterward, rather than plumbing updatedCatalogs out of the installer -- the disk diff covers the single-project, recursive, and pacquet-delegated paths without changing any return contract, and structurally cannot observe resolution-only changes, so the specs-only rule holds by construction. - The default is exposed as update.changeset on the canonical `update` section (#13197); the never-released updateConfig.changeset spelling needs no back-compat alias. It resolves onto the internal updateConfig.changeset the command reads.
846 B
846 B
@pnpm/installing.commands, pacquet, pnpm
| @pnpm/installing.commands | pacquet | pnpm |
|---|---|---|
| minor | minor | minor |
Added a --changeset flag to pnpm update. Set update.changeset to true in pnpm-workspace.yaml to enable this behavior by default, and use --no-changeset to override the setting for one update. After the update completes, pnpm writes a .changeset/pnpm-update-<suffix>.md file declaring a patch bump for every workspace package whose dependencies or optionalDependencies were changed by the update and a major bump when peerDependencies changed, including packages that consume an updated catalog entry via the catalog: protocol. Private packages, packages without a name, and packages listed in the ignore array of .changeset/config.json are skipped. If .changeset/config.json does not exist, a warning is printed and no changeset is generated.