Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@MaxBlack-dev
Copy link
Contributor

Description

This PR documents npm's normalization behavior for the repository field in package.json during publishing.

Changes

  • Added a "Note on normalization" section explaining that npm converts shorthand repository formats to the full object format during npm publish
  • Documented the warning message users see when publishing with shorthand formats
  • Recommended using the full object format to avoid warnings
  • Mentioned npm pkg fix as a tool to automatically convert to normalized format

Context

Users were confused when npm publish showed warnings about auto-correcting the repository field, even though the documentation stated shorthand formats were allowed. The maintainer (@wraithgar) explained that npm has historically normalized this field during publishing, creating a discrepancy between local package.json and the published manifest. The warning is preparing users for future changes where this discrepancy may no longer be allowed.

Closes #7299

@MaxBlack-dev MaxBlack-dev requested a review from a team as a code owner November 30, 2025 01:59
@owlstronaut owlstronaut merged commit 95d25cd into npm:latest Dec 1, 2025
8 checks passed
@github-actions github-actions bot mentioned this pull request Dec 1, 2025
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.

[DOCS] package.json#repository should clarify normalization steps and future plans.

2 participants