aboutsummaryrefslogtreecommitdiff
path: root/node_modules/cross-spawn
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
commitbbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch)
treec58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/cross-spawn
parent003fb34971cf63466184351b4db5f7c67df4f444 (diff)
update packages
Diffstat (limited to 'node_modules/cross-spawn')
-rw-r--r--node_modules/cross-spawn/LICENSE12
-rw-r--r--node_modules/cross-spawn/README.md73
-rw-r--r--node_modules/cross-spawn/index.js36
-rw-r--r--node_modules/cross-spawn/lib/enoent.js56
-rw-r--r--node_modules/cross-spawn/lib/hasBrokenSpawn.js11
-rw-r--r--node_modules/cross-spawn/lib/parse.js197
-rw-r--r--node_modules/cross-spawn/lib/resolveCommand.js31
-rw-r--r--node_modules/cross-spawn/package.json87
8 files changed, 231 insertions, 272 deletions
diff --git a/node_modules/cross-spawn/LICENSE b/node_modules/cross-spawn/LICENSE
index db5e914de..8407b9a30 100644
--- a/node_modules/cross-spawn/LICENSE
+++ b/node_modules/cross-spawn/LICENSE
@@ -1,14 +1,16 @@
-Copyright (c) 2014 IndigoUnited
+The MIT License (MIT)
+
+Copyright (c) 2018 Made With MOXY Lda <hello@moxy.studio>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
diff --git a/node_modules/cross-spawn/README.md b/node_modules/cross-spawn/README.md
index 18cc2b8bc..e895cd7a7 100644
--- a/node_modules/cross-spawn/README.md
+++ b/node_modules/cross-spawn/README.md
@@ -1,18 +1,22 @@
# cross-spawn
-[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url]
+[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] [![Greenkeeper badge][greenkeeper-image]][greenkeeper-url]
[npm-url]:https://npmjs.org/package/cross-spawn
[downloads-image]:http://img.shields.io/npm/dm/cross-spawn.svg
[npm-image]:http://img.shields.io/npm/v/cross-spawn.svg
-[travis-url]:https://travis-ci.org/IndigoUnited/node-cross-spawn
-[travis-image]:http://img.shields.io/travis/IndigoUnited/node-cross-spawn/master.svg
+[travis-url]:https://travis-ci.org/moxystudio/node-cross-spawn
+[travis-image]:http://img.shields.io/travis/moxystudio/node-cross-spawn/master.svg
[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn
[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg
-[david-dm-url]:https://david-dm.org/IndigoUnited/node-cross-spawn
-[david-dm-image]:https://img.shields.io/david/IndigoUnited/node-cross-spawn.svg
-[david-dm-dev-url]:https://david-dm.org/IndigoUnited/node-cross-spawn#info=devDependencies
-[david-dm-dev-image]:https://img.shields.io/david/dev/IndigoUnited/node-cross-spawn.svg
+[codecov-url]:https://codecov.io/gh/moxystudio/node-cross-spawn
+[codecov-image]:https://img.shields.io/codecov/c/github/moxystudio/node-cross-spawn/master.svg
+[david-dm-url]:https://david-dm.org/moxystudio/node-cross-spawn
+[david-dm-image]:https://img.shields.io/david/moxystudio/node-cross-spawn.svg
+[david-dm-dev-url]:https://david-dm.org/moxystudio/node-cross-spawn?type=dev
+[david-dm-dev-image]:https://img.shields.io/david/dev/moxystudio/node-cross-spawn.svg
+[greenkeeper-image]:https://badges.greenkeeper.io/moxystudio/node-cross-spawn.svg
+[greenkeeper-url]:https://greenkeeper.io/
A cross platform solution to node's spawn and spawnSync.
@@ -21,19 +25,17 @@ A cross platform solution to node's spawn and spawnSync.
`$ npm install cross-spawn`
-If you are using `spawnSync` on node 0.10 or older, you will also need to install `spawn-sync`:
-
-`$ npm install spawn-sync`
-
## Why
Node has issues when using spawn on Windows:
- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318)
-- It does not support [shebangs](http://pt.wikipedia.org/wiki/Shebang)
-- It does not allow you to run `del` or `dir`
-- It does not properly escape arguments with spaces or special characters
+- It does not support [shebangs](https://en.wikipedia.org/wiki/Shebang_(Unix))
+- Has problems running commands with [spaces](https://github.com/nodejs/node/issues/7367)
+- Has problems running commands with posix relative paths (e.g.: `./my-folder/my-executable`)
+- Has an [issue](https://github.com/moxystudio/node-cross-spawn/issues/82) with command shims (files in `node_modules/.bin/`), where arguments with quotes and parenthesis would result in [invalid syntax error](https://github.com/moxystudio/node-cross-spawn/blob/e77b8f22a416db46b6196767bcd35601d7e11d54/test/index.test.js#L149)
+- No `options.shell` support on node `<v4.8`
All these issues are handled correctly by `cross-spawn`.
There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments.
@@ -43,28 +45,49 @@ There are some known modules, such as [win-spawn](https://github.com/ForbesLinde
Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) or [`spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options), so it's a drop in replacement.
-```javascript
-var spawn = require('cross-spawn');
+
+```js
+const spawn = require('cross-spawn');
// Spawn NPM asynchronously
-var child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
+const child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
// Spawn NPM synchronously
-var results = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
+const result = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
```
-## Caveat
-On Windows, cross-spawn will only spawn `cmd.exe` if necessary. If the extension
-of the executable is `.exe` or `.com`, it will spawn it directly. If you wish
-to override this behavior and *always* spawn a shell, pass the `{shell: true}`
-option.
+## Caveats
+### Using `options.shell` as an alternative to `cross-spawn`
-## Tests
+Starting from node `v4.8`, `spawn` has a `shell` option that allows you run commands from within a shell. This new option solves
+the [PATHEXT](https://github.com/joyent/node/issues/2318) issue but:
+
+- It's not supported in node `<v4.8`
+- You must manually escape the command and arguments which is very error prone, specially when passing user input
+- There are a lot of other unresolved issues from the [Why](#why) section that you must take into account
+
+If you are using the `shell` option to spawn a command in a cross platform way, consider using `cross-spawn` instead. You have been warned.
+
+### `options.shell` support
-`$ npm test`
+While `cross-spawn` adds support for `options.shell` in node `<v4.8`, all of its enhancements are disabled.
+
+This mimics the Node.js behavior. More specifically, the command and its arguments will not be automatically escaped nor shebang support will be offered. This is by design because if you are using `options.shell` you are probably targeting a specific platform anyway and you don't want things to get into your way.
+
+### Shebangs support
+
+While `cross-spawn` handles shebangs on Windows, its support is limited. More specifically, it just supports `#!/usr/bin/env <program>` where `<program>` must not contain any arguments.
+If you would like to have the shebang support improved, feel free to contribute via a pull-request.
+
+Remember to always test your code on Windows!
+
+
+## Tests
+`$ npm test`
+`$ npm test -- --watch` during development
## License
diff --git a/node_modules/cross-spawn/index.js b/node_modules/cross-spawn/index.js
index 7814a9692..5509742ca 100644
--- a/node_modules/cross-spawn/index.js
+++ b/node_modules/cross-spawn/index.js
@@ -1,20 +1,15 @@
'use strict';
-var cp = require('child_process');
-var parse = require('./lib/parse');
-var enoent = require('./lib/enoent');
-
-var cpSpawnSync = cp.spawnSync;
+const cp = require('child_process');
+const parse = require('./lib/parse');
+const enoent = require('./lib/enoent');
function spawn(command, args, options) {
- var parsed;
- var spawned;
-
// Parse the arguments
- parsed = parse(command, args, options);
+ const parsed = parse(command, args, options);
// Spawn the child process
- spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
+ const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
// Hook into child process "exit" event to emit an error if the command
// does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
@@ -24,28 +19,13 @@ function spawn(command, args, options) {
}
function spawnSync(command, args, options) {
- var parsed;
- var result;
-
- if (!cpSpawnSync) {
- try {
- cpSpawnSync = require('spawn-sync'); // eslint-disable-line global-require
- } catch (ex) {
- throw new Error(
- 'In order to use spawnSync on node 0.10 or older, you must ' +
- 'install spawn-sync:\n\n' +
- ' npm install spawn-sync --save'
- );
- }
- }
-
// Parse the arguments
- parsed = parse(command, args, options);
+ const parsed = parse(command, args, options);
// Spawn the child process
- result = cpSpawnSync(parsed.command, parsed.args, parsed.options);
+ const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
- // Analyze if the command does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
+ // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
return result;
diff --git a/node_modules/cross-spawn/lib/enoent.js b/node_modules/cross-spawn/lib/enoent.js
index 74ff06e49..14df9b623 100644
--- a/node_modules/cross-spawn/lib/enoent.js
+++ b/node_modules/cross-spawn/lib/enoent.js
@@ -1,43 +1,37 @@
'use strict';
-var isWin = process.platform === 'win32';
-var resolveCommand = require('./resolveCommand');
-
-var isNode10 = process.version.indexOf('v0.10.') === 0;
-
-function notFoundError(command, syscall) {
- var err;
-
- err = new Error(syscall + ' ' + command + ' ENOENT');
- err.code = err.errno = 'ENOENT';
- err.syscall = syscall + ' ' + command;
-
- return err;
+const isWin = process.platform === 'win32';
+
+function notFoundError(original, syscall) {
+ return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
+ code: 'ENOENT',
+ errno: 'ENOENT',
+ syscall: `${syscall} ${original.command}`,
+ path: original.command,
+ spawnargs: original.args,
+ });
}
function hookChildProcess(cp, parsed) {
- var originalEmit;
-
if (!isWin) {
return;
}
- originalEmit = cp.emit;
- cp.emit = function (name, arg1) {
- var err;
+ const originalEmit = cp.emit;
+ cp.emit = function (name, arg1) {
// If emitting "exit" event and exit code is 1, we need to check if
// the command exists and emit an "error" instead
- // See: https://github.com/IndigoUnited/node-cross-spawn/issues/16
+ // See https://github.com/IndigoUnited/node-cross-spawn/issues/16
if (name === 'exit') {
- err = verifyENOENT(arg1, parsed, 'spawn');
+ const err = verifyENOENT(arg1, parsed, 'spawn');
if (err) {
return originalEmit.call(cp, 'error', err);
}
}
- return originalEmit.apply(cp, arguments);
+ return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params
};
}
@@ -54,20 +48,12 @@ function verifyENOENTSync(status, parsed) {
return notFoundError(parsed.original, 'spawnSync');
}
- // If we are in node 10, then we are using spawn-sync; if it exited
- // with -1 it probably means that the command does not exist
- if (isNode10 && status === -1) {
- parsed.file = isWin ? parsed.file : resolveCommand(parsed.original);
-
- if (!parsed.file) {
- return notFoundError(parsed.original, 'spawnSync');
- }
- }
-
return null;
}
-module.exports.hookChildProcess = hookChildProcess;
-module.exports.verifyENOENT = verifyENOENT;
-module.exports.verifyENOENTSync = verifyENOENTSync;
-module.exports.notFoundError = notFoundError;
+module.exports = {
+ hookChildProcess,
+ verifyENOENT,
+ verifyENOENTSync,
+ notFoundError,
+};
diff --git a/node_modules/cross-spawn/lib/hasBrokenSpawn.js b/node_modules/cross-spawn/lib/hasBrokenSpawn.js
deleted file mode 100644
index e73f906b6..000000000
--- a/node_modules/cross-spawn/lib/hasBrokenSpawn.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = (function () {
- if (process.platform !== 'win32') {
- return false;
- }
- var nodeVer = process.version.substr(1).split('.').map(function (num) {
- return parseInt(num, 10);
- });
- return (nodeVer[0] === 0 && nodeVer[1] < 12);
-})();
diff --git a/node_modules/cross-spawn/lib/parse.js b/node_modules/cross-spawn/lib/parse.js
index 77cbb83d2..962827a94 100644
--- a/node_modules/cross-spawn/lib/parse.js
+++ b/node_modules/cross-spawn/lib/parse.js
@@ -1,140 +1,125 @@
'use strict';
-var fs = require('fs');
-var LRU = require('lru-cache');
-var resolveCommand = require('./resolveCommand');
-var hasBrokenSpawn = require('./hasBrokenSpawn');
-
-var isWin = process.platform === 'win32';
-var shebangCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec
-
-function readShebang(command) {
- var buffer;
- var fd;
- var match;
- var shebang;
-
- // Check if it is in the cache first
- if (shebangCache.has(command)) {
- return shebangCache.get(command);
- }
+const path = require('path');
+const niceTry = require('nice-try');
+const resolveCommand = require('./util/resolveCommand');
+const escape = require('./util/escape');
+const readShebang = require('./util/readShebang');
+const semver = require('semver');
- // Read the first 150 bytes from the file
- buffer = new Buffer(150);
+const isWin = process.platform === 'win32';
+const isExecutableRegExp = /\.(?:com|exe)$/i;
+const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
- try {
- fd = fs.openSync(command, 'r');
- fs.readSync(fd, buffer, 0, 150, 0);
- fs.closeSync(fd);
- } catch (e) { /* empty */ }
+// `options.shell` is supported in Node ^4.8.0, ^5.7.0 and >= 6.0.0
+const supportsShellOption = niceTry(() => semver.satisfies(process.version, '^4.8.0 || ^5.7.0 || >= 6.0.0', true)) || false;
- // Check if it is a shebang
- match = buffer.toString().trim().match(/#!(.+)/i);
+function detectShebang(parsed) {
+ parsed.file = resolveCommand(parsed);
- if (match) {
- shebang = match[1].replace(/\/usr\/bin\/env\s+/i, ''); // Remove /usr/bin/env
- }
+ const shebang = parsed.file && readShebang(parsed.file);
- // Store the shebang in the cache
- shebangCache.set(command, shebang);
+ if (shebang) {
+ parsed.args.unshift(parsed.file);
+ parsed.command = shebang;
+
+ return resolveCommand(parsed);
+ }
- return shebang;
+ return parsed.file;
}
-function escapeArg(arg, quote) {
- // Convert to string
- arg = '' + arg;
+function parseNonShell(parsed) {
+ if (!isWin) {
+ return parsed;
+ }
- // If we are not going to quote the argument,
- // escape shell metacharacters, including double and single quotes:
- if (!quote) {
- arg = arg.replace(/([\(\)%!\^<>&|;,"'\s])/g, '^$1');
- } else {
- // Sequence of backslashes followed by a double quote:
- // double up all the backslashes and escape the double quote
- arg = arg.replace(/(\\*)"/g, '$1$1\\"');
+ // Detect & add support for shebangs
+ const commandFile = detectShebang(parsed);
- // Sequence of backslashes followed by the end of the string
- // (which will become a double quote later):
- // double up all the backslashes
- arg = arg.replace(/(\\*)$/, '$1$1');
+ // We don't need a shell if the command filename is an executable
+ const needsShell = !isExecutableRegExp.test(commandFile);
- // All other backslashes occur literally
+ // If a shell is required, use cmd.exe and take care of escaping everything correctly
+ // Note that `forceShell` is an hidden option used only in tests
+ if (parsed.options.forceShell || needsShell) {
+ // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`
+ // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument
+ // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,
+ // we need to double escape them
+ const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
- // Quote the whole thing:
- arg = '"' + arg + '"';
- }
+ // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar)
+ // This is necessary otherwise it will always fail with ENOENT in those cases
+ parsed.command = path.normalize(parsed.command);
- return arg;
-}
+ // Escape command & arguments
+ parsed.command = escape.command(parsed.command);
+ parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
-function escapeCommand(command) {
- // Do not escape if this command is not dangerous..
- // We do this so that commands like "echo" or "ifconfig" work
- // Quoting them, will make them unaccessible
- return /^[a-z0-9_-]+$/i.test(command) ? command : escapeArg(command, true);
-}
+ const shellCommand = [parsed.command].concat(parsed.args).join(' ');
-function requiresShell(command) {
- return !/\.(?:com|exe)$/i.test(command);
-}
+ parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`];
+ parsed.command = process.env.comspec || 'cmd.exe';
+ parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
+ }
-function parse(command, args, options) {
- var shebang;
- var applyQuotes;
- var file;
- var original;
- var shell;
+ return parsed;
+}
- // Normalize arguments, similar to nodejs
- if (args && !Array.isArray(args)) {
- options = args;
- args = null;
+function parseShell(parsed) {
+ // If node supports the shell option, there's no need to mimic its behavior
+ if (supportsShellOption) {
+ return parsed;
}
- args = args ? args.slice(0) : []; // Clone array to avoid changing the original
- options = options || {};
- original = command;
+ // Mimic node shell option
+ // See https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335
+ const shellCommand = [parsed.command].concat(parsed.args).join(' ');
if (isWin) {
- // Detect & add support for shebangs
- file = resolveCommand(command);
- file = file || resolveCommand(command, true);
- shebang = file && readShebang(file);
- shell = options.shell || hasBrokenSpawn;
-
- if (shebang) {
- args.unshift(file);
- command = shebang;
- shell = shell || requiresShell(resolveCommand(shebang) || resolveCommand(shebang, true));
+ parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe';
+ parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`];
+ parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
+ } else {
+ if (typeof parsed.options.shell === 'string') {
+ parsed.command = parsed.options.shell;
+ } else if (process.platform === 'android') {
+ parsed.command = '/system/bin/sh';
} else {
- shell = shell || requiresShell(file);
+ parsed.command = '/bin/sh';
}
- if (shell) {
- // Escape command & arguments
- applyQuotes = (command !== 'echo'); // Do not quote arguments for the special "echo" command
- command = escapeCommand(command);
- args = args.map(function (arg) {
- return escapeArg(arg, applyQuotes);
- });
+ parsed.args = ['-c', shellCommand];
+ }
- // Use cmd.exe
- args = ['/s', '/c', '"' + command + (args.length ? ' ' + args.join(' ') : '') + '"'];
- command = process.env.comspec || 'cmd.exe';
+ return parsed;
+}
- // Tell node's spawn that the arguments are already escaped
- options.windowsVerbatimArguments = true;
- }
+function parse(command, args, options) {
+ // Normalize arguments, similar to nodejs
+ if (args && !Array.isArray(args)) {
+ options = args;
+ args = null;
}
- return {
- command: command,
- args: args,
- options: options,
- file: file,
- original: original,
+ args = args ? args.slice(0) : []; // Clone array to avoid changing the original
+ options = Object.assign({}, options); // Clone object to avoid changing the original
+
+ // Build our parsed object
+ const parsed = {
+ command,
+ args,
+ options,
+ file: undefined,
+ original: {
+ command,
+ args,
+ },
};
+
+ // Delegate further parsing to shell or non-shell
+ return options.shell ? parseShell(parsed) : parseNonShell(parsed);
}
module.exports = parse;
diff --git a/node_modules/cross-spawn/lib/resolveCommand.js b/node_modules/cross-spawn/lib/resolveCommand.js
deleted file mode 100644
index b7a949097..000000000
--- a/node_modules/cross-spawn/lib/resolveCommand.js
+++ /dev/null
@@ -1,31 +0,0 @@
-'use strict';
-
-var path = require('path');
-var which = require('which');
-var LRU = require('lru-cache');
-
-var commandCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec
-
-function resolveCommand(command, noExtension) {
- var resolved;
-
- noExtension = !!noExtension;
- resolved = commandCache.get(command + '!' + noExtension);
-
- // Check if its resolved in the cache
- if (commandCache.has(command)) {
- return commandCache.get(command);
- }
-
- try {
- resolved = !noExtension ?
- which.sync(command) :
- which.sync(command, { pathExt: path.delimiter + (process.env.PATHEXT || '') });
- } catch (e) { /* empty */ }
-
- commandCache.set(command + '!' + noExtension, resolved);
-
- return resolved;
-}
-
-module.exports = resolveCommand;
diff --git a/node_modules/cross-spawn/package.json b/node_modules/cross-spawn/package.json
index 7d7bb88a5..1a69be8cc 100644
--- a/node_modules/cross-spawn/package.json
+++ b/node_modules/cross-spawn/package.json
@@ -1,51 +1,76 @@
{
"name": "cross-spawn",
- "version": "4.0.2",
+ "version": "6.0.5",
"description": "Cross platform child_process#spawn and child_process#spawnSync",
- "main": "index.js",
- "scripts": {
- "test": "node test/prepare && mocha --bail test/test",
- "lint": "eslint '{*.js,lib/**/*.js,test/**/*.js}'"
- },
- "bugs": {
- "url": "https://github.com/IndigoUnited/node-cross-spawn/issues/"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/IndigoUnited/node-cross-spawn.git"
- },
- "files": [
- "index.js",
- "lib"
- ],
"keywords": [
"spawn",
"spawnSync",
"windows",
- "cross",
- "platform",
- "path",
- "ext",
+ "cross-platform",
"path-ext",
- "path_ext",
"shebang",
- "hashbang",
"cmd",
"execute"
],
- "author": "IndigoUnited <hello@indigounited.com> (http://indigounited.com)",
+ "author": "André Cruz <andre@moxy.studio>",
+ "homepage": "https://github.com/moxystudio/node-cross-spawn",
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:moxystudio/node-cross-spawn.git"
+ },
"license": "MIT",
+ "main": "index.js",
+ "files": [
+ "lib"
+ ],
+ "scripts": {
+ "lint": "eslint .",
+ "test": "jest --env node --coverage",
+ "prerelease": "npm t && npm run lint",
+ "release": "standard-version",
+ "precommit": "lint-staged",
+ "commitmsg": "commitlint -e $GIT_PARAMS"
+ },
+ "standard-version": {
+ "scripts": {
+ "posttag": "git push --follow-tags origin master && npm publish"
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "eslint --fix",
+ "git add"
+ ]
+ },
+ "commitlint": {
+ "extends": [
+ "@commitlint/config-conventional"
+ ]
+ },
"dependencies": {
- "lru-cache": "^4.0.1",
+ "nice-try": "^1.0.4",
+ "path-key": "^2.0.1",
+ "semver": "^5.5.0",
+ "shebang-command": "^1.2.0",
"which": "^1.2.9"
},
"devDependencies": {
- "@satazor/eslint-config": "^3.0.0",
- "eslint": "^3.0.0",
- "expect.js": "^0.3.0",
- "glob": "^7.0.0",
+ "@commitlint/cli": "^6.0.0",
+ "@commitlint/config-conventional": "^6.0.2",
+ "babel-core": "^6.26.0",
+ "babel-jest": "^22.1.0",
+ "babel-preset-moxy": "^2.2.1",
+ "eslint": "^4.3.0",
+ "eslint-config-moxy": "^5.0.0",
+ "husky": "^0.14.3",
+ "jest": "^22.0.0",
+ "lint-staged": "^7.0.0",
"mkdirp": "^0.5.1",
- "mocha": "^3.0.2",
- "rimraf": "^2.5.0"
+ "regenerator-runtime": "^0.11.1",
+ "rimraf": "^2.6.2",
+ "standard-version": "^4.2.0"
+ },
+ "engines": {
+ "node": ">=4.8"
}
}