Skip to content

chore: migrate from Yarn Classic to pnpm - #627

Open
akudev wants to merge 1 commit into
mainfrom
migrate-to-pnpm
Open

akudev wants to merge 1 commit into
mainfrom
migrate-to-pnpm

Conversation

@akudev

@akudev akudev commented Sep 17, 2026

Copy link
Copy Markdown
Member

Replace Yarn 1.x with pnpm 10 as the workspace package manager.

  • Add pnpm-workspace.yaml and .npmrc (frozen-lockfile, save-exact, registry pin, shamefully-hoist)
  • Add packageManager field for Corepack support
  • Update CI workflows with pnpm/action-setup and dependency caching
  • Convert workspace cross-reference from link: to workspace: protocol
  • Drop lockfile-lint (pnpm lockfile not vulnerable to URL injection; .npmrc registry pin provides equivalent protection)
  • Replace npm-run-all in root ci script with plain && chain (npm-run-all2 v5+ delegates to pnpm which chokes on the commitizen config block in package.json)
  • Add pnpmDedupe to Renovate postUpdateOptions
  • Update documentation

@akudev
akudev force-pushed the migrate-to-pnpm branch 3 times, most recently from bf366a1 to 181d2f9 Compare September 18, 2026 08:03
@akudev

akudev commented Sep 18, 2026

Copy link
Copy Markdown
Member Author

pnpm 12 adaptations:

  • packageManager: pnpm@12.4.1 (not 10.x)
  • .npmrc: now only has registry= (auth/registry only, per pnpm 12 convention)
  • pnpm-workspace.yaml: now carries frozenLockfile, saveExact, minimumReleaseAge, and allowBuilds (pnpm 12 moved settings out of .npmrc)
  • allowBuilds: new pnpm 12 feature — explicit approval for packages with build scripts (@parcel/watcher, ui5-tooling-transpile, unrs-resolver)
  • No shamefully-hoist: strict node_modules — the proper pnpm benefit

Phantom dependencies fixed (surfaced by strict mode):

  • test-packages/typed-json-model: added @eslint/js
  • packages/ts-interface-generator: added @eslint/js, @eslint/eslintrc

Pre-existing lint fix (not from migration):

  • packages/ts-interface-generator/src/interfaceGenerationHelper.ts: added { cause: e } to two throw new Error() calls to satisfy the preserve-caught-error ESLint rule

@codeworrior

Copy link
Copy Markdown
Member

@petermuessig added a ❤️ to "No shamefully-hoist: strict node_modules — the proper pnpm benefit"...

Replace Yarn 1.x with pnpm 10 as the workspace package manager.

- Add pnpm-workspace.yaml and .npmrc (frozen-lockfile, save-exact,
  registry pin, shamefully-hoist)
- Add packageManager field for Corepack support
- Update CI workflows with pnpm/action-setup and dependency caching
- Convert workspace cross-reference from link: to workspace: protocol
- Drop lockfile-lint (pnpm lockfile not vulnerable to URL injection;
  .npmrc registry pin provides equivalent protection)
- Replace npm-run-all in root ci script with plain && chain
  (npm-run-all2 v5+ delegates to pnpm which chokes on the commitizen
  config block in package.json)
- Add pnpmDedupe to Renovate postUpdateOptions
- Update documentation
@akudev

akudev commented Sep 18, 2026

Copy link
Copy Markdown
Member Author

Added a stricter trust policy - with exceptions as three libs don't reliably publish with provenance.

@codeworrior codeworrior left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, independent from the npm vs pnpm question.

@petermuessig petermuessig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants