Skip to content

Omit registry URLs from the npm lockfile - #18

Merged
Vlad G (vladpm) merged 1 commit into
Azure-Samples:mainfrom
JamieMagee:omit-lockfile-registry-resolved
Aug 28, 2026
Merged

Omit registry URLs from the npm lockfile#18
Vlad G (vladpm) merged 1 commit into
Azure-Samples:mainfrom
JamieMagee:omit-lockfile-registry-resolved

Conversation

@JamieMagee

Copy link
Copy Markdown
Contributor

What changed

Added a project-level .npmrc with omit-lockfile-registry-resolved=true and regenerated package-lock.json with npm 10.9.4.

Why

The lockfile recorded Azure Artifacts proxy URLs in each registry dependency's resolved field. Those URLs depend on the registry used when the lockfile is generated. The npm setting keeps future lockfile updates independent of that registry.

Dependency versions, integrity hashes, and lockfileVersion are unchanged. npm will resolve registry tarball URLs from the configured registry during installation.

Validation

  • npx --yes npm@10.9.4 config get omit-lockfile-registry-resolved
  • npx --yes npm@10.9.4 install --package-lock-only --ignore-scripts
  • Repeated lockfile generation and confirmed a clean result
  • npx --yes npm@10.9.4 ci --ignore-scripts
  • npm run db:generate
  • TZ=UTC npm test (101 tests passed)
  • npm run lint

This change does not affect application behavior, security, privacy, accessibility, deployment, or cost. It does not add registry credentials or authentication settings.

npm config reference: https://docs.npmjs.com/cli/v8/using-npm/config#omit-lockfile-registry-resolved

Add project-level npm configuration so future lockfile updates do not record registry-specific resolved URLs. Regenerate the lockfile with npm 10.9.4 without changing dependency versions or integrity hashes.
@vladpm

Copy link
Copy Markdown
Contributor

Thanks Jamie Magee (@JamieMagee). Good catch. Confirmed change is limited to stripping registry-specific resolved URLs and project .npmrc keeps future lockfile updates registry-agnostic.

Approving and applying the same omit-lockfile-reigstry-resolved setting on our other active branches so whole repo stays consistent.

@vladpm
Vlad G (vladpm) merged commit 5140e5c into Azure-Samples:main Aug 28, 2026
6 of 7 checks passed
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.

2 participants