Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2014-06-26 05:16:25 +0400
committerForrest L Norvell <forrest@npmjs.com>2014-07-02 05:49:45 +0400
commit4f540437091d1cbca3915cd20c2da83c2a88bb8e (patch)
treeab0969a0bdba62a32824ecc91ed4bf95da9f1de3 /node_modules/npm-package-arg
parent2793877f5b412c200a249f928f81b4d1bc03a35f (diff)
npm-package-arg@2.0.0
Diffstat (limited to 'node_modules/npm-package-arg')
-rw-r--r--node_modules/npm-package-arg/README.md3
-rw-r--r--node_modules/npm-package-arg/npa.js6
-rw-r--r--node_modules/npm-package-arg/package.json20
-rw-r--r--node_modules/npm-package-arg/test/basic.js14
4 files changed, 30 insertions, 13 deletions
diff --git a/node_modules/npm-package-arg/README.md b/node_modules/npm-package-arg/README.md
index 48b86efb3..602277a37 100644
--- a/node_modules/npm-package-arg/README.md
+++ b/node_modules/npm-package-arg/README.md
@@ -50,3 +50,6 @@ fields:
* `raw` - The original un-modified string that was provided.
* `rawSpec` - The part after the `name@...`, as it was originally
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`.
diff --git a/node_modules/npm-package-arg/npa.js b/node_modules/npm-package-arg/npa.js
index e2e3da7c5..b30b587dc 100644
--- a/node_modules/npm-package-arg/npa.js
+++ b/node_modules/npm-package-arg/npa.js
@@ -46,7 +46,8 @@ function npa (arg) {
if (nameparse && validName(nameparse[3]) &&
(!nameparse[2] || validName(nameparse[2]))) {
res.name = (nameparse[1] || "") + nameparse[3]
- res.scope = nameparse[2] || null
+ if (nameparse[2])
+ res.scope = "@" + nameparse[2]
arg = arg.substr(nameparse[0].length)
} else {
res.name = null
@@ -100,7 +101,8 @@ function npa (arg) {
res.spec = "*"
res.rawSpec = ""
res.name = arg
- res.scope = p[1] || null
+ if (p[1])
+ res.scope = "@" + p[1]
} else {
parseLocal(res, arg)
}
diff --git a/node_modules/npm-package-arg/package.json b/node_modules/npm-package-arg/package.json
index e9e4ac4bd..e173f76f6 100644
--- a/node_modules/npm-package-arg/package.json
+++ b/node_modules/npm-package-arg/package.json
@@ -1,6 +1,6 @@
{
"name": "npm-package-arg",
- "version": "1.1.0",
+ "version": "2.0.0",
"description": "Parse the things that can be arguments to `npm install`",
"main": "npa.js",
"directories": {
@@ -29,10 +29,10 @@
"url": "https://github.com/npm/npm-package-arg/issues"
},
"homepage": "https://github.com/npm/npm-package-arg",
- "gitHead": "3bc0a6195ffb0396e8598fefed54f64b5b40723d",
- "_id": "npm-package-arg@1.1.0",
- "_shasum": "4546d1cf7d6c25bd1addd605ebc5a040778a2cd6",
- "_from": "npm-package-arg@~1.1.0",
+ "gitHead": "e8b8d15b13bc254c64702a265668d35bb1cc27e0",
+ "_id": "npm-package-arg@2.0.0",
+ "_shasum": "b573aa01f3405c085564dfec930e8acc199bee08",
+ "_from": "npm-package-arg@>=2.0.0-0 <2.1.0-0",
"_npmVersion": "1.4.16",
"_npmUser": {
"name": "isaacs",
@@ -42,11 +42,15 @@
{
"name": "isaacs",
"email": "i@izs.me"
+ },
+ {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
}
],
"dist": {
- "shasum": "4546d1cf7d6c25bd1addd605ebc5a040778a2cd6",
- "tarball": "http://registry.npmjs.org/npm-package-arg/-/npm-package-arg-1.1.0.tgz"
+ "shasum": "b573aa01f3405c085564dfec930e8acc199bee08",
+ "tarball": "http://registry.npmjs.org/npm-package-arg/-/npm-package-arg-2.0.0.tgz"
},
- "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-1.1.0.tgz"
+ "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-2.0.0.tgz"
}
diff --git a/node_modules/npm-package-arg/test/basic.js b/node_modules/npm-package-arg/test/basic.js
index 7c7e9a718..6a96c24c4 100644
--- a/node_modules/npm-package-arg/test/basic.js
+++ b/node_modules/npm-package-arg/test/basic.js
@@ -16,7 +16,7 @@ require("tap").test("basic", function (t) {
"@foo/bar": {
raw: "@foo/bar",
name: "@foo/bar",
- scope: "foo",
+ scope: "@foo",
rawSpec: "",
spec: "*",
type: "range"
@@ -25,7 +25,7 @@ require("tap").test("basic", function (t) {
"@foo/bar@": {
raw: "@foo/bar@",
name: "@foo/bar",
- scope: "foo",
+ scope: "@foo",
rawSpec: "",
spec: "*",
type: "range"
@@ -34,7 +34,7 @@ require("tap").test("basic", function (t) {
"@foo/bar@baz": {
raw: "@foo/bar@baz",
name: "@foo/bar",
- scope: "foo",
+ scope: "@foo",
rawSpec: "baz",
spec: "baz",
type: "tag"
@@ -70,6 +70,14 @@ require("tap").test("basic", function (t) {
raw: "git://github.com/user/foo"
},
+ "@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": {
name: null,
type: "local",