chore: migrate package management from yarn to pnpm - #14
Open
JeevanMahesha wants to merge 1 commit into
Open
Conversation
Move the root workspace off yarn: replace yarn.lock with pnpm-lock.yaml, add pnpm-workspace.yaml, update package.json (packageManager/engines and script calls), husky hooks, and CI to use pnpm. Add shamefully-hoist to .npmrc to fix Angular/ng-packagr module resolution under pnpm's strict linking. docs/ subproject is untouched — it was already on pnpm.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Migrates the root workspace off Yarn and onto pnpm for consistency with the
docs/subproject, which was already on pnpm. Specifically:yarn.lockwithpnpm-lock.yaml(viapnpm importto preserve resolved versions)pnpm-workspace.yaml(packages: - 'projects/*'), replacing theworkspacesfield inpackage.jsonwhich pnpm doesn't readonlyBuiltDependenciestopnpm-workspace.yamlso native postinstall scripts (esbuild, @parcel/watcher, lmdb, etc.) aren't silently skippedpackage.json: addedpackageManager/pnpmengine fields, swapped internalyarn ...script calls forpnpm ....npmrcwithshamefully-hoist=true— required, not cosmetic: without it, the builtdist/spectator/jestanddist/spectator/vitestentry points fail to resolve@testing-library/domand@jest/globalstypes, since pnpm's strict linking doesn't hoist transitive deps to rootnode_modulesthe way Yarn classic did.husky/commit-msgand.husky/pre-committo callpnpm.github/workflows/ci.yml: addedpnpm/action-setup, switched the cache key topnpm-lock.yaml, swapped allyarnrun commands forpnpmREADME.mdinstall instructions and.gitignoredocs/is untouched — it already had its ownpnpm-lock.yaml/pnpm-workspace.yamland remains a fully independent pnpm project;deploy-docs.ymlneeded no changes.Related issues
Fixes #
Type of change
Breaking changes
None — public API and published package are unaffected. Local contributors must have pnpm installed (
corepack enableornpm i -g pnpm) and should delete their oldnode_modulesbefore runningpnpm install.Test plan
pnpm build— full ng-packagr build across all entry points (@openng/spectator,internals,jest,vitest), schematics build/copy, docs copy; verifieddist/spectatorcontains expected outputpnpm test:ci— Karma/Jasmine (326/326), Jest (242/242), Vitest (212/212) all passingpnpm lint— 0 errors (pre-existing unrelated warnings only)pnpm test:types— passes against built dist output.husky/pre-commitand.husky/commit-msgexecute correctly under pnpmdocs/subproject is fully untouched (git diff --stat -- docsempty)Checklist
Additional context
Contributors will need to switch from
yarntopnpmlocally (pnpm@10.33.1, pinned viapackageManager). No dependency versions changed — this is a tooling-only migration.