Skip to content

Switch the workspace from npm to pnpm - #7

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

FlyOverCoderKY merged 5 commits into
mainfrom
cursor/convert-to-pnpm-5f51

Conversation

@FlyOverCoderKY

@FlyOverCoderKY FlyOverCoderKY commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

This repository used npm workspaces (package-lock.json, packageManager: npm@11.18.0). Local git worktrees were rewriting a full node_modules tree on every create/delete.

What changed

  • Pin packageManager to pnpm@10.34.5 via Corepack (latest 10.x; engines/CI do not require 9).
  • Add pnpm-workspace.yaml matching the existing packages/* workspace.
  • Import the existing npm lockfile with pnpm import and remove package-lock.json.
  • CI, contributor docs, and package scripts now install and run through pnpm / pnpm run / pnpm test.
  • The release gate now reads pnpm-lock.yaml and pnpm-workspace.yaml. npm pack, npm view, and npm publish --provenance stay on the npm CLI because trusted-publisher OIDC still requires npm 11.5.1+.
  • Ignore pnpm-lock.yaml in Prettier. prepack uses pnpm run --silent build so npm pack --json stays valid JSON.
  • No dependency version changes. shamefully-hoist is not enabled.

Review-template follow-up

Aligned with sibling Pegma pnpm reviews:

  1. runNpm() invokes the real npm binary and strips npm_execpath.
  2. Prepare still installs reviewed npm@11.18.0.
  3. release:check matches each importer dependency to its own specifier and a resolved version that satisfies that specifier (exact pins still match exactly, including prerelease pins). YAML scalars are decoded before comparison. The gate does not look up a peerDependencies importer section — pnpm does not record one; with autoInstallPeers, peers fold into dependencies. Caret-zero / partial ranges (^0, ^0.0, ^0.0.x) follow npm/pnpm rules. A prerelease does not satisfy an exact stable pin or a caret of another tuple.
  4. README and CONTRIBUTING install Corepack (npm install -g corepack) before corepack enable, then run the first pnpm command. That covers Node 25+, which no longer bundles Corepack.
  5. The 0.1.0 release checklist regenerates pnpm-lock.yaml. The immutable v0.0.0 bootstrap ceremony keeps its npm commands.
  6. The OIDC publish job runs node scripts/release-package.mjs publish and does not enable Corepack.
  7. CI enables Corepack before cache: pnpm, then activates pnpm again on the selected Node.

Verification

Passed locally on this revision:

  • pnpm run format:check
  • pnpm run check
  • pnpm test (56 tests)
  • pnpm run release:check
  • Quoted lockfile scalars still match; an exact-pin version: 999.0.0 is rejected; a pnpm peer-suffix resolved version still satisfies the exact pin.
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 14, 2026 19:54
Pin packageManager to pnpm@10.34.5, add pnpm-workspace.yaml, and import
the existing lockfile so worktrees no longer rewrite a full node_modules
tree. CI and contributor docs now install and run through pnpm; npm remains
only for registry pack, view, and trusted-publisher OIDC.

Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
prettier --check was rewriting pnpm-lock.yaml, and npm pack --json
could not parse prepack output from pnpm run build.

Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
@FlyOverCoderKY
FlyOverCoderKY marked this pull request as ready for review August 14, 2026 20:18
@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: 997e192849

ℹ️ 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 docs/RELEASING.md Resolved
cursoragent and others added 2 commits August 14, 2026 21:15
Keep pack, registry view, the trusted-publishing version gate, and
npm publish --provenance on a real npm CLI that ignores npm_execpath.
Compare each lockfile importer pin to both its specifier and resolved
version, document corepack enable, and invoke the OIDC publish helper
with node so that job never downloads Corepack pnpm.

Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
Accept resolved versions that satisfy a specifier range, decode YAML
scalars before comparing lockfile fields, and include peerDependencies
in the importer check. Document installing Corepack before enabling it.

Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a606761. Configure here.

Comment thread scripts/release-package.mjs Resolved
pnpm importers do not record a peerDependencies section, so comparing
manifest peers to that missing map fails a valid lockfile. Exact
prerelease pins still match; a prerelease no longer satisfies an exact
stable pin or a caret of another tuple.

Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
@FlyOverCoderKY
FlyOverCoderKY merged commit f548a61 into main Aug 14, 2026
3 checks passed
@FlyOverCoderKY
FlyOverCoderKY deleted the cursor/convert-to-pnpm-5f51 branch August 14, 2026 23:56
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