diff --git a/node_modules/.gitignore b/node_modules/.gitignore index c67fa8c2be060..fa76105d97b99 100644 --- a/node_modules/.gitignore +++ b/node_modules/.gitignore @@ -135,16 +135,15 @@ /log-driver /loose-envify /make-error -/map-age-cleaner /marked /marked-man /merge-source-map +/mimic-fn /minipass /nano /natural-compare /neo-async /nested-error-stacks -/nice-try /npm-license-corrections /npm-registry-couchapp /npm-registry-mock @@ -156,8 +155,6 @@ /optionator /own-or /own-or-env -/p-defer -/p-is-promise /package-hash /parse-json /parseurl diff --git a/node_modules/get-caller-file/LICENSE.md b/node_modules/get-caller-file/LICENSE.md new file mode 100644 index 0000000000000..bf3e1c071bae4 --- /dev/null +++ b/node_modules/get-caller-file/LICENSE.md @@ -0,0 +1,6 @@ +ISC License (ISC) +Copyright 2018 Stefan Penner + +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/node_modules/get-caller-file/README.md b/node_modules/get-caller-file/README.md index c32df54c39135..194492736bc4f 100644 --- a/node_modules/get-caller-file/README.md +++ b/node_modules/get-caller-file/README.md @@ -1,4 +1,4 @@ # get-caller-file -[![Build Status](https://travis-ci.org/ember-cli/ember-cli.svg?branch=master)](https://travis-ci.org/ember-cli/ember-cli) +[![Build Status](https://travis-ci.org/stefanpenner/get-caller-file.svg?branch=master)](https://travis-ci.org/stefanpenner/get-caller-file) [![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master) diff --git a/node_modules/get-caller-file/package.json b/node_modules/get-caller-file/package.json index d5c90d52fca1e..e853deec1b056 100644 --- a/node_modules/get-caller-file/package.json +++ b/node_modules/get-caller-file/package.json @@ -1,8 +1,8 @@ { "_from": "get-caller-file@^1.0.1", - "_id": "get-caller-file@1.0.2", + "_id": "get-caller-file@1.0.3", "_inBundle": false, - "_integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "_integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", "_location": "/get-caller-file", "_phantomChildren": {}, "_requested": { @@ -18,10 +18,10 @@ "_requiredBy": [ "/yargs" ], - "_resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "_shasum": "f702e63127e7e231c160a80c1554acb70d5047e5", + "_resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "_shasum": "f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a", "_spec": "get-caller-file@^1.0.1", - "_where": "/Users/rebecca/code/npm/node_modules/yargs", + "_where": "/Users/mperrotte/npminc/cli/node_modules/yargs", "author": { "name": "Stefan Penner" }, @@ -30,11 +30,11 @@ }, "bundleDependencies": false, "deprecated": false, - "description": "[![Build Status](https://travis-ci.org/ember-cli/ember-cli.svg?branch=master)](https://travis-ci.org/ember-cli/ember-cli) [![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master)", + "description": "[![Build Status](https://travis-ci.org/stefanpenner/get-caller-file.svg?branch=master)](https://travis-ci.org/stefanpenner/get-caller-file) [![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master)", "devDependencies": { - "chai": "^3.4.1", + "chai": "^4.1.2", "ensure-posix-path": "^1.0.1", - "mocha": "^2.3.4" + "mocha": "^5.2.0" }, "directories": { "test": "tests" @@ -54,5 +54,5 @@ "test": "mocha test", "test:debug": "mocha test" }, - "version": "1.0.2" + "version": "1.0.3" } diff --git a/node_modules/invert-kv/index.js b/node_modules/invert-kv/index.js index 61e21961128f7..27f9cbb8eaf28 100644 --- a/node_modules/invert-kv/index.js +++ b/node_modules/invert-kv/index.js @@ -1,14 +1,14 @@ 'use strict'; -module.exports = function (obj) { - if (typeof obj !== 'object') { +module.exports = object => { + if (typeof object !== 'object') { throw new TypeError('Expected an object'); } - var ret = {}; + const ret = {}; - for (var key in obj) { - var val = obj[key]; - ret[val] = key; + for (const key of Object.keys(object)) { + const value = object[key]; + ret[value] = key; } return ret; diff --git a/node_modules/invert-kv/license b/node_modules/invert-kv/license new file mode 100644 index 0000000000000..e7af2f77107d7 --- /dev/null +++ b/node_modules/invert-kv/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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: + +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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/invert-kv/package.json b/node_modules/invert-kv/package.json index c38e09e5d91ba..beb77fa37f6fa 100644 --- a/node_modules/invert-kv/package.json +++ b/node_modules/invert-kv/package.json @@ -1,43 +1,44 @@ { - "_from": "invert-kv@^1.0.0", - "_id": "invert-kv@1.0.0", + "_from": "invert-kv@^2.0.0", + "_id": "invert-kv@2.0.0", "_inBundle": false, - "_integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "_integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", "_location": "/invert-kv", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "invert-kv@^1.0.0", + "raw": "invert-kv@^2.0.0", "name": "invert-kv", "escapedName": "invert-kv", - "rawSpec": "^1.0.0", + "rawSpec": "^2.0.0", "saveSpec": null, - "fetchSpec": "^1.0.0" + "fetchSpec": "^2.0.0" }, "_requiredBy": [ "/lcid" ], - "_resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "_shasum": "104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6", - "_spec": "invert-kv@^1.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/lcid", + "_resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "_shasum": "7393f5afa59ec9ff5f67a27620d11c226e3eec02", + "_spec": "invert-kv@^2.0.0", + "_where": "/Users/mperrotte/npminc/cli/node_modules/lcid", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" + "url": "sindresorhus.com" }, "bugs": { "url": "https://github.com/sindresorhus/invert-kv/issues" }, "bundleDependencies": false, "deprecated": false, - "description": "Invert the key/value of an object. Example: {foo: 'bar'} → {bar: 'foo'}", + "description": "Invert the key/value of an object. Example: `{foo: 'bar'}` → `{bar: 'foo'}`", "devDependencies": { - "mocha": "*" + "ava": "*", + "xo": "*" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" }, "files": [ "index.js" @@ -45,10 +46,8 @@ "homepage": "https://github.com/sindresorhus/invert-kv#readme", "keywords": [ "object", - "obj", "key", "value", - "val", "kv", "invert" ], @@ -59,7 +58,7 @@ "url": "git+https://github.com/sindresorhus/invert-kv.git" }, "scripts": { - "test": "mocha" + "test": "xo && ava" }, - "version": "1.0.0" + "version": "2.0.0" } diff --git a/node_modules/invert-kv/readme.md b/node_modules/invert-kv/readme.md index 039fc7cfa25b0..365a97997cac3 100644 --- a/node_modules/invert-kv/readme.md +++ b/node_modules/invert-kv/readme.md @@ -5,15 +5,15 @@ ## Install -```sh -$ npm install --save invert-kv +``` +$ npm install invert-kv ``` ## Usage ```js -var invertKv = require('invert-kv'); +const invertKv = require('invert-kv'); invertKv({foo: 'bar', unicorn: 'rainbow'}); //=> {bar: 'foo', rainbow: 'unicorn'} @@ -22,4 +22,4 @@ invertKv({foo: 'bar', unicorn: 'rainbow'}); ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/lcid/index.js b/node_modules/lcid/index.js index 69bd3d231e059..b666ef00a4504 100644 --- a/node_modules/lcid/index.js +++ b/node_modules/lcid/index.js @@ -1,9 +1,10 @@ 'use strict'; -var invertKv = require('invert-kv'); -var all = require('./lcid.json'); -var inverted = invertKv(all); +const invertKv = require('invert-kv'); +const all = require('./lcid.json'); -exports.from = function (lcidCode) { +const inverted = invertKv(all); + +exports.from = lcidCode => { if (typeof lcidCode !== 'number') { throw new TypeError('Expected a number'); } @@ -11,7 +12,7 @@ exports.from = function (lcidCode) { return inverted[lcidCode]; }; -exports.to = function (localeId) { +exports.to = localeId => { if (typeof localeId !== 'string') { throw new TypeError('Expected a string'); } diff --git a/node_modules/lcid/license b/node_modules/lcid/license index 654d0bfe94343..e7af2f77107d7 100644 --- a/node_modules/lcid/license +++ b/node_modules/lcid/license @@ -1,21 +1,9 @@ -The MIT License (MIT) +MIT License Copyright (c) Sindre Sorhus (sindresorhus.com) -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: +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: -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, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/lcid/package.json b/node_modules/lcid/package.json index 6ab09a0881309..3de023722441e 100644 --- a/node_modules/lcid/package.json +++ b/node_modules/lcid/package.json @@ -1,28 +1,27 @@ { - "_from": "lcid@^1.0.0", - "_id": "lcid@1.0.0", + "_from": "lcid@^2.0.0", + "_id": "lcid@2.0.0", "_inBundle": false, - "_integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "_integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", "_location": "/lcid", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "lcid@^1.0.0", + "raw": "lcid@^2.0.0", "name": "lcid", "escapedName": "lcid", - "rawSpec": "^1.0.0", + "rawSpec": "^2.0.0", "saveSpec": null, - "fetchSpec": "^1.0.0" + "fetchSpec": "^2.0.0" }, "_requiredBy": [ - "/os-locale", - "/tacks/os-locale" + "/os-locale" ], - "_resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "_shasum": "308accafa0bc483a3867b4b6f2b9506251d1b835", - "_spec": "lcid@^1.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/os-locale", + "_resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "_shasum": "6ef5d2df60e52f82eb228a4c373e8d1f397253cf", + "_spec": "lcid@^2.0.0", + "_where": "/Users/mperrotte/npminc/cli/node_modules/os-locale", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -33,15 +32,16 @@ }, "bundleDependencies": false, "dependencies": { - "invert-kv": "^1.0.0" + "invert-kv": "^2.0.0" }, "deprecated": false, "description": "Mapping between standard locale identifiers and Windows locale identifiers (LCID)", "devDependencies": { - "ava": "0.0.4" + "ava": "*", + "xo": "*" }, "engines": { - "node": ">=0.10.0" + "node": ">=6" }, "files": [ "index.js", @@ -73,7 +73,7 @@ "url": "git+https://github.com/sindresorhus/lcid.git" }, "scripts": { - "test": "node test.js" + "test": "xo && ava" }, - "version": "1.0.0" + "version": "2.0.0" } diff --git a/node_modules/lcid/readme.md b/node_modules/lcid/readme.md index bee4a70166978..2b1aa798b6930 100644 --- a/node_modules/lcid/readme.md +++ b/node_modules/lcid/readme.md @@ -1,8 +1,8 @@ # lcid [![Build Status](https://travis-ci.org/sindresorhus/lcid.svg?branch=master)](https://travis-ci.org/sindresorhus/lcid) -> Mapping between [standard locale identifiers](http://en.wikipedia.org/wiki/Locale) and [Windows locale identifiers (LCID)](http://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms) +> Mapping between [standard locale identifiers](https://en.wikipedia.org/wiki/Locale_(computer_software)) and [Windows locale identifiers (LCID)](http://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms) -Based on the [mapping](https://github.com/python/cpython/blob/be2a1a76fa43bb1ea1b3577bb5bdd506a2e90e37/Lib/locale.py#L1395-L1604) used in the Python standard library. +Based on the [mapping](https://github.com/python/cpython/blob/8f7bb100d0fa7fb2714f3953b5b627878277c7c6/Lib/locale.py#L1465-L1674) used in the Python standard library. The mapping itself is just a [JSON file](lcid.json) and can be used wherever. @@ -10,14 +10,14 @@ The mapping itself is just a [JSON file](lcid.json) and can be used wherever. ## Install ``` -$ npm install --save lcid +$ npm install lcid ``` ## Usage ```js -var lcid = require('lcid'); +const lcid = require('lcid'); lcid.from(1044); //=> 'nb_NO' @@ -32,4 +32,4 @@ lcid.all; ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/libnpx/CHANGELOG.md b/node_modules/libnpx/CHANGELOG.md index 5fa91fac96ae7..74da62235d696 100644 --- a/node_modules/libnpx/CHANGELOG.md +++ b/node_modules/libnpx/CHANGELOG.md @@ -2,61 +2,73 @@ 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. + +## [10.2.2](https://github.com/npm/npx/compare/v10.2.1...v10.2.2) (2020-01-28) + + +### Bug Fixes + +* correct Kat's github url ([9a23db1](https://github.com/npm/npx/commit/9a23db1)) +* install latest npm on travis for node 6 ([e0eb3cb](https://github.com/npm/npx/commit/e0eb3cb)) +* Update changelog to fix old issue links ([3733137](https://github.com/npm/npx/commit/3733137)) + + + -# [10.2.0](https://github.com/zkat/npx/compare/v10.1.1...v10.2.0) (2018-04-13) +# [10.2.0](https://github.com/npm/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) +* **i18n:** fix korean; 쉘 -> 셸 ([#163](https://github.com/zkat/npx/issues/163)) ([11d9fe0](https://github.com/npm/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/npm/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/npm/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)) +* **i18n:** add translation ([#159](https://github.com/zkat/npx/issues/159)) ([5da008b](https://github.com/npm/npx/commit/5da008b)) -## [10.1.1](https://github.com/zkat/npx/compare/v10.1.0...v10.1.1) (2018-04-12) +## [10.1.1](https://github.com/npm/npx/compare/v10.1.0...v10.1.1) (2018-04-12) -# [10.1.0](https://github.com/zkat/npx/compare/v10.0.1...v10.1.0) (2018-04-12) +# [10.1.0](https://github.com/npm/npx/compare/v10.0.1...v10.1.0) (2018-04-12) ### Features -* **spawn:** add --always-spawn to opt out of process takeover optimization feature ([#172](https://github.com/zkat/npx/issues/172)) ([c0d6abc](https://github.com/zkat/npx/commit/c0d6abc)) +* **spawn:** add --always-spawn to opt out of process takeover optimization feature ([#172](https://github.com/zkat/npx/issues/172)) ([c0d6abc](https://github.com/npm/npx/commit/c0d6abc)) -## [10.0.1](https://github.com/zkat/npx/compare/v10.0.0...v10.0.1) (2018-03-08) +## [10.0.1](https://github.com/npm/npx/compare/v10.0.0...v10.0.1) (2018-03-08) ### Bug Fixes -* **i18n:** Improve French localization ([#158](https://github.com/zkat/npx/issues/158)) ([c88823e](https://github.com/zkat/npx/commit/c88823e)) -* **windows:** on Windows, throw useful error when package contains no binaries([#142](https://github.com/zkat/npx/issues/142)) ([a69276e](https://github.com/zkat/npx/commit/a69276e)), closes [#137](https://github.com/zkat/npx/issues/137) +* **i18n:** Improve French localization ([#158](https://github.com/zkat/npx/issues/158)) ([c88823e](https://github.com/npm/npx/commit/c88823e)) +* **windows:** on Windows, throw useful error when package contains no binaries([#142](https://github.com/zkat/npx/issues/142)) ([a69276e](https://github.com/npm/npx/commit/a69276e)), closes [#137](https://github.com/zkat/npx/issues/137) -# [10.0.0](https://github.com/zkat/npx/compare/v9.7.1...v10.0.0) (2018-03-08) +# [10.0.0](https://github.com/npm/npx/compare/v9.7.1...v10.0.0) (2018-03-08) ### Bug Fixes -* **i18n:** Fix Korean locale ([#130](https://github.com/zkat/npx/issues/130)) ([752db48](https://github.com/zkat/npx/commit/752db48)) -* **index:** remove extraneous logging on Windows ([#136](https://github.com/zkat/npx/issues/136)) ([357e6ab](https://github.com/zkat/npx/commit/357e6ab)), closes [#131](https://github.com/zkat/npx/issues/131) -* **license:** change npx license to ISC ([a617d7b](https://github.com/zkat/npx/commit/a617d7b)) -* **parse-args:** fix version thing for yargs ([30677ed](https://github.com/zkat/npx/commit/30677ed)) -* **prefix:** Handle node_modules without package.json ([#128](https://github.com/zkat/npx/issues/128)) ([f64ae43](https://github.com/zkat/npx/commit/f64ae43)), closes [/github.com/babel/babel/issues/4066#issuecomment-336705199](https://github.com//github.com/babel/babel/issues/4066/issues/issuecomment-336705199) -* **standard:** get things in line with standard 11 ([6cf8e88](https://github.com/zkat/npx/commit/6cf8e88)) +* **i18n:** Fix Korean locale ([#130](https://github.com/zkat/npx/issues/130)) ([752db48](https://github.com/npm/npx/commit/752db48)) +* **index:** remove extraneous logging on Windows ([#136](https://github.com/zkat/npx/issues/136)) ([357e6ab](https://github.com/npm/npx/commit/357e6ab)), closes [#131](https://github.com/zkat/npx/issues/131) +* **license:** change npx license to ISC ([a617d7b](https://github.com/npm/npx/commit/a617d7b)) +* **parse-args:** fix version thing for yargs ([30677ed](https://github.com/npm/npx/commit/30677ed)) +* **prefix:** Handle node_modules without package.json ([#128](https://github.com/zkat/npx/issues/128)) ([f64ae43](https://github.com/npm/npx/commit/f64ae43)), closes [/github.com/babel/babel/issues/4066#issuecomment-336705199](https://github.com//github.com/babel/babel/issues/4066/issues/issuecomment-336705199) +* **standard:** get things in line with standard 11 ([6cf8e88](https://github.com/npm/npx/commit/6cf8e88)) ### BREAKING CHANGES @@ -66,271 +78,271 @@ All notable changes to this project will be documented in this file. See [standa -## [9.7.1](https://github.com/zkat/npx/compare/v9.7.0...v9.7.1) (2017-10-19) +## [9.7.1](https://github.com/npm/npx/compare/v9.7.0...v9.7.1) (2017-10-19) ### Bug Fixes -* **main:** err... oops? ([f24b4e3](https://github.com/zkat/npx/commit/f24b4e3)) +* **main:** err... oops? ([f24b4e3](https://github.com/npm/npx/commit/f24b4e3)) -# [9.7.0](https://github.com/zkat/npx/compare/v9.6.0...v9.7.0) (2017-10-19) +# [9.7.0](https://github.com/npm/npx/compare/v9.6.0...v9.7.0) (2017-10-19) ### Bug Fixes -* **exec:** fixed unix binary pathing issues (#120) ([f80a970](https://github.com/zkat/npx/commit/f80a970)), closes [#120](https://github.com/zkat/npx/issues/120) +* **exec:** fixed unix binary pathing issues (#120) ([f80a970](https://github.com/npm/npx/commit/f80a970)), closes [#120](https://github.com/zkat/npx/issues/120) ### Features -* **child:** add opts.installerStdio (#126) ([ade03f7](https://github.com/zkat/npx/commit/ade03f7)) +* **child:** add opts.installerStdio (#126) ([ade03f7](https://github.com/npm/npx/commit/ade03f7)) -# [9.6.0](https://github.com/zkat/npx/compare/v9.5.0...v9.6.0) (2017-08-17) +# [9.6.0](https://github.com/npm/npx/compare/v9.5.0...v9.6.0) (2017-08-17) ### Features -* **i18n:** add Arabic translation (#111) ([3c5b99a](https://github.com/zkat/npx/commit/3c5b99a)) -* **i18n:** add Dutch (#108) ([ed116fd](https://github.com/zkat/npx/commit/ed116fd)) +* **i18n:** add Arabic translation (#111) ([3c5b99a](https://github.com/npm/npx/commit/3c5b99a)) +* **i18n:** add Dutch (#108) ([ed116fd](https://github.com/npm/npx/commit/ed116fd)) -# [9.5.0](https://github.com/zkat/npx/compare/v9.4.1...v9.5.0) (2017-07-28) +# [9.5.0](https://github.com/npm/npx/compare/v9.4.1...v9.5.0) (2017-07-28) ### Features -* **i18n:** add Polish translations (#99) ([8442f59](https://github.com/zkat/npx/commit/8442f59)) +* **i18n:** add Polish translations (#99) ([8442f59](https://github.com/npm/npx/commit/8442f59)) -## [9.4.1](https://github.com/zkat/npx/compare/v9.4.0...v9.4.1) (2017-07-21) +## [9.4.1](https://github.com/npm/npx/compare/v9.4.0...v9.4.1) (2017-07-21) ### Bug Fixes -* **i18n:** fix filename for uk.json locale ([2c770e4](https://github.com/zkat/npx/commit/2c770e4)) +* **i18n:** fix filename for uk.json locale ([2c770e4](https://github.com/npm/npx/commit/2c770e4)) -# [9.4.0](https://github.com/zkat/npx/compare/v9.3.2...v9.4.0) (2017-07-21) +# [9.4.0](https://github.com/npm/npx/compare/v9.3.2...v9.4.0) (2017-07-21) ### Bug Fixes -* **i18n:** minor fixes to ru locale (#92) ([f4d5051](https://github.com/zkat/npx/commit/f4d5051)), closes [#92](https://github.com/zkat/npx/issues/92) +* **i18n:** minor fixes to ru locale (#92) ([f4d5051](https://github.com/npm/npx/commit/f4d5051)), closes [#92](https://github.com/zkat/npx/issues/92) ### Features -* **i18n:** `no` locale fallback for Norwegian bokmål ⚠️ In case of weird setups ⚠️ (#91) ([74f0e4c](https://github.com/zkat/npx/commit/74f0e4c)) -* **i18n:** add Bahasa Indonesia locale (#95) ([80dceeb](https://github.com/zkat/npx/commit/80dceeb)) -* **i18n:** add serbian translation (#96) ([040de7a](https://github.com/zkat/npx/commit/040de7a)) -* **i18n:** add Ukrainian locale (#93) ([9a3ef33](https://github.com/zkat/npx/commit/9a3ef33)) -* **i18n:** Added Norwegian (bokmål and nynorsk) translations (#90) ([6c5c733](https://github.com/zkat/npx/commit/6c5c733)) +* **i18n:** `no` locale fallback for Norwegian bokmål ⚠️ In case of weird setups ⚠️ (#91) ([74f0e4c](https://github.com/npm/npx/commit/74f0e4c)) +* **i18n:** add Bahasa Indonesia locale (#95) ([80dceeb](https://github.com/npm/npx/commit/80dceeb)) +* **i18n:** add serbian translation (#96) ([040de7a](https://github.com/npm/npx/commit/040de7a)) +* **i18n:** add Ukrainian locale (#93) ([9a3ef33](https://github.com/npm/npx/commit/9a3ef33)) +* **i18n:** Added Norwegian (bokmål and nynorsk) translations (#90) ([6c5c733](https://github.com/npm/npx/commit/6c5c733)) -## [9.3.2](https://github.com/zkat/npx/compare/v9.3.1...v9.3.2) (2017-07-17) +## [9.3.2](https://github.com/npm/npx/compare/v9.3.1...v9.3.2) (2017-07-17) ### Bug Fixes -* **exec:** detect a wider range of shebang lines for node scripts (#89) ([1841b6f](https://github.com/zkat/npx/commit/1841b6f)) -* **windows:** escape spawn args because windows is picky (#87) ([314e5eb](https://github.com/zkat/npx/commit/314e5eb)) -* **windows:** get magic shim detection working on Windows (#88) ([255aeeb](https://github.com/zkat/npx/commit/255aeeb)) +* **exec:** detect a wider range of shebang lines for node scripts (#89) ([1841b6f](https://github.com/npm/npx/commit/1841b6f)) +* **windows:** escape spawn args because windows is picky (#87) ([314e5eb](https://github.com/npm/npx/commit/314e5eb)) +* **windows:** get magic shim detection working on Windows (#88) ([255aeeb](https://github.com/npm/npx/commit/255aeeb)) -## [9.3.1](https://github.com/zkat/npx/compare/v9.3.0...v9.3.1) (2017-07-17) +## [9.3.1](https://github.com/npm/npx/compare/v9.3.0...v9.3.1) (2017-07-17) ### Bug Fixes -* **deps:** update to npm[@5](https://github.com/5).3.0 ([2b14de2](https://github.com/zkat/npx/commit/2b14de2)) +* **deps:** update to npm[@5](https://github.com/5).3.0 ([2b14de2](https://github.com/npm/npx/commit/2b14de2)) -# [9.3.0](https://github.com/zkat/npx/compare/v9.2.3...v9.3.0) (2017-07-17) +# [9.3.0](https://github.com/npm/npx/compare/v9.2.3...v9.3.0) (2017-07-17) ### Features -* **i18n:** add Korean locale (#86) ([3655314](https://github.com/zkat/npx/commit/3655314)) +* **i18n:** add Korean locale (#86) ([3655314](https://github.com/npm/npx/commit/3655314)) -## [9.2.3](https://github.com/zkat/npx/compare/v9.2.2...v9.2.3) (2017-07-17) +## [9.2.3](https://github.com/npm/npx/compare/v9.2.2...v9.2.3) (2017-07-17) ### Bug Fixes -* **paths:** support npm/npx paths with spaces in them ([8f3b829](https://github.com/zkat/npx/commit/8f3b829)) +* **paths:** support npm/npx paths with spaces in them ([8f3b829](https://github.com/npm/npx/commit/8f3b829)) -## [9.2.2](https://github.com/zkat/npx/compare/v9.2.1...v9.2.2) (2017-07-15) +## [9.2.2](https://github.com/npm/npx/compare/v9.2.1...v9.2.2) (2017-07-15) ### Bug Fixes -* **npm:** escape path to npm, too ([333d2ff](https://github.com/zkat/npx/commit/333d2ff)) +* **npm:** escape path to npm, too ([333d2ff](https://github.com/npm/npx/commit/333d2ff)) -## [9.2.1](https://github.com/zkat/npx/compare/v9.2.0...v9.2.1) (2017-07-14) +## [9.2.1](https://github.com/npm/npx/compare/v9.2.0...v9.2.1) (2017-07-14) ### Bug Fixes -* **windows:** fixed windows binary pathing issues ([761dfe9](https://github.com/zkat/npx/commit/761dfe9)) +* **windows:** fixed windows binary pathing issues ([761dfe9](https://github.com/npm/npx/commit/761dfe9)) -# [9.2.0](https://github.com/zkat/npx/compare/v9.1.0...v9.2.0) (2017-07-14) +# [9.2.0](https://github.com/npm/npx/compare/v9.1.0...v9.2.0) (2017-07-14) ### Bug Fixes -* **binpath:** fix calling binaries from subdirectories ([f185d0d](https://github.com/zkat/npx/commit/f185d0d)) -* **i18n:** Fix typos in french locale (#78) ([f277fc7](https://github.com/zkat/npx/commit/f277fc7)), closes [#78](https://github.com/zkat/npx/issues/78) +* **binpath:** fix calling binaries from subdirectories ([f185d0d](https://github.com/npm/npx/commit/f185d0d)) +* **i18n:** Fix typos in french locale (#78) ([f277fc7](https://github.com/npm/npx/commit/f277fc7)), closes [#78](https://github.com/zkat/npx/issues/78) ### Features -* **i18n:** Add German translations (#79) ([c81e26d](https://github.com/zkat/npx/commit/c81e26d)) -* **i18n:** add zh_TW translation (#80) ([98288d8](https://github.com/zkat/npx/commit/98288d8)) +* **i18n:** Add German translations (#79) ([c81e26d](https://github.com/npm/npx/commit/c81e26d)) +* **i18n:** add zh_TW translation (#80) ([98288d8](https://github.com/npm/npx/commit/98288d8)) -# [9.1.0](https://github.com/zkat/npx/compare/v9.0.7...v9.1.0) (2017-07-12) +# [9.1.0](https://github.com/npm/npx/compare/v9.0.7...v9.1.0) (2017-07-12) ### Bug Fixes -* **call:** only npm run env if package.json exists ([370f395](https://github.com/zkat/npx/commit/370f395)) -* **i18n:** Fix grammar and spelling for de.json (#63) ([b14020f](https://github.com/zkat/npx/commit/b14020f)), closes [#63](https://github.com/zkat/npx/issues/63) -* **i18n:** wording revisions for Brazilian Portuguese (#75) ([b5dc536](https://github.com/zkat/npx/commit/b5dc536)) -* **npm:** path directly to the npm-cli.js script ([d531206](https://github.com/zkat/npx/commit/d531206)) -* **rimraf:** fix rimraf.sync is not a function issue ([d2ecba3](https://github.com/zkat/npx/commit/d2ecba3)) -* **windows:** get npx working well on Windows again (#69) ([6cfb8de](https://github.com/zkat/npx/commit/6cfb8de)), closes [#60](https://github.com/zkat/npx/issues/60) [#58](https://github.com/zkat/npx/issues/58) [#62](https://github.com/zkat/npx/issues/62) +* **call:** only npm run env if package.json exists ([370f395](https://github.com/npm/npx/commit/370f395)) +* **i18n:** Fix grammar and spelling for de.json (#63) ([b14020f](https://github.com/npm/npx/commit/b14020f)), closes [#63](https://github.com/zkat/npx/issues/63) +* **i18n:** wording revisions for Brazilian Portuguese (#75) ([b5dc536](https://github.com/npm/npx/commit/b5dc536)) +* **npm:** path directly to the npm-cli.js script ([d531206](https://github.com/npm/npx/commit/d531206)) +* **rimraf:** fix rimraf.sync is not a function issue ([d2ecba3](https://github.com/npm/npx/commit/d2ecba3)) +* **windows:** get npx working well on Windows again (#69) ([6cfb8de](https://github.com/npm/npx/commit/6cfb8de)), closes [#60](https://github.com/zkat/npx/issues/60) [#58](https://github.com/zkat/npx/issues/58) [#62](https://github.com/zkat/npx/issues/62) ### Features -* **i18n:** add Czech translation (#76) ([8a0b3f6](https://github.com/zkat/npx/commit/8a0b3f6)) -* **i18n:** Add Turkish translation (#73) ([26e5edf](https://github.com/zkat/npx/commit/26e5edf)) -* **i18n:** Added support for Italian language (#71) ([6883e75](https://github.com/zkat/npx/commit/6883e75)) -* **i18n:** Fix Romanian translation (#70) ([fd6bbcf](https://github.com/zkat/npx/commit/fd6bbcf)), closes [#70](https://github.com/zkat/npx/issues/70) -* **node:** add --node-arg support to pass flags to node for script binaries (#77) ([65665bd](https://github.com/zkat/npx/commit/65665bd)) +* **i18n:** add Czech translation (#76) ([8a0b3f6](https://github.com/npm/npx/commit/8a0b3f6)) +* **i18n:** Add Turkish translation (#73) ([26e5edf](https://github.com/npm/npx/commit/26e5edf)) +* **i18n:** Added support for Italian language (#71) ([6883e75](https://github.com/npm/npx/commit/6883e75)) +* **i18n:** Fix Romanian translation (#70) ([fd6bbcf](https://github.com/npm/npx/commit/fd6bbcf)), closes [#70](https://github.com/zkat/npx/issues/70) +* **node:** add --node-arg support to pass flags to node for script binaries (#77) ([65665bd](https://github.com/npm/npx/commit/65665bd)) -## [9.0.7](https://github.com/zkat/npx/compare/v9.0.6...v9.0.7) (2017-07-11) +## [9.0.7](https://github.com/npm/npx/compare/v9.0.6...v9.0.7) (2017-07-11) ### Bug Fixes -* **i18n:** Fix some Catalan translations (#59) ([11c8a19](https://github.com/zkat/npx/commit/11c8a19)), closes [#59](https://github.com/zkat/npx/issues/59) +* **i18n:** Fix some Catalan translations (#59) ([11c8a19](https://github.com/npm/npx/commit/11c8a19)), closes [#59](https://github.com/zkat/npx/issues/59) -## [9.0.6](https://github.com/zkat/npx/compare/v9.0.5...v9.0.6) (2017-07-11) +## [9.0.6](https://github.com/npm/npx/compare/v9.0.5...v9.0.6) (2017-07-11) ### Bug Fixes -* **auto-fallback:** fix syntax error in bash/zsh auto-fallback ([d8b19db](https://github.com/zkat/npx/commit/d8b19db)) +* **auto-fallback:** fix syntax error in bash/zsh auto-fallback ([d8b19db](https://github.com/npm/npx/commit/d8b19db)) -## [9.0.5](https://github.com/zkat/npx/compare/v9.0.4...v9.0.5) (2017-07-11) +## [9.0.5](https://github.com/npm/npx/compare/v9.0.4...v9.0.5) (2017-07-11) ### Bug Fixes -* **npx:** something went wrong with the 9.0.4 build and bundledeps ([75fc436](https://github.com/zkat/npx/commit/75fc436)) +* **npx:** something went wrong with the 9.0.4 build and bundledeps ([75fc436](https://github.com/npm/npx/commit/75fc436)) -## [9.0.4](https://github.com/zkat/npx/compare/v9.0.3...v9.0.4) (2017-07-11) +## [9.0.4](https://github.com/npm/npx/compare/v9.0.3...v9.0.4) (2017-07-11) ### Bug Fixes -* **auto-fallback:** prevent infinite loop if npx disappears ([6c24e58](https://github.com/zkat/npx/commit/6c24e58)) -* **bin:** add repository and more detailed author info ([906574e](https://github.com/zkat/npx/commit/906574e)) -* **bin:** pin the npx bin's dependencies ([ae62f7a](https://github.com/zkat/npx/commit/ae62f7a)) -* **build:** make sure changelog and license are copied to bin ([4fbb599](https://github.com/zkat/npx/commit/4fbb599)) -* **deps:** stop bundling deps in libnpx itself ([c3e56e9](https://github.com/zkat/npx/commit/c3e56e9)) -* **errors:** print command not found for packages without valid binaries ([9b24359](https://github.com/zkat/npx/commit/9b24359)) -* **help:** --no-install help text was contradicting itself ([9d96f5e](https://github.com/zkat/npx/commit/9d96f5e)) -* **install:** prevent concurrent npx runs from clobbering each other ([6b35c91](https://github.com/zkat/npx/commit/6b35c91)) -* **npx:** npx npx npx npx npx npx npx npx npx works again ([875d4cd](https://github.com/zkat/npx/commit/875d4cd)) -* **updater:** dependency injection for update-notifier target ([c3027a9](https://github.com/zkat/npx/commit/c3027a9)) -* **updater:** ignore some kinds of update-notifier errors ([7631bbe](https://github.com/zkat/npx/commit/7631bbe)) +* **auto-fallback:** prevent infinite loop if npx disappears ([6c24e58](https://github.com/npm/npx/commit/6c24e58)) +* **bin:** add repository and more detailed author info ([906574e](https://github.com/npm/npx/commit/906574e)) +* **bin:** pin the npx bin's dependencies ([ae62f7a](https://github.com/npm/npx/commit/ae62f7a)) +* **build:** make sure changelog and license are copied to bin ([4fbb599](https://github.com/npm/npx/commit/4fbb599)) +* **deps:** stop bundling deps in libnpx itself ([c3e56e9](https://github.com/npm/npx/commit/c3e56e9)) +* **errors:** print command not found for packages without valid binaries ([9b24359](https://github.com/npm/npx/commit/9b24359)) +* **help:** --no-install help text was contradicting itself ([9d96f5e](https://github.com/npm/npx/commit/9d96f5e)) +* **install:** prevent concurrent npx runs from clobbering each other ([6b35c91](https://github.com/npm/npx/commit/6b35c91)) +* **npx:** npx npx npx npx npx npx npx npx npx works again ([875d4cd](https://github.com/npm/npx/commit/875d4cd)) +* **updater:** dependency injection for update-notifier target ([c3027a9](https://github.com/npm/npx/commit/c3027a9)) +* **updater:** ignore some kinds of update-notifier errors ([7631bbe](https://github.com/npm/npx/commit/7631bbe)) -## [9.0.3](https://github.com/zkat/npx/compare/v9.0.2...v9.0.3) (2017-07-08) +## [9.0.3](https://github.com/npm/npx/compare/v9.0.2...v9.0.3) (2017-07-08) ### Bug Fixes -* **version:** hand version to yargs directly ([e0b5eeb](https://github.com/zkat/npx/commit/e0b5eeb)) +* **version:** hand version to yargs directly ([e0b5eeb](https://github.com/npm/npx/commit/e0b5eeb)) -## [9.0.2](https://github.com/zkat/npx/compare/v9.0.1...v9.0.2) (2017-07-08) +## [9.0.2](https://github.com/npm/npx/compare/v9.0.1...v9.0.2) (2017-07-08) ### Bug Fixes -* **manpage:** fix manpage for real because files syntax is weird ([9145e2a](https://github.com/zkat/npx/commit/9145e2a)) +* **manpage:** fix manpage for real because files syntax is weird ([9145e2a](https://github.com/npm/npx/commit/9145e2a)) -## [9.0.1](https://github.com/zkat/npx/compare/v9.0.0...v9.0.1) (2017-07-08) +## [9.0.1](https://github.com/npm/npx/compare/v9.0.0...v9.0.1) (2017-07-08) ### Bug Fixes -* **man:** make sure manpage is used in npx bin ([704b94f](https://github.com/zkat/npx/commit/704b94f)) +* **man:** make sure manpage is used in npx bin ([704b94f](https://github.com/npm/npx/commit/704b94f)) -# [9.0.0](https://github.com/zkat/npx/compare/v8.1.1...v9.0.0) (2017-07-08) +# [9.0.0](https://github.com/npm/npx/compare/v8.1.1...v9.0.0) (2017-07-08) ### Features -* **libnpx:** libify main npx codebase ([643f58e](https://github.com/zkat/npx/commit/643f58e)) -* **npx:** create a new binary for standalone publishing ([da5a3b7](https://github.com/zkat/npx/commit/da5a3b7)) +* **libnpx:** libify main npx codebase ([643f58e](https://github.com/npm/npx/commit/643f58e)) +* **npx:** create a new binary for standalone publishing ([da5a3b7](https://github.com/npm/npx/commit/da5a3b7)) ### BREAKING CHANGES @@ -342,49 +354,49 @@ and a separate project will take over the role of the main `npx` binary. -## [8.1.1](https://github.com/zkat/npx/compare/v8.1.0...v8.1.1) (2017-07-06) +## [8.1.1](https://github.com/npm/npx/compare/v8.1.0...v8.1.1) (2017-07-06) ### Bug Fixes -* **deps:** bump all deps ([6ea24bf](https://github.com/zkat/npx/commit/6ea24bf)) -* **npm:** bump npm to 5.1.0 for a bunch of fixes ([18e4587](https://github.com/zkat/npx/commit/18e4587)) +* **deps:** bump all deps ([6ea24bf](https://github.com/npm/npx/commit/6ea24bf)) +* **npm:** bump npm to 5.1.0 for a bunch of fixes ([18e4587](https://github.com/npm/npx/commit/18e4587)) -# [8.1.0](https://github.com/zkat/npx/compare/v8.0.1...v8.1.0) (2017-06-27) +# [8.1.0](https://github.com/npm/npx/compare/v8.0.1...v8.1.0) (2017-06-27) ### Bug Fixes -* **i18n:** minor tweaks to ja.json (#46) ([1ed63c2](https://github.com/zkat/npx/commit/1ed63c2)) +* **i18n:** minor tweaks to ja.json (#46) ([1ed63c2](https://github.com/npm/npx/commit/1ed63c2)) ### Features -* **i18n:** Update pt_BR.json (#51) ([d292f22](https://github.com/zkat/npx/commit/d292f22)) +* **i18n:** Update pt_BR.json (#51) ([d292f22](https://github.com/npm/npx/commit/d292f22)) -## [8.0.1](https://github.com/zkat/npx/compare/v8.0.0...v8.0.1) (2017-06-27) +## [8.0.1](https://github.com/npm/npx/compare/v8.0.0...v8.0.1) (2017-06-27) ### Bug Fixes -* **npm:** bump npm version for more bugfixes ([30711a8](https://github.com/zkat/npx/commit/30711a8)) -* **npm:** Use --parseable option to work around output quirks ([8cb75a2](https://github.com/zkat/npx/commit/8cb75a2)) +* **npm:** bump npm version for more bugfixes ([30711a8](https://github.com/npm/npx/commit/30711a8)) +* **npm:** Use --parseable option to work around output quirks ([8cb75a2](https://github.com/npm/npx/commit/8cb75a2)) -# [8.0.0](https://github.com/zkat/npx/compare/v7.0.0...v8.0.0) (2017-06-24) +# [8.0.0](https://github.com/npm/npx/compare/v7.0.0...v8.0.0) (2017-06-24) ### Features -* **exec:** auto-guess binaries when different from pkg name ([139c434](https://github.com/zkat/npx/commit/139c434)) +* **exec:** auto-guess binaries when different from pkg name ([139c434](https://github.com/npm/npx/commit/139c434)) ### BREAKING CHANGES @@ -398,17 +410,17 @@ multiple non-matching binaries, but that should be rare. -# [7.0.0](https://github.com/zkat/npx/compare/v6.2.0...v7.0.0) (2017-06-24) +# [7.0.0](https://github.com/npm/npx/compare/v6.2.0...v7.0.0) (2017-06-24) ### Bug Fixes -* **win32:** improve win32 situation a bit (#50) ([b7ad934](https://github.com/zkat/npx/commit/b7ad934)) +* **win32:** improve win32 situation a bit (#50) ([b7ad934](https://github.com/npm/npx/commit/b7ad934)) ### Features -* **local:** improve the behavior when calling ./local paths (#48) ([2e418d1](https://github.com/zkat/npx/commit/2e418d1)) +* **local:** improve the behavior when calling ./local paths (#48) ([2e418d1](https://github.com/npm/npx/commit/2e418d1)) ### BREAKING CHANGES @@ -422,71 +434,71 @@ of all the various cases and how each of them is handled. -# [6.2.0](https://github.com/zkat/npx/compare/v6.1.0...v6.2.0) (2017-06-23) +# [6.2.0](https://github.com/npm/npx/compare/v6.1.0...v6.2.0) (2017-06-23) ### Bug Fixes -* **child:** iron out a few crinkles and add tests ([b3b5ef6](https://github.com/zkat/npx/commit/b3b5ef6)) -* **execCmd:** only reuse the current process if no shell passed in ([e413cff](https://github.com/zkat/npx/commit/e413cff)) -* **execCmd:** use the module built-in directly ([6f741c2](https://github.com/zkat/npx/commit/6f741c2)) -* **help:** fuck it. just hard-code it ([d5d5085](https://github.com/zkat/npx/commit/d5d5085)) -* **main:** only exec if this is the main module ([9631e2a](https://github.com/zkat/npx/commit/9631e2a)) +* **child:** iron out a few crinkles and add tests ([b3b5ef6](https://github.com/npm/npx/commit/b3b5ef6)) +* **execCmd:** only reuse the current process if no shell passed in ([e413cff](https://github.com/npm/npx/commit/e413cff)) +* **execCmd:** use the module built-in directly ([6f741c2](https://github.com/npm/npx/commit/6f741c2)) +* **help:** fuck it. just hard-code it ([d5d5085](https://github.com/npm/npx/commit/d5d5085)) +* **main:** only exec if this is the main module ([9631e2a](https://github.com/npm/npx/commit/9631e2a)) ### Features -* **i18n:** Update fr.json (#44) ([ea47c4f](https://github.com/zkat/npx/commit/ea47c4f)) -* **i18n:** update the Romanian translation. (#42) ([2ed36b6](https://github.com/zkat/npx/commit/2ed36b6)) +* **i18n:** Update fr.json (#44) ([ea47c4f](https://github.com/npm/npx/commit/ea47c4f)) +* **i18n:** update the Romanian translation. (#42) ([2ed36b6](https://github.com/npm/npx/commit/2ed36b6)) -# [6.1.0](https://github.com/zkat/npx/compare/v6.0.0...v6.1.0) (2017-06-21) +# [6.1.0](https://github.com/npm/npx/compare/v6.0.0...v6.1.0) (2017-06-21) ### Bug Fixes -* **deps:** remove unused gauge dep ([aa40a34](https://github.com/zkat/npx/commit/aa40a34)) +* **deps:** remove unused gauge dep ([aa40a34](https://github.com/npm/npx/commit/aa40a34)) ### Features -* **i18n:** update ru locale (#41) ([7c84dee](https://github.com/zkat/npx/commit/7c84dee)) -* **i18n:** update zh_CN (#40) ([da4ec67](https://github.com/zkat/npx/commit/da4ec67)) -* **perf:** run node-based commands in the current process ([6efcde4](https://github.com/zkat/npx/commit/6efcde4)) +* **i18n:** update ru locale (#41) ([7c84dee](https://github.com/npm/npx/commit/7c84dee)) +* **i18n:** update zh_CN (#40) ([da4ec67](https://github.com/npm/npx/commit/da4ec67)) +* **perf:** run node-based commands in the current process ([6efcde4](https://github.com/npm/npx/commit/6efcde4)) -# [6.0.0](https://github.com/zkat/npx/compare/v5.4.0...v6.0.0) (2017-06-20) +# [6.0.0](https://github.com/npm/npx/compare/v5.4.0...v6.0.0) (2017-06-20) ### Bug Fixes -* **call:** stop parsing -c for commands + fix corner cases ([bd4e538](https://github.com/zkat/npx/commit/bd4e538)) -* **child:** exec does not have the information needed to correctly escape its args ([6714992](https://github.com/zkat/npx/commit/6714992)) -* **guessCmdName:** tests failed because of lazy npa ([53a0119](https://github.com/zkat/npx/commit/53a0119)) -* **i18n:** gender inclusiveness fix for french version (#37) ([04920ae](https://github.com/zkat/npx/commit/04920ae)), closes [#37](https://github.com/zkat/npx/issues/37) -* **i18n:** typo 😇 (#38) ([ede4a53](https://github.com/zkat/npx/commit/ede4a53)) -* **install:** handle JSON parsing failures ([bec2887](https://github.com/zkat/npx/commit/bec2887)) -* **output:** stop printing out Command Failed messages ([873cffe](https://github.com/zkat/npx/commit/873cffe)) -* **parseArgs:** fix booboo in fast path ([d1e5487](https://github.com/zkat/npx/commit/d1e5487)) -* **perf:** fast-path `npx foo` arg parsing ([ba4fe71](https://github.com/zkat/npx/commit/ba4fe71)) -* **perf:** remove bluebird and defer some requires for SPEED ([00fc313](https://github.com/zkat/npx/commit/00fc313)) +* **call:** stop parsing -c for commands + fix corner cases ([bd4e538](https://github.com/npm/npx/commit/bd4e538)) +* **child:** exec does not have the information needed to correctly escape its args ([6714992](https://github.com/npm/npx/commit/6714992)) +* **guessCmdName:** tests failed because of lazy npa ([53a0119](https://github.com/npm/npx/commit/53a0119)) +* **i18n:** gender inclusiveness fix for french version (#37) ([04920ae](https://github.com/npm/npx/commit/04920ae)), closes [#37](https://github.com/zkat/npx/issues/37) +* **i18n:** typo 😇 (#38) ([ede4a53](https://github.com/npm/npx/commit/ede4a53)) +* **install:** handle JSON parsing failures ([bec2887](https://github.com/npm/npx/commit/bec2887)) +* **output:** stop printing out Command Failed messages ([873cffe](https://github.com/npm/npx/commit/873cffe)) +* **parseArgs:** fix booboo in fast path ([d1e5487](https://github.com/npm/npx/commit/d1e5487)) +* **perf:** fast-path `npx foo` arg parsing ([ba4fe71](https://github.com/npm/npx/commit/ba4fe71)) +* **perf:** remove bluebird and defer some requires for SPEED ([00fc313](https://github.com/npm/npx/commit/00fc313)) ### Features -* **i18n:** add Romanian translations. (#34) ([9e98bd0](https://github.com/zkat/npx/commit/9e98bd0)) -* **i18n:** added a few more localizable strings ([779d950](https://github.com/zkat/npx/commit/779d950)) -* **i18n:** updated ca.json ([af7a035](https://github.com/zkat/npx/commit/af7a035)) -* **i18n:** updated es.json ([414644f](https://github.com/zkat/npx/commit/414644f)) -* **i18n:** updated ja.json ([448b082](https://github.com/zkat/npx/commit/448b082)) -* **i18n:** Ze German Translation (#35) ([6f003f5](https://github.com/zkat/npx/commit/6f003f5)) -* **package:** report number of temp packages installed ([5b7fe8d](https://github.com/zkat/npx/commit/5b7fe8d)) -* **perf:** only launch update-notifier when npx installs stuff ([549d413](https://github.com/zkat/npx/commit/549d413)) -* **quiet:** added -q/--quiet to suppress output from npx itself ([16607d9](https://github.com/zkat/npx/commit/16607d9)) +* **i18n:** add Romanian translations. (#34) ([9e98bd0](https://github.com/npm/npx/commit/9e98bd0)) +* **i18n:** added a few more localizable strings ([779d950](https://github.com/npm/npx/commit/779d950)) +* **i18n:** updated ca.json ([af7a035](https://github.com/npm/npx/commit/af7a035)) +* **i18n:** updated es.json ([414644f](https://github.com/npm/npx/commit/414644f)) +* **i18n:** updated ja.json ([448b082](https://github.com/npm/npx/commit/448b082)) +* **i18n:** Ze German Translation (#35) ([6f003f5](https://github.com/npm/npx/commit/6f003f5)) +* **package:** report number of temp packages installed ([5b7fe8d](https://github.com/npm/npx/commit/5b7fe8d)) +* **perf:** only launch update-notifier when npx installs stuff ([549d413](https://github.com/npm/npx/commit/549d413)) +* **quiet:** added -q/--quiet to suppress output from npx itself ([16607d9](https://github.com/npm/npx/commit/16607d9)) ### BREAKING CHANGES @@ -496,124 +508,124 @@ of all the various cases and how each of them is handled. -# [5.4.0](https://github.com/zkat/npx/compare/v5.3.0...v5.4.0) (2017-06-17) +# [5.4.0](https://github.com/npm/npx/compare/v5.3.0...v5.4.0) (2017-06-17) ### Bug Fixes -* **i18n:** some corrections for es.json ([4d50b71](https://github.com/zkat/npx/commit/4d50b71)) -* **i18n:** update locale files with bugfixes ([77caf82](https://github.com/zkat/npx/commit/77caf82)) -* **i18n:** Y utility was ignoring falsy entries ([f22a4d0](https://github.com/zkat/npx/commit/f22a4d0)) -* **i18n:** してください -> します ([01671af](https://github.com/zkat/npx/commit/01671af)) +* **i18n:** some corrections for es.json ([4d50b71](https://github.com/npm/npx/commit/4d50b71)) +* **i18n:** update locale files with bugfixes ([77caf82](https://github.com/npm/npx/commit/77caf82)) +* **i18n:** Y utility was ignoring falsy entries ([f22a4d0](https://github.com/npm/npx/commit/f22a4d0)) +* **i18n:** してください -> します ([01671af](https://github.com/npm/npx/commit/01671af)) ### Features -* **i18n:** add catalan translation ([579efa1](https://github.com/zkat/npx/commit/579efa1)) -* **i18n:** add pt-br translation (#33) ([6142551](https://github.com/zkat/npx/commit/6142551)) -* **i18n:** added largely machine-translated ja.json ([827705f](https://github.com/zkat/npx/commit/827705f)) -* **i18n:** adds russian translation (#32) ([b2619c1](https://github.com/zkat/npx/commit/b2619c1)) +* **i18n:** add catalan translation ([579efa1](https://github.com/npm/npx/commit/579efa1)) +* **i18n:** add pt-br translation (#33) ([6142551](https://github.com/npm/npx/commit/6142551)) +* **i18n:** added largely machine-translated ja.json ([827705f](https://github.com/npm/npx/commit/827705f)) +* **i18n:** adds russian translation (#32) ([b2619c1](https://github.com/npm/npx/commit/b2619c1)) -# [5.3.0](https://github.com/zkat/npx/compare/v5.2.0...v5.3.0) (2017-06-13) +# [5.3.0](https://github.com/npm/npx/compare/v5.2.0...v5.3.0) (2017-06-13) ### Features -* **i18n:** add Chinese translation (#31) ([24e1b31](https://github.com/zkat/npx/commit/24e1b31)) +* **i18n:** add Chinese translation (#31) ([24e1b31](https://github.com/npm/npx/commit/24e1b31)) -# [5.2.0](https://github.com/zkat/npx/compare/v5.1.3...v5.2.0) (2017-06-12) +# [5.2.0](https://github.com/npm/npx/compare/v5.1.3...v5.2.0) (2017-06-12) ### Bug Fixes -* **i18n:** removing extra spacing in fr.json ([002e2b8](https://github.com/zkat/npx/commit/002e2b8)) +* **i18n:** removing extra spacing in fr.json ([002e2b8](https://github.com/npm/npx/commit/002e2b8)) ### Features -* **i18n:** add french locale (#29) ([662395b](https://github.com/zkat/npx/commit/662395b)) +* **i18n:** add french locale (#29) ([662395b](https://github.com/npm/npx/commit/662395b)) -## [5.1.3](https://github.com/zkat/npx/compare/v5.1.2...v5.1.3) (2017-06-12) +## [5.1.3](https://github.com/npm/npx/compare/v5.1.2...v5.1.3) (2017-06-12) ### Bug Fixes -* **fallback:** put the Y in the wrong place lol ([d6bf8aa](https://github.com/zkat/npx/commit/d6bf8aa)) +* **fallback:** put the Y in the wrong place lol ([d6bf8aa](https://github.com/npm/npx/commit/d6bf8aa)) -## [5.1.2](https://github.com/zkat/npx/compare/v5.1.1...v5.1.2) (2017-06-10) +## [5.1.2](https://github.com/npm/npx/compare/v5.1.1...v5.1.2) (2017-06-10) -## [5.1.1](https://github.com/zkat/npx/compare/v5.1.0...v5.1.1) (2017-06-10) +## [5.1.1](https://github.com/npm/npx/compare/v5.1.0...v5.1.1) (2017-06-10) ### Bug Fixes -* **i18n:** forgot to add locales to files ([4118d6a](https://github.com/zkat/npx/commit/4118d6a)) +* **i18n:** forgot to add locales to files ([4118d6a](https://github.com/npm/npx/commit/4118d6a)) -# [5.1.0](https://github.com/zkat/npx/compare/v5.0.3...v5.1.0) (2017-06-10) +# [5.1.0](https://github.com/npm/npx/compare/v5.0.3...v5.1.0) (2017-06-10) ### Bug Fixes -* **exit:** let process exit normally to finish writes ([c50a398](https://github.com/zkat/npx/commit/c50a398)) +* **exit:** let process exit normally to finish writes ([c50a398](https://github.com/npm/npx/commit/c50a398)) ### Features -* **i18n:** added es.json ([6cf58b9](https://github.com/zkat/npx/commit/6cf58b9)) -* **i18n:** set up i18n plus baseline en.json locale ([b67bb3a](https://github.com/zkat/npx/commit/b67bb3a)) +* **i18n:** added es.json ([6cf58b9](https://github.com/npm/npx/commit/6cf58b9)) +* **i18n:** set up i18n plus baseline en.json locale ([b67bb3a](https://github.com/npm/npx/commit/b67bb3a)) -## [5.0.3](https://github.com/zkat/npx/compare/v5.0.2...v5.0.3) (2017-06-09) +## [5.0.3](https://github.com/npm/npx/compare/v5.0.2...v5.0.3) (2017-06-09) ### Bug Fixes -* **fallback:** exec is no ([42c1d30](https://github.com/zkat/npx/commit/42c1d30)) +* **fallback:** exec is no ([42c1d30](https://github.com/npm/npx/commit/42c1d30)) -## [5.0.2](https://github.com/zkat/npx/compare/v5.0.1...v5.0.2) (2017-06-09) +## [5.0.2](https://github.com/npm/npx/compare/v5.0.1...v5.0.2) (2017-06-09) ### Bug Fixes -* **fallback:** allow fallback to local anyway ([569cf2c](https://github.com/zkat/npx/commit/569cf2c)) +* **fallback:** allow fallback to local anyway ([569cf2c](https://github.com/npm/npx/commit/569cf2c)) -## [5.0.1](https://github.com/zkat/npx/compare/v5.0.0...v5.0.1) (2017-06-09) +## [5.0.1](https://github.com/npm/npx/compare/v5.0.0...v5.0.1) (2017-06-09) -# [5.0.0](https://github.com/zkat/npx/compare/v4.0.3...v5.0.0) (2017-06-09) +# [5.0.0](https://github.com/npm/npx/compare/v4.0.3...v5.0.0) (2017-06-09) ### Features -* **fallback:** by default, only fall back if you have an @ in the name ([bea08a0](https://github.com/zkat/npx/commit/bea08a0)) +* **fallback:** by default, only fall back if you have an @ in the name ([bea08a0](https://github.com/npm/npx/commit/bea08a0)) ### BREAKING CHANGES @@ -624,45 +636,45 @@ an @ sign in the command. -## [4.0.3](https://github.com/zkat/npx/compare/v4.0.2...v4.0.3) (2017-06-04) +## [4.0.3](https://github.com/npm/npx/compare/v4.0.2...v4.0.3) (2017-06-04) ### Bug Fixes -* **npm:** use --userconfig when querying for npm cache config (#28) ([21bc3bf](https://github.com/zkat/npx/commit/21bc3bf)) +* **npm:** use --userconfig when querying for npm cache config (#28) ([21bc3bf](https://github.com/npm/npx/commit/21bc3bf)) -## [4.0.2](https://github.com/zkat/npx/compare/v4.0.1...v4.0.2) (2017-06-04) +## [4.0.2](https://github.com/npm/npx/compare/v4.0.1...v4.0.2) (2017-06-04) ### Bug Fixes -* **install:** get windows workin (#27) ([9472175](https://github.com/zkat/npx/commit/9472175)) +* **install:** get windows workin (#27) ([9472175](https://github.com/npm/npx/commit/9472175)) -## [4.0.1](https://github.com/zkat/npx/compare/v4.0.0...v4.0.1) (2017-06-04) +## [4.0.1](https://github.com/npm/npx/compare/v4.0.0...v4.0.1) (2017-06-04) ### Bug Fixes -* **cmd:** make sure to use our own, enriched path ([9c89c2a](https://github.com/zkat/npx/commit/9c89c2a)) -* **error:** join args with a space on Command failed error ([c2f6f18](https://github.com/zkat/npx/commit/c2f6f18)) +* **cmd:** make sure to use our own, enriched path ([9c89c2a](https://github.com/npm/npx/commit/9c89c2a)) +* **error:** join args with a space on Command failed error ([c2f6f18](https://github.com/npm/npx/commit/c2f6f18)) -# [4.0.0](https://github.com/zkat/npx/compare/v3.0.0...v4.0.0) (2017-06-03) +# [4.0.0](https://github.com/npm/npx/compare/v3.0.0...v4.0.0) (2017-06-03) ### Features -* **call:** -c now loads same env as run-script ([76ae44c](https://github.com/zkat/npx/commit/76ae44c)) -* **npm:** allow configuration of npm binary ([e5d5634](https://github.com/zkat/npx/commit/e5d5634)) -* **npm:** embed npm binary ([a2cae9d](https://github.com/zkat/npx/commit/a2cae9d)) +* **call:** -c now loads same env as run-script ([76ae44c](https://github.com/npm/npx/commit/76ae44c)) +* **npm:** allow configuration of npm binary ([e5d5634](https://github.com/npm/npx/commit/e5d5634)) +* **npm:** embed npm binary ([a2cae9d](https://github.com/npm/npx/commit/a2cae9d)) ### BREAKING CHANGES @@ -674,29 +686,29 @@ variables added to them that were not there before. -# [3.0.0](https://github.com/zkat/npx/compare/v2.1.0...v3.0.0) (2017-06-03) +# [3.0.0](https://github.com/npm/npx/compare/v2.1.0...v3.0.0) (2017-06-03) ### Bug Fixes -* **args:** accept argv as arg and fix minor bugs ([46f10fe](https://github.com/zkat/npx/commit/46f10fe)) -* **deps:** explicitly add mkdirp and rimraf to devDeps ([832c75d](https://github.com/zkat/npx/commit/832c75d)) -* **docs:** misc tweaks to docs ([ed70a7b](https://github.com/zkat/npx/commit/ed70a7b)) -* **exec:** escape binaries and args to cp.exec (#18) ([55d6a11](https://github.com/zkat/npx/commit/55d6a11)) -* **fallback:** shells were sometimes ignored based on $SHELL ([07b7efc](https://github.com/zkat/npx/commit/07b7efc)) -* **get-prefix:** nudge isRootPath ([1ab31eb](https://github.com/zkat/npx/commit/1ab31eb)) -* **help:** correctly enable -h and --help ([adc2f45](https://github.com/zkat/npx/commit/adc2f45)) -* **startup:** delay loading some things to speed up startup ([6b32bf5](https://github.com/zkat/npx/commit/6b32bf5)) +* **args:** accept argv as arg and fix minor bugs ([46f10fe](https://github.com/npm/npx/commit/46f10fe)) +* **deps:** explicitly add mkdirp and rimraf to devDeps ([832c75d](https://github.com/npm/npx/commit/832c75d)) +* **docs:** misc tweaks to docs ([ed70a7b](https://github.com/npm/npx/commit/ed70a7b)) +* **exec:** escape binaries and args to cp.exec (#18) ([55d6a11](https://github.com/npm/npx/commit/55d6a11)) +* **fallback:** shells were sometimes ignored based on $SHELL ([07b7efc](https://github.com/npm/npx/commit/07b7efc)) +* **get-prefix:** nudge isRootPath ([1ab31eb](https://github.com/npm/npx/commit/1ab31eb)) +* **help:** correctly enable -h and --help ([adc2f45](https://github.com/npm/npx/commit/adc2f45)) +* **startup:** delay loading some things to speed up startup ([6b32bf5](https://github.com/npm/npx/commit/6b32bf5)) ### Features -* **cmd:** do some heuristic guesswork on default command names (#23) ([2404420](https://github.com/zkat/npx/commit/2404420)) -* **ignore:** add --ignore-existing option (#20) ([0866a83](https://github.com/zkat/npx/commit/0866a83)) -* **install:** added --no-install option to prevent install fallbacks ([a5fbdaf](https://github.com/zkat/npx/commit/a5fbdaf)) -* **package:** multiple --package options are now accepted ([f2fa6b3](https://github.com/zkat/npx/commit/f2fa6b3)) -* **save:** remove all save-related functionality (#19) ([ab77f6c](https://github.com/zkat/npx/commit/ab77f6c)) -* **shell:** run -c strings inside a system shell (#22) ([17db461](https://github.com/zkat/npx/commit/17db461)) +* **cmd:** do some heuristic guesswork on default command names (#23) ([2404420](https://github.com/npm/npx/commit/2404420)) +* **ignore:** add --ignore-existing option (#20) ([0866a83](https://github.com/npm/npx/commit/0866a83)) +* **install:** added --no-install option to prevent install fallbacks ([a5fbdaf](https://github.com/npm/npx/commit/a5fbdaf)) +* **package:** multiple --package options are now accepted ([f2fa6b3](https://github.com/npm/npx/commit/f2fa6b3)) +* **save:** remove all save-related functionality (#19) ([ab77f6c](https://github.com/npm/npx/commit/ab77f6c)) +* **shell:** run -c strings inside a system shell (#22) ([17db461](https://github.com/npm/npx/commit/17db461)) ### BREAKING CHANGES @@ -706,37 +718,37 @@ variables added to them that were not there before. -# [2.1.0](https://github.com/zkat/npx/compare/v2.0.1...v2.1.0) (2017-06-01) +# [2.1.0](https://github.com/npm/npx/compare/v2.0.1...v2.1.0) (2017-06-01) ### Features -* **opts:** add --shell-auto-fallback (#7) ([ac9cb40](https://github.com/zkat/npx/commit/ac9cb40)) +* **opts:** add --shell-auto-fallback (#7) ([ac9cb40](https://github.com/npm/npx/commit/ac9cb40)) -## [2.0.1](https://github.com/zkat/npx/compare/v2.0.0...v2.0.1) (2017-05-31) +## [2.0.1](https://github.com/npm/npx/compare/v2.0.0...v2.0.1) (2017-05-31) ### Bug Fixes -* **exec:** use command lookup joined with current PATH ([d9175e8](https://github.com/zkat/npx/commit/d9175e8)) +* **exec:** use command lookup joined with current PATH ([d9175e8](https://github.com/npm/npx/commit/d9175e8)) -# [2.0.0](https://github.com/zkat/npx/compare/v1.1.1...v2.0.0) (2017-05-31) +# [2.0.0](https://github.com/npm/npx/compare/v1.1.1...v2.0.0) (2017-05-31) ### Bug Fixes -* **npm:** manually look up npm path for Windows compat ([0fe8fbf](https://github.com/zkat/npx/commit/0fe8fbf)) +* **npm:** manually look up npm path for Windows compat ([0fe8fbf](https://github.com/npm/npx/commit/0fe8fbf)) ### Features -* **commands:** -p and [@version](https://github.com/version) now trigger installs ([9668c83](https://github.com/zkat/npx/commit/9668c83)) +* **commands:** -p and [@version](https://github.com/version) now trigger installs ([9668c83](https://github.com/npm/npx/commit/9668c83)) ### BREAKING CHANGES @@ -746,51 +758,51 @@ variables added to them that were not there before. -## [1.1.1](https://github.com/zkat/npx/compare/v1.1.0...v1.1.1) (2017-05-30) +## [1.1.1](https://github.com/npm/npx/compare/v1.1.0...v1.1.1) (2017-05-30) ### Bug Fixes -* **docs:** make sure man page gets installed ([2aadc16](https://github.com/zkat/npx/commit/2aadc16)) +* **docs:** make sure man page gets installed ([2aadc16](https://github.com/npm/npx/commit/2aadc16)) -# [1.1.0](https://github.com/zkat/npx/compare/v1.0.2...v1.1.0) (2017-05-30) +# [1.1.0](https://github.com/npm/npx/compare/v1.0.2...v1.1.0) (2017-05-30) ### Bug Fixes -* **help:** update usage string for help ([0747cff](https://github.com/zkat/npx/commit/0747cff)) -* **main:** exit if no package was parsed ([cdb579d](https://github.com/zkat/npx/commit/cdb579d)) -* **opts:** allow -- to prevent further parsing ([db7a0e4](https://github.com/zkat/npx/commit/db7a0e4)) +* **help:** update usage string for help ([0747cff](https://github.com/npm/npx/commit/0747cff)) +* **main:** exit if no package was parsed ([cdb579d](https://github.com/npm/npx/commit/cdb579d)) +* **opts:** allow -- to prevent further parsing ([db7a0e4](https://github.com/npm/npx/commit/db7a0e4)) ### Features -* **updates:** added update-notifier ([8dc91d4](https://github.com/zkat/npx/commit/8dc91d4)) +* **updates:** added update-notifier ([8dc91d4](https://github.com/npm/npx/commit/8dc91d4)) -## [1.0.2](https://github.com/zkat/npx/compare/v1.0.1...v1.0.2) (2017-05-30) +## [1.0.2](https://github.com/npm/npx/compare/v1.0.1...v1.0.2) (2017-05-30) ### Bug Fixes -* **pkg:** bundle deps to guarantee global install precision ([3e21217](https://github.com/zkat/npx/commit/3e21217)) +* **pkg:** bundle deps to guarantee global install precision ([3e21217](https://github.com/npm/npx/commit/3e21217)) -## [1.0.1](https://github.com/zkat/npx/compare/v1.0.0...v1.0.1) (2017-05-30) +## [1.0.1](https://github.com/npm/npx/compare/v1.0.0...v1.0.1) (2017-05-30) ### Bug Fixes -* **build:** add dummy test file to let things build ([6199eb6](https://github.com/zkat/npx/commit/6199eb6)) -* **docs:** fix arg documentation in readme/manpage ([d1cf44c](https://github.com/zkat/npx/commit/d1cf44c)) -* **opts:** add --version/-v ([2633a0e](https://github.com/zkat/npx/commit/2633a0e)) +* **build:** add dummy test file to let things build ([6199eb6](https://github.com/npm/npx/commit/6199eb6)) +* **docs:** fix arg documentation in readme/manpage ([d1cf44c](https://github.com/npm/npx/commit/d1cf44c)) +* **opts:** add --version/-v ([2633a0e](https://github.com/npm/npx/commit/2633a0e)) @@ -800,4 +812,4 @@ variables added to them that were not there before. ### Features -* **npx:** initial working implementation ([a83a67d](https://github.com/zkat/npx/commit/a83a67d)) +* **npx:** initial working implementation ([a83a67d](https://github.com/npm/npx/commit/a83a67d)) diff --git a/node_modules/libnpx/README.md b/node_modules/libnpx/README.md index 130f1bc3fdd02..fa7f37d878a06 100644 --- a/node_modules/libnpx/README.md +++ b/node_modules/libnpx/README.md @@ -1,4 +1,4 @@ -[![npm](https://img.shields.io/npm/v/npx.svg)](https://npm.im/npx) [![license](https://img.shields.io/npm/l/npx.svg)](https://npm.im/npx) [![Travis](https://img.shields.io/travis/zkat/npx.svg)](https://travis-ci.org/zkat/npx) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/npx?svg=true)](https://ci.appveyor.com/project/zkat/npx) [![Coverage Status](https://coveralls.io/repos/github/zkat/npx/badge.svg?branch=latest)](https://coveralls.io/github/zkat/npx?branch=latest) +[![npm](https://img.shields.io/npm/v/npx.svg)](https://npm.im/npx) [![license](https://img.shields.io/npm/l/npx.svg)](https://npm.im/npx) [![Travis](https://img.shields.io/travis/npm/npx.svg)](https://travis-ci.org/npm/npx) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/npm/npx?svg=true)](https://ci.appveyor.com/project/npm/npx) [![Coverage Status](https://coveralls.io/repos/github/npm/npx/badge.svg?branch=latest)](https://coveralls.io/github/npm/npx?branch=latest) # npx(1) -- execute npm package binaries @@ -152,7 +152,7 @@ Written by [Kat Marchan](https://github.com/zkat). ## REPORTING BUGS -Please file any relevant issues [on Github.](https://github.com/zkat/npx) +Please file any relevant issues [on Github.](https://github.com/npm/npx) ## LICENSE diff --git a/node_modules/libnpx/libnpx.1 b/node_modules/libnpx/libnpx.1 index 4215202da8e24..aea3ffe8f4192 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.1" "User Commands" +.TH "NPX" "1" "January 2020" "libnpx@10.2.1" "User Commands" .SH "NAME" \fBnpx\fR \- execute npm package binaries .SH SYNOPSIS @@ -158,7 +158,7 @@ Huge thanks to Kwyn Meagher \fIhttps://blog\.kwyn\.io\fR for generously donating Written by Kat Marchan \fIhttps://github\.com/zkat\fR\|\. .SH REPORTING BUGS .P -Please file any relevant issues on Github\. \fIhttps://github\.com/zkat/npx\fR +Please file any relevant issues on Github\. \fIhttps://github\.com/npm/npx\fR .SH LICENSE .P This work is released by its authors into the public domain under CC0\-1\.0\. See \fBLICENSE\.md\fP for details\. diff --git a/node_modules/libnpx/package.json b/node_modules/libnpx/package.json index b9d866b96a7d0..9b9949cd3ca4f 100644 --- a/node_modules/libnpx/package.json +++ b/node_modules/libnpx/package.json @@ -1,39 +1,36 @@ { - "_args": [ - [ - "libnpx@10.2.0", - "/Users/rebecca/code/npm" - ] - ], - "_from": "libnpx@10.2.0", - "_id": "libnpx@10.2.0", + "_from": "libnpx@10.2.2", + "_id": "libnpx@10.2.2", "_inBundle": false, - "_integrity": "sha512-X28coei8/XRCt15cYStbLBph+KGhFra4VQhRBPuH/HHMkC5dxM8v24RVgUsvODKCrUZ0eTgiTqJp6zbl0sskQQ==", + "_integrity": "sha512-ujaYToga1SAX5r7FU5ShMFi88CWpY75meNZtr6RtEyv4l2ZK3+Wgvxq2IqlwWBiDZOqhumdeiocPS1aKrCMe3A==", "_location": "/libnpx", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "libnpx@10.2.0", + "raw": "libnpx@10.2.2", "name": "libnpx", "escapedName": "libnpx", - "rawSpec": "10.2.0", + "rawSpec": "10.2.2", "saveSpec": null, - "fetchSpec": "10.2.0" + "fetchSpec": "10.2.2" }, "_requiredBy": [ + "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/libnpx/-/libnpx-10.2.0.tgz", - "_spec": "10.2.0", - "_where": "/Users/rebecca/code/npm", + "_resolved": "https://registry.npmjs.org/libnpx/-/libnpx-10.2.2.tgz", + "_shasum": "5a4171b9b92dd031463ef66a4af9f5cbd6b09572", + "_spec": "libnpx@10.2.2", + "_where": "/Users/mperrotte/npminc/cli", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" }, "bugs": { - "url": "https://github.com/zkat/npx/issues" + "url": "https://github.com/npm/npx/issues" }, + "bundleDependencies": false, "config": { "nyc": { "exclude": [ @@ -52,6 +49,7 @@ "y18n": "^4.0.0", "yargs": "^11.0.0" }, + "deprecated": false, "description": "support library for npx -- an tool for executing npm-based packages.", "devDependencies": { "cross-env": "^5.1.3", @@ -76,7 +74,7 @@ "libnpx.1", "locales" ], - "homepage": "https://github.com/zkat/npx#readme", + "homepage": "https://github.com/npm/npx#readme", "keywords": [ "npm", "npm exec", @@ -93,7 +91,7 @@ "name": "libnpx", "repository": { "type": "git", - "url": "git+https://github.com/zkat/npx.git" + "url": "git+https://github.com/npm/npx.git" }, "scripts": { "bin": "make bin", @@ -107,5 +105,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.2.0" + "version": "10.2.2" } diff --git a/node_modules/map-age-cleaner/dist/index.d.ts b/node_modules/map-age-cleaner/dist/index.d.ts new file mode 100644 index 0000000000000..fbf5ce08f5fc1 --- /dev/null +++ b/node_modules/map-age-cleaner/dist/index.d.ts @@ -0,0 +1,20 @@ +interface Entry { + [key: string]: any; +} +interface MaxAgeEntry extends Entry { + maxAge: number; +} +/** + * Automatically cleanup the items in the provided `map`. The property of the expiration timestamp should be named `maxAge`. + * + * @param map - Map instance which should be cleaned up. + */ +export default function mapAgeCleaner(map: Map): any; +/** + * Automatically cleanup the items in the provided `map`. + * + * @param map - Map instance which should be cleaned up. + * @param property - Name of the property which olds the expiry timestamp. + */ +export default function mapAgeCleaner(map: Map, property: string): any; +export {}; diff --git a/node_modules/map-age-cleaner/dist/index.js b/node_modules/map-age-cleaner/dist/index.js new file mode 100644 index 0000000000000..ff137dec85f56 --- /dev/null +++ b/node_modules/map-age-cleaner/dist/index.js @@ -0,0 +1,92 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const p_defer_1 = __importDefault(require("p-defer")); +function mapAgeCleaner(map, property = 'maxAge') { + let processingKey; + let processingTimer; + let processingDeferred; + const cleanup = () => __awaiter(this, void 0, void 0, function* () { + if (processingKey !== undefined) { + // If we are already processing an item, we can safely exit + return; + } + const setupTimer = (item) => __awaiter(this, void 0, void 0, function* () { + processingDeferred = p_defer_1.default(); + const delay = item[1][property] - Date.now(); + if (delay <= 0) { + // Remove the item immediately if the delay is equal to or below 0 + map.delete(item[0]); + processingDeferred.resolve(); + return; + } + // Keep track of the current processed key + processingKey = item[0]; + processingTimer = setTimeout(() => { + // Remove the item when the timeout fires + map.delete(item[0]); + if (processingDeferred) { + processingDeferred.resolve(); + } + }, delay); + // tslint:disable-next-line:strict-type-predicates + if (typeof processingTimer.unref === 'function') { + // Don't hold up the process from exiting + processingTimer.unref(); + } + return processingDeferred.promise; + }); + try { + for (const entry of map) { + yield setupTimer(entry); + } + } + catch (_a) { + // Do nothing if an error occurs, this means the timer was cleaned up and we should stop processing + } + processingKey = undefined; + }); + const reset = () => { + processingKey = undefined; + if (processingTimer !== undefined) { + clearTimeout(processingTimer); + processingTimer = undefined; + } + if (processingDeferred !== undefined) { // tslint:disable-line:early-exit + processingDeferred.reject(undefined); + processingDeferred = undefined; + } + }; + const originalSet = map.set.bind(map); + map.set = (key, value) => { + if (map.has(key)) { + // If the key already exist, remove it so we can add it back at the end of the map. + map.delete(key); + } + // Call the original `map.set` + const result = originalSet(key, value); + // If we are already processing a key and the key added is the current processed key, stop processing it + if (processingKey && processingKey === key) { + reset(); + } + // Always run the cleanup method in case it wasn't started yet + cleanup(); // tslint:disable-line:no-floating-promises + return result; + }; + cleanup(); // tslint:disable-line:no-floating-promises + return map; +} +exports.default = mapAgeCleaner; +// Add support for CJS +module.exports = mapAgeCleaner; +module.exports.default = mapAgeCleaner; diff --git a/node_modules/map-age-cleaner/license b/node_modules/map-age-cleaner/license new file mode 100644 index 0000000000000..0711ab006f8a9 --- /dev/null +++ b/node_modules/map-age-cleaner/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sam Verschueren (github.com/SamVerschueren) + +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: + +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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/map-age-cleaner/package.json b/node_modules/map-age-cleaner/package.json new file mode 100644 index 0000000000000..fc6be6aac5f14 --- /dev/null +++ b/node_modules/map-age-cleaner/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + "map-age-cleaner@0.1.3", + "/Users/mperrotte/npminc/cli" + ] + ], + "_development": true, + "_from": "map-age-cleaner@0.1.3", + "_id": "map-age-cleaner@0.1.3", + "_inBundle": false, + "_integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "_location": "/map-age-cleaner", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "map-age-cleaner@0.1.3", + "name": "map-age-cleaner", + "escapedName": "map-age-cleaner", + "rawSpec": "0.1.3", + "saveSpec": null, + "fetchSpec": "0.1.3" + }, + "_requiredBy": [ + "/nyc/mem" + ], + "_resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "_spec": "0.1.3", + "_where": "/Users/mperrotte/npminc/cli", + "author": { + "name": "Sam Verschueren", + "email": "sam.verschueren@gmail.com", + "url": "github.com/SamVerschueren" + }, + "bugs": { + "url": "https://github.com/SamVerschueren/map-age-cleaner/issues" + }, + "dependencies": { + "p-defer": "^1.0.0" + }, + "description": "Automatically cleanup expired items in a Map", + "devDependencies": { + "@types/delay": "^2.0.1", + "@types/node": "^10.7.1", + "ava": "^0.25.0", + "codecov": "^3.0.0", + "del-cli": "^1.1.0", + "delay": "^3.0.0", + "nyc": "^12.0.0", + "tslint": "^5.11.0", + "tslint-xo": "^0.9.0", + "typescript": "^3.0.1" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "dist/index.js", + "dist/index.d.ts" + ], + "homepage": "https://github.com/SamVerschueren/map-age-cleaner#readme", + "keywords": [ + "map", + "age", + "cleaner", + "maxage", + "expire", + "expiration", + "expiring" + ], + "license": "MIT", + "main": "dist/index.js", + "name": "map-age-cleaner", + "nyc": { + "exclude": [ + "dist/test.js" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/SamVerschueren/map-age-cleaner.git" + }, + "scripts": { + "build": "npm run clean && tsc", + "clean": "del-cli dist", + "lint": "tslint --format stylish --project .", + "prepublishOnly": "npm run build", + "pretest": "npm run build -- --sourceMap", + "test": "npm run lint && nyc ava dist/test.js" + }, + "sideEffects": false, + "typings": "dist/index.d.ts", + "version": "0.1.3" +} diff --git a/node_modules/map-age-cleaner/readme.md b/node_modules/map-age-cleaner/readme.md new file mode 100644 index 0000000000000..471d93353a07e --- /dev/null +++ b/node_modules/map-age-cleaner/readme.md @@ -0,0 +1,67 @@ +# map-age-cleaner + +[![Build Status](https://travis-ci.org/SamVerschueren/map-age-cleaner.svg?branch=master)](https://travis-ci.org/SamVerschueren/map-age-cleaner) [![codecov](https://codecov.io/gh/SamVerschueren/map-age-cleaner/badge.svg?branch=master)](https://codecov.io/gh/SamVerschueren/map-age-cleaner?branch=master) + +> Automatically cleanup expired items in a Map + + +## Install + +``` +$ npm install map-age-cleaner +``` + + +## Usage + +```js +import mapAgeCleaner from 'map-age-cleaner'; + +const map = new Map([ + ['unicorn', {data: '🦄', maxAge: Date.now() + 1000}] +]); + +mapAgeCleaner(map); + +map.has('unicorn'); +//=> true + +// Wait for 1 second... + +map.has('unicorn'); +//=> false +``` + +> **Note**: Items have to be ordered ascending based on the expiry property. This means that the item which will be expired first, should be in the first position of the `Map`. + + +## API + +### mapAgeCleaner(map, [property]) + +Returns the `Map` instance. + +#### map + +Type: `Map` + +Map instance which should be cleaned up. + +#### property + +Type: `string`
+Default: `maxAge` + +Name of the property which olds the expiry timestamp. + + +## Related + +- [expiry-map](https://github.com/SamVerschueren/expiry-map) - A `Map` implementation with expirable items +- [expiry-set](https://github.com/SamVerschueren/expiry-set) - A `Set` implementation with expirable keys +- [mem](https://github.com/sindresorhus/mem) - Memoize functions + + +## License + +MIT © [Sam Verschueren](https://github.com/SamVerschueren) diff --git a/node_modules/mem/index.d.ts b/node_modules/mem/index.d.ts new file mode 100644 index 0000000000000..786625520b203 --- /dev/null +++ b/node_modules/mem/index.d.ts @@ -0,0 +1,96 @@ +declare namespace mem { + interface CacheStorage { + has(key: KeyType): boolean; + get(key: KeyType): ValueType | undefined; + set(key: KeyType, value: ValueType): void; + delete(key: KeyType): void; + clear?: () => void; + } + + interface Options< + ArgumentsType extends unknown[], + CacheKeyType extends unknown, + ReturnType extends unknown + > { + /** + Milliseconds until the cache expires. + + @default Infinity + */ + readonly maxAge?: number; + + /** + Determines the cache key for storing the result based on the function arguments. By default, if there's only one argument and it's a [primitive](https://developer.mozilla.org/en-US/docs/Glossary/Primitive), it's used directly as a key, otherwise it's all the function arguments JSON stringified as an array. + + You could for example change it to only cache on the first argument `x => JSON.stringify(x)`. + */ + readonly cacheKey?: (...arguments: ArgumentsType) => CacheKeyType; + + /** + Use a different cache storage. You could for example use a `WeakMap` instead or [`quick-lru`](https://github.com/sindresorhus/quick-lru) for a LRU cache. + + @default new Map() + */ + readonly cache?: CacheStorage; + + /** + Cache rejected promises. + + @default false + */ + readonly cachePromiseRejection?: boolean; + } +} + +declare const mem: { + /** + [Memoize](https://en.wikipedia.org/wiki/Memoization) functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input. + + @param fn - Function to be memoized. + + @example + ``` + import mem = require('mem'); + + let i = 0; + const counter = () => ++i; + const memoized = mem(counter); + + memoized('foo'); + //=> 1 + + // Cached as it's the same arguments + memoized('foo'); + //=> 1 + + // Not cached anymore as the arguments changed + memoized('bar'); + //=> 2 + + memoized('bar'); + //=> 2 + ``` + */ + < + ArgumentsType extends unknown[], + ReturnType extends unknown, + CacheKeyType extends unknown + >( + fn: (...arguments: ArgumentsType) => ReturnType, + options?: mem.Options + ): (...arguments: ArgumentsType) => ReturnType; + + /** + Clear all cached data of a memoized function. + + @param fn - Memoized function. + */ + clear( + fn: (...arguments: ArgumentsType) => ReturnType + ): void; + + // TODO: Remove this for the next major release + default: typeof mem; +}; + +export = mem; diff --git a/node_modules/mem/index.js b/node_modules/mem/index.js index aa5a0739822c7..51faf012c2fc4 100644 --- a/node_modules/mem/index.js +++ b/node_modules/mem/index.js @@ -1,51 +1,84 @@ 'use strict'; const mimicFn = require('mimic-fn'); +const isPromise = require('p-is-promise'); +const mapAgeCleaner = require('map-age-cleaner'); const cacheStore = new WeakMap(); -const defaultCacheKey = function (x) { - if (arguments.length === 1 && (x === null || x === undefined || (typeof x !== 'function' && typeof x !== 'object'))) { - return x; +const defaultCacheKey = (...arguments_) => { + if (arguments_.length === 0) { + return '__defaultKey'; } - return JSON.stringify(arguments); + if (arguments_.length === 1) { + const [firstArgument] = arguments_; + if ( + firstArgument === null || + firstArgument === undefined || + (typeof firstArgument !== 'function' && typeof firstArgument !== 'object') + ) { + return firstArgument; + } + } + + return JSON.stringify(arguments_); }; -module.exports = (fn, opts) => { - opts = Object.assign({ +const mem = (fn, options) => { + options = Object.assign({ cacheKey: defaultCacheKey, - cache: new Map() - }, opts); + cache: new Map(), + cachePromiseRejection: false + }, options); + + if (typeof options.maxAge === 'number') { + mapAgeCleaner(options.cache); + } - const memoized = function () { - const cache = cacheStore.get(memoized); - const key = opts.cacheKey.apply(null, arguments); + const {cache} = options; + options.maxAge = options.maxAge || 0; - if (cache.has(key)) { - const c = cache.get(key); + const setData = (key, data) => { + cache.set(key, { + data, + maxAge: Date.now() + options.maxAge + }); + }; + + const memoized = function (...arguments_) { + const key = options.cacheKey(...arguments_); - if (typeof opts.maxAge !== 'number' || Date.now() < c.maxAge) { - return c.data; - } + if (cache.has(key)) { + return cache.get(key).data; } - const ret = fn.apply(null, arguments); + const cacheItem = fn.call(this, ...arguments_); - cache.set(key, { - data: ret, - maxAge: Date.now() + (opts.maxAge || 0) - }); + setData(key, cacheItem); + + if (isPromise(cacheItem) && options.cachePromiseRejection === false) { + // Remove rejected promises from cache unless `cachePromiseRejection` is set to `true` + cacheItem.catch(() => cache.delete(key)); + } - return ret; + return cacheItem; }; - mimicFn(memoized, fn); + try { + // The below call will throw in some host environments + // See https://github.com/sindresorhus/mimic-fn/issues/10 + mimicFn(memoized, fn); + } catch (_) {} - cacheStore.set(memoized, opts.cache); + cacheStore.set(memoized, options.cache); return memoized; }; +module.exports = mem; +// TODO: Remove this for the next major release +module.exports.default = mem; + module.exports.clear = fn => { const cache = cacheStore.get(fn); diff --git a/node_modules/mem/license b/node_modules/mem/license index 654d0bfe94343..e7af2f77107d7 100644 --- a/node_modules/mem/license +++ b/node_modules/mem/license @@ -1,21 +1,9 @@ -The MIT License (MIT) +MIT License Copyright (c) Sindre Sorhus (sindresorhus.com) -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: +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: -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, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mem/node_modules/mimic-fn/index.d.ts b/node_modules/mem/node_modules/mimic-fn/index.d.ts new file mode 100644 index 0000000000000..b4047d58902eb --- /dev/null +++ b/node_modules/mem/node_modules/mimic-fn/index.d.ts @@ -0,0 +1,54 @@ +declare const mimicFn: { + /** + Make a function mimic another one. It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set. + + @param to - Mimicking function. + @param from - Function to mimic. + @returns The modified `to` function. + + @example + ``` + import mimicFn = require('mimic-fn'); + + function foo() {} + foo.unicorn = '🦄'; + + function wrapper() { + return foo(); + } + + console.log(wrapper.name); + //=> 'wrapper' + + mimicFn(wrapper, foo); + + console.log(wrapper.name); + //=> 'foo' + + console.log(wrapper.unicorn); + //=> '🦄' + ``` + */ + < + ArgumentsType extends unknown[], + ReturnType, + FunctionType extends (...arguments: ArgumentsType) => ReturnType + >( + to: (...arguments: ArgumentsType) => ReturnType, + from: FunctionType + ): FunctionType; + + // TODO: Remove this for the next major release, refactor the whole definition to: + // declare function mimicFn< + // ArgumentsType extends unknown[], + // ReturnType, + // FunctionType extends (...arguments: ArgumentsType) => ReturnType + // >( + // to: (...arguments: ArgumentsType) => ReturnType, + // from: FunctionType + // ): FunctionType; + // export = mimicFn; + default: typeof mimicFn; +}; + +export = mimicFn; diff --git a/node_modules/mem/node_modules/mimic-fn/index.js b/node_modules/mem/node_modules/mimic-fn/index.js new file mode 100644 index 0000000000000..1a597051750da --- /dev/null +++ b/node_modules/mem/node_modules/mimic-fn/index.js @@ -0,0 +1,13 @@ +'use strict'; + +const mimicFn = (to, from) => { + for (const prop of Reflect.ownKeys(from)) { + Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); + } + + return to; +}; + +module.exports = mimicFn; +// TODO: Remove this for the next major release +module.exports.default = mimicFn; diff --git a/node_modules/mem/node_modules/mimic-fn/license b/node_modules/mem/node_modules/mimic-fn/license new file mode 100644 index 0000000000000..e7af2f77107d7 --- /dev/null +++ b/node_modules/mem/node_modules/mimic-fn/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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: + +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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mem/node_modules/mimic-fn/package.json b/node_modules/mem/node_modules/mimic-fn/package.json new file mode 100644 index 0000000000000..b4970a28d40c8 --- /dev/null +++ b/node_modules/mem/node_modules/mimic-fn/package.json @@ -0,0 +1,74 @@ +{ + "_from": "mimic-fn@^2.0.0", + "_id": "mimic-fn@2.1.0", + "_inBundle": false, + "_integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "_location": "/mem/mimic-fn", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "mimic-fn@^2.0.0", + "name": "mimic-fn", + "escapedName": "mimic-fn", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/mem" + ], + "_resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "_shasum": "7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b", + "_spec": "mimic-fn@^2.0.0", + "_where": "/Users/mperrotte/npminc/cli/node_modules/mem", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/mimic-fn/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Make a function mimic another one", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/sindresorhus/mimic-fn#readme", + "keywords": [ + "function", + "mimic", + "imitate", + "rename", + "copy", + "inherit", + "properties", + "name", + "func", + "fn", + "set", + "infer", + "change" + ], + "license": "MIT", + "name": "mimic-fn", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/mimic-fn.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.1.0" +} diff --git a/node_modules/mem/node_modules/mimic-fn/readme.md b/node_modules/mem/node_modules/mimic-fn/readme.md new file mode 100644 index 0000000000000..0ef8a13d7e0d9 --- /dev/null +++ b/node_modules/mem/node_modules/mimic-fn/readme.md @@ -0,0 +1,69 @@ +# mimic-fn [![Build Status](https://travis-ci.org/sindresorhus/mimic-fn.svg?branch=master)](https://travis-ci.org/sindresorhus/mimic-fn) + +> Make a function mimic another one + +Useful when you wrap a function in another function and like to preserve the original name and other properties. + + +## Install + +``` +$ npm install mimic-fn +``` + + +## Usage + +```js +const mimicFn = require('mimic-fn'); + +function foo() {} +foo.unicorn = '🦄'; + +function wrapper() { + return foo(); +} + +console.log(wrapper.name); +//=> 'wrapper' + +mimicFn(wrapper, foo); + +console.log(wrapper.name); +//=> 'foo' + +console.log(wrapper.unicorn); +//=> '🦄' +``` + + +## API + +It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set. + +### mimicFn(to, from) + +Modifies the `to` function and returns it. + +#### to + +Type: `Function` + +Mimicking function. + +#### from + +Type: `Function` + +Function to mimic. + + +## Related + +- [rename-fn](https://github.com/sindresorhus/rename-fn) - Rename a function +- [keep-func-props](https://github.com/ehmicky/keep-func-props) - Wrap a function without changing its name, length and other properties + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/mem/package.json b/node_modules/mem/package.json index 27eefe8d720d4..eedf07469c4c3 100644 --- a/node_modules/mem/package.json +++ b/node_modules/mem/package.json @@ -1,27 +1,27 @@ { - "_from": "mem@^1.1.0", - "_id": "mem@1.1.0", + "_from": "mem@^4.0.0", + "_id": "mem@4.3.0", "_inBundle": false, - "_integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "_integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", "_location": "/mem", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "mem@^1.1.0", + "raw": "mem@^4.0.0", "name": "mem", "escapedName": "mem", - "rawSpec": "^1.1.0", + "rawSpec": "^4.0.0", "saveSpec": null, - "fetchSpec": "^1.1.0" + "fetchSpec": "^4.0.0" }, "_requiredBy": [ "/os-locale" ], - "_resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "_shasum": "5edd52b485ca1d900fe64895505399a0dfa45f76", - "_spec": "mem@^1.1.0", - "_where": "/Users/rebecca/code/npm/node_modules/os-locale", + "_resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "_shasum": "461af497bc4ae09608cdb2e60eefb69bff744178", + "_spec": "mem@^4.0.0", + "_where": "/Users/mperrotte/npminc/cli/node_modules/os-locale", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -32,20 +32,24 @@ }, "bundleDependencies": false, "dependencies": { - "mimic-fn": "^1.0.0" + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" }, "deprecated": false, "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input", "devDependencies": { - "ava": "*", - "delay": "^1.1.0", - "xo": "*" + "ava": "^1.4.1", + "delay": "^4.1.0", + "tsd": "^0.7.1", + "xo": "^0.24.0" }, "engines": { - "node": ">=4" + "node": ">=6" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/sindresorhus/mem#readme", "keywords": [ @@ -68,10 +72,7 @@ "url": "git+https://github.com/sindresorhus/mem.git" }, "scripts": { - "test": "xo && ava" + "test": "xo && ava && tsd" }, - "version": "1.1.0", - "xo": { - "esnext": true - } + "version": "4.3.0" } diff --git a/node_modules/mem/readme.md b/node_modules/mem/readme.md index 7ebab84f0e716..add4222b62d71 100644 --- a/node_modules/mem/readme.md +++ b/node_modules/mem/readme.md @@ -2,11 +2,13 @@ > [Memoize](https://en.wikipedia.org/wiki/Memoization) functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input +Memory is automatically released when an item expires. + ## Install ``` -$ npm install --save mem +$ npm install mem ``` @@ -22,11 +24,11 @@ const memoized = mem(counter); memoized('foo'); //=> 1 -// cached as it's the same arguments +// Cached as it's the same arguments memoized('foo'); //=> 1 -// not cached anymore as the arguments changed +// Not cached anymore as the arguments changed memoized('bar'); //=> 2 @@ -40,35 +42,37 @@ memoized('bar'); const mem = require('mem'); let i = 0; -const counter = () => Promise.resolve(++i); +const counter = async () => ++i; const memoized = mem(counter); -memoized().then(a => { - console.log(a); +(async () => { + console.log(await memoized()); //=> 1 - memoized().then(b => { - // the return value didn't increase as it's cached - console.log(b); - //=> 1 - }); -}); + // The return value didn't increase as it's cached + console.log(await memoized()); + //=> 1 +})(); ``` ```js const mem = require('mem'); const got = require('got'); +const delay = require('delay'); + const memGot = mem(got, {maxAge: 1000}); -memGot('sindresorhus.com').then(() => { - // this call is cached - memGot('sindresorhus.com').then(() => { - setTimeout(() => { - // this call is not cached as the cache has expired - memGot('sindresorhus.com').then(() => {}); - }, 2000); - }); -}); +(async () => { + await memGot('sindresorhus.com'); + + // This call is cached + await memGot('sindresorhus.com'); + + await delay(2000); + + // This call is not cached as the cache has expired + await memGot('sindresorhus.com'); +})(); ``` @@ -84,6 +88,8 @@ Function to be memoized. #### options +Type: `Object` + ##### maxAge Type: `number`
@@ -104,7 +110,14 @@ You could for example change it to only cache on the first argument `x => JSON.s Type: `Object`
Default: `new Map()` -Use a different cache storage. Must implement the following methods: `.has(key)`, `.get(key)`, `.set(key, value)`, and optionally `.clear()`. You could for example use a `WeakMap` instead. +Use a different cache storage. Must implement the following methods: `.has(key)`, `.get(key)`, `.set(key, value)`, `.delete(key)`, and optionally `.clear()`. You could for example use a `WeakMap` instead or [`quick-lru`](https://github.com/sindresorhus/quick-lru) for a LRU cache. + +##### cachePromiseRejection + +Type: `boolean`
+Default: `false` + +Cache rejected promises. ### mem.clear(fn) @@ -133,15 +146,22 @@ const got = require('got'); const cache = new StatsMap(); const memGot = mem(got, {cache}); -memGot('sindresorhus.com') - .then(() => memGot('sindresorhus.com')) - .then(() => memGot('sindresorhus.com')); +(async () => { + await memGot('sindresorhus.com'); + await memGot('sindresorhus.com'); + await memGot('sindresorhus.com'); -console.log(cache.stats); -//=> {hits: 2, misses: 1} + console.log(cache.stats); + //=> {hits: 2, misses: 1} +})(); ``` +## Related + +- [p-memoize](https://github.com/sindresorhus/p-memoize) - Memoize promise-returning & async functions + + ## License MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/nice-try/CHANGELOG.md b/node_modules/nice-try/CHANGELOG.md new file mode 100644 index 0000000000000..9e6baf2fb59be --- /dev/null +++ b/node_modules/nice-try/CHANGELOG.md @@ -0,0 +1,21 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [1.0.5] - 2018-08-25 + +### Changed + +- Removed `prepublish` script from `package.json` + +## [1.0.4] - 2017-08-08 + +### New + +- Added a changelog + +### Changed + +- Ignore `yarn.lock` and `package-lock.json` files \ No newline at end of file diff --git a/node_modules/nice-try/LICENSE b/node_modules/nice-try/LICENSE new file mode 100644 index 0000000000000..681c8f507b00e --- /dev/null +++ b/node_modules/nice-try/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Tobias Reich + +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: + +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, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/nice-try/README.md b/node_modules/nice-try/README.md new file mode 100644 index 0000000000000..5b83b78824a0e --- /dev/null +++ b/node_modules/nice-try/README.md @@ -0,0 +1,32 @@ +# nice-try + +[![Travis Build Status](https://travis-ci.org/electerious/nice-try.svg?branch=master)](https://travis-ci.org/electerious/nice-try) [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/8tqb09wrwci3xf8l?svg=true)](https://ci.appveyor.com/project/electerious/nice-try) [![Coverage Status](https://coveralls.io/repos/github/electerious/nice-try/badge.svg?branch=master)](https://coveralls.io/github/electerious/nice-try?branch=master) [![Dependencies](https://david-dm.org/electerious/nice-try.svg)](https://david-dm.org/electerious/nice-try#info=dependencies) [![Greenkeeper badge](https://badges.greenkeeper.io/electerious/nice-try.svg)](https://greenkeeper.io/) + +A function that tries to execute a function and discards any error that occurs. + +## Install + +``` +npm install nice-try +``` + +## Usage + +```js +const niceTry = require('nice-try') + +niceTry(() => JSON.parse('true')) // true +niceTry(() => JSON.parse('truee')) // undefined +niceTry() // undefined +niceTry(true) // undefined +``` + +## API + +### Parameters + +- `fn` `{Function}` Function that might or might not throw an error. + +### Returns + +- `{?*}` Return-value of the function when no error occurred. \ No newline at end of file diff --git a/node_modules/nice-try/package.json b/node_modules/nice-try/package.json new file mode 100644 index 0000000000000..787ce7a7a846e --- /dev/null +++ b/node_modules/nice-try/package.json @@ -0,0 +1,65 @@ +{ + "_args": [ + [ + "nice-try@1.0.5", + "/Users/mperrotte/npminc/cli" + ] + ], + "_development": true, + "_from": "nice-try@1.0.5", + "_id": "nice-try@1.0.5", + "_inBundle": false, + "_integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "_location": "/nice-try", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "nice-try@1.0.5", + "name": "nice-try", + "escapedName": "nice-try", + "rawSpec": "1.0.5", + "saveSpec": null, + "fetchSpec": "1.0.5" + }, + "_requiredBy": [ + "/nyc/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "_spec": "1.0.5", + "_where": "/Users/mperrotte/npminc/cli", + "authors": [ + "Tobias Reich " + ], + "bugs": { + "url": "https://github.com/electerious/nice-try/issues" + }, + "description": "Tries to execute a function and discards any error that occurs", + "devDependencies": { + "chai": "^4.1.2", + "coveralls": "^3.0.0", + "mocha": "^5.1.1", + "nyc": "^12.0.1" + }, + "files": [ + "src" + ], + "homepage": "https://github.com/electerious/nice-try", + "keywords": [ + "try", + "catch", + "error" + ], + "license": "MIT", + "main": "src/index.js", + "name": "nice-try", + "repository": { + "type": "git", + "url": "git+https://github.com/electerious/nice-try.git" + }, + "scripts": { + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "nyc node_modules/mocha/bin/_mocha" + }, + "version": "1.0.5" +} diff --git a/node_modules/nice-try/src/index.js b/node_modules/nice-try/src/index.js new file mode 100644 index 0000000000000..837506f2cc2db --- /dev/null +++ b/node_modules/nice-try/src/index.js @@ -0,0 +1,12 @@ +'use strict' + +/** + * Tries to execute a function and discards any error that occurs. + * @param {Function} fn - Function that might or might not throw an error. + * @returns {?*} Return-value of the function when no error occurred. + */ +module.exports = function(fn) { + + try { return fn() } catch (e) {} + +} \ No newline at end of file diff --git a/node_modules/os-locale/index.js b/node_modules/os-locale/index.js index 1ada7a4949c7c..8c73c99f20e2f 100644 --- a/node_modules/os-locale/index.js +++ b/node_modules/os-locale/index.js @@ -3,33 +3,51 @@ const execa = require('execa'); const lcid = require('lcid'); const mem = require('mem'); -const defaultOpts = {spawn: true}; +const defaultOptions = {spawn: true}; const defaultLocale = 'en_US'; -function getEnvLocale(env) { - env = env || process.env; +function getEnvLocale(env = process.env) { return env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE; } -function parseLocale(x) { - const env = x.split('\n').reduce((env, def) => { - def = def.split('='); - env[def[0]] = def[1].replace(/^"|"$/g, ''); +function parseLocale(string) { + const env = string.split('\n').reduce((env, def) => { + const [key, value] = def.split('='); + env[key] = value.replace(/^"|"$/g, ''); return env; }, {}); + return getEnvLocale(env); } -function getLocale(str) { - return (str && str.replace(/[.:].*/, '')); +function getLocale(string) { + return (string && string.replace(/[.:].*/, '')); +} + +function getLocales() { + return execa.stdout('locale', ['-a']); +} + +function getLocalesSync() { + return execa.sync('locale', ['-a']).stdout; +} + +function getSupportedLocale(locale, locales = '') { + return locales.includes(locale) ? locale : defaultLocale; } function getAppleLocale() { - return execa.stdout('defaults', ['read', '-g', 'AppleLocale']); + return Promise.all([ + execa.stdout('defaults', ['read', '-globalDomain', 'AppleLocale']), + getLocales() + ]).then(results => getSupportedLocale(results[0], results[1])); } function getAppleLocaleSync() { - return execa.sync('defaults', ['read', '-g', 'AppleLocale']).stdout; + return getSupportedLocale( + execa.sync('defaults', ['read', '-globalDomain', 'AppleLocale']).stdout, + getLocalesSync() + ); } function getUnixLocale() { @@ -58,17 +76,16 @@ function getWinLocale() { } function getWinLocaleSync() { - const stdout = execa.sync('wmic', ['os', 'get', 'locale']).stdout; + const {stdout} = execa.sync('wmic', ['os', 'get', 'locale']); const lcidCode = parseInt(stdout.replace('Locale', ''), 16); return lcid.from(lcidCode); } -module.exports = mem(opts => { - opts = opts || defaultOpts; +module.exports = mem((options = defaultOptions) => { const envLocale = getEnvLocale(); - let thenable; - if (envLocale || opts.spawn === false) { + let thenable; + if (envLocale || options.spawn === false) { thenable = Promise.resolve(getLocale(envLocale)); } else if (process.platform === 'win32') { thenable = getWinLocale(); @@ -76,25 +93,21 @@ module.exports = mem(opts => { thenable = getUnixLocale(); } - return thenable.then(locale => locale || defaultLocale) + return thenable + .then(locale => locale || defaultLocale) .catch(() => defaultLocale); }); -module.exports.sync = mem(opts => { - opts = opts || defaultOpts; +module.exports.sync = mem((options = defaultOptions) => { const envLocale = getEnvLocale(); - let res; - if (envLocale || opts.spawn === false) { + let res; + if (envLocale || options.spawn === false) { res = getLocale(envLocale); } else { try { - if (process.platform === 'win32') { - res = getWinLocaleSync(); - } else { - res = getUnixLocaleSync(); - } - } catch (err) {} + res = process.platform === 'win32' ? getWinLocaleSync() : getUnixLocaleSync(); + } catch (_) {} } return res || defaultLocale; diff --git a/node_modules/os-locale/license b/node_modules/os-locale/license index 654d0bfe94343..e7af2f77107d7 100644 --- a/node_modules/os-locale/license +++ b/node_modules/os-locale/license @@ -1,21 +1,9 @@ -The MIT License (MIT) +MIT License Copyright (c) Sindre Sorhus (sindresorhus.com) -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: +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: -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, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md b/node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md new file mode 100644 index 0000000000000..ded9620b18d25 --- /dev/null +++ b/node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md @@ -0,0 +1,100 @@ +# Change Log + +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. + + +## [6.0.5](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.4...v6.0.5) (2018-03-02) + + +### Bug Fixes + +* avoid using deprecated Buffer constructor ([#94](https://github.com/moxystudio/node-cross-spawn/issues/94)) ([d5770df](https://github.com/moxystudio/node-cross-spawn/commit/d5770df)), closes [/nodejs.org/api/deprecations.html#deprecations_dep0005](https://github.com//nodejs.org/api/deprecations.html/issues/deprecations_dep0005) + + + + +## [6.0.4](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.3...v6.0.4) (2018-01-31) + + +### Bug Fixes + +* fix paths being incorrectly normalized on unix ([06ee3c6](https://github.com/moxystudio/node-cross-spawn/commit/06ee3c6)), closes [#90](https://github.com/moxystudio/node-cross-spawn/issues/90) + + + + +## [6.0.3](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.2...v6.0.3) (2018-01-23) + + + + +## [6.0.2](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.1...v6.0.2) (2018-01-23) + + + + +## [6.0.1](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.0...v6.0.1) (2018-01-23) + + + + +# [6.0.0](https://github.com/moxystudio/node-cross-spawn/compare/5.1.0...6.0.0) (2018-01-23) + + +### Bug Fixes + +* fix certain arguments not being correctly escaped or causing batch syntax error ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)), closes [#82](https://github.com/moxystudio/node-cross-spawn/issues/82) [#51](https://github.com/moxystudio/node-cross-spawn/issues/51) +* fix commands as posix relatixe paths not working correctly, e.g.: `./my-command` ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) +* fix `options` argument being mutated ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) +* fix commands resolution when PATH was actually Path ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) + + +### Features + +* improve compliance with node's ENOENT errors ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) +* improve detection of node's shell option support ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) + + +### Chores + +* upgrade tooling +* upgrate project to es6 (node v4) + + +### BREAKING CHANGES + +* remove support for older nodejs versions, only `node >= 4` is supported + + + +## [5.1.0](https://github.com/moxystudio/node-cross-spawn/compare/5.0.1...5.1.0) (2017-02-26) + + +### Bug Fixes + +* fix `options.shell` support for NodeJS [v4.8](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V4.md#4.8.0) + + + +## [5.0.1](https://github.com/moxystudio/node-cross-spawn/compare/5.0.0...5.0.1) (2016-11-04) + + +### Bug Fixes + +* fix `options.shell` support for NodeJS v7 + + + +# [5.0.0](https://github.com/moxystudio/node-cross-spawn/compare/4.0.2...5.0.0) (2016-10-30) + + +## Features + +* add support for `options.shell` +* improve parsing of shebangs by using [`shebang-command`](https://github.com/kevva/shebang-command) module + + +## Chores + +* refactor some code to make it more clear +* update README caveats diff --git a/node_modules/os-locale/node_modules/cross-spawn/LICENSE b/node_modules/os-locale/node_modules/cross-spawn/LICENSE new file mode 100644 index 0000000000000..8407b9a30f51b --- /dev/null +++ b/node_modules/os-locale/node_modules/cross-spawn/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Made With MOXY Lda + +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: + +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, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/os-locale/node_modules/cross-spawn/README.md b/node_modules/os-locale/node_modules/cross-spawn/README.md new file mode 100644 index 0000000000000..e895cd7a77747 --- /dev/null +++ b/node_modules/os-locale/node_modules/cross-spawn/README.md @@ -0,0 +1,94 @@ +# 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] [![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/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 +[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. + + +## Installation + +`$ npm install cross-spawn` + + +## Why + +Node has issues when using spawn on Windows: + +- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318) +- 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 `` where `` 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 + +Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). diff --git a/node_modules/os-locale/node_modules/cross-spawn/index.js b/node_modules/os-locale/node_modules/cross-spawn/index.js new file mode 100644 index 0000000000000..5509742ca9fa8 --- /dev/null +++ b/node_modules/os-locale/node_modules/cross-spawn/index.js @@ -0,0 +1,39 @@ +'use strict'; + +const cp = require('child_process'); +const parse = require('./lib/parse'); +const enoent = require('./lib/enoent'); + +function spawn(command, args, options) { + // Parse the arguments + const parsed = parse(command, args, options); + + // Spawn the child process + 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 + enoent.hookChildProcess(spawned, parsed); + + return spawned; +} + +function spawnSync(command, args, options) { + // Parse the arguments + const parsed = parse(command, args, options); + + // Spawn the child process + const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); + + // 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; +} + +module.exports = spawn; +module.exports.spawn = spawn; +module.exports.sync = spawnSync; + +module.exports._parse = parse; +module.exports._enoent = enoent; diff --git a/node_modules/os-locale/node_modules/cross-spawn/lib/enoent.js b/node_modules/os-locale/node_modules/cross-spawn/lib/enoent.js new file mode 100644 index 0000000000000..14df9b623d0a2 --- /dev/null +++ b/node_modules/os-locale/node_modules/cross-spawn/lib/enoent.js @@ -0,0 +1,59 @@ +'use strict'; + +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) { + if (!isWin) { + return; + } + + 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 + if (name === 'exit') { + const err = verifyENOENT(arg1, parsed, 'spawn'); + + if (err) { + return originalEmit.call(cp, 'error', err); + } + } + + return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params + }; +} + +function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawn'); + } + + return null; +} + +function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawnSync'); + } + + return null; +} + +module.exports = { + hookChildProcess, + verifyENOENT, + verifyENOENTSync, + notFoundError, +}; diff --git a/node_modules/os-locale/node_modules/cross-spawn/lib/parse.js b/node_modules/os-locale/node_modules/cross-spawn/lib/parse.js new file mode 100644 index 0000000000000..962827a94e8c0 --- /dev/null +++ b/node_modules/os-locale/node_modules/cross-spawn/lib/parse.js @@ -0,0 +1,125 @@ +'use strict'; + +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'); + +const isWin = process.platform === 'win32'; +const isExecutableRegExp = /\.(?:com|exe)$/i; +const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; + +// `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; + +function detectShebang(parsed) { + parsed.file = resolveCommand(parsed); + + const shebang = parsed.file && readShebang(parsed.file); + + if (shebang) { + parsed.args.unshift(parsed.file); + parsed.command = shebang; + + return resolveCommand(parsed); + } + + return parsed.file; +} + +function parseNonShell(parsed) { + if (!isWin) { + return parsed; + } + + // Detect & add support for shebangs + const commandFile = detectShebang(parsed); + + // We don't need a shell if the command filename is an executable + const needsShell = !isExecutableRegExp.test(commandFile); + + // 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); + + // 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); + + // Escape command & arguments + parsed.command = escape.command(parsed.command); + parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); + + const shellCommand = [parsed.command].concat(parsed.args).join(' '); + + 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 + } + + return parsed; +} + +function parseShell(parsed) { + // If node supports the shell option, there's no need to mimic its behavior + if (supportsShellOption) { + return parsed; + } + + // 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) { + 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 { + parsed.command = '/bin/sh'; + } + + parsed.args = ['-c', shellCommand]; + } + + return parsed; +} + +function parse(command, args, options) { + // Normalize arguments, similar to nodejs + if (args && !Array.isArray(args)) { + options = args; + args = null; + } + + 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/os-locale/node_modules/cross-spawn/lib/util/escape.js b/node_modules/os-locale/node_modules/cross-spawn/lib/util/escape.js new file mode 100644 index 0000000000000..b0bb84c3a1409 --- /dev/null +++ b/node_modules/os-locale/node_modules/cross-spawn/lib/util/escape.js @@ -0,0 +1,45 @@ +'use strict'; + +// See http://www.robvanderwoude.com/escapechars.php +const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; + +function escapeCommand(arg) { + // Escape meta chars + arg = arg.replace(metaCharsRegExp, '^$1'); + + return arg; +} + +function escapeArgument(arg, doubleEscapeMetaChars) { + // Convert to string + arg = `${arg}`; + + // Algorithm below is based on https://qntm.org/cmd + + // Sequence of backslashes followed by a double quote: + // double up all the backslashes and escape the double quote + arg = arg.replace(/(\\*)"/g, '$1$1\\"'); + + // 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'); + + // All other backslashes occur literally + + // Quote the whole thing: + arg = `"${arg}"`; + + // Escape meta chars + arg = arg.replace(metaCharsRegExp, '^$1'); + + // Double escape meta chars if necessary + if (doubleEscapeMetaChars) { + arg = arg.replace(metaCharsRegExp, '^$1'); + } + + return arg; +} + +module.exports.command = escapeCommand; +module.exports.argument = escapeArgument; diff --git a/node_modules/os-locale/node_modules/cross-spawn/lib/util/readShebang.js b/node_modules/os-locale/node_modules/cross-spawn/lib/util/readShebang.js new file mode 100644 index 0000000000000..bd4f1280c9cad --- /dev/null +++ b/node_modules/os-locale/node_modules/cross-spawn/lib/util/readShebang.js @@ -0,0 +1,32 @@ +'use strict'; + +const fs = require('fs'); +const shebangCommand = require('shebang-command'); + +function readShebang(command) { + // Read the first 150 bytes from the file + const size = 150; + let buffer; + + if (Buffer.alloc) { + // Node.js v4.5+ / v5.10+ + buffer = Buffer.alloc(size); + } else { + // Old Node.js API + buffer = new Buffer(size); + buffer.fill(0); // zero-fill + } + + let fd; + + try { + fd = fs.openSync(command, 'r'); + fs.readSync(fd, buffer, 0, size, 0); + fs.closeSync(fd); + } catch (e) { /* Empty */ } + + // Attempt to extract shebang (null is returned if not a shebang) + return shebangCommand(buffer.toString()); +} + +module.exports = readShebang; diff --git a/node_modules/os-locale/node_modules/cross-spawn/lib/util/resolveCommand.js b/node_modules/os-locale/node_modules/cross-spawn/lib/util/resolveCommand.js new file mode 100644 index 0000000000000..2fd5ad2705607 --- /dev/null +++ b/node_modules/os-locale/node_modules/cross-spawn/lib/util/resolveCommand.js @@ -0,0 +1,47 @@ +'use strict'; + +const path = require('path'); +const which = require('which'); +const pathKey = require('path-key')(); + +function resolveCommandAttempt(parsed, withoutPathExt) { + const cwd = process.cwd(); + const hasCustomCwd = parsed.options.cwd != null; + + // If a custom `cwd` was specified, we need to change the process cwd + // because `which` will do stat calls but does not support a custom cwd + if (hasCustomCwd) { + try { + process.chdir(parsed.options.cwd); + } catch (err) { + /* Empty */ + } + } + + let resolved; + + try { + resolved = which.sync(parsed.command, { + path: (parsed.options.env || process.env)[pathKey], + pathExt: withoutPathExt ? path.delimiter : undefined, + }); + } catch (e) { + /* Empty */ + } finally { + process.chdir(cwd); + } + + // If we successfully resolved, ensure that an absolute path is returned + // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it + if (resolved) { + resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); + } + + return resolved; +} + +function resolveCommand(parsed) { + return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); +} + +module.exports = resolveCommand; diff --git a/node_modules/os-locale/node_modules/cross-spawn/package.json b/node_modules/os-locale/node_modules/cross-spawn/package.json new file mode 100644 index 0000000000000..3fdff9f498b27 --- /dev/null +++ b/node_modules/os-locale/node_modules/cross-spawn/package.json @@ -0,0 +1,107 @@ +{ + "_from": "cross-spawn@^6.0.0", + "_id": "cross-spawn@6.0.5", + "_inBundle": false, + "_integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "_location": "/os-locale/cross-spawn", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "cross-spawn@^6.0.0", + "name": "cross-spawn", + "escapedName": "cross-spawn", + "rawSpec": "^6.0.0", + "saveSpec": null, + "fetchSpec": "^6.0.0" + }, + "_requiredBy": [ + "/os-locale/execa" + ], + "_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "_shasum": "4a5ec7c64dfae22c3a14124dbacdee846d80cbc4", + "_spec": "cross-spawn@^6.0.0", + "_where": "/Users/mperrotte/npminc/cli/node_modules/os-locale/node_modules/execa", + "author": { + "name": "André Cruz", + "email": "andre@moxy.studio" + }, + "bugs": { + "url": "https://github.com/moxystudio/node-cross-spawn/issues" + }, + "bundleDependencies": false, + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "deprecated": false, + "description": "Cross platform child_process#spawn and child_process#spawnSync", + "devDependencies": { + "@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", + "regenerator-runtime": "^0.11.1", + "rimraf": "^2.6.2", + "standard-version": "^4.2.0" + }, + "engines": { + "node": ">=4.8" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/moxystudio/node-cross-spawn", + "keywords": [ + "spawn", + "spawnSync", + "windows", + "cross-platform", + "path-ext", + "shebang", + "cmd", + "execute" + ], + "license": "MIT", + "lint-staged": { + "*.js": [ + "eslint --fix", + "git add" + ] + }, + "main": "index.js", + "name": "cross-spawn", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/moxystudio/node-cross-spawn.git" + }, + "scripts": { + "commitmsg": "commitlint -e $GIT_PARAMS", + "lint": "eslint .", + "precommit": "lint-staged", + "prerelease": "npm t && npm run lint", + "release": "standard-version", + "test": "jest --env node --coverage" + }, + "standard-version": { + "scripts": { + "posttag": "git push --follow-tags origin master && npm publish" + } + }, + "version": "6.0.5" +} diff --git a/node_modules/os-locale/node_modules/execa/index.js b/node_modules/os-locale/node_modules/execa/index.js new file mode 100644 index 0000000000000..aad9ac88775cb --- /dev/null +++ b/node_modules/os-locale/node_modules/execa/index.js @@ -0,0 +1,361 @@ +'use strict'; +const path = require('path'); +const childProcess = require('child_process'); +const crossSpawn = require('cross-spawn'); +const stripEof = require('strip-eof'); +const npmRunPath = require('npm-run-path'); +const isStream = require('is-stream'); +const _getStream = require('get-stream'); +const pFinally = require('p-finally'); +const onExit = require('signal-exit'); +const errname = require('./lib/errname'); +const stdio = require('./lib/stdio'); + +const TEN_MEGABYTES = 1000 * 1000 * 10; + +function handleArgs(cmd, args, opts) { + let parsed; + + opts = Object.assign({ + extendEnv: true, + env: {} + }, opts); + + if (opts.extendEnv) { + opts.env = Object.assign({}, process.env, opts.env); + } + + if (opts.__winShell === true) { + delete opts.__winShell; + parsed = { + command: cmd, + args, + options: opts, + file: cmd, + original: { + cmd, + args + } + }; + } else { + parsed = crossSpawn._parse(cmd, args, opts); + } + + opts = Object.assign({ + maxBuffer: TEN_MEGABYTES, + buffer: true, + stripEof: true, + preferLocal: true, + localDir: parsed.options.cwd || process.cwd(), + encoding: 'utf8', + reject: true, + cleanup: true + }, parsed.options); + + opts.stdio = stdio(opts); + + if (opts.preferLocal) { + opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir})); + } + + if (opts.detached) { + // #115 + opts.cleanup = false; + } + + if (process.platform === 'win32' && path.basename(parsed.command) === 'cmd.exe') { + // #116 + parsed.args.unshift('/q'); + } + + return { + cmd: parsed.command, + args: parsed.args, + opts, + parsed + }; +} + +function handleInput(spawned, input) { + if (input === null || input === undefined) { + return; + } + + if (isStream(input)) { + input.pipe(spawned.stdin); + } else { + spawned.stdin.end(input); + } +} + +function handleOutput(opts, val) { + if (val && opts.stripEof) { + val = stripEof(val); + } + + return val; +} + +function handleShell(fn, cmd, opts) { + let file = '/bin/sh'; + let args = ['-c', cmd]; + + opts = Object.assign({}, opts); + + if (process.platform === 'win32') { + opts.__winShell = true; + file = process.env.comspec || 'cmd.exe'; + args = ['/s', '/c', `"${cmd}"`]; + opts.windowsVerbatimArguments = true; + } + + if (opts.shell) { + file = opts.shell; + delete opts.shell; + } + + return fn(file, args, opts); +} + +function getStream(process, stream, {encoding, buffer, maxBuffer}) { + if (!process[stream]) { + return null; + } + + let ret; + + if (!buffer) { + // TODO: Use `ret = util.promisify(stream.finished)(process[stream]);` when targeting Node.js 10 + ret = new Promise((resolve, reject) => { + process[stream] + .once('end', resolve) + .once('error', reject); + }); + } else if (encoding) { + ret = _getStream(process[stream], { + encoding, + maxBuffer + }); + } else { + ret = _getStream.buffer(process[stream], {maxBuffer}); + } + + return ret.catch(err => { + err.stream = stream; + err.message = `${stream} ${err.message}`; + throw err; + }); +} + +function makeError(result, options) { + const {stdout, stderr} = result; + + let err = result.error; + const {code, signal} = result; + + const {parsed, joinedCmd} = options; + const timedOut = options.timedOut || false; + + if (!err) { + let output = ''; + + if (Array.isArray(parsed.opts.stdio)) { + if (parsed.opts.stdio[2] !== 'inherit') { + output += output.length > 0 ? stderr : `\n${stderr}`; + } + + if (parsed.opts.stdio[1] !== 'inherit') { + output += `\n${stdout}`; + } + } else if (parsed.opts.stdio !== 'inherit') { + output = `\n${stderr}${stdout}`; + } + + err = new Error(`Command failed: ${joinedCmd}${output}`); + err.code = code < 0 ? errname(code) : code; + } + + err.stdout = stdout; + err.stderr = stderr; + err.failed = true; + err.signal = signal || null; + err.cmd = joinedCmd; + err.timedOut = timedOut; + + return err; +} + +function joinCmd(cmd, args) { + let joinedCmd = cmd; + + if (Array.isArray(args) && args.length > 0) { + joinedCmd += ' ' + args.join(' '); + } + + return joinedCmd; +} + +module.exports = (cmd, args, opts) => { + const parsed = handleArgs(cmd, args, opts); + const {encoding, buffer, maxBuffer} = parsed.opts; + const joinedCmd = joinCmd(cmd, args); + + let spawned; + try { + spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts); + } catch (err) { + return Promise.reject(err); + } + + let removeExitHandler; + if (parsed.opts.cleanup) { + removeExitHandler = onExit(() => { + spawned.kill(); + }); + } + + let timeoutId = null; + let timedOut = false; + + const cleanup = () => { + if (timeoutId) { + clearTimeout(timeoutId); + timeoutId = null; + } + + if (removeExitHandler) { + removeExitHandler(); + } + }; + + if (parsed.opts.timeout > 0) { + timeoutId = setTimeout(() => { + timeoutId = null; + timedOut = true; + spawned.kill(parsed.opts.killSignal); + }, parsed.opts.timeout); + } + + const processDone = new Promise(resolve => { + spawned.on('exit', (code, signal) => { + cleanup(); + resolve({code, signal}); + }); + + spawned.on('error', err => { + cleanup(); + resolve({error: err}); + }); + + if (spawned.stdin) { + spawned.stdin.on('error', err => { + cleanup(); + resolve({error: err}); + }); + } + }); + + function destroy() { + if (spawned.stdout) { + spawned.stdout.destroy(); + } + + if (spawned.stderr) { + spawned.stderr.destroy(); + } + } + + const handlePromise = () => pFinally(Promise.all([ + processDone, + getStream(spawned, 'stdout', {encoding, buffer, maxBuffer}), + getStream(spawned, 'stderr', {encoding, buffer, maxBuffer}) + ]).then(arr => { + const result = arr[0]; + result.stdout = arr[1]; + result.stderr = arr[2]; + + if (result.error || result.code !== 0 || result.signal !== null) { + const err = makeError(result, { + joinedCmd, + parsed, + timedOut + }); + + // TODO: missing some timeout logic for killed + // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203 + // err.killed = spawned.killed || killed; + err.killed = err.killed || spawned.killed; + + if (!parsed.opts.reject) { + return err; + } + + throw err; + } + + return { + stdout: handleOutput(parsed.opts, result.stdout), + stderr: handleOutput(parsed.opts, result.stderr), + code: 0, + failed: false, + killed: false, + signal: null, + cmd: joinedCmd, + timedOut: false + }; + }), destroy); + + crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed); + + handleInput(spawned, parsed.opts.input); + + spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected); + spawned.catch = onrejected => handlePromise().catch(onrejected); + + return spawned; +}; + +// TODO: set `stderr: 'ignore'` when that option is implemented +module.exports.stdout = (...args) => module.exports(...args).then(x => x.stdout); + +// TODO: set `stdout: 'ignore'` when that option is implemented +module.exports.stderr = (...args) => module.exports(...args).then(x => x.stderr); + +module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts); + +module.exports.sync = (cmd, args, opts) => { + const parsed = handleArgs(cmd, args, opts); + const joinedCmd = joinCmd(cmd, args); + + if (isStream(parsed.opts.input)) { + throw new TypeError('The `input` option cannot be a stream in sync mode'); + } + + const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts); + result.code = result.status; + + if (result.error || result.status !== 0 || result.signal !== null) { + const err = makeError(result, { + joinedCmd, + parsed + }); + + if (!parsed.opts.reject) { + return err; + } + + throw err; + } + + return { + stdout: handleOutput(parsed.opts, result.stdout), + stderr: handleOutput(parsed.opts, result.stderr), + code: 0, + failed: false, + signal: null, + cmd: joinedCmd, + timedOut: false + }; +}; + +module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts); diff --git a/node_modules/os-locale/node_modules/execa/lib/errname.js b/node_modules/os-locale/node_modules/execa/lib/errname.js new file mode 100644 index 0000000000000..e367837b28cb9 --- /dev/null +++ b/node_modules/os-locale/node_modules/execa/lib/errname.js @@ -0,0 +1,39 @@ +'use strict'; +// Older verions of Node.js might not have `util.getSystemErrorName()`. +// In that case, fall back to a deprecated internal. +const util = require('util'); + +let uv; + +if (typeof util.getSystemErrorName === 'function') { + module.exports = util.getSystemErrorName; +} else { + try { + uv = process.binding('uv'); + + if (typeof uv.errname !== 'function') { + throw new TypeError('uv.errname is not a function'); + } + } catch (err) { + console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err); + uv = null; + } + + module.exports = code => errname(uv, code); +} + +// Used for testing the fallback behavior +module.exports.__test__ = errname; + +function errname(uv, code) { + if (uv) { + return uv.errname(code); + } + + if (!(code < 0)) { + throw new Error('err >= 0'); + } + + return `Unknown system error ${code}`; +} + diff --git a/node_modules/os-locale/node_modules/execa/lib/stdio.js b/node_modules/os-locale/node_modules/execa/lib/stdio.js new file mode 100644 index 0000000000000..a82d46838ac9b --- /dev/null +++ b/node_modules/os-locale/node_modules/execa/lib/stdio.js @@ -0,0 +1,41 @@ +'use strict'; +const alias = ['stdin', 'stdout', 'stderr']; + +const hasAlias = opts => alias.some(x => Boolean(opts[x])); + +module.exports = opts => { + if (!opts) { + return null; + } + + if (opts.stdio && hasAlias(opts)) { + throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`); + } + + if (typeof opts.stdio === 'string') { + return opts.stdio; + } + + const stdio = opts.stdio || []; + + if (!Array.isArray(stdio)) { + throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); + } + + const result = []; + const len = Math.max(stdio.length, alias.length); + + for (let i = 0; i < len; i++) { + let value = null; + + if (stdio[i] !== undefined) { + value = stdio[i]; + } else if (opts[alias[i]] !== undefined) { + value = opts[alias[i]]; + } + + result[i] = value; + } + + return result; +}; diff --git a/node_modules/os-locale/node_modules/execa/license b/node_modules/os-locale/node_modules/execa/license new file mode 100644 index 0000000000000..e7af2f77107d7 --- /dev/null +++ b/node_modules/os-locale/node_modules/execa/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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: + +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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/os-locale/node_modules/execa/package.json b/node_modules/os-locale/node_modules/execa/package.json new file mode 100644 index 0000000000000..7ab0a5777c7cd --- /dev/null +++ b/node_modules/os-locale/node_modules/execa/package.json @@ -0,0 +1,101 @@ +{ + "_from": "execa@^1.0.0", + "_id": "execa@1.0.0", + "_inBundle": false, + "_integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "_location": "/os-locale/execa", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "execa@^1.0.0", + "name": "execa", + "escapedName": "execa", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/os-locale" + ], + "_resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "_shasum": "c6236a5bb4df6d6f15e88e7f017798216749ddd8", + "_spec": "execa@^1.0.0", + "_where": "/Users/mperrotte/npminc/cli/node_modules/os-locale", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/execa/issues" + }, + "bundleDependencies": false, + "dependencies": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "deprecated": false, + "description": "A better `child_process`", + "devDependencies": { + "ava": "*", + "cat-names": "^1.0.2", + "coveralls": "^3.0.1", + "delay": "^3.0.0", + "is-running": "^2.0.0", + "nyc": "^13.0.1", + "tempfile": "^2.0.0", + "xo": "*" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "lib" + ], + "homepage": "https://github.com/sindresorhus/execa#readme", + "keywords": [ + "exec", + "child", + "process", + "execute", + "fork", + "execfile", + "spawn", + "file", + "shell", + "bin", + "binary", + "binaries", + "npm", + "path", + "local" + ], + "license": "MIT", + "name": "execa", + "nyc": { + "reporter": [ + "text", + "lcov" + ], + "exclude": [ + "**/fixtures/**", + "**/test.js", + "**/test/**" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/execa.git" + }, + "scripts": { + "test": "xo && nyc ava" + }, + "version": "1.0.0" +} diff --git a/node_modules/os-locale/node_modules/execa/readme.md b/node_modules/os-locale/node_modules/execa/readme.md new file mode 100644 index 0000000000000..f3f533d92915e --- /dev/null +++ b/node_modules/os-locale/node_modules/execa/readme.md @@ -0,0 +1,327 @@ +# execa [![Build Status: Linux](https://travis-ci.org/sindresorhus/execa.svg?branch=master)](https://travis-ci.org/sindresorhus/execa) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/x5ajamxtjtt93cqv/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/execa/branch/master) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/execa/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/execa?branch=master) + +> A better [`child_process`](https://nodejs.org/api/child_process.html) + + +## Why + +- Promise interface. +- [Strips EOF](https://github.com/sindresorhus/strip-eof) from the output so you don't have to `stdout.trim()`. +- Supports [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) binaries cross-platform. +- [Improved Windows support.](https://github.com/IndigoUnited/node-cross-spawn#why) +- Higher max buffer. 10 MB instead of 200 KB. +- [Executes locally installed binaries by name.](#preferlocal) +- [Cleans up spawned processes when the parent process dies.](#cleanup) + + +## Install + +``` +$ npm install execa +``` + + + + + + +## Usage + +```js +const execa = require('execa'); + +(async () => { + const {stdout} = await execa('echo', ['unicorns']); + console.log(stdout); + //=> 'unicorns' +})(); +``` + +Additional examples: + +```js +const execa = require('execa'); + +(async () => { + // Pipe the child process stdout to the current stdout + execa('echo', ['unicorns']).stdout.pipe(process.stdout); + + + // Run a shell command + const {stdout} = await execa.shell('echo unicorns'); + //=> 'unicorns' + + + // Catching an error + try { + await execa.shell('exit 3'); + } catch (error) { + console.log(error); + /* + { + message: 'Command failed: /bin/sh -c exit 3' + killed: false, + code: 3, + signal: null, + cmd: '/bin/sh -c exit 3', + stdout: '', + stderr: '', + timedOut: false + } + */ + } +})(); + +// Catching an error with a sync method +try { + execa.shellSync('exit 3'); +} catch (error) { + console.log(error); + /* + { + message: 'Command failed: /bin/sh -c exit 3' + code: 3, + signal: null, + cmd: '/bin/sh -c exit 3', + stdout: '', + stderr: '', + timedOut: false + } + */ +} +``` + + +## API + +### execa(file, [arguments], [options]) + +Execute a file. + +Think of this as a mix of `child_process.execFile` and `child_process.spawn`. + +Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties. + +### execa.stdout(file, [arguments], [options]) + +Same as `execa()`, but returns only `stdout`. + +### execa.stderr(file, [arguments], [options]) + +Same as `execa()`, but returns only `stderr`. + +### execa.shell(command, [options]) + +Execute a command through the system shell. Prefer `execa()` whenever possible, as it's both faster and safer. + +Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess). + +The `child_process` instance is enhanced to also be promise for a result object with `stdout` and `stderr` properties. + +### execa.sync(file, [arguments], [options]) + +Execute a file synchronously. + +Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). + +This method throws an `Error` if the command fails. + +### execa.shellSync(file, [options]) + +Execute a command synchronously through the system shell. + +Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). + +### options + +Type: `Object` + +#### cwd + +Type: `string`
+Default: `process.cwd()` + +Current working directory of the child process. + +#### env + +Type: `Object`
+Default: `process.env` + +Environment key-value pairs. Extends automatically from `process.env`. Set `extendEnv` to `false` if you don't want this. + +#### extendEnv + +Type: `boolean`
+Default: `true` + +Set to `false` if you don't want to extend the environment variables when providing the `env` property. + +#### argv0 + +Type: `string` + +Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` or `file` if not specified. + +#### stdio + +Type: `string[]` `string`
+Default: `pipe` + +Child's [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio) configuration. + +#### detached + +Type: `boolean` + +Prepare child to run independently of its parent process. Specific behavior [depends on the platform](https://nodejs.org/api/child_process.html#child_process_options_detached). + +#### uid + +Type: `number` + +Sets the user identity of the process. + +#### gid + +Type: `number` + +Sets the group identity of the process. + +#### shell + +Type: `boolean` `string`
+Default: `false` + +If `true`, runs `command` inside of a shell. Uses `/bin/sh` on UNIX and `cmd.exe` on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows. + +#### stripEof + +Type: `boolean`
+Default: `true` + +[Strip EOF](https://github.com/sindresorhus/strip-eof) (last newline) from the output. + +#### preferLocal + +Type: `boolean`
+Default: `true` + +Prefer locally installed binaries when looking for a binary to execute.
+If you `$ npm install foo`, you can then `execa('foo')`. + +#### localDir + +Type: `string`
+Default: `process.cwd()` + +Preferred path to find locally installed binaries in (use with `preferLocal`). + +#### input + +Type: `string` `Buffer` `stream.Readable` + +Write some input to the `stdin` of your binary.
+Streams are not allowed when using the synchronous methods. + +#### reject + +Type: `boolean`
+Default: `true` + +Setting this to `false` resolves the promise with the error instead of rejecting it. + +#### cleanup + +Type: `boolean`
+Default: `true` + +Keep track of the spawned process and `kill` it when the parent process exits. + +#### encoding + +Type: `string`
+Default: `utf8` + +Specify the character encoding used to decode the `stdout` and `stderr` output. + +#### timeout + +Type: `number`
+Default: `0` + +If timeout is greater than `0`, the parent will send the signal identified by the `killSignal` property (the default is `SIGTERM`) if the child runs longer than timeout milliseconds. + +#### buffer + +Type: `boolean`
+Default: `true` + +Buffer the output from the spawned process. When buffering is disabled you must consume the output of the `stdout` and `stderr` streams because the promise will not be resolved/rejected until they have completed. + +#### maxBuffer + +Type: `number`
+Default: `10000000` (10MB) + +Largest amount of data in bytes allowed on `stdout` or `stderr`. + +#### killSignal + +Type: `string` `number`
+Default: `SIGTERM` + +Signal value to be used when the spawned process will be killed. + +#### stdin + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### stdout + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### stderr + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### windowsVerbatimArguments + +Type: `boolean`
+Default: `false` + +If `true`, no quoting or escaping of arguments is done on Windows. Ignored on other platforms. This is set to `true` automatically when the `shell` option is `true`. + + +## Tips + +### Save and pipe output from a child process + +Let's say you want to show the output of a child process in real-time while also saving it to a variable. + +```js +const execa = require('execa'); +const getStream = require('get-stream'); + +const stream = execa('echo', ['foo']).stdout; + +stream.pipe(process.stdout); + +getStream(stream).then(value => { + console.log('child output:', value); +}); +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/os-locale/package.json b/node_modules/os-locale/package.json index 3777aec6a3951..fb6646ec9974b 100644 --- a/node_modules/os-locale/package.json +++ b/node_modules/os-locale/package.json @@ -1,27 +1,39 @@ { - "_from": "os-locale@^2.0.0", - "_id": "os-locale@2.1.0", + "_from": "os-locale@^3.1.0", + "_id": "os-locale@3.1.0", "_inBundle": false, - "_integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "_integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", "_location": "/os-locale", - "_phantomChildren": {}, + "_phantomChildren": { + "get-stream": "4.1.0", + "is-stream": "1.1.0", + "nice-try": "1.0.5", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "path-key": "2.0.1", + "semver": "5.7.1", + "shebang-command": "1.2.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0", + "which": "1.3.1" + }, "_requested": { "type": "range", "registry": true, - "raw": "os-locale@^2.0.0", + "raw": "os-locale@^3.1.0", "name": "os-locale", "escapedName": "os-locale", - "rawSpec": "^2.0.0", + "rawSpec": "^3.1.0", "saveSpec": null, - "fetchSpec": "^2.0.0" + "fetchSpec": "^3.1.0" }, "_requiredBy": [ "/yargs" ], - "_resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "_shasum": "42bc2900a6b5b8bd17376c8e882b65afccf24bf2", - "_spec": "os-locale@^2.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/yargs", + "_resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "_shasum": "a802a6ee17f24c10483ab9935719cef4ed16bf1a", + "_spec": "os-locale@^3.1.0", + "_where": "/Users/mperrotte/npminc/cli/node_modules/yargs", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -32,19 +44,19 @@ }, "bundleDependencies": false, "dependencies": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" }, "deprecated": false, "description": "Get the system locale", "devDependencies": { - "ava": "*", - "import-fresh": "^2.0.0", - "xo": "*" + "ava": "^1.0.1", + "import-fresh": "^3.0.0", + "xo": "^0.23.0" }, "engines": { - "node": ">=4" + "node": ">=6" }, "files": [ "index.js" @@ -73,5 +85,5 @@ "scripts": { "test": "xo && ava" }, - "version": "2.1.0" + "version": "3.1.0" } diff --git a/node_modules/os-locale/readme.md b/node_modules/os-locale/readme.md index 7c80d33589e4b..8f9c280eedb85 100644 --- a/node_modules/os-locale/readme.md +++ b/node_modules/os-locale/readme.md @@ -6,11 +6,24 @@ Useful for localizing your module or app. POSIX systems: The returned locale refers to the [`LC_MESSAGE`](http://www.gnu.org/software/libc/manual/html_node/Locale-Categories.html#Locale-Categories) category, suitable for selecting the language used in the user interface for message translation. +--- + +
+ + Get professional support for 'os-locale' with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
+ +--- ## Install ``` -$ npm install --save os-locale +$ npm install os-locale ``` @@ -19,10 +32,10 @@ $ npm install --save os-locale ```js const osLocale = require('os-locale'); -osLocale().then(locale => { - console.log(locale); +(async () => { + console.log(await osLocale()); //=> 'en_US' -}); +})(); ``` @@ -48,6 +61,11 @@ Default: `true` Set to `false` to avoid spawning subprocesses and instead only resolve the locale from environment variables. +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + ## License MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/p-defer/index.js b/node_modules/p-defer/index.js new file mode 100644 index 0000000000000..eaef75e4e5f72 --- /dev/null +++ b/node_modules/p-defer/index.js @@ -0,0 +1,11 @@ +'use strict'; +module.exports = () => { + const ret = {}; + + ret.promise = new Promise((resolve, reject) => { + ret.resolve = resolve; + ret.reject = reject; + }); + + return ret; +}; diff --git a/node_modules/p-defer/license b/node_modules/p-defer/license new file mode 100644 index 0000000000000..654d0bfe94343 --- /dev/null +++ b/node_modules/p-defer/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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: + +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, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/p-defer/package.json b/node_modules/p-defer/package.json new file mode 100644 index 0000000000000..ee706cd930858 --- /dev/null +++ b/node_modules/p-defer/package.json @@ -0,0 +1,77 @@ +{ + "_args": [ + [ + "p-defer@1.0.0", + "/Users/mperrotte/npminc/cli" + ] + ], + "_development": true, + "_from": "p-defer@1.0.0", + "_id": "p-defer@1.0.0", + "_inBundle": false, + "_integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "_location": "/p-defer", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-defer@1.0.0", + "name": "p-defer", + "escapedName": "p-defer", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/map-age-cleaner" + ], + "_resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "_spec": "1.0.0", + "_where": "/Users/mperrotte/npminc/cli", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/p-defer/issues" + }, + "description": "Create a deferred promise", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/p-defer#readme", + "keywords": [ + "promise", + "defer", + "deferred", + "resolve", + "reject", + "lazy", + "later", + "async", + "await", + "promises", + "bluebird" + ], + "license": "MIT", + "name": "p-defer", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-defer.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/p-defer/readme.md b/node_modules/p-defer/readme.md new file mode 100644 index 0000000000000..b94f137129d9d --- /dev/null +++ b/node_modules/p-defer/readme.md @@ -0,0 +1,47 @@ +# p-defer [![Build Status](https://travis-ci.org/sindresorhus/p-defer.svg?branch=master)](https://travis-ci.org/sindresorhus/p-defer) + +> Create a deferred promise + +[**Don't use this unless you know what you're doing!**](https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns#the-deferred-anti-pattern) Prefer the `Promise` constructor. + + +## Install + +``` +$ npm install --save p-defer +``` + + +## Usage + +```js +const pDefer = require('p-defer'); + +function delay(ms) { + const deferred = pDefer(); + setTimeout(deferred.resolve, ms, '🦄'); + return deferred.promise; +} + +delay(100).then(console.log); +//=> '🦄' +``` + +*The above is just an example. Use [`delay`](https://github.com/sindresorhus/delay) if you need to delay a promise.* + + +## API + +### pDefer() + +Returns an `Object` with a `promise` property and functions to `resolve()` and `reject()`. + + +## Related + +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/p-is-promise/index.d.ts b/node_modules/p-is-promise/index.d.ts new file mode 100644 index 0000000000000..662d9e0c420f6 --- /dev/null +++ b/node_modules/p-is-promise/index.d.ts @@ -0,0 +1,23 @@ +declare const pIsPromise: { + /** + Check if `input` is a ES2015 promise. + + @param input - Value to be checked. + + @example + ``` + import isPromise = require('p-is-promise'); + + isPromise(Promise.resolve('🦄')); + //=> true + ``` + */ + (input: unknown): input is Promise; + + // TODO: Remove this for the next major release, refactor the whole definition to: + // declare function pIsPromise(input: unknown): input is Promise; + // export = pIsPromise; + default: typeof pIsPromise; +}; + +export = pIsPromise; diff --git a/node_modules/p-is-promise/index.js b/node_modules/p-is-promise/index.js new file mode 100644 index 0000000000000..389d38fc55f6f --- /dev/null +++ b/node_modules/p-is-promise/index.js @@ -0,0 +1,15 @@ +'use strict'; + +const isPromise = input => ( + input instanceof Promise || + ( + input !== null && + typeof input === 'object' && + typeof input.then === 'function' && + typeof input.catch === 'function' + ) +); + +module.exports = isPromise; +// TODO: Remove this for the next major release +module.exports.default = isPromise; diff --git a/node_modules/p-is-promise/license b/node_modules/p-is-promise/license new file mode 100644 index 0000000000000..e7af2f77107d7 --- /dev/null +++ b/node_modules/p-is-promise/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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: + +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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/p-is-promise/package.json b/node_modules/p-is-promise/package.json new file mode 100644 index 0000000000000..3315effdfb15d --- /dev/null +++ b/node_modules/p-is-promise/package.json @@ -0,0 +1,78 @@ +{ + "_args": [ + [ + "p-is-promise@2.1.0", + "/Users/mperrotte/npminc/cli" + ] + ], + "_development": true, + "_from": "p-is-promise@2.1.0", + "_id": "p-is-promise@2.1.0", + "_inBundle": false, + "_integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "_location": "/p-is-promise", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "p-is-promise@2.1.0", + "name": "p-is-promise", + "escapedName": "p-is-promise", + "rawSpec": "2.1.0", + "saveSpec": null, + "fetchSpec": "2.1.0" + }, + "_requiredBy": [ + "/nyc/mem" + ], + "_resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "_spec": "2.1.0", + "_where": "/Users/mperrotte/npminc/cli", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/p-is-promise/issues" + }, + "description": "Check if something is a promise", + "devDependencies": { + "ava": "^1.4.1", + "bluebird": "^3.5.4", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/sindresorhus/p-is-promise#readme", + "keywords": [ + "promise", + "is", + "detect", + "check", + "kind", + "type", + "thenable", + "es2015", + "async", + "await", + "promises", + "bluebird" + ], + "license": "MIT", + "name": "p-is-promise", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-is-promise.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.1.0" +} diff --git a/node_modules/p-is-promise/readme.md b/node_modules/p-is-promise/readme.md new file mode 100644 index 0000000000000..0e0e48171a919 --- /dev/null +++ b/node_modules/p-is-promise/readme.md @@ -0,0 +1,43 @@ +# p-is-promise [![Build Status](https://travis-ci.org/sindresorhus/p-is-promise.svg?branch=master)](https://travis-ci.org/sindresorhus/p-is-promise) + +> Check if something is a promise + +Why not [`is-promise`](https://github.com/then/is-promise)? That module [checks for a thenable](https://github.com/then/is-promise/issues/6), not an ES2015 promise. This one is stricter. + +You most likely don't need this. Just pass your value to `Promise.resolve()` and let it handle it. + +Can be useful if you need to create a fast path for a synchronous operation. + + +## Install + +``` +$ npm install p-is-promise +``` + + +## Usage + +```js +const pIsPromise = require('p-is-promise'); +const Bluebird = require('bluebird'); + +pIsPromise(Promise.resolve('🦄')); +//=> true + +pIsPromise(Bluebird.resolve('🦄')); +//=> true + +pIsPromise('🦄'); +//=> false +``` + + +## Related + +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs/CHANGELOG.md b/node_modules/yargs/CHANGELOG.md index 0eaf2f33edddb..2cccca04c4113 100644 --- a/node_modules/yargs/CHANGELOG.md +++ b/node_modules/yargs/CHANGELOG.md @@ -2,6 +2,25 @@ 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. + +# [11.1.1](https://github.com/yargs/yargs/compare/v11.1.0...v11.1.1) (2019-10-06) + +* backport security fix for os-locale. + + +# [11.1.0](https://github.com/yargs/yargs/compare/v11.0.0...v11.1.0) (2018-03-04) + + +### Bug Fixes + +* choose correct config directory when require.main does not exist ([#1056](https://github.com/yargs/yargs/issues/1056)) ([a04678c](https://github.com/yargs/yargs/commit/a04678c)) + + +### Features + +* allow hidden options to be displayed with --show-hidden ([#1061](https://github.com/yargs/yargs/issues/1061)) ([ea862ae](https://github.com/yargs/yargs/commit/ea862ae)) +* extend *.rc files in addition to json ([#1080](https://github.com/yargs/yargs/issues/1080)) ([11691a6](https://github.com/yargs/yargs/commit/11691a6)) + # [11.0.0](https://github.com/yargs/yargs/compare/v10.1.2...v11.0.0) (2018-01-22) diff --git a/node_modules/yargs/lib/apply-extends.js b/node_modules/yargs/lib/apply-extends.js index 3005848e3cdb7..530b022ac57b5 100644 --- a/node_modules/yargs/lib/apply-extends.js +++ b/node_modules/yargs/lib/apply-extends.js @@ -6,9 +6,9 @@ const YError = require('./yerror') let previouslyVisitedConfigs = [] -function checkForCircularExtends (path) { - if (previouslyVisitedConfigs.indexOf(path) > -1) { - throw new YError(`Circular extended configurations: '${path}'.`) +function checkForCircularExtends (cfgPath) { + if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) { + throw new YError(`Circular extended configurations: '${cfgPath}'.`) } } diff --git a/node_modules/yargs/package.json b/node_modules/yargs/package.json index 1fe51fedd4392..fd0a1265c23dd 100644 --- a/node_modules/yargs/package.json +++ b/node_modules/yargs/package.json @@ -1,8 +1,8 @@ { "_from": "yargs@^11.0.0", - "_id": "yargs@11.0.0", + "_id": "yargs@11.1.1", "_inBundle": false, - "_integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", + "_integrity": "sha512-PRU7gJrJaXv3q3yQZ/+/X6KBswZiaQ+zOmdprZcouPYtQgvNU35i+68M4b1ZHLZtYFT5QObFLV+ZkmJYcwKdiw==", "_location": "/yargs", "_phantomChildren": {}, "_requested": { @@ -18,10 +18,10 @@ "_requiredBy": [ "/libnpx" ], - "_resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", - "_shasum": "c052931006c5eee74610e5fc0354bedfd08a201b", + "_resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.1.tgz", + "_shasum": "5052efe3446a4df5ed669c995886cc0f13702766", "_spec": "yargs@^11.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/libnpx", + "_where": "/Users/mperrotte/npminc/cli/node_modules/libnpx", "bugs": { "url": "https://github.com/yargs/yargs/issues" }, @@ -31,7 +31,7 @@ "decamelize": "^1.1.1", "find-up": "^2.1.0", "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", + "os-locale": "^3.1.0", "require-directory": "^2.1.1", "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", @@ -47,7 +47,7 @@ "chalk": "^1.1.3", "coveralls": "^2.11.11", "cpr": "^2.0.0", - "cross-spawn": "^5.0.1", + "cross-spawn": "^6.0.4", "es6-promise": "^4.0.2", "hashish": "0.0.4", "mocha": "^3.0.1", @@ -97,5 +97,5 @@ "**/example/**" ] }, - "version": "11.0.0" + "version": "11.1.1" } diff --git a/node_modules/yargs/yargs.js b/node_modules/yargs/yargs.js index 9b50b8bfeb0a4..38f1b2ea6e67f 100644 --- a/node_modules/yargs/yargs.js +++ b/node_modules/yargs/yargs.js @@ -476,17 +476,17 @@ function Yargs (processArgs, cwd, parentRequire) { return self } - self.pkgConf = function pkgConf (key, path) { - argsert(' [string]', [key, path], arguments.length) + self.pkgConf = function pkgConf (key, rootPath) { + argsert(' [string]', [key, rootPath], arguments.length) let conf = null // prefer cwd to require-main-filename in this method // since we're looking for e.g. "nyc" config in nyc consumer // rather than "yargs" config in nyc (where nyc is the main filename) - const obj = pkgUp(path || cwd) + const obj = pkgUp(rootPath || cwd) // If an object exists in the key, add it to options.configObjects if (obj[key] && typeof obj[key] === 'object') { - conf = applyExtends(obj[key], path || cwd) + conf = applyExtends(obj[key], rootPath || cwd) options.configObjects = (options.configObjects || []).concat(conf) } @@ -494,16 +494,24 @@ function Yargs (processArgs, cwd, parentRequire) { } const pkgs = {} - function pkgUp (path) { - const npath = path || '*' + function pkgUp (rootPath) { + const npath = rootPath || '*' if (pkgs[npath]) return pkgs[npath] const findUp = require('find-up') let obj = {} try { + let startDir = rootPath || require('require-main-filename')(parentRequire || require) + + // When called in an environment that lacks require.main.filename, such as a jest test runner, + // startDir is already process.cwd(), and should not be shortened. + // Whether or not it is _actually_ a directory (e.g., extensionless bin) is irrelevant, find-up handles it. + if (!rootPath && path.extname(startDir)) { + startDir = path.dirname(startDir) + } + const pkgJsonPath = findUp.sync('package.json', { - cwd: path || require('path').dirname(require('require-main-filename')(parentRequire || require)), - normalize: false + cwd: startDir }) obj = JSON.parse(fs.readFileSync(pkgJsonPath)) } catch (noop) {} diff --git a/package-lock.json b/package-lock.json index c31e6376ec2e6..a70959141ca06 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2281,9 +2281,9 @@ } }, "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" }, "get-stdin": { "version": "6.0.0", @@ -2659,9 +2659,9 @@ } }, "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" }, "ip": { "version": "1.1.5", @@ -3046,11 +3046,11 @@ "integrity": "sha1-hN3Es3Bnm6i9TNz6TAa0PVcREUc=" }, "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "^2.0.0" } }, "lcov-parse": { @@ -3239,9 +3239,9 @@ } }, "libnpx": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/libnpx/-/libnpx-10.2.0.tgz", - "integrity": "sha512-X28coei8/XRCt15cYStbLBph+KGhFra4VQhRBPuH/HHMkC5dxM8v24RVgUsvODKCrUZ0eTgiTqJp6zbl0sskQQ==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/libnpx/-/libnpx-10.2.2.tgz", + "integrity": "sha512-ujaYToga1SAX5r7FU5ShMFi88CWpY75meNZtr6RtEyv4l2ZK3+Wgvxq2IqlwWBiDZOqhumdeiocPS1aKrCMe3A==", "requires": { "dotenv": "^5.0.1", "npm-package-arg": "^6.0.0", @@ -3478,7 +3478,6 @@ "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, "requires": { "p-defer": "^1.0.0" } @@ -3501,11 +3500,20 @@ "integrity": "sha512-UakVLFjKkbbUwNWJ2frVLnnAtbb7D7DsloxRd3s/gDpI8rdv8W5Hp3NaDb+POBI1fQdeussER6NB8vpcRURvlg==" }, "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", "requires": { - "mimic-fn": "^1.0.0" + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + }, + "dependencies": { + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + } } }, "merge-source-map": { @@ -3541,7 +3549,8 @@ "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true }, "minimatch": { "version": "3.0.4", @@ -3693,8 +3702,7 @@ "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "node-fetch-npm": { "version": "2.0.2", @@ -4309,13 +4317,41 @@ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + } } }, "os-tmpdir": { @@ -4350,8 +4386,7 @@ "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" }, "p-finally": { "version": "1.0.0", @@ -4361,8 +4396,7 @@ "p-is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", - "dev": true + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" }, "p-limit": { "version": "1.2.0", @@ -6504,15 +6538,15 @@ "dev": true }, "yargs": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", - "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.1.tgz", + "integrity": "sha512-PRU7gJrJaXv3q3yQZ/+/X6KBswZiaQ+zOmdprZcouPYtQgvNU35i+68M4b1ZHLZtYFT5QObFLV+ZkmJYcwKdiw==", "requires": { "cliui": "^4.0.0", "decamelize": "^1.1.1", "find-up": "^2.1.0", "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", + "os-locale": "^3.1.0", "require-directory": "^2.1.1", "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", diff --git a/package.json b/package.json index 53f6958d3bdfb..bef9474764e81 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "libnpmorg": "^1.0.1", "libnpmsearch": "^2.0.2", "libnpmteam": "^1.0.2", - "libnpx": "^10.2.0", + "libnpx": "^10.2.2", "lock-verify": "^2.1.0", "lockfile": "^1.0.4", "lodash._baseuniq": "~4.6.0",