Migrate theme-tools to pnpm#1208
Open
graygilmore wants to merge 2 commits into
Open
Conversation
`dev up` now rejects yarn projects under minimum dependency age protection, so theme-tools needs to use a supported package manager. Switch the dev environment, package manager metadata, workspace config, and lockfile to pnpm. pnpm also stops relying on yarn's broad hoisting, so make the packages that were imported directly explicit in the relevant workspaces. Update local scripts, CI, release jobs, and VS Code tasks to invoke pnpm while leaving the admin linking scripts on yarn for a follow-up commit.
6ec420e to
79a3dcc
Compare
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.
Summary
Migrates theme-tools from Yarn to pnpm so
dev upcan run again with minimum dependency age enforcement enabled.This updates the dev environment, package manager metadata, workspace config, lockfile, package scripts, CI/release workflows, VS Code tasks, and the public setup docs.
Why
dev upnow blocks Yarn projects because the supply-chain protection we use for JavaScript dependencies does not support Yarn. pnpm is supported, so this moves the repo onto pnpm instead of opting out of that protection.A few non-obvious changes
Most of this is mechanical
yarn->pnpm, but a few things are worth calling out:node_modules. A few dependencies are now declared where they were already imported directly.pnpm.onlyBuiltDependenciesis pnpm's allowlist for dependency install scripts. This keeps the list small and explicit instead of making every developer or CI runpnpm approve-buildsinteractively.pnpm/action-setupbeforeactions/setup-node.setup-noderuns pnpm while restoring the pnpm cache, socorepack enablein a later step was too late and caused CI to fail before install started.--workspace-concurrency=1because a few packages expect generated files from earlier packages. This keeps the old build order behavior rather than racing those generated files.node_modules/prettier2ornode_modules/prettier3paths. pnpm stores package aliases differently, so the old paths were too specific to Yarn.es2022because the codebase already usesArray.prototype.at. The language server common package also includes browser globals because it uses things likeURL, timers, andconsole.syntaxessubmodule install uses--ignore-workspaceso pnpm treats it as its own package instead of trying to fold it into the root workspace.I intentionally left
scripts/dev-admin-build.shandscripts/dev-admin-init.shon Yarn. Those need a separate pass because the linking behavior is a little more involved than a straight command swap.Testing
dev uppnpm install --frozen-lockfile --config.confirmModulesPurge=falsepnpm buildpnpm test --runyamldependencygit diff --checkI did not run branch-scoped
dev test -i/dev style -i/dev check -ibecause this repo does not define those project commands indev.yml; the pnpm scripts above are the relevant checks here.🎩 Tophatting
dev upfrom the repo root.pnpm install --frozen-lockfile.pnpm buildandpnpm test --run.