chore(repo): migrate from npm + semantic-release to pnpm + Changesets#94
Conversation
Replaces npm workspaces with pnpm workspaces and semantic-release with Changesets. Cross-package dependencies now use the workspace:^ protocol so dependent packages develop against local source instead of stale published versions. Single main branch is now the source of truth for releases; the next branch is dropped. Each package.json version is seeded to the currently-published value (storage 3.4.0, iam 2.1.1, agent-kit 0.1.3, keyv-tigris 1.1.3, react 1.2.3) so Changesets bumps from real history. Existing @tigrisdata/<pkg>@<version> tags are preserved unchanged. Release workflow uses changesets/action with GitHub OIDC trusted publishing (no NPM_TOKEN) and provenance enabled. Assisted-by: Claude Opus 4.7 (1M context) via Claude Code Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryMigrates the monorepo from npm workspaces + semantic-release to pnpm workspaces + Changesets, updating CI workflows, Husky hooks, and developer docs to match. All five packages have their versions seeded to currently-published values and their cross-package deps switched to
Confidence Score: 3/5The core migration is structurally sound, but the release workflow has two gaps that could silently break on the first real publish, and the PR check gate will block every infrastructure contributor who forgets to add a changeset. The workflow files carry two gaps that are only exercised at publish or CI time: the
Important Files Changed
|
… pnpm shared/ imports dotenv, @aws-crypto/sha256-js, and @smithy/signature-v4. Under npm workspaces those resolved via root hoisting; under pnpm's strict isolation they can't, so iam (and any other package whose tsconfig includes shared/**/*) failed to build in CI. Adding shared/package.json (private, name @tigrisdata/shared) and listing it in pnpm-workspace.yaml makes pnpm install those deps into shared/node_modules/, where tsc + tsup can resolve them. No consumer configs or source files change — the existing @shared/* TS path alias and tsup esbuild alias still point at ../../shared and continue to work. Also: - Path-gate the 'Verify changeset present' step in pr.yaml so non-package PRs (CI, docs) aren't forced to add empty changesets. - Use a clearer Changesets release commit title: 'chore(release): bump versions and update changelogs'. Scoped to satisfy commitlint's scope-empty rule. Assisted-by: Claude Opus 4.7 (1M context) via Claude Code Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Pushed 0bde2a1 with three fixes:
On On SHA-pinning Locally: |
storage source imports HttpRequest/HttpResponse from @aws-sdk/types in 8 files but only declares @aws-sdk/client-s3 et al., relying on @aws-sdk/types being a transitive. Under npm's hoisted layout that resolved at the root node_modules; under pnpm's isolated layout it doesn't, so tsc in CI fails with TS2307. Local passed because tsc was resolving the type module from a stray ~/node_modules copy that CI runners don't have. Pinned to ^3.973.8 to match what @aws-sdk/client-s3 itself requests. Assisted-by: Claude Opus 4.7 (1M context) via Claude Code Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
vitest.config.base.ts at the repo root imports dotenv to load .env before tests, but the root package.json never declared it — it was relying on dotenv being hoisted from a workspace package's transitive closure. Under pnpm strict isolation, root files only see deps declared in the root package.json, so vitest config loading failed in CI with ERR_MODULE_NOT_FOUND. Local was again masked by a stray ~/node_modules copy. Assisted-by: Claude Opus 4.7 (1M context) via Claude Code Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pnpm 10.x's publish shells out to npm publish for the actual upload. Node 22 ships npm 10.9.7, but OIDC trusted publishing requires npm >= 11.5.1, so the first real release would 401. Node 24 (LTS since 2025-10) ships npm 11.12.1, which has the required OIDC support. Applied the same version bump in pr.yaml so PR checks run against the same Node we'll publish from. Assisted-by: Claude Opus 4.7 (1M context) via Claude Code Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fd4ce3a. Configure here.
setup-node's registry-url input exists specifically to wire up
NODE_AUTH_TOKEN-based publish — it writes a project-level .npmrc with
//registry.npmjs.org/:_authToken=\${NODE_AUTH_TOKEN} and exports a
placeholder NODE_AUTH_TOKEN. With OIDC trusted publishing we don't want
that path: the placeholder beats OIDC's token discovery and the publish
fails. The npm registry is the default for both npm and pnpm without
any .npmrc configuration, so dropping the input is the cleanest fix.
Assisted-by: Claude Opus 4.7 (1M context) via Claude Code
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Summary
pnpm-workspace.yaml,packageManager: pnpm@10.33.4).@tigrisdata/storage,iam,agent-kit,keyv-tigris,react). Independent versioning is preserved.^3.2.1, etc.) toworkspace:^so dependents develop against local source. pnpm rewrites the protocol to a real range at publish time.nextbranch from release configuration.mainis the single release branch; pre-releases usepnpm changeset pre enter <tag>onmainwhen needed.Tag and version preservation
package.json#versionis seeded to its currently-published value so the next Changesets bump computes from real history rather than0.0.1:@tigrisdata/storage→3.4.0@tigrisdata/iam→2.1.1@tigrisdata/agent-kit→0.1.3@tigrisdata/keyv-tigris→1.1.3@tigrisdata/react→1.2.3@tigrisdata/<pkg>@<version>tags are untouched. New tags use the same format (Changesets default for monorepos withfixed: []/linked: [])..changeset/dx-pnpm-and-changeset.mdis included so the migration PR itself satisfies thepnpm changeset statusgate without bumping anything.Release flow (post-merge)
pnpm changeset).main, the release workflow opens a "Version Packages" PR that bumps versions and updates each package'sCHANGELOG.md.changeset publish: publishes to npm via GitHub OIDC trusted publishing with provenance (NPM_CONFIG_PROVENANCE=true, noNPM_TOKEN), then creates@tigrisdata/<pkg>@<version>tags.Other changes
packages/agent-artifact-passport/andpackages/agent-artifacts/.pnpm(pre-commit→pnpm check,commit-msg→pnpm exec commitlint).AGENTS.mdto reflect pnpm + Changesets workflow and remove the stalepackages/clireference.pnpm.onlyBuiltDependenciesforesbuildandsqlite3(pnpm 10 disables install scripts by default).Prerequisite before merging
Each of the five packages must have Trusted Publisher configured on npmjs.com (Settings → Trusted publisher → GitHub Actions, repo
tigrisdata/storage, workflowrelease.yaml). Without this,changeset publishwill 401 since there's noNPM_TOKEN.Test plan
pnpm install(clean: removedpackage-lock.json,node_modules)pnpm -r build— all 5 packages buildpnpm -r test— 237 tests pass (storage 144, react 44, keyv-tigris 38, agent-kit 11)pnpm run lint(Biome) cleanpnpm -r publint— all 4 packages with publint script report "All good"pnpm changeset status— clean (empty changeset present)pr.yaml) green on this PRrelease.yamlruns cleanly on push tomain(no version PR opened — empty changeset only)🤖 Generated with Claude Code
Note
High Risk
Replaces the project’s CI/install and publishing automation (npm/semantic-release) with pnpm + Changesets, which can directly impact release correctness and npm publishing if misconfigured. Also updates Node version and enforces changeset presence on package-affecting PRs, potentially affecting contributor workflow and CI outcomes.
Overview
Migrates the repo’s tooling from npm + semantic-release to pnpm + Changesets by adding a
.changeset/config/README and wiringchangesets/action@v1into the release workflow to open version PRs and publish with provenance.Updates PR and release GitHub Actions to use pnpm (install, lint, build, publint, tests) on Node 24, removes the
nextbranch triggers, and adds a CI gate that requires a changeset when files underpackages/orshared/change.Adjusts developer workflow docs and git hooks to use pnpm (
pnpm check,pnpm exec commitlint) and tweaks npm config via.npmrc.Reviewed by Cursor Bugbot for commit 48fe93f. Bugbot is set up for automated code reviews on this repo. Configure here.