-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
Bugthing that needs fixingthing that needs fixingDocumentationdocumentation related issuedocumentation related issuePriority 2secondary priority issuesecondary priority issueRelease 10.x
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
If you have a package.json with this:
See https://github.com/broksonic21/npm-pkg-fix/blob/main/package.json
"repository": {
"type": "git",
"url": "https://github.com/broksonic21/npm-pkg-fix.git"
},
then npm pkg fix
converts it to:
"repository": {
"type": "git",
"url": "git+https://github.com/broksonic21/npm-pkg-fix.git"
},
(see https://github.com/broksonic21/npm-pkg-fix/pull/2/files )
Expected Behavior
That doesn't match the v10 docs at https://docs.npmjs.com/cli/v10/configuring-npm/package-json#repository which has the example canonical format to not include git+
{
"repository": {
"type": "git",
"url": "https://github.com/npm/cli.git"
}
}
I'd expect docs and npm pkg fix
to match
Steps To Reproduce
- with npm 10
- with this package.json:
https://github.com/broksonic21/npm-pkg-fix
- Run
npm pkg fix
- See the package.json change
Environment
- npm: 10.2.0
- Node.js: v18.18.0
- OS Name: Mac Sonoma 14.0
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingDocumentationdocumentation related issuedocumentation related issuePriority 2secondary priority issuesecondary priority issueRelease 10.x