Skip to content

Align npm release-age gate with the Dependabot cooldown - #414

Merged
Vladimir Morozov (vmoroz) merged 1 commit into
microsoft:mainfrom
vmoroz:PR/dependabot-npm-age-gate
Nov 18, 2026
Merged

Vladimir Morozov (vmoroz) merged 1 commit into
microsoft:mainfrom
vmoroz:PR/dependabot-npm-age-gate

Conversation

@vmoroz

@vmoroz Vladimir Morozov (vmoroz) commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

The grouped npm Dependabot update
(run 43036355131)
failed with NoChangeError for @babel/generator and @babel/parser in three npm
projects. 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 update and no age limit, then
rewrites the lockfile with --min-release-age=8 taken from the cooldown. Babel 7.29.13
was 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.yml
applies to both steps.

  • npm age gate: set min-release-age=8 in each npm project's .npmrc, so npm
    uses 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.
  • Docs: the cooldown comment in dependabot.yml and "Package feeds" in
    .ado/scripts/README.md now 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 ci then rejects a locked version younger than 8 days, one day
longer 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/scripts
    restore with npm 11.8.0 printed the expected warning and succeeded.
  • Dependabot's lockfile command, run with npm 12.2.0 (the version Dependabot uses) in
    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:
    • without a gate, as Dependabot's resolver runs it on main: locked 7.29.13;
    • with --min-release-age=14, as the writer runs it: kept 7.29.12, the mismatch
      that failed the run;
    • with min-release-age=14 in .npmrc and no flag: kept 7.29.12, so both steps
      agree;
    • with the committed .npmrc: locked 7.29.13, so the pending update now goes
      through.
  • npm ci --ignore-scripts with npm 11.20.0 and the committed gate: passed for all
    eight npm projects. From an empty cache, unittests/NodeApi/test took 5.4 s with
    the gate and 7.4 s without it.

The next scheduled Dependabot npm run confirms the fix after merge.

Microsoft Reviewers: Open in CodeFlow

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.
Copilot AI balanced review requested due to automatic review settings November 18, 2026 01:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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=8 to all eight npm projects’ .npmrc files.
  • 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

@github-actions

Copy link
Copy Markdown

Benchmark Results

Total benchmarks: 204

Inputs: baseline/baseline.json, bench_result.json

v8 (6176ms, 4413ms) -28.6%
v8 hermes (CI) hermes (CI)
v8-crypto 622.6ms 482.4ms
v8-deltablue 739.4ms 691.2ms
v8-raytrace 127.8ms 126.4ms
v8-regexp 593ms 308.2ms
v8-richards 937ms 721ms
v8-splay 225.2ms 202.4ms
v8-crypto (static) 452ms 347.6ms
v8-deltablue (static) 661.6ms 531.8ms
v8-raytrace (static) 91.8ms 76.6ms
v8-regexp (static) 749.2ms 275.8ms
v8-richards (static) 781.4ms 487.4ms
v8-splay (static) 195ms 161.8ms
test-suites (317886ms, 249132ms) -21.6%
test-suites hermes (CI) hermes (CI)
box2d 2949.8ms 2106.4ms
earley-boyer 2564.8ms 2252.6ms
navier-stokes 5743.8ms 3493.4ms
pdfjs 1038.2ms 747ms
gbemu 2296ms 1802ms
code-load 4472.8ms 3692.8ms
typescript 3381.8ms 2482.2ms
simpleSum 8855.4ms 5040.6ms
propAccess 2691.2ms 1733.4ms
allocObj 252ms 171.4ms
allocObjLit 6371.8ms 4643.4ms
allocNewObj 20053ms 15970.6ms
allocArray 249ms 172ms
allocNewArray 34956.8ms 27932.4ms
arrayRead 115.6ms 69ms
arrayReadByIndex 550ms 367.6ms
largeArrayRead 827.2ms 408.8ms
arrayWrite 261.8ms 203.4ms
largeArrayWrite 2218ms 1729.4ms
interp-dispatch 2880ms 1731.2ms
wb-perf 8327ms 8128.2ms
arrayReverse 40.6ms 31.8ms
arrayMap 1472.6ms 1493.4ms
arrayIndexOf 143.2ms 122.6ms
arrayLastIndexOf 148.6ms 145.8ms
arrayEvery 2308.8ms 2340.4ms
arraySome 2174.4ms 2329ms
arrayFill 2401.2ms 1996.8ms
arrayFilter 1866.4ms 1753.8ms
arrayFind 3207ms 2718ms
arrayFindIndex 3322ms 2711.8ms
arrayPop 1031.4ms 852.2ms
arrayReduce 1994.2ms 2033ms
arrayReduceRight 2075.8ms 2061.8ms
arrayShift 2065.8ms 1884ms
arrayUnshift 2109.4ms 1936.8ms
arrayIncludes 1216.6ms 112.4ms
arrayFrom 1102.8ms 899.8ms
arrayCopyWithin 1487ms 1276.2ms
stringFromCharCode 92.6ms 73.8ms
arraySlice 786.2ms 691.4ms
arraySplice 26.8ms 23.2ms
arrayOf 1048.8ms 774.4ms
stringCharAt 1346.6ms 1111.4ms
stringMatch 3192.4ms 2377ms
stringSearch 3508.2ms 2342.8ms
stringStartsWith 701ms 476.4ms
stringEndsWith 650.4ms 419.2ms
stringIncludes 1520.6ms 1428ms
stringIndexOf 1555.6ms 1678.6ms
stringLastIndexOf 1821.4ms 1518.4ms
stringSplit 822ms 575.6ms
stringSlice 490ms 346.2ms
stringPadStart 2910.8ms 2549.2ms
stringPadEnd 2910ms 2552.6ms
regExpMatch 1506.2ms 498.8ms
regExpSearch 1227ms 923.2ms
regExpToString 1204ms 959.6ms
stringReplace 1394.8ms 1277.4ms
regExpReplace 3309.2ms 309.2ms
regExpFlags 956.8ms 813.4ms
regExpSplit 1307.8ms 590ms
numberArrayReadWrite 2477.8ms 1916.4ms
protoCache 3594.6ms 1837.4ms
box2d (static) 1792.6ms 1336ms
earley-boyer (static) 1875.6ms 1517.6ms
navier-stokes (static) 3410.2ms 2633.6ms
pdfjs (static) 812.8ms 601.8ms
gbemu (static) 1797ms 1385.6ms
code-load (static) 4199.2ms 3365ms
typescript (static) 2685.6ms 1992.2ms
simpleSum (static) 936.2ms 853.2ms
propAccess (static) 2298ms 1843.4ms
allocObj (static) 0.2ms 0.8ms
allocObjLit (static) 4154.4ms 3049ms
allocNewObj (static) 15749.2ms 14258ms
allocArray (static) 0.6ms 0.2ms
allocNewArray (static) 28494.2ms 24849.6ms
arrayRead (static) 74.2ms 55.4ms
arrayReadByIndex (static) 453.2ms 387.6ms
largeArrayRead (static) 552.2ms 428ms
arrayWrite (static) 178.4ms 136ms
largeArrayWrite (static) 1568.6ms 1248.6ms
interp-dispatch (static) 1918.8ms 1584.8ms
wb-perf (static) 8991.2ms 7237.6ms
arrayReverse (static) 37ms 32ms
arrayMap (static) 1064.8ms 845.8ms
arrayIndexOf (static) 128.2ms 87.8ms
arrayLastIndexOf (static) 138.8ms 88.4ms
arrayEvery (static) 1397.6ms 1187.2ms
arraySome (static) 1406.6ms 1191.4ms
arrayFill (static) 1969.2ms 1620.6ms
arrayFilter (static) 1061ms 893.2ms
arrayFind (static) 2242.2ms 1934.4ms
arrayFindIndex (static) 2235.8ms 1927.6ms
arrayPop (static) 878ms 731.4ms
arrayReduce (static) 1311.8ms 1117.6ms
arrayReduceRight (static) 1322.6ms 1126.8ms
arrayShift (static) 1512ms 1243.4ms
arrayUnshift (static) 1568.2ms 1276ms
arrayIncludes (static) 963.4ms 93.8ms
arrayFrom (static) 1030.6ms 767.6ms
arrayCopyWithin (static) 1109.6ms 899.2ms
stringFromCharCode (static) 77ms 57ms
arraySlice (static) 571.6ms 479.4ms
arraySplice (static) 26ms 23ms
arrayOf (static) 868.8ms 648.2ms
stringCharAt (static) 1100.6ms 855.4ms
stringMatch (static) 2227.6ms 1923ms
stringSearch (static) 2219.2ms 1881.6ms
stringStartsWith (static) 494.2ms 362.4ms
stringEndsWith (static) 457.8ms 348ms
stringIncludes (static) 1437.4ms 860.2ms
stringIndexOf (static) 1440.8ms 1214.6ms
stringLastIndexOf (static) 1956.6ms 1218ms
stringSplit (static) 651.2ms 478.4ms
stringSlice (static) 445.6ms 296.6ms
stringPadStart (static) 2294.4ms 1911.2ms
stringPadEnd (static) 2499.2ms 1941ms
regExpMatch (static) 1483.2ms 445.2ms
regExpSearch (static) 1296.2ms 917.4ms
regExpToString (static) 1326.6ms 980.4ms
stringReplace (static) 1455.6ms 844.4ms
regExpReplace (static) 851.8ms 271.4ms
regExpFlags (static) 870.6ms 692.2ms
regExpSplit (static) 1200ms 539ms
numberArrayReadWrite (static) 2132.8ms 1635.6ms
protoCache (static) 3595.8ms 2839.4ms
micros (60876ms, 48174ms) -20.9%
micros hermes (CI) hermes (CI)
getNodeById.js 5273ms 4203.2ms
setInsert.js 2864.8ms 2292ms
stringify-number.js 1823.4ms 1205.4ms
typed-array-sort.js 22381ms 17510.8ms
getNodeById.js (static) 3941ms 3132.6ms
setInsert.js (static) 2517.6ms 2063.2ms
stringify-number.js (static) 1663.6ms 1099.6ms
typed-array-sort.js (static) 20411.4ms 16667.6ms
jit-benches (8563ms, 5382ms) -37.1%
jit-benches hermes (CI) hermes (CI)
idisp.js 2810.2ms 1731.6ms
idispn.js 3395.8ms 1761.4ms
idisp.js (static) 1906ms 1584.4ms
idispn.js (static) 450.8ms 304.6ms
many-subclasses (73437ms, 63646ms) -13.3%
many-subclasses hermes (CI) hermes (CI)
many.js 19104.8ms 14839.8ms
many-sh-1.js 7322.8ms 7843.8ms
many-sh-2.js 7329ms 7916.8ms
many-sh-3.js 7083.6ms 5902.2ms
many-sh-4.js 7235ms 5915.4ms
many.js (static) 15996ms 13522ms
many-sh-1.js (static) 2285.2ms 1905.2ms
many-sh-2.js (static) 2387ms 1991.8ms
many-sh-3.js (static) 2347.2ms 1904.4ms
many-sh-4.js (static) 2346ms 1905ms
map-objects (3627ms, 1493ms) -58.8%
map-objects hermes (CI) hermes (CI)
map-objects-untyped.js 1023.6ms 780.6ms
map-objects-typed.js 957.6ms -
map-objects-untyped.js (static) 917.2ms 712.8ms
map-objects-typed.js (static) 728.8ms -
map-strings (4335ms, 1724ms) -60.2%
map-strings hermes (CI) hermes (CI)
map-strings-untyped.js 1196.8ms 897ms
map-strings-typed.js 1139.2ms -
map-strings-untyped.js (static) 1092.2ms 826.6ms
map-strings-typed.js (static) 906.8ms -
nbody (3448ms, 2336ms) -32.2%
nbody hermes (CI) hermes (CI)
original/nbody.js 839.6ms 546.4ms
fully-typed/nbody.js 710ms 472.8ms
fully-typed/nbody.ts 865.2ms 561.8ms
original/nbody.js (static) 449.2ms 343ms
fully-typed/nbody.js (static) 135ms 70.6ms
fully-typed/nbody.ts (static) 449.2ms 341.6ms
string-switch (6503ms, 4765ms) -26.7%
string-switch (string-switch/plain) hermes (CI) hermes (CI)
bench.js 1316ms 1053.4ms
bench.js (static) 5187ms 3711.2ms
raytracer (5608ms, 4413ms) -21.3%
raytracer (raytracer/original) hermes (CI) hermes (CI)
bench-raytracer.js 1550.4ms 1260.2ms
raytracer.ts 1667.6ms 1233.2ms
bench-raytracer.js (static) 1198.4ms 978ms
raytracer.ts (static) 1191.8ms 942ms
MiniReact (30332ms, 16581ms) -45.3%
MiniReact hermes (CI) hermes (CI)
no-objects/out/simple-stripped.js 2239.2ms 652ms
no-objects/out/simple-lowered.js 2270.8ms 671.2ms
no-objects/out/music-stripped.js 42.6ms 34.6ms
no-objects/out/music-lowered.js 47.2ms 36.8ms
no-deps/stripped/MiniReact.js 5004ms 3593.4ms
no-deps/MiniReact.js 5256.2ms 3530.8ms
no-objects/out/simple.js 2260.4ms 613.2ms
no-objects/out/music.js 45.6ms 35ms
no-objects/out/simple-stripped.js (static) 1725.2ms 506.2ms
no-objects/out/simple-lowered.js (static) 1725.4ms 497ms
no-objects/out/music-stripped.js (static) 18.8ms 20.8ms
no-objects/out/music-lowered.js (static) 19.4ms 20.2ms
no-deps/stripped/MiniReact.js (static) 4024.8ms 2977.6ms
no-deps/MiniReact.js (static) 3938.2ms 2899.8ms
no-objects/out/simple.js (static) 1695.2ms 472ms
no-objects/out/music.js (static) 19ms 20.2ms
widgets (12934ms, 10230ms) -20.9%
widgets hermes (CI) hermes (CI)
simple-classes/widgets.js 1758.2ms 1786.2ms
original/es5/widgets.js 2798.8ms 2121.4ms
single-file/es5/widgets.js 2775.2ms 2120ms
simple-classes/widgets.js (static) 1012ms 902.2ms
original/es5/widgets.js (static) 2283.2ms 1653.4ms
single-file/es5/widgets.js (static) 2306.2ms 1646.8ms

@vmoroz
Vladimir Morozov (vmoroz) merged commit c5eb091 into microsoft:main Nov 18, 2026
19 checks passed
@vmoroz
Vladimir Morozov (vmoroz) deleted the PR/dependabot-npm-age-gate branch November 18, 2026 04:30
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.

3 participants