Skip to content

Use PackageFeedProxy for npm and Yarn restores - #404

Merged
Vladimir Morozov (vmoroz) merged 1 commit into
microsoft:mainfrom
vmoroz:PR/use-package-feed-proxy
Nov 4, 2026
Merged

Vladimir Morozov (vmoroz) merged 1 commit into
microsoft:mainfrom
vmoroz:PR/use-package-feed-proxy

Conversation

@vmoroz

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

Copy link
Copy Markdown
Member

Summary

The old ADO feed fails anonymous restores for uncached packages. Switch npm and
Yarn to Microsoft's PackageFeedProxy without changing normal install commands,
dependency versions, or NuGet feeds.

  • Restore sources: configure the anonymous proxy for package projects, CI,
    and standalone helpers so installs need no credentials or new environment setup.
  • Lockfile safety: retain Yarn 4 and the eight-day gates, and reject literal
    and encoded download URLs so lockfiles do not pin a download host. Dependabot
    groups and lockfile-only updates stay unchanged.
  • Native builds: refresh the copied npm configuration when its source changes
    so existing build trees pick up the new feed.

Test Plan

  • .\dev npm-source-lint and
    npm --prefix .ado\scripts run test:npm-source-lint: passed, 47 tests.
  • npm ci --no-audit --no-fund --maxsockets=8: passed in all seven npm projects
    with empty npm user/global configuration and no registry override. The committed Yarn 4
    release passed immutable installs in all five Yarn projects. All 12 lockfiles
    stayed byte-for-byte unchanged.
  • .\dev build: passed, x64 Release, including the native npm restore.

Hosted Dependabot has not yet been verified with this configuration.

Microsoft Reviewers: Open in CodeFlow

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

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.

🔵 Needs a closer look

Hosted Dependabot compatibility remains unverified because local restores do not confirm that hosted updates honor the proxy configuration and produce lockfiles compatible with the new download-URL restrictions.

No open issues 🎉

What changed in this PR

Switches npm and Yarn restores to Microsoft’s anonymous PackageFeedProxy to address uncached-package failures on the previous feed, without changing dependency versions or NuGet feeds.

Changes:

  • Updates package projects, CI, standalone helpers, and documentation to use the proxy while retaining the eight-day dependency gates.
  • Strengthens lockfile validation to reject literal and encoded download URLs, with additional regression tests.
  • Makes native builds refresh their copied npm configuration when the source changes.
File Description
unittests/​NodeApi/​test/​CMakeLists.txt Tracks source .npmrc changes to refresh the build copy.
unittests/​NodeApi/​test/​.npmrc Selects the proxy for Node-API test dependencies.
tools/​hermes-parser/​js/​scripts/​build-prettier.sh Uses the proxy for Prettier’s Yarn restore.
tools/​hcdp/​.npmrc Selects the proxy for hcdp dependencies.
tools/​fork-sync/​.npmrc Selects the proxy for fork-sync dependencies.
test/​SourceMap/​translator/​README.md Documents proxy-backed installation commands.
test/​circleci-e2e/​run.sh Routes React Native and Hermes installs through the proxy.
benchmarks/​widgets/​single-file/​es5/​.npmrc Selects the proxy for single-file widget dependencies.
benchmarks/​widgets/​original/​es5/​.npmrc Selects the proxy for original widget dependencies.
benchmarks/​raytracer/​original/​.npmrc Selects the proxy for raytracer dependencies.
.yarnrc.yml Switches Yarn’s registry while retaining its age gate.
.github/​dependabot.yml Clarifies feed and cooldown comments; update settings remain unchanged.
.ado/​scripts/​README.md Documents anonymous restores and registry-independent lockfiles.
.ado/​scripts/​npm-source-lint.ts Enforces the proxy and rejects Yarn download URLs.
.ado/​scripts/​npm-source-lint.test.ts Adds registry and lockfile URL validation cases.
.ado/​scripts/​.npmrc Selects the proxy for build-script dependencies.
.ado/​build-template.yml Sets CI’s npm registry to the proxy.

Review effort: Balanced

@vmoroz
Vladimir Morozov (vmoroz) merged commit b8eef8e into microsoft:main Nov 4, 2026
19 checks passed
@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, 6269ms) +1.5%
v8 hermes (CI) hermes (CI)
v8-crypto 622.6ms 620.4ms
v8-deltablue 739.4ms 780.2ms
v8-raytrace 127.8ms 123ms
v8-regexp 593ms 616.6ms
v8-richards 937ms 914ms
v8-splay 225.2ms 239.8ms
v8-crypto (static) 452ms 445.2ms
v8-deltablue (static) 661.6ms 676ms
v8-raytrace (static) 91.8ms 95.4ms
v8-regexp (static) 749.2ms 778ms
v8-richards (static) 781.4ms 765ms
v8-splay (static) 195ms 215ms
test-suites (317886ms, 327067ms) +2.9%
test-suites hermes (CI) hermes (CI)
box2d 2949.8ms 2481.8ms
earley-boyer 2564.8ms 2669.6ms
navier-stokes 5743.8ms 4537.8ms
pdfjs 1038.2ms 1046.2ms
gbemu 2296ms 2507.2ms
code-load 4472.8ms 4969.8ms
typescript 3381.8ms 2983.2ms
simpleSum 8855.4ms 6530.6ms
propAccess 2691.2ms 2223.6ms
allocObj 252ms 222.4ms
allocObjLit 6371.8ms 6445ms
allocNewObj 20053ms 20001.6ms
allocArray 249ms 223.6ms
allocNewArray 34956.8ms 36092ms
arrayRead 115.6ms 89.6ms
arrayReadByIndex 550ms 475.6ms
largeArrayRead 827.2ms 529.2ms
arrayWrite 261.8ms 257.6ms
largeArrayWrite 2218ms 2097.6ms
interp-dispatch 2880ms 2285.8ms
wb-perf 8327ms 11144.8ms
arrayReverse 40.6ms 40.8ms
arrayMap 1472.6ms 1806.4ms
arrayIndexOf 143.2ms 140ms
arrayLastIndexOf 148.6ms 150.6ms
arrayEvery 2308.8ms 2761.2ms
arraySome 2174.4ms 2784.2ms
arrayFill 2401.2ms 2478ms
arrayFilter 1866.4ms 2057.2ms
arrayFind 3207ms 3517.8ms
arrayFindIndex 3322ms 3495.2ms
arrayPop 1031.4ms 1068.8ms
arrayReduce 1994.2ms 2468.2ms
arrayReduceRight 2075.8ms 2460.8ms
arrayShift 2065.8ms 2292.4ms
arrayUnshift 2109.4ms 2403.2ms
arrayIncludes 1216.6ms 1169ms
arrayFrom 1102.8ms 1131.4ms
arrayCopyWithin 1487ms 1589.2ms
stringFromCharCode 92.6ms 92.8ms
arraySlice 786.2ms 827.4ms
arraySplice 26.8ms 30ms
arrayOf 1048.8ms 1004ms
stringCharAt 1346.6ms 1326.4ms
stringMatch 3192.4ms 2903.4ms
stringSearch 3508.2ms 2892.8ms
stringStartsWith 701ms 603ms
stringEndsWith 650.4ms 543.8ms
stringIncludes 1520.6ms 1889.2ms
stringIndexOf 1555.6ms 2336ms
stringLastIndexOf 1821.4ms 1782.8ms
stringSplit 822ms 789ms
stringSlice 490ms 503.8ms
stringPadStart 2910.8ms 3013.2ms
stringPadEnd 2910ms 3013ms
regExpMatch 1506.2ms 1538.6ms
regExpSearch 1227ms 1385ms
regExpToString 1204ms 1080.8ms
stringReplace 1394.8ms 1805ms
regExpReplace 3309.2ms 909.4ms
regExpFlags 956.8ms 971.2ms
regExpSplit 1307.8ms 1296.2ms
numberArrayReadWrite 2477.8ms 2403.4ms
protoCache 3594.6ms 2372.4ms
box2d (static) 1792.6ms 1802ms
earley-boyer (static) 1875.6ms 1870.8ms
navier-stokes (static) 3410.2ms 3540.2ms
pdfjs (static) 812.8ms 820ms
gbemu (static) 1797ms 1717.2ms
code-load (static) 4199.2ms 4357.2ms
typescript (static) 2685.6ms 2630.4ms
simpleSum (static) 936.2ms 1103.4ms
propAccess (static) 2298ms 2354.6ms
allocObj (static) 0.2ms 0.6ms
allocObjLit (static) 4154.4ms 4345.4ms
allocNewObj (static) 15749.2ms 17971.2ms
allocArray (static) 0.6ms 0.6ms
allocNewArray (static) 28494.2ms 31836.6ms
arrayRead (static) 74.2ms 71.4ms
arrayReadByIndex (static) 453.2ms 499.6ms
largeArrayRead (static) 552.2ms 555ms
arrayWrite (static) 178.4ms 187.2ms
largeArrayWrite (static) 1568.6ms 1644.6ms
interp-dispatch (static) 1918.8ms 2042.8ms
wb-perf (static) 8991.2ms 9349ms
arrayReverse (static) 37ms 41.2ms
arrayMap (static) 1064.8ms 1083ms
arrayIndexOf (static) 128.2ms 126ms
arrayLastIndexOf (static) 138.8ms 131.8ms
arrayEvery (static) 1397.6ms 1553.2ms
arraySome (static) 1406.6ms 1553.6ms
arrayFill (static) 1969.2ms 2077.2ms
arrayFilter (static) 1061ms 1151.2ms
arrayFind (static) 2242.2ms 2509.4ms
arrayFindIndex (static) 2235.8ms 2538.8ms
arrayPop (static) 878ms 924.2ms
arrayReduce (static) 1311.8ms 1449.4ms
arrayReduceRight (static) 1322.6ms 1448.6ms
arrayShift (static) 1512ms 1587ms
arrayUnshift (static) 1568.2ms 1631.4ms
arrayIncludes (static) 963.4ms 984.4ms
arrayFrom (static) 1030.6ms 988.2ms
arrayCopyWithin (static) 1109.6ms 1150.6ms
stringFromCharCode (static) 77ms 75.4ms
arraySlice (static) 571.6ms 602.8ms
arraySplice (static) 26ms 29.8ms
arrayOf (static) 868.8ms 812.8ms
stringCharAt (static) 1100.6ms 1132.6ms
stringMatch (static) 2227.6ms 2287.6ms
stringSearch (static) 2219.2ms 2285ms
stringStartsWith (static) 494.2ms 508.6ms
stringEndsWith (static) 457.8ms 452.8ms
stringIncludes (static) 1437.4ms 1864.4ms
stringIndexOf (static) 1440.8ms 1838.2ms
stringLastIndexOf (static) 1956.6ms 2422ms
stringSplit (static) 651.2ms 650.4ms
stringSlice (static) 445.6ms 451.6ms
stringPadStart (static) 2294.4ms 2373.2ms
stringPadEnd (static) 2499.2ms 2376.6ms
regExpMatch (static) 1483.2ms 1373.6ms
regExpSearch (static) 1296.2ms 1381.8ms
regExpToString (static) 1326.6ms 1263.4ms
stringReplace (static) 1455.6ms 1780.8ms
regExpReplace (static) 851.8ms 807.6ms
regExpFlags (static) 870.6ms 858ms
regExpSplit (static) 1200ms 1058ms
numberArrayReadWrite (static) 2132.8ms 2118.4ms
protoCache (static) 3595.8ms 3690.6ms
micros (60876ms, 62405ms) +2.5%
micros hermes (CI) hermes (CI)
getNodeById.js 5273ms 5374.4ms
setInsert.js 2864.8ms 2535.6ms
stringify-number.js 1823.4ms 1906ms
typed-array-sort.js 22381ms 22637.8ms
getNodeById.js (static) 3941ms 4171.2ms
setInsert.js (static) 2517.6ms 2434.6ms
stringify-number.js (static) 1663.6ms 1598.4ms
typed-array-sort.js (static) 20411.4ms 21747.2ms
jit-benches (8563ms, 7033ms) -17.9%
jit-benches hermes (CI) hermes (CI)
idisp.js 2810.2ms 2286.4ms
idispn.js 3395.8ms 2308.6ms
idisp.js (static) 1906ms 2047ms
idispn.js (static) 450.8ms 390.8ms
many-subclasses (73437ms, 78068ms) +6.3%
many-subclasses hermes (CI) hermes (CI)
many.js 19104.8ms 18855.4ms
many-sh-1.js 7322.8ms 8164.4ms
many-sh-2.js 7329ms 8106.2ms
many-sh-3.js 7083.6ms 7653.4ms
many-sh-4.js 7235ms 7637.8ms
many.js (static) 15996ms 17745ms
many-sh-1.js (static) 2285.2ms 2400.4ms
many-sh-2.js (static) 2387ms 2581.2ms
many-sh-3.js (static) 2347.2ms 2468ms
many-sh-4.js (static) 2346ms 2456ms
map-objects (3627ms, 3604ms) -0.6%
map-objects hermes (CI) hermes (CI)
map-objects-untyped.js 1023.6ms 1012.8ms
map-objects-typed.js 957.6ms 923ms
map-objects-untyped.js (static) 917.2ms 932.2ms
map-objects-typed.js (static) 728.8ms 736.2ms
map-strings (4335ms, 4185ms) -3.5%
map-strings hermes (CI) hermes (CI)
map-strings-untyped.js 1196.8ms 1142.8ms
map-strings-typed.js 1139.2ms 1057.4ms
map-strings-untyped.js (static) 1092.2ms 1087.6ms
map-strings-typed.js (static) 906.8ms 897.6ms
nbody (3448ms, 3127ms) -9.3%
nbody hermes (CI) hermes (CI)
original/nbody.js 839.6ms 748.4ms
fully-typed/nbody.js 710ms 612.4ms
fully-typed/nbody.ts 865.2ms 738.2ms
original/nbody.js (static) 449.2ms 451.2ms
fully-typed/nbody.js (static) 135ms 128.8ms
fully-typed/nbody.ts (static) 449.2ms 448.4ms
string-switch (6503ms, 5684ms) -12.6%
string-switch (string-switch/plain) hermes (CI) hermes (CI)
bench.js 1316ms 1399.2ms
bench.js (static) 5187ms 4284.6ms
raytracer (5608ms, 5648ms) +0.7%
raytracer (raytracer/original) hermes (CI) hermes (CI)
bench-raytracer.js 1550.4ms 1537.6ms
raytracer.ts 1667.6ms 1622.6ms
bench-raytracer.js (static) 1198.4ms 1244.4ms
raytracer.ts (static) 1191.8ms 1243ms
MiniReact (30332ms, 29277ms) -3.5%
MiniReact hermes (CI) hermes (CI)
no-objects/out/simple-stripped.js 2239.2ms 2008ms
no-objects/out/simple-lowered.js 2270.8ms 2033.4ms
no-objects/out/music-stripped.js 42.6ms 41.4ms
no-objects/out/music-lowered.js 47.2ms 47.4ms
no-deps/stripped/MiniReact.js 5004ms 4953.4ms
no-deps/MiniReact.js 5256.2ms 4899.2ms
no-objects/out/simple.js 2260.4ms 2012ms
no-objects/out/music.js 45.6ms 45.2ms
no-objects/out/simple-stripped.js (static) 1725.2ms 1698.4ms
no-objects/out/simple-lowered.js (static) 1725.4ms 1736.4ms
no-objects/out/music-stripped.js (static) 18.8ms 19.6ms
no-objects/out/music-lowered.js (static) 19.4ms 19.8ms
no-deps/stripped/MiniReact.js (static) 4024.8ms 4039.4ms
no-deps/MiniReact.js (static) 3938.2ms 4008.6ms
no-objects/out/simple.js (static) 1695.2ms 1695.8ms
no-objects/out/music.js (static) 19ms 19.4ms
widgets (12934ms, 13150ms) +1.7%
widgets hermes (CI) hermes (CI)
simple-classes/widgets.js 1758.2ms 1693.4ms
original/es5/widgets.js 2798.8ms 2879.8ms
single-file/es5/widgets.js 2775.2ms 2857ms
simple-classes/widgets.js (static) 1012ms 1029.2ms
original/es5/widgets.js (static) 2283.2ms 2313.4ms
single-file/es5/widgets.js (static) 2306.2ms 2377.2ms

Vladimir Morozov (vmoroz) added a commit that referenced this pull request Nov 4, 2026
Dependabot reads the committed .npmrc and .yarnrc.yml files. Since #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>
@vmoroz
Vladimir Morozov (vmoroz) deleted the PR/use-package-feed-proxy branch November 9, 2026 23:03
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