Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: use git+https in package.com url examples #7615

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

MikeMcC399
Copy link
Contributor

Issue

Examples in the repository section of the npm CI > Configuring npm > package.json reference page use the protocol https. The examples are:

"url": "https://github.com/npm/cli.git"
"url": "https://github.com/facebook/react.git"

Executing npm pkg fix in a repo with a url definition and protocol using https normalizes the protocol to git+https.

Examples should be aligned with what npm pkg fix considers correct and should also be aligned to the list of valid protocols in the Git URLs as Dependencies section, which states:

<protocol> is one of git, git+ssh, git+http, git+https, or git+file.

Change

  1. npm/cli.git
    Change to
    "url": "git+https://github.com/npm/cli.git"
  2. facebook/react.git
    Since the source example of https://github.com/facebook/react/blob/main/packages/react-dom/package.json does not use the correct git+https protocol, use instead
    "url": "git+https://github.com/npm/cli.git",
    "directory": "workspaces/libnpmpublish"

@wraithgar wraithgar merged commit 55639ef into npm:latest Jun 27, 2024
8 checks passed
@github-actions github-actions bot mentioned this pull request Jun 27, 2024
@MikeMcC399 MikeMcC399 deleted the git-https-example-url branch June 27, 2024 14:24
@MikeMcC399
Copy link
Contributor Author

@wraithgar

Unfortunately there is a typo in the title of this PR and in the commit message. It should say:

"docs: use git+https in package.json url examples"

not "package.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.

[DOCS] Inconsistent package.json repository example use of https and git+https
2 participants