diff options
Diffstat (limited to 'deps/npm/node_modules/realize-package-specifier')
11 files changed, 0 insertions, 845 deletions
diff --git a/deps/npm/node_modules/realize-package-specifier/.npmignore b/deps/npm/node_modules/realize-package-specifier/.npmignore deleted file mode 100644 index 926ddf616c..0000000000 --- a/deps/npm/node_modules/realize-package-specifier/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -*~ -.#* -node_modules diff --git a/deps/npm/node_modules/realize-package-specifier/LICENSE b/deps/npm/node_modules/realize-package-specifier/LICENSE deleted file mode 100644 index 45055763dc..0000000000 --- a/deps/npm/node_modules/realize-package-specifier/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2015, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/npm/node_modules/realize-package-specifier/README.md b/deps/npm/node_modules/realize-package-specifier/README.md deleted file mode 100644 index dac3b64c51..0000000000 --- a/deps/npm/node_modules/realize-package-specifier/README.md +++ /dev/null @@ -1,69 +0,0 @@ -realize-package-specifier -------------------------- - -Parse a package specifier, peeking at the disk to differentiate between -local tarballs, directories and named modules. This implements the logic -used by `npm install` and `npm cache` to determine where to get packages -from. - -```javascript -var realizePackageSpecifier = require("realize-package-specifier") -realizePackageSpecifier("foo.tar.gz", ".", function (err, package) { - … -}) -``` - -## Using - -* realizePackageSpecifier(*spec*, [*where*,] *callback*) - -Parses *spec* using `npm-package-arg` and then uses stat to check to see if -it refers to a local tarball or package directory. Stats are done relative -to *where*. If it does then the local module is loaded. If it doesn't then -target is left as a remote package specifier. Package directories are -recognized by the presence of a package.json in them. - -*spec* -- a package specifier, like: `foo@1.2`, or `foo@user/foo`, or -`http://x.com/foo.tgz`, or `git+https://github.com/user/foo` - -*where* (optional, default: .) -- The directory in which we should look for -local tarballs or package directories. - -*callback* function(*err*, *result*) -- Called once we've determined what -kind of specifier this is. The *result* object will be very like the one -returned by `npm-package-arg` except with three differences: 1) There's a -new type of `directory`. 2) The `local` type only refers to tarballs. 2) -For all `local` and `directory` type results spec will contain the full path of -the local package. - -## Result Object - -The full definition of the result object is: - -* `name` - If known, the `name` field expected in the resulting pkg. -* `type` - One of the following strings: - * `git` - A git repo - * `hosted` - A hosted project, from github, bitbucket or gitlab. Originally - either a full url pointing at one of these services or a shorthand like - `user/project` or `github:user/project` for github or `bitbucket:user/project` - for bitbucket. - * `tag` - A tagged version, like `"foo@latest"` - * `version` - A specific version number, like `"foo@1.2.3"` - * `range` - A version range, like `"foo@2.x"` - * `local` - A local file path - * `directory` - A local package directory - * `remote` - An http url (presumably to a tgz) -* `spec` - The "thing". URL, the range, git repo, etc. -* `hosted` - If type=hosted this will be an object with the following keys: - * `type` - github, bitbucket or gitlab - * `ssh` - The ssh path for this git repo - * `sshurl` - The ssh URL for this git repo - * `https` - The HTTPS URL for this git repo - * `directUrl` - The URL for the package.json in this git repo -* `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/deps/npm/node_modules/realize-package-specifier/index.js b/deps/npm/node_modules/realize-package-specifier/index.js deleted file mode 100644 index eae8fbaf82..0000000000 --- a/deps/npm/node_modules/realize-package-specifier/index.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict" -var fs = require("fs") -var path = require("path") -var dz = require("dezalgo") -var npa = require("npm-package-arg") - -module.exports = function (spec, where, cb) { - if (where instanceof Function) { cb = where; where = null } - if (where == null) where = "." - cb = dz(cb) - try { - var dep = npa(spec) - } - catch (e) { - return cb(e) - } - if ((dep.type == "range" || dep.type == "version") && dep.name != dep.raw) return cb(null, dep) - var specpath = dep.type == "local" - ? path.resolve(where, dep.spec) - : path.resolve(where, dep.rawSpec? dep.rawSpec: dep.name) - fs.stat(specpath, function (er, s) { - if (er) return finalize() - if (!s.isDirectory()) return finalize("local") - fs.stat(path.join(specpath, "package.json"), function (er) { - finalize(er ? null : "directory") - }) - }) - function finalize(type) { - if (type != null && type != dep.type) { - dep.type = type - if (! dep.rawSpec) { - dep.rawSpec = dep.name - dep.name = null - } - } - if (dep.type == "local" || dep.type == "directory") { - dep.spec = path.resolve(specpath) - } - cb(null, dep) - } -} diff --git a/deps/npm/node_modules/realize-package-specifier/package.json b/deps/npm/node_modules/realize-package-specifier/package.json deleted file mode 100644 index d2fb6da2f7..0000000000 --- a/deps/npm/node_modules/realize-package-specifier/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "_args": [ - [ - "realize-package-specifier@~3.0.2", - "/Users/rebecca/code/npm" - ] - ], - "_from": "realize-package-specifier@>=3.0.2 <3.1.0", - "_id": "realize-package-specifier@3.0.3", - "_inCache": true, - "_installable": true, - "_location": "/realize-package-specifier", - "_nodeVersion": "4.4.0", - "_npmOperationalInternal": { - "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/realize-package-specifier-3.0.3.tgz_1461233015050_0.3224435243755579" - }, - "_npmUser": { - "email": "me@re-becca.org", - "name": "iarna" - }, - "_npmVersion": "3.8.7", - "_phantomChildren": {}, - "_requested": { - "name": "realize-package-specifier", - "raw": "realize-package-specifier@~3.0.2", - "rawSpec": "~3.0.2", - "scope": null, - "spec": ">=3.0.2 <3.1.0", - "type": "range" - }, - "_requiredBy": [ - "/" - ], - "_shasum": "d0def882952b8de3f67eba5e91199661271f41f4", - "_shrinkwrap": null, - "_spec": "realize-package-specifier@~3.0.2", - "_where": "/Users/rebecca/code/npm", - "author": { - "email": "me@re-becca.org", - "name": "Rebecca Turner", - "url": "http://re-becca.org" - }, - "bugs": { - "url": "https://github.com/npm/realize-package-specifier/issues" - }, - "dependencies": { - "dezalgo": "^1.0.1", - "npm-package-arg": "^4.1.1" - }, - "description": "Like npm-package-arg, but more so, producing full file paths and differentiating local tar and directory sources.", - "devDependencies": { - "require-inject": "^1.1.0", - "tap": "^5.7.1" - }, - "directories": {}, - "dist": { - "shasum": "d0def882952b8de3f67eba5e91199661271f41f4", - "tarball": "https://registry.npmjs.org/realize-package-specifier/-/realize-package-specifier-3.0.3.tgz" - }, - "gitHead": "388221ee8e5b586932372949091aa2ee3ee7ab78", - "homepage": "https://github.com/npm/realize-package-specifier", - "license": "ISC", - "main": "index.js", - "maintainers": [ - { - "email": "me@re-becca.org", - "name": "iarna" - }, - { - "email": "ogd@aoaioxxysz.net", - "name": "othiym23" - }, - { - "email": "kat@sykosomatic.org", - "name": "zkat" - } - ], - "name": "realize-package-specifier", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/realize-package-specifier.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "3.0.3" -} diff --git a/deps/npm/node_modules/realize-package-specifier/test/basic.js b/deps/npm/node_modules/realize-package-specifier/test/basic.js deleted file mode 100644 index 692ca07d5a..0000000000 --- a/deps/npm/node_modules/realize-package-specifier/test/basic.js +++ /dev/null @@ -1,143 +0,0 @@ -"use strict" -var test = require("tap").test -var requireInject = require("require-inject") -var path = require("path") - -var re = { - tarball: /[/\\]a.tar.gz$/, - packagedir: /[/\\]b$/, - packagejson: /[/\\]b[/\\]package.json$/, - nonpackagedir: /[/\\]c$/, - nopackagejson: /[/\\]c[/\\]package.json$/, - remotename: /[/\\]d$/, - packagedirlikegithub: /[/\\]e[/\\]1$/, - packagejsonlikegithub: /[/\\]e[/\\]1[/\\]package.json$/, - github: /[/\\]e[/\\]2$/, - localrangefile: /[/\\]1[.]0[.]0$/, - localverfile: /[/\\]1$/ -} - -var rps = requireInject("../index", { - "fs": { - "stat": function (path, callback) { - if (re.tarball.test(path)) { - callback(null,{isDirectory:function(){ return false }}) - } - else if (re.packagedir.test(path)) { - callback(null,{isDirectory:function(){ return true }}) - } - else if (re.packagejson.test(path)) { - callback(null,{}) - } - else if (re.nonpackagedir.test(path)) { - callback(null,{isDirectory:function(){ return true }}) - } - else if (re.nopackagejson.test(path)) { - callback(new Error("EFILENOTFOUND")) - } - else if (re.remotename.test(path)) { - callback(new Error("EFILENOTFOUND")) - } - else if (re.packagedirlikegithub.test(path)) { - callback(null,{isDirectory:function(){ return true }}) - } - else if (re.packagejsonlikegithub.test(path)) { - callback(null,{}) - } - else if (re.github.test(path)) { - callback(new Error("EFILENOTFOUND")) - } - else if (re.localverfile.test(path)) { - callback(null,{isDirectory:function(){ return false }}) - } - else if (re.localrangefile.test(path)) { - callback(null,{isDirectory:function(){ return false }}) - } - else { - throw new Error("Unknown stat fixture path: "+path) - } - } - } -}) - -test("realize-package-specifier", function (t) { - t.plan(13) - rps("a.tar.gz", function (err, result) { - t.is(result.type, "local", "local tarball") - }) - rps("b", function (err, result) { - t.is(result.type, "directory", "local package directory") - }) - rps("c", function (err, result) { - t.is(result.type, "tag", "remote package, non-package local directory") - }) - rps("d", function (err, result) { - t.is(result.type, "tag", "remote package, no local directory") - }) - rps("file:./a.tar.gz", function (err, result) { - t.is(result.type, "local", "local tarball") - }) - rps("file:./b", function (err, result) { - t.is(result.type, "directory", "local package directory") - }) - rps("file:./c", function (err, result) { - t.is(result.type, "local", "non-package local directory, specified with a file URL") - }) - rps("file:./d", function (err, result) { - t.is(result.type, "local", "no local directory, specified with a file URL") - }) - rps("e/1", function (err, result) { - t.is(result.type, "directory", "local package directory") - }) - rps("e/2", function (err, result) { - t.is(result.type, "hosted", "hosted package dependency") - t.is(result.hosted.type, "github", "github package dependency") - }) - rps("1", function (err, result) { - t.is(result.type, "local", "range like local file is still a local file") - }) - rps("1.0.0", function (err, result) { - t.is(result.type, "local", "version like local file is still a local file") - }) -}) -test("named realize-package-specifier", function (t) { - t.plan(13) - - rps("a@a.tar.gz", function (err, result) { - t.is(result.type, "local", "named local tarball") - }) - rps("b@b", function (err, result) { - t.is(result.type, "directory", "named local package directory") - }) - rps("c@c", function (err, result) { - t.is(result.type, "tag", "remote package, non-package local directory") - }) - rps("d@d", function (err, result) { - t.is(result.type, "tag", "remote package, no local directory") - }) - rps("a@file:./a.tar.gz", function (err, result) { - t.is(result.type, "local", "local tarball") - }) - rps("b@file:./b", function (err, result) { - t.is(result.type, "directory", "local package directory") - }) - rps("c@file:./c", function (err, result) { - t.is(result.type, "local", "non-package local directory, specified with a file URL") - }) - rps("d@file:./d", function (err, result) { - t.is(result.type, "local", "no local directory, specified with a file URL") - }) - rps("e@e/1", function (err, result) { - t.is(result.type, "directory", "local package directory") - }) - rps("e@e/2", function (err, result) { - t.is(result.type, "hosted", "hosted package dependency") - t.is(result.hosted.type, "github", "github package dependency") - }) - rps("e@1", function (err, result) { - t.is(result.type, "range", "range like specifier is never a local file") - }) - rps("e@1.0.0", function (err, result) { - t.is(result.type, "version", "version like specifier is never a local file") - }) -}) diff --git a/deps/npm/node_modules/realize-package-specifier/test/npa-basic.js b/deps/npm/node_modules/realize-package-specifier/test/npa-basic.js deleted file mode 100644 index 1155911789..0000000000 --- a/deps/npm/node_modules/realize-package-specifier/test/npa-basic.js +++ /dev/null @@ -1,162 +0,0 @@ -var test = require("tap").test; -var rps = require("../index.js") -var path = require("path") - -test("npa-basic", function (t) { - t.setMaxListeners(999) - - var tests = { - "foo@1.2": { - name: "foo", - type: "range", - spec: ">=1.2.0 <1.3.0", - raw: "foo@1.2", - rawSpec: "1.2" - }, - - "@foo/bar": { - raw: "@foo/bar", - name: "@foo/bar", - scope: "@foo", - rawSpec: "", - spec: "latest", - type: "tag" - }, - - "@foo/bar@": { - raw: "@foo/bar@", - name: "@foo/bar", - scope: "@foo", - rawSpec: "", - spec: "latest", - type: "tag" - }, - - "@foo/bar@baz": { - raw: "@foo/bar@baz", - name: "@foo/bar", - scope: "@foo", - rawSpec: "baz", - spec: "baz", - type: "tag" - }, - - "@f fo o al/ a d s ;f ": { - raw: "@f fo o al/ a d s ;f", - name: null, - rawSpec: "@f fo o al/ a d s ;f", - spec: path.resolve("@f fo o al/ a d s ;f"), - type: "local" - }, - - "foo@1.2.3": { - name: "foo", - type: "version", - spec: "1.2.3", - raw: "foo@1.2.3" - }, - - "foo@=v1.2.3": { - name: "foo", - type: "version", - spec: "1.2.3", - raw: "foo@=v1.2.3", - rawSpec: "=v1.2.3" - }, - - "git+ssh://git@notgithub.com/user/foo#1.2.3": { - name: null, - type: "git", - spec: "ssh://git@notgithub.com/user/foo#1.2.3", - raw: "git+ssh://git@notgithub.com/user/foo#1.2.3" - }, - - "git+file://path/to/repo#1.2.3": { - name: null, - type: "git", - spec: "file://path/to/repo#1.2.3", - raw: "git+file://path/to/repo#1.2.3" - }, - - "git://notgithub.com/user/foo": { - name: null, - type: "git", - spec: "git://notgithub.com/user/foo", - raw: "git://notgithub.com/user/foo" - }, - - "@foo/bar@git+ssh://notgithub.com/user/foo": { - name: "@foo/bar", - scope: "@foo", - spec: "ssh://notgithub.com/user/foo", - rawSpec: "git+ssh://notgithub.com/user/foo", - raw: "@foo/bar@git+ssh://notgithub.com/user/foo" - }, - - "/path/to/foo": { - name: null, - type: "local", - spec: "/path/to/foo", - raw: "/path/to/foo" - }, - "file:path/to/foo": { - name: null, - type: "local", - spec: path.resolve(__dirname,"..","path/to/foo"), - raw: "file:path/to/foo" - }, - "file:../path/to/foo": { - name: null, - type: "local", - spec: path.resolve(__dirname,"..","../path/to/foo"), - raw: "file:../path/to/foo" - }, - "file:///path/to/foo": { - name: null, - type: "local", - spec: "/path/to/foo", - raw: "file:///path/to/foo" - }, - - "https://server.com/foo.tgz": { - name: null, - type: "remote", - spec: "https://server.com/foo.tgz", - raw: "https://server.com/foo.tgz" - }, - - "foo@latest": { - name: "foo", - type: "tag", - spec: "latest", - raw: "foo@latest" - }, - - "foo": { - name: "foo", - type: "tag", - spec: "latest", - raw: "foo" - } - } - - t.plan( 2 + Object.keys(tests).length * 3 ) - - Object.keys(tests).forEach(function (arg) { - rps(arg, path.resolve(__dirname,'..'), function(err, res) { - t.notOk(err, arg + " no error") - t.type(res, "Result", arg + " got right result time") - t.has(res, tests[arg], arg + " result has correct values") - }) - }) - - // Completely unreasonable invalid garbage throws an error - rps("this is not a \0 valid package name or url", path.resolve(__dirname,'..'), function (err) { - t.ok(err, "error") - }) - - rps("gopher://yea right", path.resolve(__dirname,'..'), function (err) { - t.ok(err, "Unsupported URL Type: gopher://yea right") - }) - -}) diff --git a/deps/npm/node_modules/realize-package-specifier/test/npa-bitbucket.js b/deps/npm/node_modules/realize-package-specifier/test/npa-bitbucket.js deleted file mode 100644 index 2bef724b9e..0000000000 --- a/deps/npm/node_modules/realize-package-specifier/test/npa-bitbucket.js +++ /dev/null @@ -1,86 +0,0 @@ -var test = require("tap").test; -var rps = require("../index.js") -var path = require("path") - -test("npa-bitbucket", function (t) { - t.setMaxListeners(999) - - var tests = { - "bitbucket:user/foo-js": { - name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "bitbucket:user/foo-js", - raw: "bitbucket:user/foo-js" - }, - - "bitbucket:user/foo-js#bar/baz": { - name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "bitbucket:user/foo-js#bar/baz", - raw: "bitbucket:user/foo-js#bar/baz" - }, - - "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /": { - name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /", - raw: "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /" - }, - - "bitbucket:user/foo-js#bar/baz/bin": { - name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "bitbucket:user/foo-js#bar/baz/bin", - raw: "bitbucket:user/foo-js#bar/baz/bin" - }, - - "foo@bitbucket:user/foo-js": { - name: "foo", - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "bitbucket:user/foo-js", - raw: "foo@bitbucket:user/foo-js" - }, - - "git+ssh://git@bitbucket.org/user/foo#1.2.3": { - name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "git+ssh://git@bitbucket.org/user/foo.git#1.2.3", - raw: "git+ssh://git@bitbucket.org/user/foo#1.2.3" - }, - - "https://bitbucket.org/user/foo.git": { - name: null, - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "git+https://bitbucket.org/user/foo.git", - raw: "https://bitbucket.org/user/foo.git" - }, - - "@foo/bar@git+ssh://bitbucket.org/user/foo": { - name: "@foo/bar", - scope: "@foo", - type: "hosted", - hosted: { type: "bitbucket" }, - spec: "git+ssh://git@bitbucket.org/user/foo.git", - rawSpec: "git+ssh://bitbucket.org/user/foo", - raw: "@foo/bar@git+ssh://bitbucket.org/user/foo" - } - } - - t.plan( Object.keys(tests).length * 3 ) - - Object.keys(tests).forEach(function (arg) { - rps(arg, path.resolve(__dirname,'..'), function(err, res) { - t.notOk(err, "No error") - t.type(res, "Result") - t.has(res, tests[arg]) - }) - }) - -}) diff --git a/deps/npm/node_modules/realize-package-specifier/test/npa-github.js b/deps/npm/node_modules/realize-package-specifier/test/npa-github.js deleted file mode 100644 index 7ae6b254ac..0000000000 --- a/deps/npm/node_modules/realize-package-specifier/test/npa-github.js +++ /dev/null @@ -1,110 +0,0 @@ -var test = require("tap").test; -var rps = require("../index.js") -var path = require("path") - -test("npa-github", function (t) { - t.setMaxListeners(999) - - var tests = { - "user/foo-js": { - name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "github:user/foo-js", - raw: "user/foo-js" - }, - - "user/foo-js#bar/baz": { - name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "github:user/foo-js#bar/baz", - raw: "user/foo-js#bar/baz" - }, - - "user..blerg--/..foo-js# . . . . . some . tags / / /": { - name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "github:user..blerg--/..foo-js# . . . . . some . tags / / /", - raw: "user..blerg--/..foo-js# . . . . . some . tags / / /" - }, - - "user/foo-js#bar/baz/bin": { - name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "github:user/foo-js#bar/baz/bin", - raw: "user/foo-js#bar/baz/bin" - }, - - "foo@user/foo-js": { - name: "foo", - type: "hosted", - hosted: { type: "github" }, - spec: "github:user/foo-js", - raw: "foo@user/foo-js" - }, - - "github:user/foo-js": { - name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "github:user/foo-js", - raw: "github:user/foo-js" - }, - - "git+ssh://git@github.com/user/foo#1.2.3": { - name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "git+ssh://git@github.com/user/foo.git#1.2.3", - raw: "git+ssh://git@github.com/user/foo#1.2.3" - }, - - "git://github.com/user/foo": { - name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "git://github.com/user/foo.git", - raw: "git://github.com/user/foo" - }, - - "https://github.com/user/foo.git": { - name: null, - type: "hosted", - hosted: { type: "github" }, - spec: "git+https://github.com/user/foo.git", - raw: "https://github.com/user/foo.git" - }, - - "@foo/bar@git+ssh://github.com/user/foo": { - name: "@foo/bar", - scope: "@foo", - type: "hosted", - hosted: { type: "github" }, - spec: "git+ssh://git@github.com/user/foo.git", - rawSpec: "git+ssh://github.com/user/foo", - raw: "@foo/bar@git+ssh://github.com/user/foo" - }, - - "foo@bar/foo": { - name: "foo", - type: "hosted", - hosted: { type: "github" }, - spec: "github:bar/foo", - raw: "foo@bar/foo" - } - } - - t.plan( Object.keys(tests).length * 3 ) - - Object.keys(tests).forEach(function (arg) { - rps(arg, path.resolve(__dirname,'..'), function(err, res) { - t.notOk(err, "No error") - t.type(res, "Result") - t.has(res, tests[arg]) - }) - }) - -}) diff --git a/deps/npm/node_modules/realize-package-specifier/test/npa-gitlab.js b/deps/npm/node_modules/realize-package-specifier/test/npa-gitlab.js deleted file mode 100644 index c7b45c2f8a..0000000000 --- a/deps/npm/node_modules/realize-package-specifier/test/npa-gitlab.js +++ /dev/null @@ -1,86 +0,0 @@ -var test = require("tap").test; -var rps = require("../index.js") -var path = require("path") - -test("npa-gitlab", function (t) { - t.setMaxListeners(999) - - var tests = { - "gitlab:user/foo-js": { - name: null, - type: "hosted", - hosted: { type: "gitlab" }, - spec: "gitlab:user/foo-js", - raw: "gitlab:user/foo-js" - }, - - "gitlab:user/foo-js#bar/baz": { - name: null, - type: "hosted", - hosted: { type: "gitlab" }, - spec: "gitlab:user/foo-js#bar/baz", - raw: "gitlab:user/foo-js#bar/baz" - }, - - "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /": { - name: null, - type: "hosted", - hosted: { type: "gitlab" }, - spec: "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /", - raw: "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /" - }, - - "gitlab:user/foo-js#bar/baz/bin": { - name: null, - type: "hosted", - hosted: { type: "gitlab" }, - spec: "gitlab:user/foo-js#bar/baz/bin", - raw: "gitlab:user/foo-js#bar/baz/bin" - }, - - "foo@gitlab:user/foo-js": { - name: "foo", - type: "hosted", - hosted: { type: "gitlab" }, - spec: "gitlab:user/foo-js", - raw: "foo@gitlab:user/foo-js" - }, - - "git+ssh://git@gitlab.com/user/foo#1.2.3": { - name: null, - type: "hosted", - hosted: { type: "gitlab" }, - spec: "git+ssh://git@gitlab.com/user/foo.git#1.2.3", - raw: "git+ssh://git@gitlab.com/user/foo#1.2.3" - }, - - "https://gitlab.com/user/foo.git": { - name: null, - type: "hosted", - hosted: { type: "gitlab" }, - spec: "git+https://gitlab.com/user/foo.git", - raw: "https://gitlab.com/user/foo.git" - }, - - "@foo/bar@git+ssh://gitlab.com/user/foo": { - name: "@foo/bar", - scope: "@foo", - type: "hosted", - hosted: { type: "gitlab" }, - spec: "git+ssh://git@gitlab.com/user/foo.git", - rawSpec: "git+ssh://gitlab.com/user/foo", - raw: "@foo/bar@git+ssh://gitlab.com/user/foo" - } - } - - t.plan( Object.keys(tests).length * 3 ) - - Object.keys(tests).forEach(function (arg) { - rps(arg, path.resolve(__dirname,'..'), function(err, res) { - t.notOk(err, "No error") - t.type(res, "Result") - t.has(res, tests[arg]) - }) - }) - -}) diff --git a/deps/npm/node_modules/realize-package-specifier/test/npa-windows.js b/deps/npm/node_modules/realize-package-specifier/test/npa-windows.js deleted file mode 100644 index f6275bea9c..0000000000 --- a/deps/npm/node_modules/realize-package-specifier/test/npa-windows.js +++ /dev/null @@ -1,42 +0,0 @@ -global.FAKE_WINDOWS = true - -var rps = require('../index.js') -var test = require("tap").test -var path = require("path") - -var cases = { - "C:\\x\\y\\z": { - raw: 'C:\\x\\y\\z', - scope: null, - name: null, - rawSpec: 'C:\\x\\y\\z', - spec: path.resolve('C:\\x\\y\\z'), - type: 'local' - }, - "foo@C:\\x\\y\\z": { - raw: 'foo@C:\\x\\y\\z', - scope: null, - name: 'foo', - rawSpec: 'C:\\x\\y\\z', - spec: path.resolve('C:\\x\\y\\z'), - type: 'local' - }, - "foo@/foo/bar/baz": { - raw: 'foo@/foo/bar/baz', - scope: null, - name: 'foo', - rawSpec: '/foo/bar/baz', - spec: path.resolve('/foo/bar/baz'), - type: 'local' - } -} - -test("parse a windows path", function (t) { - t.plan( Object.keys(cases).length ) - Object.keys(cases).forEach(function (c) { - var expect = cases[c] - rps(c, function(err, actual) { - t.same(actual, expect, c) - }) - }) -}) |