Fix dependabot pnpm-lock.yaml updates in workspaces#7423
Merged
isaacroldan merged 1 commit intoApr 29, 2026
Conversation
Dependabot was opening PRs that bumped a workspace package's package.json but left pnpm-lock.yaml untouched (e.g. #7166), forcing manual lockfile commits before merging. Root cause: `directories:` listed both `/` and `packages/*`. In a pnpm workspace the lockfile lives at the workspace root, so per-subdirectory update runs cannot rewrite it. dependabot-core treats this as a misconfiguration (see dependabot/dependabot-core#11135 and the fix in #11487 — "all dependencies should be updated from the root directory, where pnpm-workspace.yaml and pnpm-lock.yaml exist"). Dropping `packages/*` makes Dependabot run only from root. It still detects dependencies in every workspace package via pnpm-workspace.yaml and updates both the package.json and pnpm-lock.yaml in the same PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Dependabot configuration for this pnpm workspace so dependency bumps are performed from the workspace root, enabling consistent pnpm-lock.yaml updates in Dependabot PRs.
Changes:
- Remove
packages/*from Dependabotdirectoriesso updates run only from/(workspace root).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

WHY are these changes introduced?
Recent Dependabot PRs (#7166, the prior liquidjs bump on the cli-kit/liquidjs branch, and others) bump a workspace package's
package.jsonbut leavepnpm-lock.yamluntouched, forcing maintainers to push a manual "update lock" commit before CI is happy and the PR can land.Root cause is in our
.github/dependabot.yml:This is a pnpm workspace — there is one
pnpm-lock.yamlat the root andpnpm-workspace.yamldeclares the member packages. When Dependabot runs the update from a subdirectory like/packages/cli-kit, pnpm needs the workspace root to resolve and rewrite the lockfile, but the lockfile is one level up, so the subdir job editspackage.jsonand produces no lockfile diff.This is a known dependabot-core limitation: see dependabot/dependabot-core#11135 and the follow-up #11487 (merged Feb 2025), where the team explicitly states "all dependencies should be updated from the root directory, where
pnpm-workspace.yamlandpnpm-lock.yamlexist" and now raises aMisconfiguredToolingerror for pure subdirectory pnpm runs.WHAT is this pull request doing?
Drops
"packages/*"fromdirectories:so Dependabot only runs from the workspace root. From the root, it walkspnpm-workspace.yaml, picks up dependencies declared in anypackages/*/package.json, and writes bothpackage.jsonandpnpm-lock.yamlin the same PR.Possible issues and tradeoffs
packages/*/package.json. Dependabot's pnpm-workspace handling has improved since (notably #11487), so root-only should now cover sub-package deps viapnpm-workspace.yaml— but I cannot fully prove that without watching the next weekly run. Concrete risk: if root-only still misses sub-package deps, we'll silently stop getting bump PRs for those packages until someone notices.Bump lodash from X to Y in /packages/cli-kit. After this change they'll lose thein /packages/cli-kitqualifier when the dep lives in a workspace package. Cosmetic, but worth knowing if any tooling/automation parses the title./package.jsonand one ofpackages/*/package.json, the current config can produce two PRs (one perdirectoriesentry). After this we get one. That's an improvement, but if anyone was relying on per-package PRs landing independently, they won't anymore.packages/*and accept the manual-lockfile workaround until dependabot-core supports per-subdir lockfile rewrites — but that's the broken state we just left.How to test your changes?
Wait for the next Dependabot weekly run after merge and confirm that:
packages/*/package.jsonalso updatespnpm-lock.yaml.If neither happens within ~a week, re-add
"packages/*"and re-open the conversation.Post-release steps
None.
Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add— N/A: CI/Dependabot config only, no shipped code change