Skip to content

fix: keep pnpm-lock.yaml a single YAML document for Dependabot alerts - #393

Merged
andykenward merged 1 commit into
mainfrom
fix/pnpm-single-document-lockfile
Oct 20, 2026
Merged

andykenward merged 1 commit into
mainfrom
fix/pnpm-single-document-lockfile

Conversation

@andykenward

Copy link
Copy Markdown
Owner

pnpm 12 writes pnpm-lock.yaml as a two-document YAML stream (env document with packageManagerDependencies first, dependency graph second). GitHub's dependency-graph parser reads only the first document (dependabot/dependabot-core#15904). After #392 merged:

  • the SBOM export dropped to 34 packages (pnpm, its binaries, direct deps from www/package.json, actions), none of the ~900 transitive packages
  • the three open extract-zip / sprintf-js alerts were marked fixed four seconds after the merge, while pnpm audit still reports them

pmOnFail: ignore is the only pnpm setting that stops the env document being written. It also disables pnpm's switch to the packageManager pin, which this repo doesn't rely on: the devcontainer installs the pinned version, pnpm/action-setup reads packageManager, and engines.pnpm rejects a wrong major.

Verified on pnpm 12.14.0: the stripped lockfile passes pnpm install --frozen-lockfile unchanged, and pnpm install --fix-lockfile rewrites it as a single document. The lockfile diff is exactly the 158 lines pnpm 12 added. Lint passes.

After merge, check the graph recovers with:

gh api repos/andykenward/unlike.dev/dependency-graph/sbom --jq '.sbom.packages | length'

Remove the setting once GitHub's parser reads the last document.

🤖 Generated with Claude Code

pnpm 12 prepends a packageManagerDependencies document to the lockfile.
GitHub's dependency graph parses only that first document, so after #392
merged the graph dropped to 34 packages and the open extract-zip and
sprintf-js alerts were auto-closed within seconds without any update
(dependabot/dependabot-core#15904). pmOnFail: ignore is the only setting
that stops pnpm emitting the env document; the pnpm version is still
enforced by the devcontainer, pnpm/action-setup and engines.pnpm.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@andykenward
andykenward merged commit e329fa2 into main Oct 20, 2026
6 checks passed
@andykenward
andykenward deleted the fix/pnpm-single-document-lockfile branch October 20, 2026 20:06
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.

1 participant