Closed pdehaan closed 5 months ago
I found the github-url-from-username-repo module which beautifully converts a repo shortname to a full URL.
I have this working locally for me (installing globally and using npm link
), but the unit tests are failing, but not sure if those were broken locally after I ran npm link
).
FWIW, here are my local changes:
var getUrl = require("github-url-from-username-repo");
urlFormat : /^https?.*:\/\/[\w.\-/?=#]+/,
2, "license": {"types": ["string", "object"]},
"repository": {"types": ["object", "string"], warning: true, validate: PJV.validateUrlTypes, or: "repositories"},
if (! PJV.urlFormat.test(getUrl(obj)) && ! PJV.urlFormat.test(obj)) {
UPDATE: Nope, i can definitely confirm that I broke the qunit tests. I guess it doesn't like my Node.js style of using require()
at the top of the PJV.js file.
Any update on this? This is actually a valid value according to the npm specs: https://docs.npmjs.com/files/package.json#repository
@gorillamania this
+1
Per https://github.com/npm/cli/issues/7299#issuecomment-2010009355, shorthand strings are now deprecated in favor of long-form objects. npm publish
now gives a warning for them. Alas.
Closing this out as no longer something npm encourages. Cheers! 🧡
I'm getting an error with the following value in my package.json file:
I believe this was added in npm 1.3.10 (per http://dailyjs.com/2013/09/06/npm-updates/). In fact, I think this may be the npm issue: https://github.com/npm/npm/issues/3783