ci: update dependencies with pnpm/update instead of Dependabot - #41
Conversation
Dependabot cannot open a passing pull request against this repository. `dist/index.js` is committed and pr-check rebuilds it and fails on any difference, but a bump only touches package.json and the lockfile — so every update lands with a bundle built by the previous dependency set. That is why #5 is red: esbuild 0.28 changed the CommonJS init helpers it emits, so a fresh build cannot match the committed one. It is not specific to esbuild either. All twelve runtime dependencies are inlined into that bundle. pnpm/update runs `pnpm run build` through its `post-update` hook, so the rebuilt bundle is committed alongside the bump and the pull request can go green. It also updates through pnpm itself, so workspace features the lockfile depends on are handled by the tool that owns them. `verify` typechecks and runs the unit tests before the commit is made; the pull request then gets the full matrix from test.yaml. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R7B41egL5GwZk1gw2DU7sY
|
Warning Review limit reachedNext included review available in 41 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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. Comment |
PR Summary by QodoAutomate dependency updates with pnpm/update
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Confidence Score: 4/5The workflow appears safe to merge functionally, with non-blocking cleanup needed for narrative comments and immutable pinning of the write-enabled updater action. The configured build and verification commands match repository scripts and the committed-distribution freshness gate, while the remaining accepted concerns are maintainability and supply-chain hardening issues rather than established current failures. Files Needing Attention: .github/workflows/update-dependencies.yaml
|
| # The branch push and the pull request both target this repository, so | ||
| # this must never run on a fork. |
There was a problem hiding this comment.
Comments narrate workflow configuration
These comments restate the adjacent repository guard, installation setting, build hook, and Changesets input. This duplicates the configuration in prose that must be maintained alongside it and can drift when the workflow changes; remove the narration and use focused tests where the behavior needs coverage.
Context Used: Comments and docs in code are suspicious. Is test ... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| version: '^12.0.0' | ||
| install: false | ||
|
|
||
| - uses: pnpm/update@v0 |
There was a problem hiding this comment.
Mutable updater receives write access
The scheduled job invokes pnpm/update@v0 with repository-content and pull-request write permissions. Retargeting or compromising this mutable tag would let code outside the reviewed revision push unauthorized changes or alter pull requests, so pin the action to an immutable commit. How this was verified: The workflow grants write permissions at workflow scope and invokes the updater through the mutable v0 tag without another control restricting its token access.
Replaces Dependabot for dependency updates. Closes #5 once merged.
Why
Dependabot cannot open a passing pull request against this repository.
dist/index.jsis committed, andpr-checkrebuilds it and fails on any difference — but a bump only touchespackage.jsonandpnpm-lock.yaml, so the committed bundle is always the one built by the previous dependency set.That is exactly why #5 is red. esbuild 0.28 changed the CommonJS init helpers it emits:
A real change, so a real diff, so
git diff --exit-code dist/index.jsfails. And it is not specific to esbuild: all twelve runtime dependencies are inlined into that bundle, so any bump can move it.What this does
pnpm/updatehas apost-updatehook that runs before it commits, sopnpm run buildregenerates the bundle in the same commit as the bump — the step Dependabot had no way to run.verifytypechecks and runs the unit tests before the commit is made; the resulting pull request then gets the full matrix fromtest.yaml.Runs weekly on Mondays and on demand via
workflow_dispatch, guarded withif: github.repository == 'pnpm/setup'so it never runs on a fork.Notes
./rather than a released tag, so the update runs on the pnpm this action ships.install: false, becausepnpm/updatedeletes the lockfile andnode_modulesbefore resolving anything.changesets: false— no.changesetdirectory here.github-actionsis left at its default (false), so pinned action versions in the workflows are not touched. Worth turning on separately if you want that too; it matches what Dependabot was not doing either..github/dependabot.ymlin the repository, so build(deps-dev): bump esbuild from 0.27.7 to 0.28.1 #5 came from a repository-level Dependabot setting rather than a config file. Turning it off is a change in the repository settings, not something this PR can do.