diff options
author | claudiahdz <cghr1990@gmail.com> | 2019-08-31 01:28:17 +0300 |
---|---|---|
committer | claudiahdz <cghr1990@gmail.com> | 2019-08-31 01:28:19 +0300 |
commit | e5fbb7ed1fc7ef5c6ca4790e2d0dc441e0ac1596 (patch) | |
tree | 9a9a49b75f2c14cd598852c711ae34cdda060fb7 /node_modules/read-cmd-shim | |
parent | 1fafb51513466cd793866b576dfea9a8963a3335 (diff) |
read-cmd-shim@1.0.4
Diffstat (limited to 'node_modules/read-cmd-shim')
-rw-r--r-- | node_modules/read-cmd-shim/package.json | 25 | ||||
-rw-r--r-- | node_modules/read-cmd-shim/test/integration.js | 139 |
2 files changed, 14 insertions, 150 deletions
diff --git a/node_modules/read-cmd-shim/package.json b/node_modules/read-cmd-shim/package.json index d706e652c..df2fe27e7 100644 --- a/node_modules/read-cmd-shim/package.json +++ b/node_modules/read-cmd-shim/package.json @@ -1,29 +1,29 @@ { - "_from": "read-cmd-shim@1.0.3", - "_id": "read-cmd-shim@1.0.3", + "_from": "read-cmd-shim@1.0.4", + "_id": "read-cmd-shim@1.0.4", "_inBundle": false, - "_integrity": "sha512-HUHb2imlZ8xBJjiZZRx0Ag9JfZ3jxQRfORMQXWCDeHE6PCCnpQrMq6LhyNqEPnMXhMDDIyq/BK7pBbhNy9zDDA==", + "_integrity": "sha512-Pqpl3qJ/QdOIjRYA0q5DND/gLvGOfpIz/fYVDGYpOXfW/lFrIttmLsBnd6IkyK10+JHU9zhsaudfvrQTBB9YFQ==", "_location": "/read-cmd-shim", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "read-cmd-shim@1.0.3", + "raw": "read-cmd-shim@1.0.4", "name": "read-cmd-shim", "escapedName": "read-cmd-shim", - "rawSpec": "1.0.3", + "rawSpec": "1.0.4", "saveSpec": null, - "fetchSpec": "1.0.3" + "fetchSpec": "1.0.4" }, "_requiredBy": [ "#USER", "/", "/gentle-fs" ], - "_resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.3.tgz", - "_shasum": "b246608c8e76e332a99be7811c096a4baf60015a", - "_spec": "read-cmd-shim@1.0.3", - "_where": "/Users/isaacs/dev/npm/cli", + "_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", @@ -44,6 +44,9 @@ "standard": "^5.2.2", "tap": "^12.7.0" }, + "files": [ + "index.js" + ], "homepage": "https://github.com/npm/read-cmd-shim#readme", "license": "ISC", "main": "index.js", @@ -56,5 +59,5 @@ "pretest": "standard", "test": "tap test/*.js --100" }, - "version": "1.0.3" + "version": "1.0.4" } diff --git a/node_modules/read-cmd-shim/test/integration.js b/node_modules/read-cmd-shim/test/integration.js deleted file mode 100644 index 0cfa84bf6..000000000 --- a/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, '..\\integration.js') - t.done() - }) -}) - -test('sync-read-no-shbang', function (t) { - t.plan(1) - var dest = readCmdShim.sync(testShimCmd) - t.is(dest, '..\\integration.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, '../integration.js') - t.done() - }) -}) - -test('sync-read-no-shbang-cygwin', function (t) { - t.plan(1) - var dest = readCmdShim.sync(testShim) - t.is(dest, '../integration.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() -}) |