Migrate from Yarn to pnpm#469
Merged
kieran-osgood-shopify merged 2 commits intomainfrom May 1, 2026
Merged
Conversation
eec4f26 to
2884c8b
Compare
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
2884c8b to
675ccbe
Compare
675ccbe to
4dc92ca
Compare
4dc92ca to
81ff3f7
Compare
This was referenced Apr 27, 2026
d90511c to
54ab9ff
Compare
81ff3f7 to
46c8b4f
Compare
Converts the repo from Yarn v4 (.yarnrc.yml) to pnpm 10.28.0. Lockfile was imported via `pnpm import` to preserve resolved versions, then re-resolved to sync with each package.json. Changes: - Replace yarn.lock with pnpm-lock.yaml; drop .yarnrc.yml and .yarn/. - Add pnpm-workspace.yaml (replaces root package.json#workspaces). - Add "packageManager": "pnpm@10.28.0" to root package.json. - Add pnpm.onlyBuiltDependencies for unrs-resolver so its postinstall runs (pnpm ignores build scripts by default). - Add .npmrc with `node-linker=hoisted` to preserve the flat node_modules layout React Native / Metro / CocoaPods / Gradle expect (mirrors the old .yarnrc.yml `nodeLinker: node-modules`), plus `frozen-lockfile=true`. - sample package.json: `@shopify/checkout-sheet-kit` now uses `workspace:*` instead of `link:../modules/...` (the pnpm-native equivalent). - Rewrite root scripts: `yarn workspace <name>` -> `pnpm --filter <name>`. - Swap `yarn` for `pnpm` across dev.yml, setup action, scripts, and CONTRIBUTING.md. README keeps yarn/npm install hints for end users installing the published package. - dev.yml: node task uses `package_manager: pnpm@10.28.0` instead of `yarn: 1.22.22`. - Setup action: drop the custom yarn cache, add `pnpm/action-setup` and use `cache: pnpm` on setup-node. Drop the `npm install -g npm@11` workaround since pnpm handles it. - Cocoapods cache key now hashes pnpm-lock.yaml. Workflow file changes (ci.yml, publish.yml) are excluded from this commit because the GitHub App doesn't have the `workflows` permission on this repo. See the PR body for a patch to apply. Requested by Kieran Osgood <kieran.osgood@shopify.com>
54ab9ff to
449ef2e
Compare
46c8b4f to
05a1ef1
Compare
05a1ef1 to
afe41c0
Compare
Address feedback: make package.json the single source of truth for node and pnpm versions where possible, and bump pnpm to the latest release. - package.json: bump `packageManager` to `pnpm@10.33.1` (pinned with the upstream sha512 integrity hash so corepack/pnpm verify the binary). - package.json: tighten `engines.node` from `>=22` to `22.14.0` so dev's built-in node-version validator catches any drift against dev.yml on every `dev up`. - dev.yml: bump to `package_manager: pnpm@10.33.1` and add a comment noting the versions must stay in lockstep with package.json. - .github/actions/setup: read node from `engines.node` via `node-version-file: package.json`, and let `pnpm/action-setup` read the version from the `packageManager` field (drop the hardcoded `version: 10.28.0` and `node-version: 22.22.1`). dev.yml itself is plain YAML (no ERB/interpolation) and the node task requires an explicit `version:` + `package_manager:`, so full deduplication into a single literal isn't supported upstream. Every other pnpm-using zone in World mirrors the value. The setup we have here — package.json as SoT, dev's validator as the enforcer, CI reading directly from package.json — is the closest equivalent. Requested by Kieran Osgood <kieran.osgood@shopify.com>
afe41c0 to
64008fd
Compare
| }, | ||
| "engines": { | ||
| "node": ">=22" | ||
| "node": "22.14.0" |
Contributor
Author
There was a problem hiding this comment.
explicit version means dev.yml will enforce this version
markmur
approved these changes
May 1, 2026
Comment on lines
-26
to
-37
| - name: Cache dependencies | ||
| id: yarn-cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| **/node_modules | ||
| .yarn/install-state.gz | ||
| key: | ||
| ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
| ${{ runner.os }}-yarn- |
Contributor
There was a problem hiding this comment.
We already caching somewhere else?
Contributor
Author
There was a problem hiding this comment.
the setup node step has built in cache for pnpm
- name: Setup Node.js
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
with:
node-version-file: package.json
registry-url: 'https://registry.npmjs.org'
cache: pnpm
Contributor
|
Thank you for taking care of this 🙌 |
kiftio
approved these changes
May 1, 2026
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.

Converts the repo from Yarn v4 (.yarnrc.yml) to pnpm 10.28.0. Lockfile was imported via
pnpm importto preserve resolved versions, then re-resolved to sync with each package.json.Changes:
node-linker=hoistedto preserve the flat node_modules layout React Native / Metro / CocoaPods / Gradle expect (mirrors the old .yarnrc.ymlnodeLinker: node-modules), plusfrozen-lockfile=true.@shopify/checkout-sheet-kitnow usesworkspace:*instead oflink:../modules/...(the pnpm-native equivalent).yarn workspace <name>->pnpm --filter <name>.yarnforpnpmacross dev.yml, setup action, scripts, and CONTRIBUTING.md. README keeps yarn/npm install hints for end users installing the published package.package_manager: pnpm@10.28.0instead ofyarn: 1.22.22.pnpm/action-setupand usecache: pnpmon setup-node. Drop thenpm install -g npm@11workaround since pnpm handles it.Workflow file changes (ci.yml, publish.yml) are excluded from this commit because the GitHub App doesn't have the
workflowspermission on this repo. See the PR body for a patch to apply.Requested by Kieran Osgood kieran.osgood@shopify.com
What changes are you making?
PR Checklist
Important
Releasing a new version of the kit?
package.jsonfile.Tip
See the Contributing documentation for instructions on how to publish a new version of the library.