Skip to content

Fix Dependabot npm updates and keep yarn.lock free of download URLs - #16548

Merged
Vladimir Morozov (vmoroz) merged 1 commit into
microsoft:mainfrom
vmoroz:PR/fix-dependabot-lockfile-urls
Oct 31, 2026
Merged

Vladimir Morozov (vmoroz) merged 1 commit into
microsoft:mainfrom
vmoroz:PR/fix-dependabot-lockfile-urls

Conversation

@vmoroz

@vmoroz Vladimir Morozov (vmoroz) commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Automation (CI/pipeline changes)

Why

Dependabot npm updates keep failing, for two reasons.

Since #16511, GitHub rejects .github/dependabot.yml: an npm-registry entry
needs credentials, and the anonymous feed entries have none. Dependabot keeps
running the last valid config from August, so the grouping fixes from #16511
never took effect.

The jobs also fail on download URLs in yarn.lock. Dependabot jobs can only
reach public registries and registries declared in a valid config, so the
PackageFeedProxy and ms-feed-* hosts recorded in 159 lockfile entries are
blocked. Yarn records such a URL whenever a registry serves a package from
another host. PackageFeedProxy does that, so installs through it keep adding more.

What

Dependabot config

  • Remove the registries. Dependabot runs on GitHub and resolves updates from the
    public npm registry, so the config validates again and the Fix Dependabot grouping and route it through PackageFeedProxy #16511 grouping and
    ignore rules apply.
  • Use the 📦 [main] prefix for main npm updates and 🎬 [main] for GitHub
    Actions updates, matching the stable branches' 📦 [0.81] style.

Lockfile

  • Remove the download URLs from yarn.lock and merge the duplicate entries they
    had split. Versions and checksums don't change; pipelines keep restoring through
    PackageFeedProxy.

Guard

  • .ado/scripts/checkYarnLock.js runs first in the Linting job and fails when
    yarn.lock records a download URL; --fix removes them. .ado/README.md
    explains the setup.

The 0.81 and 0.85 lockfiles are cleaned in #16549 and #16550. Merge them first
or together with this one: once this config is valid, Dependabot also updates
those branches.

Screenshots

Not applicable.

Testing

yarn install --immutable through PackageFeedProxy passes with the cleaned
lockfile; the new check fails on the old lockfile and passes on the new one.

Changelog

Should this change be included in the release notes: no

Fix Dependabot npm updates and keep yarn.lock free of download URLs.

Dependabot rejected .github/dependabot.yml because its credential-less
registries fail schema validation, so it kept running an older config. Its
jobs also could not reach the PackageFeedProxy and ms-feed-* hosts recorded
in yarn.lock.

- Remove the registries; Dependabot resolves from the public npm registry.
- Remove the recorded download URLs from yarn.lock and merge the duplicate
  entries they had split. Versions and checksums are unchanged, and
  pipelines restore through their configured registry.
- Add checkYarnLock.js and run it in the Linting job to keep them out.
- Use the "📦 [main]" and "🎬 [main]" title prefixes for main and Actions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Enabling Dependabot updates for 0.81-stable and 0.85-stable requires a maintainer to coordinate merge order with the still-open required lockfile-cleanup PRs #16549 and #16550.

No open issues 🎉

What changed in this PR

Repairs Dependabot’s npm update configuration and keeps the shared lockfile usable by both Dependabot and React Native Windows pipelines.

Changes:

  • Removes invalid anonymous registry declarations while preserving grouping and ignore rules, and adds main-branch commit prefixes.
  • Removes recorded download URLs and merges duplicate lockfile entries without changing versions or checksums.
  • Adds an early linting check with a --fix option and documents the registry setup.
File Description
yarn.lock Removes archive URLs and consolidates duplicate entries.
.github/​dependabot.yml Removes registry declarations and updates commit prefixes.
.ado/​scripts/​checkYarnLock.js Detects recorded archive URLs and provides cleanup support.
.ado/​README.md Documents registry behavior and lockfile cleanup.
.ado/​jobs/​linting.yml Runs the lockfile guard before dependency installation.

Review effort: Balanced

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.

4 participants