Skip to content

Switch the monorepo from npm to pnpm - #12

Merged
FlyOverCoderKY merged 6 commits into
mainfrom
cursor/convert-to-pnpm-d751
Aug 14, 2026
Merged

FlyOverCoderKY merged 6 commits into
mainfrom
cursor/convert-to-pnpm-d751

Conversation

@FlyOverCoderKY

@FlyOverCoderKY FlyOverCoderKY commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

This repository used npm workspaces and package-lock.json. Local git worktrees were rewriting a full node_modules tree on every create/delete. This PR switches the repo package manager to pnpm while keeping install, gate, and publish behavior the same.

Follow-up aligns the conversion with the sibling Pegma template (verified against review notes on spine#3, webhooks#12, audit#4, identity#9, health#7, scheduler#8, sessions#13, support-desk#19, and this PR’s Codex comment).

Package manager

  • Pin packageManager to pnpm@10.34.5 via Corepack
  • Add pnpm-workspace.yaml matching the existing packages/* workspaces
  • Import pnpm-lock.yaml from the previous npm lockfile and remove package-lock.json
  • Ignore pnpm-lock.yaml in Prettier
  • CI installs pnpm (pnpm/action-setup pinned to fc06bc1257f339d1d5d8b3a19a8cae5388b55320, v4.4.0) before setup-node cache: pnpm
  • README and CONTRIBUTING install Corepack (npm install -g corepack) then run corepack enable before the first pnpm command. Official Node 25+ builds do not bundle Corepack.

Release path

  • Pack, registry view, the trusted-publishing version gate, and npm publish --provenance resolve a real npm-cli.js and refuse npm_execpath when it points at pnpm
  • Prepare job restores the reviewed npm@11.18.0 pin
  • OIDC publish job runs node scripts/release-packages.mjs publish and does not download Corepack pnpm
  • release:check matches each dependency, including peerDependencies, to its own lockfile specifier and resolved version. Exact pins match exactly; a range such as ^1.2.0 accepts a satisfying resolution such as 1.2.3. YAML scalars are unquoted before comparison.
  • RELEASING.md describes pnpm-lock.yaml and the reviewed npm pin; the one-time bootstrap remains npm publish

Unchanged

  • Dependency versions
  • Shipped prepack fields left as this conversion already set them (pnpm run build)
  • No workspace: protocol added in this follow-up
  • No Corepack integrity hash
  • Consumer install examples still use npm install @pegma/...

Verification

  • pnpm run format:check
  • pnpm run check
  • pnpm test
  • pnpm run release:check
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 14, 2026 20:02
Pin pnpm@10.34.5 via Corepack, import the existing lockfile, and update
CI, docs, and release metadata checks so local worktrees no longer rewrite
a full node_modules tree. Registry pack, publish, and consumer smoke tests
still use npm so trusted publishing stays unchanged.

Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
The generated lockfile is not a source file; formatting it would fight
pnpm and fail the existing format:check gate.

Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
@FlyOverCoderKY
FlyOverCoderKY marked this pull request as ready for review August 14, 2026 20:19
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b70b9ab8c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md Resolved
cursoragent and others added 4 commits August 14, 2026 21:19
Resolve a real npm CLI for pack, registry view, the trusted-publishing
version gate, and npm publish --provenance so pnpm run cannot substitute
itself via npm_execpath. Restore the reviewed npm@11.18.0 pin in the
prepare job, invoke the OIDC publish helper with node directly, match
each lockfile dependency to its own specifier and resolved version, put
pnpm on PATH before setup-node cache, and document corepack enable for
local installs.

Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
Release lockfile sync now unquotes YAML scalars, treats a resolved
version as valid when it satisfies a semver range, and includes
peerDependencies. Local docs install Corepack before enabling it.

Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
@FlyOverCoderKY
FlyOverCoderKY merged commit 6d1d87f into main Aug 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants