summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/read-cmd-shim
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/read-cmd-shim')
-rw-r--r--deps/npm/node_modules/read-cmd-shim/.npmignore3
-rw-r--r--deps/npm/node_modules/read-cmd-shim/LICENSE13
-rw-r--r--deps/npm/node_modules/read-cmd-shim/README.md1
-rw-r--r--deps/npm/node_modules/read-cmd-shim/index.js2
-rw-r--r--deps/npm/node_modules/read-cmd-shim/package.json40
-rw-r--r--deps/npm/node_modules/read-cmd-shim/test/integration.js139
6 files changed, 36 insertions, 162 deletions
diff --git a/deps/npm/node_modules/read-cmd-shim/.npmignore b/deps/npm/node_modules/read-cmd-shim/.npmignore
deleted file mode 100644
index ac50549639..0000000000
--- a/deps/npm/node_modules/read-cmd-shim/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.#*
-*~
-node_modules
diff --git a/deps/npm/node_modules/read-cmd-shim/LICENSE b/deps/npm/node_modules/read-cmd-shim/LICENSE
new file mode 100644
index 0000000000..2a4982dc40
--- /dev/null
+++ b/deps/npm/node_modules/read-cmd-shim/LICENSE
@@ -0,0 +1,13 @@
+Copyright (c) 2015, Rebecca Turner <me@re-becca.org>
+
+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/read-cmd-shim/README.md b/deps/npm/node_modules/read-cmd-shim/README.md
index 2f0b5f6cc6..b139ea7ff6 100644
--- a/deps/npm/node_modules/read-cmd-shim/README.md
+++ b/deps/npm/node_modules/read-cmd-shim/README.md
@@ -14,6 +14,7 @@ readCmdShim('/path/to/shim.cmd', function (er, destination) {
})
var destination = readCmdShim.sync('/path/to/shim.cmd')
+```
### readCmdShim(path, callback)
diff --git a/deps/npm/node_modules/read-cmd-shim/index.js b/deps/npm/node_modules/read-cmd-shim/index.js
index 6a2265449a..f565ababe4 100644
--- a/deps/npm/node_modules/read-cmd-shim/index.js
+++ b/deps/npm/node_modules/read-cmd-shim/index.js
@@ -10,7 +10,7 @@ function extractPath (path, cmdshimContents) {
}
function extractPathFromCmd (cmdshimContents) {
- var matches = cmdshimContents.match(/"%~dp0\\([^"]+?)"\s+%[*]/)
+ var matches = cmdshimContents.match(/"%(?:~dp0|dp0%)\\([^"]+?)"\s+%[*]/)
return matches && matches[1]
}
diff --git a/deps/npm/node_modules/read-cmd-shim/package.json b/deps/npm/node_modules/read-cmd-shim/package.json
index 8df095488f..df2fe27e7b 100644
--- a/deps/npm/node_modules/read-cmd-shim/package.json
+++ b/deps/npm/node_modules/read-cmd-shim/package.json
@@ -1,33 +1,29 @@
{
- "_args": [
- [
- "read-cmd-shim@1.0.1",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "read-cmd-shim@1.0.1",
- "_id": "read-cmd-shim@1.0.1",
+ "_from": "read-cmd-shim@1.0.4",
+ "_id": "read-cmd-shim@1.0.4",
"_inBundle": false,
- "_integrity": "sha1-LV0Vd4ajfAVdIgd8MsU/gynpHHs=",
+ "_integrity": "sha512-Pqpl3qJ/QdOIjRYA0q5DND/gLvGOfpIz/fYVDGYpOXfW/lFrIttmLsBnd6IkyK10+JHU9zhsaudfvrQTBB9YFQ==",
"_location": "/read-cmd-shim",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "read-cmd-shim@1.0.1",
+ "raw": "read-cmd-shim@1.0.4",
"name": "read-cmd-shim",
"escapedName": "read-cmd-shim",
- "rawSpec": "1.0.1",
+ "rawSpec": "1.0.4",
"saveSpec": null,
- "fetchSpec": "1.0.1"
+ "fetchSpec": "1.0.4"
},
"_requiredBy": [
+ "#USER",
"/",
"/gentle-fs"
],
- "_resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz",
- "_spec": "1.0.1",
- "_where": "/Users/rebecca/code/npm",
+ "_resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.4.tgz",
+ "_shasum": "b4a53d43376211b45243f0072b6e603a8e37640d",
+ "_spec": "read-cmd-shim@1.0.4",
+ "_where": "/Users/claudiahdz/npm/cli",
"author": {
"name": "Rebecca Turner",
"email": "me@re-becca.org",
@@ -36,16 +32,21 @@
"bugs": {
"url": "https://github.com/npm/read-cmd-shim/issues"
},
+ "bundleDependencies": false,
"dependencies": {
"graceful-fs": "^4.1.2"
},
+ "deprecated": false,
"description": "Figure out what a cmd-shim is pointing at. This acts as the equivalent of fs.readlink.",
"devDependencies": {
- "cmd-shim": "^2.0.1",
+ "cmd-shim": "^3.0.0",
"rimraf": "^2.4.3",
"standard": "^5.2.2",
- "tap": "^1.4.1"
+ "tap": "^12.7.0"
},
+ "files": [
+ "index.js"
+ ],
"homepage": "https://github.com/npm/read-cmd-shim#readme",
"license": "ISC",
"main": "index.js",
@@ -55,7 +56,8 @@
"url": "git+https://github.com/npm/read-cmd-shim.git"
},
"scripts": {
- "test": "standard && tap test/*.js"
+ "pretest": "standard",
+ "test": "tap test/*.js --100"
},
- "version": "1.0.1"
+ "version": "1.0.4"
}
diff --git a/deps/npm/node_modules/read-cmd-shim/test/integration.js b/deps/npm/node_modules/read-cmd-shim/test/integration.js
deleted file mode 100644
index 269f964727..0000000000
--- a/deps/npm/node_modules/read-cmd-shim/test/integration.js
+++ /dev/null
@@ -1,139 +0,0 @@
-'use strict'
-var path = require('path')
-var fs = require('graceful-fs')
-var test = require('tap').test
-var rimraf = require('rimraf')
-var cmdShim = require('cmd-shim')
-var readCmdShim = require('../index.js')
-var workDir = path.join(__dirname, path.basename(__filename, '.js'))
-var testShbang = path.join(workDir, 'test-shbang')
-var testShbangCmd = testShbang + '.cmd'
-var testShim = path.join(workDir, 'test')
-var testShimCmd = testShim + '.cmd'
-
-test('setup', function (t) {
- rimraf.sync(workDir)
- fs.mkdirSync(workDir)
- fs.writeFileSync(testShbang + '.js', '#!/usr/bin/env node\ntrue')
- cmdShim(__filename, testShim, function (er) {
- t.error(er)
- cmdShim(testShbang + '.js', testShbang, function (er) {
- t.error(er)
- t.done()
- })
- })
-})
-
-test('async-read-no-shbang', function (t) {
- t.plan(2)
- readCmdShim(testShimCmd, function (er, dest) {
- t.error(er)
- t.is(dest, '..\\basic.js')
- t.done()
- })
-})
-
-test('sync-read-no-shbang', function (t) {
- t.plan(1)
- var dest = readCmdShim.sync(testShimCmd)
- t.is(dest, '..\\basic.js')
- t.done()
-})
-
-test('async-read-shbang', function (t) {
- t.plan(2)
- readCmdShim(testShbangCmd, function (er, dest) {
- t.error(er)
- t.is(dest, 'test-shbang.js')
- t.done()
- })
-})
-
-test('sync-read-shbang', function (t) {
- t.plan(1)
- var dest = readCmdShim.sync(testShbangCmd)
- t.is(dest, 'test-shbang.js')
- t.done()
-})
-
-test('async-read-no-shbang-cygwin', function (t) {
- t.plan(2)
- readCmdShim(testShim, function (er, dest) {
- t.error(er)
- t.is(dest, '../basic.js')
- t.done()
- })
-})
-
-test('sync-read-no-shbang-cygwin', function (t) {
- t.plan(1)
- var dest = readCmdShim.sync(testShim)
- t.is(dest, '../basic.js')
- t.done()
-})
-
-test('async-read-shbang-cygwin', function (t) {
- t.plan(2)
- readCmdShim(testShbang, function (er, dest) {
- t.error(er)
- t.is(dest, 'test-shbang.js')
- t.done()
- })
-})
-
-test('sync-read-shbang-cygwin', function (t) {
- t.plan(1)
- var dest = readCmdShim.sync(testShbang)
- t.is(dest, 'test-shbang.js')
- t.done()
-})
-
-test('async-read-dir', function (t) {
- t.plan(2)
- readCmdShim(workDir, function (er) {
- t.ok(er)
- t.is(er.code, 'EISDIR', "cmd-shims can't be directories")
- t.done()
- })
-})
-
-test('sync-read-dir', function (t) {
- t.plan(1)
- t.throws(function () { readCmdShim.sync(workDir) }, "cmd-shims can't be directories")
- t.done()
-})
-
-test('async-read-not-there', function (t) {
- t.plan(2)
- readCmdShim('/path/to/nowhere', function (er, dest) {
- t.ok(er, 'missing files throw errors')
- t.is(er.code, 'ENOENT', "cmd-shim file doesn't exist")
- t.done()
- })
-})
-
-test('sync-read-not-there', function (t) {
- t.plan(1)
- t.throws(function () { readCmdShim.sync('/path/to/nowhere') }, "cmd-shim file doesn't exist")
- t.done()
-})
-
-test('async-read-not-shim', function (t) {
- t.plan(2)
- readCmdShim(__filename, function (er, dest) {
- t.ok(er)
- t.is(er.code, 'ENOTASHIM', 'shim file specified is not a shim')
- t.done()
- })
-})
-
-test('sync-read-not-shim', function (t) {
- t.plan(1)
- t.throws(function () { readCmdShim.sync(__filename) }, 'shim file specified is not a shim')
- t.done()
-})
-
-test('cleanup', function (t) {
- rimraf.sync(workDir)
- t.done()
-})