Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: use git+https in package.com url examples (#7615)
- closes #7614 ## Issue Examples in the [repository](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#repository) section of the [npm CI > Configuring npm > package.json](https://docs.npmjs.com/cli/v10/configuring-npm/package-json) reference page use the protocol `https`. The examples are: ```json "url": "https://github.com/npm/cli.git" ``` ```json "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](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#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 ```json "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 ```json "url": "git+https://github.com/npm/cli.git", "directory": "workspaces/libnpmpublish" ```
- Loading branch information