diff options
author | Kat Marchán <kzm@zkat.tech> | 2018-04-18 21:45:11 +0300 |
---|---|---|
committer | Kat Marchán <kzm@zkat.tech> | 2018-04-18 21:45:11 +0300 |
commit | 1c1f89b7319b2eef6adee2530c4619ac1c0d83cf (patch) | |
tree | 88af1a594a7585f3e89259d6c0e4cc99cc5372c5 /node_modules | |
parent | 95b463bba67fd69861f487e6137cfefa8292e113 (diff) |
libnpx@10.2.0
Diffstat (limited to 'node_modules')
-rw-r--r-- | node_modules/libnpx/CHANGELOG.md | 17 | ||||
-rw-r--r-- | node_modules/libnpx/index.js | 27 | ||||
-rw-r--r-- | node_modules/libnpx/libnpx.1 | 2 | ||||
-rw-r--r-- | node_modules/libnpx/locales/ko.json | 10 | ||||
-rw-r--r-- | node_modules/libnpx/locales/zh_CN.json | 3 | ||||
-rw-r--r-- | node_modules/libnpx/package.json | 28 |
6 files changed, 56 insertions, 31 deletions
diff --git a/node_modules/libnpx/CHANGELOG.md b/node_modules/libnpx/CHANGELOG.md index 1cd8653c5..5fa91fac9 100644 --- a/node_modules/libnpx/CHANGELOG.md +++ b/node_modules/libnpx/CHANGELOG.md @@ -2,6 +2,23 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +<a name="10.2.0"></a> +# [10.2.0](https://github.com/zkat/npx/compare/v10.1.1...v10.2.0) (2018-04-13) + + +### Bug Fixes + +* **i18n:** fix korean; 쉘 -> 셸 ([#163](https://github.com/zkat/npx/issues/163)) ([11d9fe0](https://github.com/zkat/npx/commit/11d9fe0)) +* **spawn:** spawn child processes with node without relying on the shebang. ([#174](https://github.com/zkat/npx/issues/174)) ([cba97bb](https://github.com/zkat/npx/commit/cba97bb)) +* **windows:** Allow spaces in the node path when using --node-arg ([#173](https://github.com/zkat/npx/issues/173)) ([fe0d48a](https://github.com/zkat/npx/commit/fe0d48a)), closes [#170](https://github.com/zkat/npx/issues/170) + + +### Features + +* **i18n:** add translation ([#159](https://github.com/zkat/npx/issues/159)) ([5da008b](https://github.com/zkat/npx/commit/5da008b)) + + + <a name="10.1.1"></a> ## [10.1.1](https://github.com/zkat/npx/compare/v10.1.0...v10.1.1) (2018-04-12) diff --git a/node_modules/libnpx/index.js b/node_modules/libnpx/index.js index 4af3d8795..21f44b371 100644 --- a/node_modules/libnpx/index.js +++ b/node_modules/libnpx/index.js @@ -253,6 +253,7 @@ function installPackages (specs, prefix, opts) { module.exports._execCommand = execCommand function execCommand (_existing, argv) { return findNodeScript(_existing, argv).then(existing => { + const argvCmdOpts = argv.cmdOpts || [] if (existing && !argv.alwaysSpawn && !argv.nodeArg && !argv.shell && existing !== process.argv[1]) { const Module = require('module') // let it take over the process. This means we can skip node startup! @@ -263,31 +264,35 @@ function execCommand (_existing, argv) { process.argv = [ process.argv[0], // Current node binary existing // node script path. `runMain()` will set this as the new main - ].concat(argv.cmdOpts) // options for the cmd itself + ].concat(argvCmdOpts) // options for the cmd itself Module.runMain() // ✨MAGIC✨. Sorry-not-sorry } else if (!existing && argv.nodeArg && argv.nodeArg.length) { throw new Error(Y()`ERROR: --node-arg/-n can only be used on packages with node scripts.`) } else { let cmd = existing - let opts = argv - if (existing && argv.nodeArg && argv.nodeArg.length) { + let cmdOpts = argvCmdOpts + if (existing) { + cmd = process.argv[0] + if (process.platform === 'win32') { + cmd = child.escapeArg(cmd, true) + } // If we know we're running a run script and we got a --node-arg, // we need to fudge things a bit to get them working right. - let nargs = argv.nodeArg - if (typeof nargs === 'string') { - nargs = [nargs] + cmdOpts = argv.nodeArg + if (cmdOpts) { + cmdOpts = Array.isArray(cmdOpts) ? cmdOpts : [cmdOpts] + } else { + cmdOpts = [] } // It's valid for a single arg to be a string of multiple // space-separated node args. // Example: `$ npx -n '--inspect --harmony --debug' ...` - nargs = nargs.reduce((acc, arg) => { + cmdOpts = cmdOpts.reduce((acc, arg) => { return acc.concat(arg.split(/\s+/)) }, []) - cmd = process.argv[0] - opts = Object.assign({}, argv, { - cmdOpts: nargs.concat([existing], argv.cmdOpts || []) - }) + cmdOpts = cmdOpts.concat(existing, argvCmdOpts) } + const opts = Object.assign({}, argv, { cmdOpts }) return child.runCommand(cmd, opts).catch(err => { if (err.isOperational && err.exitCode) { // At this point, we want to treat errors from the child as if diff --git a/node_modules/libnpx/libnpx.1 b/node_modules/libnpx/libnpx.1 index 472472e77..4215202da 100644 --- a/node_modules/libnpx/libnpx.1 +++ b/node_modules/libnpx/libnpx.1 @@ -1,4 +1,4 @@ -.TH "NPX" "1" "April 2018" "libnpx@10.1.0" "User Commands" +.TH "NPX" "1" "April 2018" "libnpx@10.1.1" "User Commands" .SH "NAME" \fBnpx\fR \- execute npm package binaries .SH SYNOPSIS diff --git a/node_modules/libnpx/locales/ko.json b/node_modules/libnpx/locales/ko.json index bd8fe1420..0e9917df9 100644 --- a/node_modules/libnpx/locales/ko.json +++ b/node_modules/libnpx/locales/ko.json @@ -5,15 +5,15 @@ "Skip installation if a package is missing.": "패키지가 없으면 설치를 건너뜁니다.", "Path to user npmrc.": "사용자 npmrc의 경로.", "Execute string as if inside `npm run-script`.": "문자열이 `npm run-script`안에 있는 것처럼 실행합니다.", - "Shell to execute the command with, if any.": "명령을 실행할 쉘(존재하는 경우).", - "Generate shell code to use npx as the \"command not found\" fallback.": "\"명령을 찾을 수 없습니다\"의 대안으로 npx가 사용하도록 쉘 코드를 생성합니다.", + "Shell to execute the command with, if any.": "명령을 실행할 셸 (존재하는 경우).", + "Generate shell code to use npx as the \"command not found\" fallback.": "\"명령을 찾을 수 없습니다\" 대신 npx가 사용되도록 셸 코드를 생성합니다.", "Ignores existing binaries in $PATH, or in the local project. This forces npx to do a temporary install and use the latest version.": "$PATH나 로컬 프로젝트에 있는 바이너리를 무시합니다. 이는 npx가 최신 버전을 임시로 설치해서 사용하도록 강제합니다.", "npm binary to use for internal operations.": "내부 작업에 사용할 npm 바이너리.", "For the full documentation, see the manual page for npx(1).": "전체 문서는 npx(1) 매뉴얼 페이지를 보세요.", - "Unable to guess a binary name from %s. Please use --package.": "%s 에서 바이너리 이름을 추측할 수 없습니다. --package 를 사용해 주세요.", + "Unable to guess a binary name from %s. Please use --package.": "%s에서 바이너리 이름을 추측할 수 없습니다. --package를 사용해 주세요.", "\nERROR: You must supply a command.\n": "\nERROR: 명령을 제공해야 합니다.\n", "Command failed: %s %s": "명령이 실패했습니다: %s %s", - "Install for %s failed with code %s": "%s 설치가 %s 코드로 실패했습니다", + "Install for %s failed with code %s": "%s 설치가 오류 코드 %s로 실패했습니다", "%s not found. Trying with npx...": "%s 을 찾을 수 없습니다. npx로 시도합니다...", "command not found: %s": "명령을 찾을 수 없습니다: %s", "options": "옵션", @@ -21,7 +21,7 @@ "version": "버전", "command-arg": "명령-인자", "command-string": "명령-문자열", - "shell": "쉘", + "shell": "셸", "package": "패키지", "npx: installed %s in %ss": "npx: %s개의 패키지를 %s초만에 설치했습니다.", "Suppress output from npx itself. Subcommands will not be affected.": "npx의 출력을 감춥니다. 하위 명령은 영향을 받지 않습니다.", diff --git a/node_modules/libnpx/locales/zh_CN.json b/node_modules/libnpx/locales/zh_CN.json index 6cf64629f..92b61186c 100644 --- a/node_modules/libnpx/locales/zh_CN.json +++ b/node_modules/libnpx/locales/zh_CN.json @@ -24,5 +24,6 @@ "shell": "命令行解释器", "package": "包", "npx: installed %s in %ss": "npx: %s 安装成功,用时 %s 秒", - "Suppress output from npx itself. Subcommands will not be affected.": "隐藏 npx 的输出,子命令不会受到影响" + "Suppress output from npx itself. Subcommands will not be affected.": "隐藏 npx 的输出,子命令不会受到影响", + "Extra node argument when calling a node binary.": "调用 node 二进制时使用额外的 node 参数。" } diff --git a/node_modules/libnpx/package.json b/node_modules/libnpx/package.json index 27c9c4445..fac78a2cb 100644 --- a/node_modules/libnpx/package.json +++ b/node_modules/libnpx/package.json @@ -1,8 +1,8 @@ { - "_from": "libnpx@10.1.1", - "_id": "libnpx@10.1.1", + "_from": "libnpx@latest", + "_id": "libnpx@10.2.0", "_inBundle": false, - "_integrity": "sha512-IjEiIXKZqqEWNFx5PpdoF6ayOPhCaRhLOZyUeOiMXrzXLEJ2cR78BffAY++sTIdxaAwSXkp0cFBbKNEv8ou/qw==", + "_integrity": "sha512-X28coei8/XRCt15cYStbLBph+KGhFra4VQhRBPuH/HHMkC5dxM8v24RVgUsvODKCrUZ0eTgiTqJp6zbl0sskQQ==", "_location": "/libnpx", "_phantomChildren": { "lru-cache": "4.1.2", @@ -10,23 +10,23 @@ "which": "1.3.0" }, "_requested": { - "type": "version", + "type": "tag", "registry": true, - "raw": "libnpx@10.1.1", + "raw": "libnpx@latest", "name": "libnpx", "escapedName": "libnpx", - "rawSpec": "10.1.1", + "rawSpec": "latest", "saveSpec": null, - "fetchSpec": "10.1.1" + "fetchSpec": "latest" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/libnpx/-/libnpx-10.1.1.tgz", - "_shasum": "69f7c3bcde6090f26a18d0d730632d4cbcd26007", - "_spec": "libnpx@10.1.1", - "_where": "/Users/rebecca/code/npm", + "_resolved": "https://registry.npmjs.org/libnpx/-/libnpx-10.2.0.tgz", + "_shasum": "1bf4a1c9f36081f64935eb014041da10855e3102", + "_spec": "libnpx@latest", + "_where": "/Users/zkat/Documents/code/work/npm", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" @@ -70,6 +70,9 @@ "weallbehave": "^1.2.0", "weallcontribute": "^1.0.8" }, + "engines": { + "node": ">=4" + }, "files": [ "*.js", "libnpx.1", @@ -90,7 +93,6 @@ "./libnpx.1" ], "name": "libnpx", - "optionalDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/zkat/npx.git" @@ -107,5 +109,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "10.1.1" + "version": "10.2.0" } |