np doesn't resolve the full URL when package.json
contains "repository": "github:foo/bar"
.
According to the npm documentation you should be able to use shorthand references to repos on the major Git providers:
For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same shortcut syntax you use for npm install:
{ "repository": "npm/npm", "repository": "github:user/repo", "repository": "gist:11081aaa281", "repository": "bitbucket:user/repo", "repository": "gitlab:user/repo" }
npm/npm-package-arg
is responsible for the resolution in npm
itself and might provide some insight.
Given a package.json
{
"name": "bar",
"homepage": "https://github.com/foo/bar",
"repository": "github:foo/bar",
Running:
npx np patch
Outputs:
β Prerequisite check
β Git
β Installing dependencies using npm
β Running tests using npm
β Bumping version using npm
β Publishing package using npm
β Pushing tags
β Creating release draft on GitHub
bar 1.2.1 published π
The release draft step ran, seemingly successfully, but did not open or print a URL.
github:foo/bar
should be resolved to https://github.com/foo/bar
before passing it to open-cli
(or equivalent).
np - 7.6.2
Node.js - 14.19.1
npm - 6.14.16
Git - 2.11.0
OS - Debian GNU/Linux 9 (stretch)
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too