Skip to content

Remove registry URLs from npm lockfile - #845

Open
Jamie Magee (JamieMagee) wants to merge 1 commit into
microsoft:mainfrom
JamieMagee:fix/npm-lockfile-registry-urls
Open

Remove registry URLs from npm lockfile#845
Jamie Magee (JamieMagee) wants to merge 1 commit into
microsoft:mainfrom
JamieMagee:fix/npm-lockfile-registry-urls

Conversation

@JamieMagee

Copy link
Copy Markdown
Member

Summary

Add omit-lockfile-registry-resolved=true to the existing root .npmrc and regenerate the lockfile with npm 10.9.4. The lockfile no longer records registry tarball URLs.

Testing

Test Types

  • Unit tests
  • Manual tests

Unit Test Coverage

npx -y npm@10.9.4 run test:fast completed with 100% statement, branch, function, and line coverage.

Other Test Details

  • Confirmed npm reads omit-lockfile-registry-resolved as true
  • Confirmed package feed URLs are absent from package-lock.json
  • Confirmed the lockfile diff only removes 645 registry resolved fields
  • Repeated lockfile generation and confirmed there were no further changes
  • npx -y npm@10.9.4 ci --no-audit --no-fund

Screenshots

Not applicable.

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.

Pull request overview

Configures npm to omit registry tarball URLs from the lockfile, improving registry portability.

Changes:

  • Enables omit-lockfile-registry-resolved.
  • Regenerates the lockfile without resolved registry URLs.
Show a summary per file
File Description
.npmrc Enables registry URL omission.
package-lock.json Removes generated registry URLs.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 1/2 changed files
  • Comments generated: 0
  • Review effort level: 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.

2 participants