chore: migrate to pnpm + changesets release flow#511
Merged
Conversation
Mirrors the modern setup of gl-transition-libs: - Replace Yarn 4 with pnpm 10 (pnpm-workspace.yaml, packageManager, resolutions -> pnpm.overrides, preinstall guard now requires pnpm) - Internal workspace deps now use the workspace:^ protocol (replaced with real versions at publish time). Note: the cookbook packages previously resolved gl-react ^5.2.x from the registry; they now use the local workspace packages. - Add @changesets/cli + .changeset/config.json (private packages ignored). Releases now flow through a "Version Packages" PR with auto-generated changelogs. - Rewrite publish.yml as the changesets Release workflow (build + test gate, then changesets/action publishes via npm trusted publishing). Filename kept as publish.yml because the npm trusted publisher config is bound to it. - Convert all CI workflows to pnpm; drop the cookbook-expo double install and NODE_PATH hack - Delete scripts/release.sh (replaced by changesets), update docs Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Migrates the gl-react monorepo from Yarn workspaces to pnpm workspaces and switches the npm publishing flow from a manual script/tag trigger to a Changesets-driven “Version Packages” PR + publish-on-merge workflow.
Changes:
- Replace Yarn-based workspace/dev commands with pnpm equivalents and add
pnpm-workspace.yaml. - Introduce Changesets configuration and update the publish workflow to create/update a version PR or publish via trusted publishing.
- Convert internal deps in packages and cookbooks to
workspace:^and remove the legacyscripts/release.sh.
Reviewed changes
Copilot reviewed 25 out of 27 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/release.sh | Removes the legacy manual release/tag script. |
| README.md | Updates cookbook run instructions to pnpm. |
| pnpm-workspace.yaml | Adds pnpm workspace definition and build dependency allowlist. |
| packages/tests/package.json | Switches internal deps to workspace:^ for local resolution. |
| packages/gl-react-native/package.json | Switches internal deps to workspace:^. |
| packages/gl-react-headless/package.json | Switches internal deps to workspace:^. |
| packages/gl-react-expo/package.json | Switches internal deps to workspace:^. |
| packages/gl-react-dom/package.json | Switches internal deps to workspace:^. |
| packages/cookbook/package.json | Switches cookbook deps to workspace packages and reformats JSON. |
| packages/cookbook-expo/package.json | Switches Expo cookbook deps to workspace packages. |
| packages/cookbook-expo-camera/package.json | Switches Expo camera cookbook deps to workspace packages. |
| package.json | Sets pnpm as package manager, updates scripts, and moves resolutions to pnpm overrides. |
| CONTRIBUTING.md | Updates contributor commands from Yarn to pnpm. |
| CLAUDE.md | Updates repo/tooling guidance to pnpm + documents Changesets release flow. |
| .yarnrc.yml | Removes Yarn config. |
| .github/workflows/publish.yml | Replaces tag-based publish with Changesets release workflow on master. |
| .github/workflows/deploy-cookbook.yml | Migrates cookbook deploy workflow to pnpm. |
| .github/workflows/ci-tests.yml | Migrates test CI workflow to pnpm. |
| .github/workflows/ci-cookbook.yml | Migrates cookbook CI workflow to pnpm. |
| .github/workflows/ci-cookbook-expo.yml | Migrates Expo cookbook CI workflow to pnpm and simplifies install/bundling. |
| .changeset/six-birds-own.md | Adds an empty changeset to record non-release infra change. |
| .changeset/README.md | Adds Changesets generated README. |
| .changeset/config.json | Adds Changesets config (independent versioning, ignored private packages). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "license": "MIT", | ||
| "scripts": { | ||
| "preinstall": "node -e \"if (process.env.npm_execpath.indexOf('yarn') === -1) { console.log('\u001b[31mPlease use yarn\u001b[0m'); process.exit(1); }\"", | ||
| "preinstall": "node -e \"if (process.env.npm_execpath.indexOf('pnpm') === -1) { console.log('\u001b[31mPlease use pnpm\u001b[0m'); process.exit(1); }\"", |
Comment on lines
+14
to
+17
| pnpm install # Install dependencies | ||
| pnpm build # Babel-compile all packages to lib/ + generate .d.ts | ||
| pnpm typecheck # Run TypeScript type checking (tsc --noEmit) | ||
| pnpm watch # Watch mode for development |
Comment on lines
7
to
+8
| * **Node 6**+ | ||
| * [yarn](https://yarnpkg.com) | ||
| * [pnpm](https://pnpm.io) |
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 the monorepo from Yarn 4 → pnpm 10 and replaces the manual
scripts/release.sh+ tag-push flow with changesets, mirroring the setup of gl-transition-libs: pushes to master open/update an automated "Version Packages" PR with generated changelogs, and merging that PR publishes to npm.pnpm migration
pnpm-workspace.yaml(packages/*,onlyBuiltDependencies: gl, esbuild),packageManager: pnpm@10.34.3resolutions→pnpm.overrides(same 8 entries), preinstall guard now requires pnpmworkspace:^(changesets rewrites them to real versions at publish).cookbook,cookbook-expo,cookbook-expo-camerapreviously resolvedgl-react@^5.2.xfrom the registry; they now consume the local workspace packages (v6), which is what the cookbooks should demo anyway.pnpm/action-setup@v4+ setup-node pnpm cache); cookbook-expo's double install andNODE_PATHhack removedchangesets
@changesets/cli+.changeset/config.json—access: public, private packages (gl-react-cookbook*,gl-react-tests) ignored, independent versioning withupdateInternalDependencies: patch(lockstep can be opted into later via thefixedfield if preferred)publish.ymlrewritten as the Release workflow: on push to master it builds + runs the test suite, thenchangesets/actioneither maintains the Version Packages PR or runspnpm changeset publish(npm trusted publishing via OIDC, npm 11)publish.yml: npm trusted publisher config is bound to repo + workflow filename, and v6.0.0 published through it — renaming would break publishing until the 5 packages are reconfigured on npmjs.comscripts/release.shdeleted; CLAUDE.md / CONTRIBUTING.md / README.md updatedFor
changesets/actionto open the Version Packages PR, enable Settings → Actions → General → "Allow GitHub Actions to create and approve pull requests" (unless already on).Verification (local, macOS)
pnpm installclean;glnative module builds and creates a GL context (onlyBuiltDependenciesworking)pnpm build: all 5 packages compile ✅pnpm test: 40/40 tests, 3/3 snapshots ✅pnpm exec vite buildin cookbook (deploy path) ✅pnpm changeset statuscorrectly detects changed packages ✅examples/next-jsuntouched (standalone, keeps its own Yarn 1 lockfile)🤖 Generated with Claude Code