Repository navigation
Align npm release-age gate with the Dependabot cooldown - #414
Merged
Vladimir Morozov (vmoroz) merged 1 commit intoNov 18, 2026
Merged
Conversation
Dependabot's grouped npm version update failed with NoChangeError for @babel/generator and @babel/parser. When a package is a transitive dependency of an npm project, Dependabot picks the new version by running `npm update` without an age limit, but then rewrites the lockfile with `--min-release-age=<cooldown>`. A release younger than the 8-day cooldown is proposed, the rewrite leaves the lockfile unchanged, and the run fails. Set min-release-age=8 in each npm project's .npmrc. npm applies it in both steps, so they agree. Dependabot adds its own flag only when the cooldown exceeds this value, and security updates still override it with --min-release-age=0. Yarn projects already behave this way through npmMinimalAgeGate in .yarnrc.yml. npm 11.10 and newer also apply the gate to local and CI restores. Older npm ignores it and prints an "Unknown project config" warning.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change aligning npm’s release-age gate with the existing eight-day cooldown.
No open issues 🎉
What changed in this PR
Aligns npm’s release-age gate with the existing eight-day Dependabot cooldown and Yarn setting, addressing inconsistent transitive dependency selection that caused grouped updates to fail.
Changes:
- Adds
min-release-age=8to all eight npm projects’.npmrcfiles. - Updates package-feed documentation and the Dependabot comment to identify the settings that must stay aligned and explain older npm behavior.
| File | Description |
|---|---|
unittests/NodeApi/test/.npmrc |
Adds the eight-day gate for Node-API tests. |
tools/hcdp/.npmrc |
Adds the eight-day gate for HCDP tooling. |
tools/fork-sync/.npmrc |
Adds the eight-day gate for fork-sync tooling. |
external/node-api-cts/.npmrc |
Adds the eight-day gate for Node-API conformance tests. |
benchmarks/widgets/single-file/es5/.npmrc |
Adds the eight-day gate for single-file widget benchmarks. |
benchmarks/widgets/original/es5/.npmrc |
Adds the eight-day gate for original widget benchmarks. |
benchmarks/raytracer/original/.npmrc |
Adds the eight-day gate for raytracer benchmarks. |
.github/dependabot.yml |
Updates the comment to reference both npm and Yarn age gates. |
.ado/scripts/README.md |
Documents alignment, transitive resolution, and older npm behavior. |
.ado/scripts/.npmrc |
Adds the eight-day gate for build and CI tooling. |
Review effort: Balanced
Benchmark ResultsTotal benchmarks: 204 Inputs: baseline/baseline.json, bench_result.json v8 (6176ms, 4413ms) -28.6%
test-suites (317886ms, 249132ms) -21.6%
micros (60876ms, 48174ms) -20.9%
jit-benches (8563ms, 5382ms) -37.1%
many-subclasses (73437ms, 63646ms) -13.3%
map-objects (3627ms, 1493ms) -58.8%
map-strings (4335ms, 1724ms) -60.2%
nbody (3448ms, 2336ms) -32.2%
string-switch (6503ms, 4765ms) -26.7%
raytracer (5608ms, 4413ms) -21.3%
MiniReact (30332ms, 16581ms) -45.3%
widgets (12934ms, 10230ms) -20.9%
|
Vladimir Morozov (vmoroz)
enabled auto-merge (squash)
November 18, 2026 04:15
Julio César Rocha (JunielKatarn)
approved these changes
Nov 18, 2026
This was referenced Nov 25, 2026
Andy Jordan (andyleejordan)
added a commit
to Azure/bicep
that referenced
this pull request
Nov 30, 2026
…FS hold (#20603) <!-- copilot-assessment:v1 --> ### Agent assessment Self-reported assessment, not an independent review. Assessed revision: `5bb9bda04755565ebebdd3f26037947d3a4e16c7` | Dimension | Assessment | Rationale | |---|---|---| | Change confidence | 9.5/10 | ↑ All 36 required CI status checks on `5bb9bda04` passed (including `Build Highlight Libraries`, all `Test CLI (e2e)` platforms, all `Build CLI NuGet Packages` platforms, .NET, Playground, VS Code Extension, and VS Code Bicep UI), and all eight npm roots passed real `npm ci` locally against `packagefeedproxy.microsoft.io/npm/`.<br>↑ Cross-family review by Claude Sonnet 5.5 found no issues.<br>↓ No live Dependabot job has run yet; the 4 non-required `Test CLI (live)` jobs fail repo-wide on the disabled Azure CLI identity. | | Diagnosis confidence | 9.5/10 | ↑ Confirmed in `dependabot-core` that `cooldown` uses `release_date + 7 * 86400s` and passes `--min-release-age=7` during npm lockfile updates.<br>↑ Live CI on `33927c7fc` proved that `omit-lockfile-registry-resolved=true` + `min-release-age=7` also enforces the 7-day gate during real `npm ci` reification, immediately catching `[email protected]`. | | Evidence fit | 9.5/10 | ↑ Aligns future Dependabot and `.npmrc` lockfile writes, enforces the 7-day floor at `npm ci` time in PR checks (via `omit-lockfile-registry-resolved=true`), and repairs the two remaining Nov 22 lockfile pins still missing from the proxy feed.<br>↓ `src/vscode-bicep-ui` still pins `[email protected]` under Corepack for Dependabot runs. | <!-- /copilot-assessment --> ## Description Routine npm lockfile updates can land before newly published packages clear the 7-day Central Feed Services (`https://packagefeedproxy.microsoft.io/npm/`) release hold, leaving Microsoft-managed developer machines failing `npm ci` with `ETARGET` while GitHub-hosted CI passes against public npm (#20602). Rather than wiring public GitHub Actions to an authenticated private feed (`packagefeedproxy.microsoft.io` is for developer machines only), we align both Dependabot and project-level `.npmrc` configs with the 7-day release-age floor across all eight npm roots (`src/vscode-bicep`, `src/vscode-bicep-ui`, `src/playground`, `src/Bicep.Cli.E2eTests`, `src/Bicep.MSBuild.E2eTests`, `src/textmate`, `src/highlightjs`, and `src/monarch`), and step back the two remaining `< 7d` packages still breaking `main` today. ### Why `.github/dependabot.yml`, `.npmrc`, and the five lockfiles all changed - **Routine Dependabot version updates (`.github/dependabot.yml`):** Sets `cooldown: { default-days: 7 }` on all eight `npm` entries while leaving schedules, groups, `ignore` rules, and non-npm ecosystems untouched. Checking [`dependabot/dependabot-core`](https://github.com/dependabot/dependabot-core) confirmed two details that weren't obvious from the docs alone: [`cooldown_calculation.rb`](https://github.com/dependabot/dependabot-core/blob/main/common/lib/dependabot/update_checkers/cooldown_calculation.rb) uses `(now - release_date) < 7 * 86400s` (168 hours from registry publish, selecting the newest eligible release outside the window), and when no `exclude` list is set, [`npm_lockfile_updater.rb`](https://github.com/dependabot/dependabot-core/blob/main/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb) also passes `--min-release-age=7` to `npm install --package-lock-only` (npm 11.10+) so transitive subdependencies like `tinybench` are held to `>= 7` days old too. - **Public-npm lockfile writers and a built-in `npm ci` PR gate (`src/*/.npmrc`):** Surveying other public `microsoft` and `Azure` repos showed teams choosing between or combining Dependabot `cooldown` (`Azure/azure-dev`, `Azure/Azurite`, `Azure/azure-rest-api-specs`, microsoft/PyRIT#4642) and `.npmrc` `min-release-age=7` (microsoft/vscode-vsce#1346, microsoft/hermes-windows#414). In `Azure/bicep`, adding `min-release-age=7` to our existing `.npmrc` files does double duty: it gates non-CFS lockfile writers hitting public npm (`copilot-auto-fix.yml`, `update-dependencies.yml`, `lockfiles-command.yml`, and external contributor or Codespace `npm install`/`npm update` runs, plus avoiding the Dependabot transitive resolver/writer `NpmNoChangeError` in microsoft/hermes-windows#414), and because every `.npmrc` here already sets `omit-lockfile-registry-resolved=true`, real `npm ci` on Node 24 (`npm` 11.19+) resolves tarball metadata during reification and **enforces `min-release-age=7` against `package-lock.json` in PR CI** without needing a custom workflow script like microsoft/vscode#350048 (`npm ci --dry-run` skips reification, which initially masked that behavior locally). - **Repairing the remaining Nov 22 lockfile pins (`src/textmate/package.json` and five `package-lock.json` files):** That new `npm ci` gate immediately failed CI on `33927c7fc` with `ETARGET` for `[email protected]` (#20589, #20591, #20592, #20593, #20594), and auditing all 65 recently bumped packages across all eight lockfiles against `packagefeedproxy.microsoft.io/npm/` found `[email protected]` (in `Bicep.Cli.E2eTests`, `Bicep.MSBuild.E2eTests`, `highlightjs`, `monarch`, and `textmate`) and `[email protected]` (in `textmate` from #20592) still inside the 7-day hold. Stepping only those two packages back to `[email protected]` and `[email protected]` unbreaks `npm ci` today on both managed developer machines and GitHub Actions. ### Tradeoffs and exclusions - **Security updates:** Dependabot bypasses `cooldown` and passes `--min-release-age=0` when writing security PRs, though `npm ci` in GitHub Actions will now flag a `< 7d` locked package on PR validation rather than letting it merge silently and break developer machines. - **Older npm and `src/vscode-bicep-ui`'s `packageManager` pin:** `min-release-age` requires npm `>= 11.10` (bundled with Node 24 in `build.yml`). Older npm clients—confirmed on the Alpine `linux-musl-x64` CLI e2e container in CI—only log an unknown-config warning and succeed. `src/vscode-bicep-ui/package.json` still pins `"packageManager": "[email protected]"` for Turborepo; CI doesn't enable Corepack so Node 24's npm 11 enforces `.npmrc`, while Dependabot runs `[email protected]` via Corepack and therefore applies the 7-day direct `cooldown` without the `--min-release-age=7` transitive flag until `packageManager` is bumped separately. Fixes #20602. ### Validation - `.github/dependabot.yml` parsed cleanly and passed validation against the [SchemaStore Dependabot v2 schema](https://www.schemastore.org/dependabot-2.0.json) and [GitHub's `cooldown` reference](https://docs.github.com/en/code-security/reference/supply-chain-security/dependabot-options-reference#cooldown). - `npm --prefix <dir> config get min-release-age` returned `7` across all eight npm roots, and real `npm ci --ignore-scripts` passed across all eight npm roots against `packagefeedproxy.microsoft.io/npm/`. - Full `npm ci && npm run build && npm test` passed in `src/highlightjs` (31/31 tests), `src/monarch` (29/29 tests), and `src/textmate` (31/31 tests). - `npm exec --yes --package=prettier -- prettier --check src/textmate/package.json` passed; `.github/dependabot.yml` reported only the pre-existing single-quoted wildcard in `dotnet-sdk`; `git diff --check` passed across all 15 changed files. - Cross-family full-diff review (Claude Sonnet 5.5) passed with no findings, and all 36 required GitHub Actions status checks passed on [Build run 45717706839](https://github.com/Azure/bicep/actions/runs/45717706839). ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/Azure/bicep/pull/20603) _Drafted by Copilot with Gemini 4 Carbon._ --------- Co-authored-by: Copilot App <[email protected]>
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.
Summary
The grouped npm Dependabot update
(run 43036355131)
failed with
NoChangeErrorfor@babel/generatorand@babel/parserin three npmprojects. Both packages are direct dependencies of other monitored projects, so
Dependabot also checks them where they are only transitive. For a transitive npm
dependency, Dependabot picks the new version with
npm updateand no age limit, thenrewrites the lockfile with
--min-release-age=8taken from the cooldown. Babel 7.29.13was less than 8 days old, so the rewrite changed nothing and the run failed. The Yarn
projects in the same run did not fail:
npmMinimalAgeGate: "8d"in.yarnrc.ymlapplies to both steps.
min-release-age=8in each npm project's.npmrc, so npmuses the same limit in both Dependabot steps. Dependabot adds its own flag only when
the cooldown is longer, and security updates still override the gate with
--min-release-age=0.dependabot.ymland "Package feeds" in.ado/scripts/README.mdnow name all three settings that must stay aligned.npm 11.10 and newer (Node 24 currently bundles 11.19.1) also apply the gate to local
and CI restores.
npm cithen rejects a locked version younger than 8 days, one daylonger than the proxy already withholds new versions. Older npm ignores the setting and
prints an "Unknown project config" warning.
Test Plan
Local validation through the anonymous PackageFeedProxy:
.\dev npm-source-lint: passed, 13 projects, 0 violations. Its.ado/scriptsrestore with npm 11.8.0 printed the expected warning and succeeded.
a copy of
unittests/NodeApi/test:npm update @babel/generator --force --ignore-scripts --package-lock-only --allow-git=all --allow-remote=all.Babel 7.29.13 is now 13 days old, so a 14-day gate recreates the run's timing:
main: locked 7.29.13;--min-release-age=14, as the writer runs it: kept 7.29.12, the mismatchthat failed the run;
min-release-age=14in.npmrcand no flag: kept 7.29.12, so both stepsagree;
.npmrc: locked 7.29.13, so the pending update now goesthrough.
npm ci --ignore-scriptswith npm 11.20.0 and the committed gate: passed for alleight npm projects. From an empty cache,
unittests/NodeApi/testtook 5.4 s withthe gate and 7.4 s without it.
The next scheduled Dependabot npm run confirms the fix after merge.
Microsoft Reviewers: Open in CodeFlow