JoshuaKGoldberg/package.json-validator

๐Ÿ› Bug: "Invalid version range for dependency..." for GitHub URLs with commit-ish suffix

Closed this issue ยท 2 comments

Should be valid according to https://docs.npmjs.com/files/package.json#dependencies as of npm version 1.1.65

Example snippet to reproduce the erroneous "Invalid version range for dependency..." error:

  "dependencies": {
    "redis-scheduler": "nsue/redis-scheduler#patch-1"
  }

The commit to fix this looks like it's been open for a while, we are currently working around it by adding the git://github.com/ prefix which works for some reason.

Documented here
https://docs.npmjs.com/files/package.json#urls-as-dependencies

Ah, just noticed this duplicates #25. GitHub URLs are not supported in general. Which is a bug. Cheers! ๐Ÿงก