Chore(ci): enable Dependabot npm version updates (stacked on #650) - #757
Open
AmaadMartin wants to merge 1 commit into
Open
Chore(ci): enable Dependabot npm version updates (stacked on #650)#757AmaadMartin wants to merge 1 commit into
AmaadMartin wants to merge 1 commit into
Conversation
Security updates already run on this repository without a configuration file. Version updates do not: they require .github/dependabot.yml. The dependency tree therefore only moves when an advisory forces it. Add a second updates entry for the npm ecosystem at the repository root. Minor and patch bumps are grouped into one weekly pull request. Majors match no group rule, so each opens on its own and a breaking bump cannot hold back the safe ones.
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.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
No issue.
Problem: Dependabot already raises npm security updates here with no configuration file:
google/adk-js#448,#443,#434,#428,#396,#329,#297are all titledchore: Bump the npm_and_yarn group .... Version updates are different. They require a committed.github/dependabot.yml, so they never run. The dependency tree only moves when an advisory forces it, and routine patch drift accumulates into a large manual catch-up.Solution: Add one
npmentry to the.github/dependabot.ymlthat #650 introduces. Minor and patch bumps land as a single grouped PR each week. Majors match no group rule, so each one opens on its own and a breaking bump cannot hold back the safe bumps beside it.Scope
Stacked on #650 (
feat/dependabot-github-actions-updates), which adds the file and thegithub-actionsentry, and which explicitly deferred npm. One file changes, 17 added lines and 1 reworded header comment. Nothing under.github/workflows/is touched, so this stays independent of the action SHA-pinning work (#505, #613) and the workflow-permissions work (#649).package.jsonandpackage-lock.jsonare untouched; I ran no install.Key-by-key reasoning
package-ecosystem'npm'package-lock.json.directory'/'google/adk-js#448is exactlypackage.json,core/package.json,dev/package.json,package-lock.json, so a root-anchored run is already workspace-aware here. Listing/core,/devand/integrationswould be wrong: they hold no lockfile, and the docs forbid overlapping directories for one ecosystem.schedule.interval'weekly'dailyis noise andmonthlylets drift pile up.groups.…patterns['*']groups.…update-types['minor', 'patch']'*'catch-all #650 uses for actions. With 94 declarations, a breaking major inside the weekly group blocks every safe bump in the same PR. Majors match no rule, so the docs say they open individually, each with its own CI result.commit-message.prefix'chore(deps)'release-please-config.jsonsets"release-type": "node", which parses conventional commits, sochorekeeps dependency bumps out of the release notes.Security updates only, or all versions?
All versions. A "security only" entry cannot be expressed: the sole spelling is
open-pull-requests-limit: 0, which the docs describe as disabling version updates. Since npm security updates already run configuration-free (the PR list above), that entry would change nothing. Grouping is the noise control instead.Keys deliberately omitted
versioning-strategy— the defaultautoalready producesincrease-style caret bumps in this repo. Evidence from thegoogle/adk-js#448diff:"^0.205.0"->"^0.220.0"and"^6.6.6"->"^7.1.6", with no widened>=x <yranges. Settingincreasewould restate observed behaviour.open-pull-requests-limit— the documented default is 5, which is the right cap here: the grouped PR plus at most four majors.cooldown— a 3-day default already applies to version updates.ignore,allow,labels,assignees,reviewers,registries,dependency-type— not required.target-branchwould actively harm: setting it detaches this ecosystem's options from security updates.Disclosed side effect
commit-messagealso applies to security updates. Existing npm security PR titles change fromchore: Bump the npm_and_yarn group ...tochore(deps): Bump .... Still a non-releasablechore, but it is externally visible. Grouped security updates are unaffected, becausegroups.applies-todefaults to version updates.Collision check
gh pr list --repo AmaadMartin/adk-js --state all --limit 400plusgh search prs --repo AmaadMartin/adk-js --state open "dependabot.yml". Only #650 touches.github/dependabot.yml, and it is this stack's base. #684 and #688 carry "Dependabot" in the title but bump packages;gh pr diff --name-onlyconfirms neither touches the config. #507 and #613 matched the text search and touch neither the file nor the ecosystem.Testing Plan
Please describe the tests that you ran to verify your changes.
Unit Tests:
[ ] I have added or updated unit tests for my change.
[ ] All unit tests pass locally.
I left both boxes unchecked on purpose. No unit test file exists for this change, and adding one would be wrong. The diff has zero lines of executable code, so there is no line, branch or function coverage to add.
vitest.config.tsscopes coverage tocore/src/**,dev/src/**andintegrations/src/**, so a file under.github/cannot move the thresholds. No repository-configuration test category exists undercore/test/,dev/test/,integrations/test/ortests/; inventing one would assert GitHub's schema rather than adk-js behaviour.Four checks stand in its place. All four pass on
c5687e51:npx js-yaml .github/dependabot.ymlnode+assert/strictover the parsed document (version, ecosystem order,directory, interval, group patterns,update-types, prefix, and the absence ofversioning-strategyandopen-pull-requests-limit)dependabot.yml OKnpx ajv-cli@5 validate -s dependabot-2.0.json -d .github/dependabot.yml --spec=draft7 --strict=false.github/dependabot.yml validnpx secretlint ".github/dependabot.yml"andbash scripts/check_license.shcheck_license.shscans only*.jsand*.ts, so the YAML is out of its scope — I verified that in the script rather than assuming it.Each check was proved able to fail. I applied each mutation, recorded the failure, then restored the file and confirmed it was byte-identical by
sha256sum:directory: '/'->'/core'expected: '/',operator: 'strictEqual'. The schema typesdirectoryas an unconstrained string, so check 3 cannot see this. That is why check 2 exists.package-ecosystem: 'npm'->'npm_and_yarn'must be equal to one of the allowed valuesat#/definitions/package-ecosystem-values/enum. Confirmsnpmis the enum member, not the group name Dependabot prints in PR titles.update-typeslistexpected: [ 'minor', 'patch' ],operator: 'deepStrictEqual'. Pins the majors-stay-individual decision against a later silent edit.No test CI runs on this PR, and that is expected.
validation.yamlandlicense-check.ymlboth trigger onpull_request: branches: [main]only. This PR targetsfeat/dependabot-github-actions-updates, so neither workflow starts; the only check that ran isauto-assign, which validates nothing. Retargeting tomainafter #650 merges will run both.I validated locally on the pushed commit
c5687e51instead. The four checks above are the substitute, and they are the complete substitute: no other repository script can observe this file. Per the rootpackage.json,lintiseslint "**/*.ts",format:checkisprettier "**/*.ts" --check,buildisnpm run build --workspacesover the threesrctrees, and everyvitestproject readscore/test,dev/test,integrations/testortests/. None of them glob.github/. The two CI steps that do see the file arenpx secretlint "**/*"andbash scripts/check_license.sh, and both are check 4 above.Manual End-to-End (E2E) Tests:
An end-to-end test cannot run before merge. Dependabot reads
.github/dependabot.ymlfrom the default branch only, and version updates are not auto-enabled on forks. After merge:github-actionsand a row fornpm, each with a "Last checked" time and no red configuration-error banner. That banner is the authoritative signal that the file is wrong.chore(deps): bump the npm-minor-and-patch group with N updates, plus a separate PR per outstanding major, capped at five open version-update PRs.package.json,core/package.json,dev/package.json,integrations/package.jsonandpackage-lock.json. The 14tests/integration/**manifests are not workspace members and declare onlyfile:links, so there is no registry version to bump. If one is ever touched, the remedy is a singleignorerule.Checklist
[x] I have read the CONTRIBUTING.md document.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have added tests that prove my fix is effective or that my feature works. (The four configuration checks above, each proved able to fail.)
[ ] New and existing unit tests pass locally with my changes. (I ran no unit test: the diff contains no executable code and no test covers
.github/.)