diff options
author | Rebecca Turner <me@re-becca.org> | 2015-04-07 11:36:49 +0300 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2015-04-09 07:38:42 +0300 |
commit | a8089268d5f3d57f42dbaba02ff6437da5121191 (patch) | |
tree | 18d307384e4a088ac1aea0a42712a813cbb6adc9 | |
parent | 0b9f8be62fe5252abe54d49e36a696f4816c2eca (diff) |
realize-package-specifier@3.0.0
-rw-r--r-- | node_modules/realize-package-specifier/package.json | 33 | ||||
-rw-r--r-- | node_modules/realize-package-specifier/test/npa-bitbucket.js | 12 | ||||
-rw-r--r-- | node_modules/realize-package-specifier/test/npa-github.js | 18 | ||||
-rw-r--r-- | node_modules/realize-package-specifier/test/npa-gitlab.js | 12 | ||||
-rw-r--r-- | package.json | 2 |
5 files changed, 30 insertions, 47 deletions
diff --git a/node_modules/realize-package-specifier/package.json b/node_modules/realize-package-specifier/package.json index 0353dd96a..6716b1914 100644 --- a/node_modules/realize-package-specifier/package.json +++ b/node_modules/realize-package-specifier/package.json @@ -1,6 +1,6 @@ { "name": "realize-package-specifier", - "version": "2.2.0", + "version": "3.0.0", "description": "Like npm-package-arg, but more so, producing full file paths and differentiating local tar and directory sources.", "main": "index.js", "scripts": { @@ -19,36 +19,19 @@ "homepage": "https://github.com/npm/realize-package-specifier", "dependencies": { "dezalgo": "^1.0.1", - "npm-package-arg": "^3.1.0" + "npm-package-arg": "^4.0.0" }, "devDependencies": { "require-inject": "^1.1.0", "tap": "^0.4.12" }, - "gitHead": "8810720d191647f06a505fc5da8d0634a21526b8", + "readme": "realize-package-specifier\n-------------------------\n\nParse a package specifier, peeking at the disk to differentiate between\nlocal tarballs, directories and named modules. This implements the logic\nused by `npm install` and `npm cache` to determine where to get packages\nfrom.\n\n```javascript\nvar realizePackageSpecifier = require(\"realize-package-specifier\")\nrealizePackageSpecifier(\"foo.tar.gz\", \".\", function (err, package) {\n …\n})\n```\n\n## Using\n\n* realizePackageSpecifier(*spec*, [*where*,] *callback*)\n\nParses *spec* using `npm-package-arg` and then uses stat to check to see if\nit refers to a local tarball or package directory. Stats are done relative\nto *where*. If it does then the local module is loaded. If it doesn't then\ntarget is left as a remote package specifier. Package directories are\nrecognized by the presence of a package.json in them.\n\n*spec* -- a package specifier, like: `foo@1.2`, or `foo@user/foo`, or\n`http://x.com/foo.tgz`, or `git+https://github.com/user/foo`\n\n*where* (optional, default: .) -- The directory in which we should look for\nlocal tarballs or package directories.\n\n*callback* function(*err*, *result*) -- Called once we've determined what\nkind of specifier this is. The *result* object will be very like the one\nreturned by `npm-package-arg` except with three differences: 1) There's a\nnew type of `directory`. 2) The `local` type only refers to tarballs. 2)\nFor all `local` and `directory` type results spec will contain the full path of\nthe local package.\n\n## Result Object\n\nThe full definition of the result object is:\n\n* `name` - If known, the `name` field expected in the resulting pkg.\n* `type` - One of the following strings:\n * `git` - A git repo\n * `hosted` - A hosted project, from github, bitbucket or gitlab. Originally\n either a full url pointing at one of these services or a shorthand like\n `user/project` or `github:user/project` for github or `bitbucket:user/project`\n for bitbucket.\n * `tag` - A tagged version, like `\"foo@latest\"`\n * `version` - A specific version number, like `\"foo@1.2.3\"`\n * `range` - A version range, like `\"foo@2.x\"`\n * `local` - A local file path\n * `directory` - A local package directory\n * `remote` - An http url (presumably to a tgz)\n* `spec` - The \"thing\". URL, the range, git repo, etc.\n* `hosted` - If type=hosted this will be an object with the following keys:\n * `type` - github, bitbucket or gitlab\n * `ssh` - The ssh path for this git repo\n * `sshurl` - The ssh URL for this git repo\n * `https` - The HTTPS URL for this git repo\n * `directUrl` - The URL for the package.json in this git repo\n* `raw` - The original un-modified string that was provided.\n* `rawSpec` - The part after the `name@...`, as it was originally\n provided.\n* `scope` - If a name is something like `@org/module` then the `scope`\n field will be set to `org`. If it doesn't have a scoped name, then\n scope is `null`.\n\n", + "readmeFilename": "README.md", + "gitHead": "2a465b11a70b288d0fb56312dcb45ba8de45b320", "bugs": { "url": "https://github.com/npm/realize-package-specifier/issues" }, - "_id": "realize-package-specifier@2.2.0", - "_shasum": "95278b6021a39158f284e15756e827fc2998ed9c", - "_from": "realize-package-specifier@>=2.2.0 <2.3.0", - "_npmVersion": "2.4.1", - "_nodeVersion": "1.0.4", - "_npmUser": { - "name": "iarna", - "email": "me@re-becca.org" - }, - "maintainers": [ - { - "name": "iarna", - "email": "me@re-becca.org" - } - ], - "dist": { - "shasum": "95278b6021a39158f284e15756e827fc2998ed9c", - "tarball": "http://registry.npmjs.org/realize-package-specifier/-/realize-package-specifier-2.2.0.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/realize-package-specifier/-/realize-package-specifier-2.2.0.tgz", - "readme": "ERROR: No README data found!" + "_id": "realize-package-specifier@3.0.0", + "_shasum": "38224d63f546d4972f0a68cb6e91f6cf73ac67fa", + "_from": "realize-package-specifier@>=3.0.0 <4.0.0" } diff --git a/node_modules/realize-package-specifier/test/npa-bitbucket.js b/node_modules/realize-package-specifier/test/npa-bitbucket.js index 7cc95d558..4381e6c40 100644 --- a/node_modules/realize-package-specifier/test/npa-bitbucket.js +++ b/node_modules/realize-package-specifier/test/npa-bitbucket.js @@ -10,7 +10,7 @@ test("npa-bitbucket", function (t) { name: null, type: "hosted", hosted: { type: "bitbucket" }, - spec: "git+ssh://git@bitbucket.org/user/foo-js.git", + spec: "bitbucket:user/foo-js", raw: "bitbucket:user/foo-js" }, @@ -18,7 +18,7 @@ test("npa-bitbucket", function (t) { name: null, type: "hosted", hosted: { type: "bitbucket" }, - spec: "git+ssh://git@bitbucket.org/user/foo-js.git#bar/baz", + spec: "bitbucket:user/foo-js#bar/baz", raw: "bitbucket:user/foo-js#bar/baz" }, @@ -26,7 +26,7 @@ test("npa-bitbucket", function (t) { name: null, type: "hosted", hosted: { type: "bitbucket" }, - spec: "git+ssh://git@bitbucket.org/user..blerg--/..foo-js.git# . . . . . some . tags / / /", + spec: "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /", raw: "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /" }, @@ -34,7 +34,7 @@ test("npa-bitbucket", function (t) { name: null, type: "hosted", hosted: { type: "bitbucket" }, - spec: "git+ssh://git@bitbucket.org/user/foo-js.git#bar/baz/bin", + spec: "bitbucket:user/foo-js#bar/baz/bin", raw: "bitbucket:user/foo-js#bar/baz/bin" }, @@ -42,7 +42,7 @@ test("npa-bitbucket", function (t) { name: "foo", type: "hosted", hosted: { type: "bitbucket" }, - spec: "git+ssh://git@bitbucket.org/user/foo-js.git", + spec: "bitbucket:user/foo-js", raw: "foo@bitbucket:user/foo-js" }, @@ -58,7 +58,7 @@ test("npa-bitbucket", function (t) { name: null, type: "hosted", hosted: { type: "bitbucket" }, - spec: "git+ssh://git@bitbucket.org/user/foo.git", + spec: "https://bitbucket.org/user/foo.git", raw: "https://bitbucket.org/user/foo.git" }, diff --git a/node_modules/realize-package-specifier/test/npa-github.js b/node_modules/realize-package-specifier/test/npa-github.js index 1e6b72e1e..b0c405e7d 100644 --- a/node_modules/realize-package-specifier/test/npa-github.js +++ b/node_modules/realize-package-specifier/test/npa-github.js @@ -10,7 +10,7 @@ test("npa-github", function (t) { name: null, type: "hosted", hosted: { type: "github" }, - spec: "git+ssh://git@github.com/user/foo-js.git", + spec: "github:user/foo-js", raw: "user/foo-js" }, @@ -18,7 +18,7 @@ test("npa-github", function (t) { name: null, type: "hosted", hosted: { type: "github" }, - spec: "git+ssh://git@github.com/user/foo-js.git#bar/baz", + spec: "github:user/foo-js#bar/baz", raw: "user/foo-js#bar/baz" }, @@ -26,7 +26,7 @@ test("npa-github", function (t) { name: null, type: "hosted", hosted: { type: "github" }, - spec: "git+ssh://git@github.com/user..blerg--/..foo-js.git# . . . . . some . tags / / /", + spec: "github:user..blerg--/..foo-js# . . . . . some . tags / / /", raw: "user..blerg--/..foo-js# . . . . . some . tags / / /" }, @@ -34,7 +34,7 @@ test("npa-github", function (t) { name: null, type: "hosted", hosted: { type: "github" }, - spec: "git+ssh://git@github.com/user/foo-js.git#bar/baz/bin", + spec: "github:user/foo-js#bar/baz/bin", raw: "user/foo-js#bar/baz/bin" }, @@ -42,7 +42,7 @@ test("npa-github", function (t) { name: "foo", type: "hosted", hosted: { type: "github" }, - spec: "git+ssh://git@github.com/user/foo-js.git", + spec: "github:user/foo-js", raw: "foo@user/foo-js" }, @@ -50,7 +50,7 @@ test("npa-github", function (t) { name: null, type: "hosted", hosted: { type: "github" }, - spec: "git+ssh://git@github.com/user/foo-js.git", + spec: "github:user/foo-js", raw: "github:user/foo-js" }, @@ -66,7 +66,7 @@ test("npa-github", function (t) { name: null, type: "hosted", hosted: { type: "github" }, - spec: "git+ssh://git@github.com/user/foo.git", + spec: "git://github.com/user/foo.git", raw: "git://github.com/user/foo" }, @@ -74,7 +74,7 @@ test("npa-github", function (t) { name: null, type: "hosted", hosted: { type: "github" }, - spec: "git+ssh://git@github.com/user/foo.git", + spec: "https://github.com/user/foo.git", raw: "https://github.com/user/foo.git" }, @@ -92,7 +92,7 @@ test("npa-github", function (t) { name: "foo", type: "hosted", hosted: { type: "github" }, - spec: "git+ssh://git@github.com/bar/foo.git", + spec: "github:bar/foo", raw: "foo@bar/foo" } } diff --git a/node_modules/realize-package-specifier/test/npa-gitlab.js b/node_modules/realize-package-specifier/test/npa-gitlab.js index b6efb29a3..cb1a625bc 100644 --- a/node_modules/realize-package-specifier/test/npa-gitlab.js +++ b/node_modules/realize-package-specifier/test/npa-gitlab.js @@ -10,7 +10,7 @@ test("npa-gitlab", function (t) { name: null, type: "hosted", hosted: { type: "gitlab" }, - spec: "git+ssh://git@gitlab.com/user/foo-js.git", + spec: "gitlab:user/foo-js", raw: "gitlab:user/foo-js" }, @@ -18,7 +18,7 @@ test("npa-gitlab", function (t) { name: null, type: "hosted", hosted: { type: "gitlab" }, - spec: "git+ssh://git@gitlab.com/user/foo-js.git#bar/baz", + spec: "gitlab:user/foo-js#bar/baz", raw: "gitlab:user/foo-js#bar/baz" }, @@ -26,7 +26,7 @@ test("npa-gitlab", function (t) { name: null, type: "hosted", hosted: { type: "gitlab" }, - spec: "git+ssh://git@gitlab.com/user..blerg--/..foo-js.git# . . . . . some . tags / / /", + spec: "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /", raw: "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /" }, @@ -34,7 +34,7 @@ test("npa-gitlab", function (t) { name: null, type: "hosted", hosted: { type: "gitlab" }, - spec: "git+ssh://git@gitlab.com/user/foo-js.git#bar/baz/bin", + spec: "gitlab:user/foo-js#bar/baz/bin", raw: "gitlab:user/foo-js#bar/baz/bin" }, @@ -42,7 +42,7 @@ test("npa-gitlab", function (t) { name: "foo", type: "hosted", hosted: { type: "gitlab" }, - spec: "git+ssh://git@gitlab.com/user/foo-js.git", + spec: "gitlab:user/foo-js", raw: "foo@gitlab:user/foo-js" }, @@ -58,7 +58,7 @@ test("npa-gitlab", function (t) { name: null, type: "hosted", hosted: { type: "gitlab" }, - spec: "git+ssh://git@gitlab.com/user/foo.git", + spec: "https://gitlab.com/user/foo.git", raw: "https://gitlab.com/user/foo.git" }, diff --git a/package.json b/package.json index 1214b9d05..e44929ee2 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "read-installed": "~4.0.0", "read-package-json": "~2.0.0", "readable-stream": "~1.0.33", - "realize-package-specifier": "~2.2.0", + "realize-package-specifier": "~3.0.0", "request": "~2.54.0", "retry": "~0.6.1", "rimraf": "~2.3.2", |