Skip to content

chore: update pnpm to v12.21.0 and switch to v13 lockfile format - #2492

Closed
dinwwwh wants to merge 1 commit into
mainfrom
claude/pnpm-12-21-lockfile-v13
Closed

dinwwwh wants to merge 1 commit into
mainfrom
claude/pnpm-12-21-lockfile-v13

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Nov 18, 2026

Copy link
Copy Markdown
Member

Summary

  • Bump the pinned pnpm from 12.16.1 to 12.21.0 (latest), via pnpm self-update.

  • Enable the v13 lockfile format in pnpm-workspace.yaml:

    lockfile:
      format: v13

Why

The v13 format (added in pnpm 12.19) writes pnpm-lock.yaml with one entry per package version (no separate packages / snapshots sections), one value per line, and a trailing comma after every entry. A dependency or peer update then changes only the lines that record its version, so concurrent PRs hit far fewer lockfile merge conflicts.

Notes

  • No resolved dependency versions change. I compared the resolved name@version sets of the old and new lockfiles: they match, apart from pnpm's own binaries in the env lockfile document.
  • The lockfile diff is large but one-time. It's the rewrite into the new layout.
  • pnpm ≥ 12.19 is needed to read the new lockfile. pnpm 12.16.1 fails on it. The packageManager / devEngines pin makes pnpm switch to 12.21.0 automatically, and CI uses pnpm/action-setup@v6, which reads that pin.
  • v13 is marked experimental upstream. 12.21.0 includes several v13 fixes.

Testing

  • pnpm install --frozen-lockfile succeeds with pnpm 12.21.0
  • pnpm run check (or this repo's equivalent) passes

Generated by Claude Code

Bump the pinned pnpm to 12.21.0 and enable the experimental
`lockfile.format: v13` (pnpm >= 12.19). It writes pnpm-lock.yaml with one
entry per package version and one line per value, with trailing commas, so
dependency updates touch fewer lines and concurrent PRs hit fewer lockfile
merge conflicts. Resolved dependency versions are unchanged; only the pnpm
binaries in the env lockfile and the lockfile layout change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVaw7SDgegkh5P17SW6Ewa
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Chores
    • Updated package management configuration and workspace lockfile format.
    • These maintenance changes do not alter user-facing features or app behavior.

The declared pnpm version changed to 12.21.0. The workspace configuration sets the lockfile format to v13 and describes it as experimental.

Changes: pnpm Configuration

Layer / File(s) Summary
Update pnpm settings
package.json, pnpm-workspace.yaml
package.json declares pnpm 12.21.0. pnpm-workspace.yaml sets the lockfile format to v13 and adds a comment describing the format.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Merge Risk: Minimal · up to 7e8bd

This updates the pinned pnpm version and switches to the experimental v13 lockfile format, which produces a one-time large lockfile rewrite. No merge-blocking risk was identified; contributors need pnpm 12.19 or later.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the two changes in the PR: the pnpm bump from 12.16.1 to 12.21.0 and the switch to the v13 lockfile format. The raw summary confirms both changes in package.json and pnpm-workspace.yam…
Description check Passed The description states the pnpm bump from 12.16.1 to 12.21.0 and the enabling of the v13 lockfile format in pnpm-workspace.yaml. It explains the reason for the format change and the testing done. It m…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the two changes in the PR: the pnpm bump from 12.16.1 to 12.21.0 and the switch to the v13 lockfile format. The raw summary confirms both changes in package.json and pnpm-workspace.yaml. The title is specific and matches the main change.

Full details: Description check

Explanation

The description states the pnpm bump from 12.16.1 to 12.21.0 and the enabling of the v13 lockfile format in pnpm-workspace.yaml. It explains the reason for the format change and the testing done. It matches the changeset.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 97604cae-d6ba-4791-89e1-586f45ff3acf
Commits

Reviewing files that changed from the base of the PR and between 0517019 and 7e8bd4d.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 2

  • package.json
  • pnpm-workspace.yaml

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@pkg-pr-new

pkg-pr-new Bot commented Nov 18, 2026

Copy link
Copy Markdown
More templates

@orpc/ai-sdk

npm i https://pkg.pr.new/@orpc/ai-sdk@2492

@orpc/arktype

npm i https://pkg.pr.new/@orpc/arktype@2492

@orpc/bun

npm i https://pkg.pr.new/@orpc/bun@2492

@orpc/client

npm i https://pkg.pr.new/@orpc/client@2492

@orpc/cloudflare

npm i https://pkg.pr.new/@orpc/cloudflare@2492

@orpc/contract

npm i https://pkg.pr.new/@orpc/contract@2492

@orpc/effect

npm i https://pkg.pr.new/@orpc/effect@2492

@orpc/evlog

npm i https://pkg.pr.new/@orpc/evlog@2492

@orpc/hibernation

npm i https://pkg.pr.new/@orpc/hibernation@2492

@orpc/json-schema

npm i https://pkg.pr.new/@orpc/json-schema@2492

@orpc/experimental-lock

npm i https://pkg.pr.new/@orpc/experimental-lock@2492

@orpc/mcp

npm i https://pkg.pr.new/@orpc/mcp@2492

@orpc/msw

npm i https://pkg.pr.new/@orpc/msw@2492

@orpc/nest

npm i https://pkg.pr.new/@orpc/nest@2492

@orpc/next

npm i https://pkg.pr.new/@orpc/next@2492

@orpc/node

npm i https://pkg.pr.new/@orpc/node@2492

@orpc/openapi

npm i https://pkg.pr.new/@orpc/openapi@2492

@orpc/experimental-openapi-inference

npm i https://pkg.pr.new/@orpc/experimental-openapi-inference@2492

@orpc/opentelemetry

npm i https://pkg.pr.new/@orpc/opentelemetry@2492

@orpc/pinia-colada

npm i https://pkg.pr.new/@orpc/pinia-colada@2492

@orpc/pino

npm i https://pkg.pr.new/@orpc/pino@2492

@orpc/publisher

npm i https://pkg.pr.new/@orpc/publisher@2492

@orpc/ratelimit

npm i https://pkg.pr.new/@orpc/ratelimit@2492

@orpc/server

npm i https://pkg.pr.new/@orpc/server@2492

@orpc/shared

npm i https://pkg.pr.new/@orpc/shared@2492

@orpc/swr

npm i https://pkg.pr.new/@orpc/swr@2492

@orpc/tanstack-query

npm i https://pkg.pr.new/@orpc/tanstack-query@2492

@orpc/trpc

npm i https://pkg.pr.new/@orpc/trpc@2492

@orpc/valibot

npm i https://pkg.pr.new/@orpc/valibot@2492

@orpc/zod

npm i https://pkg.pr.new/@orpc/zod@2492

commit: 7e8bd4d

@codecov

codecov Bot commented Nov 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

Enabling the v13 lockfile format breaks Dependabot for this repo: dependabot-core's bundled pnpm parser cannot read lockfileVersion: 13.0 and dies with a TypeError on the first package entry. .github/dependabot.yml runs daily npm updates and every Dependabot PR rewrites pnpm-lock.yaml, so dependency and security updates stop until upstream supports the format.

Approach: the goal (fewer pnpm-lock.yaml merge conflicts) is reasonable and the "no resolved versions change" claim checks out exactly, but v13 is still experimental upstream and the tooling around this repo cannot read it yet — worth sequencing behind tooling support rather than merging it now.

Reviewed changes

  • package.json — the pnpm pin moves from 12.16.1 to 12.21.0; nothing else in the repo references the old version.
  • pnpm-workspace.yaml — adds lockfile: { format: v13 } with an explanatory comment.
  • pnpm-lock.yaml — rewritten into the two-document v13 layout (JSON with tabs and trailing commas, projects instead of importers, no snapshots). I compared both lockfiles programmatically: same 2,303 package versions with identical specifiers and resolved versions across all 36 projects, pnpm install --frozen-lockfile reports the lockfile as up to date, and oxfmt leaves the file untouched.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Comment thread pnpm-workspace.yaml
# one line per value, with trailing commas, so a dependency update touches fewer
# lines and concurrent PRs hit fewer pnpm-lock.yaml merge conflicts.
lockfile:
format: v13

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Enabling v13 breaks Dependabot. dependabot-core's pnpm parser (@pnpm/lockfile-file@9.1.3) takes the legacy branch for a document with no snapshots, then reads pkgSnapshot.resolution, which v13 no longer writes — the helper dies with TypeError: Cannot use 'in' operator to search for 'tarball' in undefined on the very first package entry. Since .github/dependabot.yml updates npm deps daily and every Dependabot PR rewrites this lockfile, this silently ends dependency and security updates.

Technical details
# Dependabot cannot read the v13 lockfile

## Affected sites
- `pnpm-workspace.yaml:58` — `format: v13` opts into the experimental writer/reader.
- `.github/dependabot.yml` — daily `npm` updates; Dependabot PRs rewrite `pnpm-lock.yaml` (e.g. #2485).
- `pnpm-lock.yaml` — the project document is now `lockfileVersion: "13.0"`.

## Evidence
- `dependabot-core/npm_and_yarn/helpers/package.json` pins `@pnpm/lockfile-file@^9.1.3`; `lockfile-parser.ts` writes the last YAML document to a temp dir, calls `readWantedLockfile(dir, { ignoreIncompatible: true })`, then maps `lockfile.packages` and evaluates `"tarball" in pkgSnapshot.resolution`.
- Reproduced against this PR's lockfile: `readWantedLockfile` returns `{ lockfileVersion: '13.0', settings, projects, packages, importers: { '.': { specifiers: {} } } }`, and the first entry throws `TypeError: Cannot use 'in' operator to search for 'tarball' in undefined`. The Ruby wrapper turns that into `Dependabot::DependencyFileNotParseable`.
- Even with the crash fixed, `importers` collapsing to `{'.': {specifiers: {}}}` means every dependency loses its specifier and `dev` flag, so Dependabot would see all packages as production subdependencies with no requirements.
- pnpm's `lockfile.format` docs state v13 is experimental, "may change before pnpm 13 is released", and that pnpm versions without the setting cannot read it.

## Required outcome
- Dependency-update automation keeps working after this merges, or the format switch waits until it does.

## Suggested approach
- Land the 12.21.0 pin on its own and hold `lockfile.format: v13` until `dependabot-core` (and GitHub's dependency graph) can read `13.0`.
- If the switch is intentional now, document the expected Dependabot outage and confirm Dependabot alerts / the dependency graph still populate for the repo.

## Open questions for the human
- Does GitHub's dependency graph (which powers Dependabot alerts) accept `lockfileVersion: 13.0`? Worth checking on a throwaway branch before merge.

dinwwwh commented Nov 18, 2026

Copy link
Copy Markdown
Member Author

Closing this for now because the v13 lockfile format is still experimental upstream. I'm keeping the branch so it can be reopened later.

Blockers I confirmed before closing:

  • Dependabot's lockfile parser (@pnpm/lockfile-file@^9.1.3 in dependabot-core) can't read lockfileVersion: 13.0. It fails with TypeError: Cannot use 'in' operator to search for 'tarball' in undefined.
  • dependabot-core ships pnpm 12.10.1. pnpm versions before 12.11 can't parse the nested lockfile: setting in pnpm-workspace.yaml.

Worth revisiting once v13 is stable and Dependabot supports it.


Generated by Claude Code

@dinwwwh dinwwwh closed this Nov 18, 2026
@codspeed

codspeed Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 5 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 40 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing claude/pnpm-12-21-lockfile-v13 (7e8bd4d) with main (b17d3d1)2

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (0517019) during the generation of this report, so b17d3d1 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

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