Skip to content

Keep committed npm and Yarn configs registry-free for Dependabot - #405

Merged
Vladimir Morozov (vmoroz) merged 1 commit into
microsoft:mainfrom
vmoroz:PR/dependabot-public-registry
Nov 4, 2026
Merged

Vladimir Morozov (vmoroz) merged 1 commit into
microsoft:mainfrom
vmoroz:PR/dependabot-public-registry

Conversation

@vmoroz

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

Copy link
Copy Markdown
Member

Summary

Since #404 the committed .npmrc and .yarnrc.yml files select
PackageFeedProxy. Dependabot reads those files but cannot reach the proxy, so
every npm update now fails with egress not allowlisted packagefeedproxy.microsoft.io
(run).
Keep the committed files registry-free and select the proxy where restores run,
as microsoft/react-native-windows#16548 does.

  • Dependabot: the committed configs no longer name a registry, so Dependabot
    resolves updates from the public npm registry. Its own config only gets
    updated comments.
  • CI and .\dev: CI sets NPM_CONFIG_REGISTRY and
    YARN_NPM_REGISTRY_SERVER for every job (.ado/npm-variables.yml), and
    .\dev sets them when they are unset, so pipeline and developer restores
    keep using the proxy.
  • Native build: the Node-API test build passes the registry to npm ci
    (HERMES_NPM_REGISTRY, the proxy by default), so it does not depend on how
    the build was started.
  • Guard: npm-source-lint now checks every committed .npmrc and
    .yarnrc.yml, including ones Dependabot reads from parent directories, and
    rejects any registry or credentials in them. Lockfiles stay free of download
    URLs, so the same lockfile restores from either registry.
  • Docs: the package-feed docs explain the setup and the one-time user
    setting for bare npm and yarn commands.

Lockfiles, dependency versions, the eight-day age gates, and NuGet are
unchanged.

Test Plan

  • .\dev npm-source-lint: passed, 12 projects, 0 violations.
    npm --prefix .ado\scripts run test:npm-source-lint: passed, 54 tests.
  • npm ci in all seven npm projects and yarn install --immutable in all five
    Yarn projects, with empty npm user/global config, cold caches, and the CI
    registry variables: passed; no lockfile changed.
  • .\dev build (x64 Release) with NPM_CONFIG_REGISTRY set to an invalid URL:
    passed, so the Node-API restore uses its explicit proxy registry.
  • Without environment or user configuration, the committed files now resolve
    to the public npm and Yarn registries, which is what Dependabot will use.
    Hosted Dependabot runs only on main, so it is confirmed after merge.
Microsoft Reviewers: Open in CodeFlow

Dependabot reads the committed .npmrc and .yarnrc.yml files. Since microsoft#404 they
select PackageFeedProxy, which Dependabot's network does not allow, so every
npm update fails with "egress not allowlisted packagefeedproxy.microsoft.io".

Remove the registry from those files so that Dependabot resolves updates from
the public npm registry, and route restores through the proxy from their
environment instead:
- CI sets NPM_CONFIG_REGISTRY and YARN_NPM_REGISTRY_SERVER for all jobs
  through .ado/npm-variables.yml.
- .\dev sets the same variables unless the caller already set them.
- The Node-API test build passes HERMES_NPM_REGISTRY, the proxy by default,
  to npm ci.

npm-source-lint now checks every committed .npmrc and .yarnrc.yml, which
Dependabot also reads from parent directories, and rejects any registry or
credentials in them. Lockfiles, dependency versions, the 8-day age gates and
NuGet are unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 4, 2026 15:53

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 were identified for the changes moving registry selection out of committed npm and Yarn configurations.

No open issues 🎉

What changed in this PR

This PR addresses Dependabot failures introduced by #404 by removing registry settings from committed npm and Yarn configs while keeping PackageFeedProxy selected for CI, developer-wrapper, and native test restores.

Changes:

  • Move registry selection to shared CI variables, scoped .\dev environment settings, and an explicit Node-API CMake option.
  • Extend source linting and tests to reject registries and credentials in all committed npm and Yarn configs.
  • Document feed setup without changing lockfiles, dependency versions, age gates, or NuGet configuration.
File Description
unittests/​NodeApi/​test/​CMakeLists.txt Pass a configurable registry explicitly to npm ci.
unittests/​NodeApi/​test/​.npmrc Remove the committed registry setting.
tools/​hcdp/​README.md Link package-feed setup instructions.
tools/​hcdp/​.npmrc Remove the committed registry setting.
tools/​fork-sync/​.npmrc Remove the committed registry setting.
dev.ps1 Set default registry variables and restore the caller’s environment afterward.
benchmarks/​widgets/​single-file/​es5/​README.md Link package-feed setup instructions.
benchmarks/​widgets/​single-file/​es5/​.npmrc Remove the committed registry setting.
benchmarks/​widgets/​original/​es5/​README.md Link package-feed setup instructions.
benchmarks/​widgets/​original/​es5/​.npmrc Remove the committed registry setting.
benchmarks/​raytracer/​original/​.npmrc Remove the committed registry setting.
benchmarks/​build-helpers/​flow-bundler/​README.md Link package-feed setup instructions.
API/​hermes/​cdp/​tools/​hermes-inspector-msggen/​README.md Document feed setup before installing test dependencies.
AGENTS.md Document the registry-free configuration requirement.
.yarnrc.yml Remove the registry setting while retaining the age gate.
.github/​dependabot.yml Update explanatory comments only.
.ado/​scripts/​README.md Explain registry selection and user setup.
.ado/​scripts/​npm-source-lint.ts Check all committed npm and Yarn configs for registries and credentials.
.ado/​scripts/​npm-source-lint.test.ts Cover registry rejection, parent configs, and shared-config diagnostics.
.ado/​scripts/​.npmrc Remove the committed registry setting.
.ado/​pr-pipeline.yml Import shared registry variables.
.ado/​npm-variables.yml Define npm and Yarn proxy environment variables.
.ado/​ci-pipeline.yml Import shared registry variables.
.ado/​build-template.yml Remove the redundant job-level registry variable.

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Benchmark Results

Total benchmarks: 204

Inputs: baseline/baseline.json, bench_result.json

v8 (6176ms, 6254ms) +1.3%
v8 hermes (CI) hermes (CI)
v8-crypto 622.6ms 607.4ms
v8-deltablue 739.4ms 793.4ms
v8-raytrace 127.8ms 122.8ms
v8-regexp 593ms 620.2ms
v8-richards 937ms 880ms
v8-splay 225.2ms 228.8ms
v8-crypto (static) 452ms 444.8ms
v8-deltablue (static) 661.6ms 667.8ms
v8-raytrace (static) 91.8ms 94.2ms
v8-regexp (static) 749.2ms 781ms
v8-richards (static) 781.4ms 803.8ms
v8-splay (static) 195ms 210ms
test-suites (317886ms, 307775ms) -3.2%
test-suites hermes (CI) hermes (CI)
box2d 2949.8ms 2572.6ms
earley-boyer 2564.8ms 2369.4ms
navier-stokes 5743.8ms 4372.4ms
pdfjs 1038.2ms 932.2ms
gbemu 2296ms 2173.8ms
code-load 4472.8ms 4465ms
typescript 3381.8ms 3183.4ms
simpleSum 8855.4ms 5678.4ms
propAccess 2691.2ms 2259.8ms
allocObj 252ms 192.6ms
allocObjLit 6371.8ms 6250.4ms
allocNewObj 20053ms 19702.4ms
allocArray 249ms 191.8ms
allocNewArray 34956.8ms 34494.6ms
arrayRead 115.6ms 87.6ms
arrayReadByIndex 550ms 608.2ms
largeArrayRead 827.2ms 533ms
arrayWrite 261.8ms 243ms
largeArrayWrite 2218ms 2073.4ms
interp-dispatch 2880ms 1907.6ms
wb-perf 8327ms 9581.6ms
arrayReverse 40.6ms 36.4ms
arrayMap 1472.6ms 1483.6ms
arrayIndexOf 143.2ms 138.8ms
arrayLastIndexOf 148.6ms 146.2ms
arrayEvery 2308.8ms 2239.8ms
arraySome 2174.4ms 2246.6ms
arrayFill 2401.2ms 2439.4ms
arrayFilter 1866.4ms 1898ms
arrayFind 3207ms 3307ms
arrayFindIndex 3322ms 3304.8ms
arrayPop 1031.4ms 1028ms
arrayReduce 1994.2ms 2082.4ms
arrayReduceRight 2075.8ms 2077.2ms
arrayShift 2065.8ms 2068.8ms
arrayUnshift 2109.4ms 2110ms
arrayIncludes 1216.6ms 1196.6ms
arrayFrom 1102.8ms 1173.8ms
arrayCopyWithin 1487ms 1512.2ms
stringFromCharCode 92.6ms 91.2ms
arraySlice 786.2ms 798.2ms
arraySplice 26.8ms 26.4ms
arrayOf 1048.8ms 1040ms
stringCharAt 1346.6ms 1287ms
stringMatch 3192.4ms 2950ms
stringSearch 3508.2ms 2937.6ms
stringStartsWith 701ms 597ms
stringEndsWith 650.4ms 546.4ms
stringIncludes 1520.6ms 1712.6ms
stringIndexOf 1555.6ms 1965.2ms
stringLastIndexOf 1821.4ms 1949.6ms
stringSplit 822ms 807ms
stringSlice 490ms 494.2ms
stringPadStart 2910.8ms 2935ms
stringPadEnd 2910ms 2959.2ms
regExpMatch 1506.2ms 1501.8ms
regExpSearch 1227ms 1223.6ms
regExpToString 1204ms 1057ms
stringReplace 1394.8ms 1531.2ms
regExpReplace 3309.2ms 866.2ms
regExpFlags 956.8ms 944.4ms
regExpSplit 1307.8ms 1279.6ms
numberArrayReadWrite 2477.8ms 2366.2ms
protoCache 3594.6ms 2350.4ms
box2d (static) 1792.6ms 1811.6ms
earley-boyer (static) 1875.6ms 1857.2ms
navier-stokes (static) 3410.2ms 3427.4ms
pdfjs (static) 812.8ms 788.8ms
gbemu (static) 1797ms 1749.8ms
code-load (static) 4199.2ms 4174.6ms
typescript (static) 2685.6ms 2622.4ms
simpleSum (static) 936.2ms 937.8ms
propAccess (static) 2298ms 2328ms
allocObj (static) 0.2ms 0.6ms
allocObjLit (static) 4154.4ms 4196ms
allocNewObj (static) 15749.2ms 15618.4ms
allocArray (static) 0.6ms 0.4ms
allocNewArray (static) 28494.2ms 28645.8ms
arrayRead (static) 74.2ms 76.4ms
arrayReadByIndex (static) 453.2ms 452.2ms
largeArrayRead (static) 552.2ms 523.6ms
arrayWrite (static) 178.4ms 179.8ms
largeArrayWrite (static) 1568.6ms 1633.6ms
interp-dispatch (static) 1918.8ms 1911.8ms
wb-perf (static) 8991.2ms 9083.2ms
arrayReverse (static) 37ms 36ms
arrayMap (static) 1064.8ms 975.4ms
arrayIndexOf (static) 128.2ms 126.8ms
arrayLastIndexOf (static) 138.8ms 139.8ms
arrayEvery (static) 1397.6ms 1427.4ms
arraySome (static) 1406.6ms 1435.2ms
arrayFill (static) 1969.2ms 1990.2ms
arrayFilter (static) 1061ms 1056.6ms
arrayFind (static) 2242.2ms 2264ms
arrayFindIndex (static) 2235.8ms 2256ms
arrayPop (static) 878ms 908ms
arrayReduce (static) 1311.8ms 1335ms
arrayReduceRight (static) 1322.6ms 1326.2ms
arrayShift (static) 1512ms 1532.8ms
arrayUnshift (static) 1568.2ms 1595ms
arrayIncludes (static) 963.4ms 942ms
arrayFrom (static) 1030.6ms 1022.2ms
arrayCopyWithin (static) 1109.6ms 1130.4ms
stringFromCharCode (static) 77ms 79ms
arraySlice (static) 571.6ms 571.8ms
arraySplice (static) 26ms 28.2ms
arrayOf (static) 868.8ms 867ms
stringCharAt (static) 1100.6ms 1097.6ms
stringMatch (static) 2227.6ms 2310.4ms
stringSearch (static) 2219.2ms 2316.2ms
stringStartsWith (static) 494.2ms 490.8ms
stringEndsWith (static) 457.8ms 457.2ms
stringIncludes (static) 1437.4ms 1678.2ms
stringIndexOf (static) 1440.8ms 1686ms
stringLastIndexOf (static) 1956.6ms 2214ms
stringSplit (static) 651.2ms 674.8ms
stringSlice (static) 445.6ms 435ms
stringPadStart (static) 2294.4ms 2428ms
stringPadEnd (static) 2499.2ms 2423.4ms
regExpMatch (static) 1483.2ms 1573.4ms
regExpSearch (static) 1296.2ms 1224.4ms
regExpToString (static) 1326.6ms 1050.6ms
stringReplace (static) 1455.6ms 1543ms
regExpReplace (static) 851.8ms 854.8ms
regExpFlags (static) 870.6ms 819ms
regExpSplit (static) 1200ms 1119.8ms
numberArrayReadWrite (static) 2132.8ms 2109.6ms
protoCache (static) 3595.8ms 3624.4ms
micros (60876ms, 61039ms) +0.3%
micros hermes (CI) hermes (CI)
getNodeById.js 5273ms 4885.4ms
setInsert.js 2864.8ms 2440.2ms
stringify-number.js 1823.4ms 1800.8ms
typed-array-sort.js 22381ms 22606.2ms
getNodeById.js (static) 3941ms 4026.6ms
setInsert.js (static) 2517.6ms 2700.8ms
stringify-number.js (static) 1663.6ms 1573.6ms
typed-array-sort.js (static) 20411.4ms 21005.8ms
jit-benches (8563ms, 6236ms) -27.2%
jit-benches hermes (CI) hermes (CI)
idisp.js 2810.2ms 1918.4ms
idispn.js 3395.8ms 2016.2ms
idisp.js (static) 1906ms 1914.4ms
idispn.js (static) 450.8ms 387.2ms
many-subclasses (73437ms, 76295ms) +3.9%
many-subclasses hermes (CI) hermes (CI)
many.js 19104.8ms 18281.4ms
many-sh-1.js 7322.8ms 8109ms
many-sh-2.js 7329ms 8135.2ms
many-sh-3.js 7083.6ms 8023.8ms
many-sh-4.js 7235ms 8033.8ms
many.js (static) 15996ms 16194.4ms
many-sh-1.js (static) 2285.2ms 2307ms
many-sh-2.js (static) 2387ms 2494.2ms
many-sh-3.js (static) 2347.2ms 2362.2ms
many-sh-4.js (static) 2346ms 2353.6ms
map-objects (3627ms, 3623ms) -0.1%
map-objects hermes (CI) hermes (CI)
map-objects-untyped.js 1023.6ms 1000ms
map-objects-typed.js 957.6ms 957.8ms
map-objects-untyped.js (static) 917.2ms 911ms
map-objects-typed.js (static) 728.8ms 754.4ms
map-strings (4335ms, 4327ms) -0.2%
map-strings hermes (CI) hermes (CI)
map-strings-untyped.js 1196.8ms 1163.6ms
map-strings-typed.js 1139.2ms 1097.6ms
map-strings-untyped.js (static) 1092.2ms 1113.8ms
map-strings-typed.js (static) 906.8ms 951.8ms
nbody (3448ms, 2920ms) -15.3%
nbody hermes (CI) hermes (CI)
original/nbody.js 839.6ms 679ms
fully-typed/nbody.js 710ms 543ms
fully-typed/nbody.ts 865.2ms 651.4ms
original/nbody.js (static) 449.2ms 456.4ms
fully-typed/nbody.js (static) 135ms 135.2ms
fully-typed/nbody.ts (static) 449.2ms 455.2ms
string-switch (6503ms, 6379ms) -1.9%
string-switch (string-switch/plain) hermes (CI) hermes (CI)
bench.js 1316ms 1290ms
bench.js (static) 5187ms 5088.8ms
raytracer (5608ms, 5468ms) -2.5%
raytracer (raytracer/original) hermes (CI) hermes (CI)
bench-raytracer.js 1550.4ms 1439.2ms
raytracer.ts 1667.6ms 1557ms
bench-raytracer.js (static) 1198.4ms 1231.2ms
raytracer.ts (static) 1191.8ms 1240.6ms
MiniReact (30332ms, 29621ms) -2.3%
MiniReact hermes (CI) hermes (CI)
no-objects/out/simple-stripped.js 2239.2ms 2131.8ms
no-objects/out/simple-lowered.js 2270.8ms 2174.6ms
no-objects/out/music-stripped.js 42.6ms 40.8ms
no-objects/out/music-lowered.js 47.2ms 44.6ms
no-deps/stripped/MiniReact.js 5004ms 4716.6ms
no-deps/MiniReact.js 5256.2ms 4668.8ms
no-objects/out/simple.js 2260.4ms 2136.8ms
no-objects/out/music.js 45.6ms 43.4ms
no-objects/out/simple-stripped.js (static) 1725.2ms 1760.6ms
no-objects/out/simple-lowered.js (static) 1725.4ms 1804.8ms
no-objects/out/music-stripped.js (static) 18.8ms 19.8ms
no-objects/out/music-lowered.js (static) 19.4ms 20.4ms
no-deps/stripped/MiniReact.js (static) 4024.8ms 4186.8ms
no-deps/MiniReact.js (static) 3938.2ms 4082.4ms
no-objects/out/simple.js (static) 1695.2ms 1768.6ms
no-objects/out/music.js (static) 19ms 20.4ms
widgets (12934ms, 12727ms) -1.6%
widgets hermes (CI) hermes (CI)
simple-classes/widgets.js 1758.2ms 1581.2ms
original/es5/widgets.js 2798.8ms 2721ms
single-file/es5/widgets.js 2775.2ms 2705.8ms
simple-classes/widgets.js (static) 1012ms 1019.4ms
original/es5/widgets.js (static) 2283.2ms 2348ms
single-file/es5/widgets.js (static) 2306.2ms 2352ms

@vmoroz
Vladimir Morozov (vmoroz) merged commit 5c72c85 into microsoft:main Nov 4, 2026
19 checks passed
@vmoroz
Vladimir Morozov (vmoroz) deleted the PR/dependabot-public-registry branch November 9, 2026 23:02
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