npm-package-arg
Advanced tools
Comparing version 1.1.0 to 2.0.0
@@ -49,3 +49,4 @@ var url = require("url") | ||
res.name = (nameparse[1] || "") + nameparse[3] | ||
res.scope = nameparse[2] || null | ||
if (nameparse[2]) | ||
res.scope = "@" + nameparse[2] | ||
arg = arg.substr(nameparse[0].length) | ||
@@ -104,3 +105,4 @@ } else { | ||
res.name = arg | ||
res.scope = p[1] || null | ||
if (p[1]) | ||
res.scope = "@" + p[1] | ||
} else { | ||
@@ -107,0 +109,0 @@ parseLocal(res, arg) |
{ | ||
"name": "npm-package-arg", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"description": "Parse the things that can be arguments to `npm install`", | ||
@@ -5,0 +5,0 @@ "main": "npa.js", |
@@ -53,1 +53,4 @@ # npm-package-arg | ||
provided. | ||
* `scope` - If a name is something like `@org/module` then the `scope` | ||
field will be set to `org`. If it doesn't have a scoped name, then | ||
scope is `null`. |
@@ -19,3 +19,3 @@ var npa = require("../npa.js") | ||
name: "@foo/bar", | ||
scope: "foo", | ||
scope: "@foo", | ||
rawSpec: "", | ||
@@ -29,3 +29,3 @@ spec: "*", | ||
name: "@foo/bar", | ||
scope: "foo", | ||
scope: "@foo", | ||
rawSpec: "", | ||
@@ -39,3 +39,3 @@ spec: "*", | ||
name: "@foo/bar", | ||
scope: "foo", | ||
scope: "@foo", | ||
rawSpec: "baz", | ||
@@ -76,2 +76,10 @@ spec: "baz", | ||
"@foo/bar@git+ssh://github.com/user/foo": { | ||
name: "@foo/bar", | ||
scope: "@foo", | ||
spec: "ssh://github.com/user/foo", | ||
rawSpec: "git+ssh://github.com/user/foo", | ||
raw: "@foo/bar@git+ssh://github.com/user/foo" | ||
}, | ||
"/path/to/foo": { | ||
@@ -78,0 +86,0 @@ name: null, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9673
261
56