Skip to content

Remove registry URLs from npm lockfile - #854

Closed
Muiris Woulfe (muiriswoulfe) wants to merge 3 commits into
microsoft:mainfrom
muiriswoulfe:fix/npm-lockfile-registry-urls-signed
Closed

Remove registry URLs from npm lockfile#854
Muiris Woulfe (muiriswoulfe) wants to merge 3 commits into
microsoft:mainfrom
muiriswoulfe:fix/npm-lockfile-registry-urls-signed

Conversation

@muiriswoulfe

@muiriswoulfe Muiris Woulfe (muiriswoulfe) commented Aug 27, 2026

Copy link
Copy Markdown
Member

Replaces #845 with a GitHub-signed commit. Original change by Jamie Magee (@JamieMagee).

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: Jamie Magee <jamie.magee@gmail.com>
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 while retaining dependency integrity hashes.

Changes:

  • Enables omit-lockfile-registry-resolved.
  • Regenerates the lockfile without registry URLs.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
.npmrc Enables URL omission during lockfile generation.
package-lock.json Removes package-level resolved URLs.

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

Comment thread .npmrc

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings August 27, 2026 17:55

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@muiriswoulfe Muiris Woulfe (muiriswoulfe) closed this by deleting the head repository Aug 28, 2026
Muiris Woulfe (muiriswoulfe) added a commit that referenced this pull request Aug 28, 2026
Replaces #845 with a GitHub-signed commit. Original change by
@JamieMagee.

## 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

- [X] 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.

Recreated from the deleted source fork for closed PR #854.

Co-authored-by: Jamie Magee <jamie.magee@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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