diff --git a/.github/ISSUE_TEMPLATE/bug_6.md b/.github/ISSUE_TEMPLATE/bug_6.md new file mode 100644 index 0000000000000..9916fc114a747 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_6.md @@ -0,0 +1,35 @@ +--- +name: 🐞 Bug v6 +about: File a bug/issue against v6.x +title: '[BUG] ' +labels: Bug, Needs Triage, Release 6.x +assignees: '' + +--- + +<!-- +Note: Please search to see if an issue already exists for your problem: https://github.com/npm/cli/issues +--> + +### Current Behavior: +<!-- ex. a clear & concise description of what you're experiencing. --> + +### Expected Behavior: +<!-- ex. a clear & concise description of what you expected to happen. --> + +### Steps To Reproduce: +<!-- +ex. steps to reproduce the behavior: +1. In this environment... +2. With this config... +3. Run '...' +4. See error... +--> + +### Environment: +<!-- +ex. +- OS: Ubuntu 20.04 +- Node: 13.14.0 +- NPM: 6.4.12 +--> diff --git a/.github/ISSUE_TEMPLATE/bug_7.md b/.github/ISSUE_TEMPLATE/bug_7.md new file mode 100644 index 0000000000000..24ffa66f3ae38 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_7.md @@ -0,0 +1,35 @@ +--- +name: 🐞 Bug v7 +about: File a bug/issue against v7.x +title: '[BUG] <title>' +labels: Bug, Needs Triage, Release 7.x +assignees: '' + +--- + +<!-- +Note: Please search to see if an issue already exists for your problem: https://github.com/npm/cli/issues +--> + +### Current Behavior: +<!-- ex. a clear & concise description of what you're experiencing. --> + +### Expected Behavior: +<!-- ex. a clear & concise description of what you expected to happen. --> + +### Steps To Reproduce: +<!-- +ex. steps to reproduce the behavior: +1. In this environment... +2. With this config... +3. Run '...' +4. See error... +--> + +### Environment: +<!-- +ex. +- OS: Ubuntu 20.04 +- Node: 13.14.0 +- NPM: 6.4.12 +--> diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000000..64449dae28ae7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,17 @@ +blank_issues_enabled: true +contact_links: + - name: ⭐️ Feature Request + url: https://github.com/npm/rfcs/discussions/category_choices + about: Add your request or discuss the project w/ the community + - name: πŸ“ƒ RFC + url: https://github.com/npm/rfcs + about: Create a more formal proposal/idea via our RFC + - name: πŸš₯ Registry Status + url: https://status.npmjs.org + about: Check the current status of the website/registry + - name: πŸ—‚ Documentation + url: https://preview-docs.npmjs.com/cli-commands/npm + about: Preview our new docs + - name: πŸ“« Support + url: https://npm.community + about: Links to other support options &/or community references diff --git a/.gitignore b/.gitignore index cc49b15f8d3f1..f4cf640f7ac9f 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ npm-debug.log /node_modules/.cache .DS_Store **/.DS_Store +.vscode/ diff --git a/AUTHORS b/AUTHORS index 08cade33b6ff1..c390455e200fb 100644 --- a/AUTHORS +++ b/AUTHORS @@ -695,3 +695,15 @@ Jarda Snajdr <jsnajdr@gmail.com> Naix Geng <1308363651@qq.com> Dylan Treisman <dylanzt@gmail.com> mum-never-proud <abhuz@hotmail.com> +Peter Fich <peterfich@users.noreply.github.com> +Maxwell Gerber <mgerber@berkeley.edu> +Sean Poulter <sean.poulter@gmail.com> +vanishcode <vanishcode@outlook.com> +Jean-Charles Sisk <jasisk@gmail.com> +Martin Packman <martin@zegami.com> +Danielle Adams <danielle.adams@heroku.com> +Gianfranco Costamagna <costamagnagianfranco@yahoo.it> +Antonio <antonio.olmo@devo.com> +Sandra TatareviΔ‡ovΓ‘ <sandra@tatarevicova.cz> +Antoine du Hamel <duhamelantoine1995@gmail.com> +Assaf Sapir <assapir@github.com> diff --git a/CHANGELOG.md b/CHANGELOG.md index bae7de7060560..0f07a687af988 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,79 @@ +## 6.14.8 (2020-08-17) + +### BUG FIXES +* [`9262e8c88`](https://github.com/npm/cli/commit/9262e8c88f2f828206423928b8e21eea67f4801a) + [#1575](https://github.com/npm/cli/pull/1575) + npm install --dev deprecation message + ([@sandratatarevicova](https://github.com/sandratatarevicova)) +* [`765cfe0bc`](https://github.com/npm/cli/commit/765cfe0bc05a10b72026291ff0ca7c9ca5cb3f57) + [#1658](https://github.com/npm/cli/issues/1658) + remove unused broken require + ([@aduh95](https://github.com/aduh95)) +* [`4e28de79a`](https://github.com/npm/cli/commit/4e28de79a3a0aacc7603010a592beb448ceb6f5f) + [#1663](https://github.com/npm/cli/pull/1663) + Do not send user secret in the referer header + ([@assapir](https://github.com/assapir)) + +### DOCUMENTATION +* [`8abdf30c9`](https://github.com/npm/cli/commit/8abdf30c95ec90331456f3f2ed78e2703939bb74) + [#1572](https://github.com/npm/cli/pull/1572) + docs: add missing metadata in semver page + ([@tripu](https://github.com/tripu)) +* [`8cedcca46`](https://github.com/npm/cli/commit/8cedcca464ced5aab58be83dd5049c3df13384de) + [#1614](https://github.com/npm/cli/pull/1614) + Node-gyp supports both Python and legacy Python + ([@cclauss](https://github.com/cclauss)) + +### DEPENDENCIES +* [`a303b75fd`](https://github.com/npm/cli/commit/a303b75fd7c4b2644da02ad2ad46d80dfceec3c5) + `update-notifier@2.5.0` +* [`c48600832`](https://github.com/npm/cli/commit/c48600832aff4cc349f59997e08dc4bbde15bd49) + `npm-registry-fetch@4.0.7` +* [`a6e9fc4df`](https://github.com/npm/cli/commit/a6e9fc4df7092ba3eb5394193638b33c24855c36) + `meant@1.0.2`: + +## 6.14.7 (2020-07-21) + +### BUG FIXES +* [`de5108836`](https://github.com/npm/cli/commit/de5108836189bddf28d4d3542f9bd5869cc5c2e9) [#784](https://github.com/npm/cli/pull/784) npm explore spawn shell correctly ([@jasisk](https://github.com/jasisk)) +* [`36e6c01d3`](https://github.com/npm/cli/commit/36e6c01d334c4db75018bc6a4a0bef726fd41ce4) git tag handling regression on shrinkwrap ([@claudiahdz](https://github.com/claudiahdz)) +* [`1961c9369`](https://github.com/npm/cli/commit/1961c9369c92bf8fe530cecba9834ca3c7f5567c) [#288](https://github.com/npm/cli/pull/288) Fix package id in shrinkwrap lifecycle step output ([@bz2](https://github.com/bz2)) +* [`87888892a`](https://github.com/npm/cli/commit/87888892a1282cc3edae968c3ae4ec279189271c) [#1009](https://github.com/npm/cli/pull/1009) gracefully handle error during npm install ([@danielleadams](https://github.com/danielleadams)) +* [`6fe2bdc25`](https://github.com/npm/cli/commit/6fe2bdc25e7961956e5c0067fa4db54ff1bd0dbd) [#1547](https://github.com/npm/cli/pull/1547) npm ls --parseable --long output ([@ruyadorno](https://github.com/ruyadorno)) + +### DEPENDENCIES +* [`2d78481c7`](https://github.com/npm/cli/commit/2d78481c7ec178e628ce23df940f73a05d5c6367) update mkdirp on tacks ([@claudiahdz](https://github.com/claudiahdz)) +* [`4e129d105`](https://github.com/npm/cli/commit/4e129d105eba3b12d474caa6e5ca216a98deb75a) uninstall npm-registry-couchapp ([@claudiahdz](https://github.com/claudiahdz)) +* [`8e1869e27`](https://github.com/npm/cli/commit/8e1869e278d1dd37ddefd6b4e961d1bb17fc9d09) update marked dev dep ([@claudiahdz](https://github.com/claudiahdz)) +* [`6a6151f37`](https://github.com/npm/cli/commit/6a6151f377063c6aca852c859c01910edd235ec6) `libnpx@10.2.4` ([@claudiahdz](https://github.com/claudiahdz)) +* [`dc21422eb`](https://github.com/npm/cli/commit/dc21422eb1ca1a4a19f160fad0e924566e08c496) `bin-links@1.1.8` ([@claudiahdz](https://github.com/claudiahdz)) +* [`d341f88ce`](https://github.com/npm/cli/commit/d341f88ce6feb3df1dcb37f34910fcc6c1db85f2) `gentle-fs@2.3.1` ([@claudiahdz](https://github.com/claudiahdz)) +* [`3e168d49b`](https://github.com/npm/cli/commit/3e168d49b41574809cae2ad013776a00d3f20ff4) `libcipm@4.0.8` ([@claudiahdz](https://github.com/claudiahdz)) +* [`6ae942a51`](https://github.com/npm/cli/commit/6ae942a510520b7dff11b5b78eebeff1706e38af) `npm-audit-report@1.3.3` ([@claudiahdz](https://github.com/claudiahdz)) +* [`6a35e3dee`](https://github.com/npm/cli/commit/6a35e3deec275bf2ae76603acd424a0640458047) `npm-lifecycle@3.1.5` ([@claudiahdz](https://github.com/claudiahdz)) + +## 6.14.6 (2020-07-07) + +### BUG FIXES +* [`a9857b8f6`](https://github.com/npm/cli/commit/a9857b8f6869451ff058789c4631fadfde5bbcbc) chore: remove auth info from logs ([@claudiahdz](https://github.com/claudiahdz)) +* [`b7ad77598`](https://github.com/npm/cli/commit/b7ad77598112908d60195d0fbc472b3c84275fd5) [#1416](https://github.com/npm/cli/pull/1416) fix: wrong `npm doctor` command result ([@vanishcode](https://github.com/vanishcode)) + +### DEPENDENCIES +* [`94eca6377`](https://github.com/npm/cli/commit/94eca637756376b949edfb697e179a1fdcc231ee) `npm-registry-fetch@4.0.5` ([@claudiahdz](https://github.com/claudiahdz)) +* [`c49b6ae28`](https://github.com/npm/cli/commit/c49b6ae28791ff7184288be16654f97168aa9705) [#1418](https://github.com/npm/cli/pull/1418) `spdx-license-ids@3.0.5` ([@kemitchell](https://github.com/kemitchell)) + +### DOCUMENTATION +* [`2e052984b`](https://github.com/npm/cli/commit/2e052984b08c09115ed75387fb2c961631d85d77) + [#1459](https://github.com/npm/cli/pull/1459) + chore(docs): fixed links to cli commands ([@claudiahdz](https://github.com/claudiahdz)) +* [`0ca3509ca`](https://github.com/npm/cli/commit/0ca3509ca940865392daeeabb39192f7d5af9f5e) + [#1283](https://github.com/npm/cli/pull/1283) Update npm-link.md ([@peterfich](https://github.com/peterfich)) +* [`3dd429e9a`](https://github.com/npm/cli/commit/3dd429e9aad760ce2ff9e522b34ebfebd85b460c) + [#1377](https://github.com/npm/cli/pull/1377) + Add note about dropped `*` filenames ([@maxwellgerber](https://github.com/maxwellgerber)) +* [`9a2e2e797`](https://github.com/npm/cli/commit/9a2e2e797e5c91e7f4f261583a1906e2c440cc2f) + [#1429](https://github.com/npm/cli/pull/1429) Fix typo ([@seanpoulter](https://github.com/seanpoulter)) + ## 6.14.5 (2020-05-01) ### BUG FIXES diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c08bd090cb64b..3e3512ffeaec0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -123,7 +123,7 @@ We often want to know if the bug we've fixed for the feature we've added has any 1. Make a pull-request against this repository 2. Add the following comment to the pull-request: "`test this please βœ…`" -This will trigger the [benmark suite](https://github.com/npm/benchmarks) to run against your pull-request, and when it's finished running it will post a comment on your pull-request just like bellow. You'll be able to see the results from the suite inline in your pull-request. +This will trigger the [benchmark suite](https://github.com/npm/benchmarks) to run against your pull-request, and when it's finished running it will post a comment on your pull-request just like below. You'll be able to see the results from the suite inline in your pull-request. > You'll notice that the bot-user will also add a πŸš€ reaction to your comment to let you know that it's sent the request to start the benchmark suite. @@ -186,7 +186,6 @@ You'll need a few things installed in order to update and test the CLI project d > Package vendoring is commonly referred to as the case where dependent packages are stored in the same place as your project. That usually means you dependencies are checked into your source management system, such as Git. -The CLI project vendors it's dependencies in the `node_modules/` folder. Meaning all the dependencies that the CLI project uses are contained withing the project itself. This is represented by the `bundledDependencies` section in the root level `package.json` file. The main reason for this is because the `npm` CLI project is distributed with the NodeJS runtime and needs to work out of the box, which means all dependencies need to be available after the runtime is installed. +The CLI project vendors its dependencies in the `node_modules/` folder. Meaning all the dependencies that the CLI project uses are contained within the project itself. This is represented by the `bundledDependencies` section in the root level `package.json` file. The main reason for this is because the `npm` CLI project is distributed with the NodeJS runtime and needs to work out of the box, which means all dependencies need to be available after the runtime is installed. There are a couple scripts created to help manage this process in the `scripts/` folder. - diff --git a/bin/npm-cli.js b/bin/npm-cli.js index 93eddc7a3c892..c0d9be00433d4 100755 --- a/bin/npm-cli.js +++ b/bin/npm-cli.js @@ -28,6 +28,7 @@ var npm = require('../lib/npm.js') var npmconf = require('../lib/config/core.js') var errorHandler = require('../lib/utils/error-handler.js') + var replaceInfo = require('../lib/utils/replace-info.js') var configDefs = npmconf.defs var shorthands = configDefs.shorthands @@ -40,7 +41,8 @@ process.argv.splice(1, 1, 'npm', '-g') } - log.verbose('cli', process.argv) + var args = replaceInfo(process.argv) + log.verbose('cli', args) var conf = nopt(types, shorthands) npm.argv = conf.argv.remain diff --git a/docs/content/cli-commands/npm-access.md b/docs/content/cli-commands/npm-access.md index f4088fe885513..0fbce9c0759d1 100644 --- a/docs/content/cli-commands/npm-access.md +++ b/docs/content/cli-commands/npm-access.md @@ -87,7 +87,7 @@ Management of teams and team memberships is done with the `npm team` command. ### See Also * [`libnpmaccess`](https://npm.im/libnpmaccess) -* [npm team](/cli-commands/team) -* [npm publish](/cli-commands/publish) -* [npm config](/cli-commands/config) +* [npm team](/cli-commands/npm-team) +* [npm publish](/cli-commands/npm-publish) +* [npm config](/cli-commands/npm-config) * [npm registry](/using-npm/registry) diff --git a/docs/content/cli-commands/npm-adduser.md b/docs/content/cli-commands/npm-adduser.md index ec61cdd39acba..2df35e45fc550 100644 --- a/docs/content/cli-commands/npm-adduser.md +++ b/docs/content/cli-commands/npm-adduser.md @@ -89,7 +89,7 @@ username/password entry in legacy npm. ### See Also * [npm registry](/using-npm/registry) -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) -* [npm owner](/cli-commands/owner) -* [npm whoami](/cli-commands/whoami) +* [npm owner](/cli-commands/npm-owner) +* [npm whoami](/cli-commands/npm-whoami) diff --git a/docs/content/cli-commands/npm-audit.md b/docs/content/cli-commands/npm-audit.md index 8b944e94cc12e..0aba874f96df8 100644 --- a/docs/content/cli-commands/npm-audit.md +++ b/docs/content/cli-commands/npm-audit.md @@ -131,6 +131,6 @@ configuration setting. ### See Also -* [npm install](/cli-commands/install) +* [npm install](/cli-commands/npm-install) * [package-locks](/configuring-npm/package-locks) * [config](/using-npm/config) diff --git a/docs/content/cli-commands/npm-bin.md b/docs/content/cli-commands/npm-bin.md index eb0912ae48a92..6c7ce0eee54e2 100644 --- a/docs/content/cli-commands/npm-bin.md +++ b/docs/content/cli-commands/npm-bin.md @@ -19,8 +19,8 @@ Print the folder where npm will install executables. ### See Also -* [npm prefix](/cli-commands/prefix) -* [npm root](/cli-commands/root) +* [npm prefix](/cli-commands/npm-prefix) +* [npm root](/cli-commands/npm-root) * [npm folders](/configuring-npm/folders) -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/cli-commands/npm-bugs.md b/docs/content/cli-commands/npm-bugs.md index 6e59f2bd1a05e..dcc9c358df14d 100644 --- a/docs/content/cli-commands/npm-bugs.md +++ b/docs/content/cli-commands/npm-bugs.md @@ -41,10 +41,10 @@ The base URL of the npm package registry. ### See Also -* [npm docs](/cli-commands/docs) -* [npm view](/cli-commands/view) -* [npm publish](/cli-commands/publish) +* [npm docs](/cli-commands/npm-docs) +* [npm view](/cli-commands/npm-view) +* [npm publish](/cli-commands/npm-publish) * [npm registry](/using-npm/registry) -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) * [package.json](/configuring-npm/package-json) diff --git a/docs/content/cli-commands/npm-build.md b/docs/content/cli-commands/npm-build.md index eca5397d9c77d..b657129787663 100644 --- a/docs/content/cli-commands/npm-build.md +++ b/docs/content/cli-commands/npm-build.md @@ -28,7 +28,7 @@ directly, run: ### See Also -* [npm install](/cli-commands/install) -* [npm link](/cli-commands/link) +* [npm install](/cli-commands/npm-install) +* [npm link](/cli-commands/npm-link) * [npm scripts](/using-npm/scripts) * [package.json](/configuring-npm/package-json) diff --git a/docs/content/cli-commands/npm-bundle.md b/docs/content/cli-commands/npm-bundle.md index c4fdc5e6bb0e6..76417ac8b0b0c 100644 --- a/docs/content/cli-commands/npm-bundle.md +++ b/docs/content/cli-commands/npm-bundle.md @@ -18,4 +18,4 @@ Just use `npm install` now to do what `npm bundle` used to do. ### See Also -* [npm install](/cli-commands/install) +* [npm install](/cli-commands/npm-install) diff --git a/docs/content/cli-commands/npm-cache.md b/docs/content/cli-commands/npm-cache.md index 4d19749b80f2d..ed31a320421b0 100644 --- a/docs/content/cli-commands/npm-cache.md +++ b/docs/content/cli-commands/npm-cache.md @@ -82,10 +82,10 @@ The root cache folder. ### See Also * [npm folders](/configuring-npm/folders) -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) -* [npm install](/cli-commands/install) -* [npm publish](/cli-commands/publish) -* [npm pack](/cli-commands/pack) +* [npm install](/cli-commands/npm-install) +* [npm publish](/cli-commands/npm-publish) +* [npm pack](/cli-commands/npm-pack) * https://npm.im/cacache * https://npm.im/pacote diff --git a/docs/content/cli-commands/npm-ci.md b/docs/content/cli-commands/npm-ci.md index b5b6447a485f8..357ba16cf6ade 100644 --- a/docs/content/cli-commands/npm-ci.md +++ b/docs/content/cli-commands/npm-ci.md @@ -45,7 +45,7 @@ cache: ### Description -This command is similar to [`npm install`](/cli-commands/install), except it's meant to be used in +This command is similar to [`npm install`](/cli-commands/npm-install), except it's meant to be used in automated environments such as test platforms, continuous integration, and deployment -- or any situation where you want to make sure you're doing a clean install of your dependencies. It can be significantly faster than a regular npm @@ -63,5 +63,5 @@ In short, the main differences between using `npm install` and `npm ci` are: ### See Also -* [npm install](/cli-commands/install) +* [npm install](/cli-commands/npm-install) * [package-locks](/configuring-npm/package-locks) diff --git a/docs/content/cli-commands/npm-config.md b/docs/content/cli-commands/npm-config.md index 68d403746fc10..c2f2033b066d2 100644 --- a/docs/content/cli-commands/npm-config.md +++ b/docs/content/cli-commands/npm-config.md @@ -79,7 +79,7 @@ global config. ### See Also * [npm folders](/configuring-npm/folders) -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [package.json](/configuring-npm/package-json) * [npmrc](/configuring-npm/npmrc) * [npm](/cli-commands/npm) diff --git a/docs/content/cli-commands/npm-dedupe.md b/docs/content/cli-commands/npm-dedupe.md index a146885a04408..e15a12ba7c18a 100644 --- a/docs/content/cli-commands/npm-dedupe.md +++ b/docs/content/cli-commands/npm-dedupe.md @@ -62,6 +62,6 @@ result in new modules being installed. ### See Also -* [npm ls](/cli-commands/ls) -* [npm update](/cli-commands/update) -* [npm install](/cli-commands/install) +* [npm ls](/cli-commands/npm-ls) +* [npm update](/cli-commands/npm-update) +* [npm install](/cli-commands/npm-install) diff --git a/docs/content/cli-commands/npm-deprecate.md b/docs/content/cli-commands/npm-deprecate.md index 252c0e7037079..d2d9613f653c6 100644 --- a/docs/content/cli-commands/npm-deprecate.md +++ b/docs/content/cli-commands/npm-deprecate.md @@ -32,5 +32,5 @@ format an empty string. ### See Also -* [npm publish](/cli-commands/publish) +* [npm publish](/cli-commands/npm-publish) * [npm registry](/using-npm/registry) diff --git a/docs/content/cli-commands/npm-dist-tag.md b/docs/content/cli-commands/npm-dist-tag.md index 4f7fcb9f58f1b..c7921c7f739d7 100644 --- a/docs/content/cli-commands/npm-dist-tag.md +++ b/docs/content/cli-commands/npm-dist-tag.md @@ -92,9 +92,9 @@ begin with a number or the letter `v`. ### See Also -* [npm publish](/cli-commands/publish) -* [npm install](/cli-commands/install) -* [npm dedupe](/cli-commands/dedupe) +* [npm publish](/cli-commands/npm-publish) +* [npm install](/cli-commands/npm-install) +* [npm dedupe](/cli-commands/npm-dedupe) * [npm registry](/using-npm/registry) -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/cli-commands/npm-docs.md b/docs/content/cli-commands/npm-docs.md index f157e200dc514..46f5cd0d900a4 100644 --- a/docs/content/cli-commands/npm-docs.md +++ b/docs/content/cli-commands/npm-docs.md @@ -44,9 +44,9 @@ The base URL of the npm package registry. ### See Also -* [npm view](/cli-commands/view) -* [npm publish](/cli-commands/publish) +* [npm view](/cli-commands/npm-view) +* [npm publish](/cli-commands/npm-publish) * [npm registry](/using-npm/registry) -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) * [package.json](/configuring-npm/package-json) diff --git a/docs/content/cli-commands/npm-doctor.md b/docs/content/cli-commands/npm-doctor.md index 60a57ea4765a2..7cec349e5a814 100644 --- a/docs/content/cli-commands/npm-doctor.md +++ b/docs/content/cli-commands/npm-doctor.md @@ -106,6 +106,6 @@ cache, you should probably run `npm cache clean` and reset the cache. ### See Also -* [npm bugs](/cli-commands/bugs) -* [npm help](/cli-commands/help) -* [npm ping](/cli-commands/ping) +* [npm bugs](/cli-commands/npm-bugs) +* [npm help](/cli-commands/npm-help) +* [npm ping](/cli-commands/npm-ping) diff --git a/docs/content/cli-commands/npm-edit.md b/docs/content/cli-commands/npm-edit.md index d4b9bbb819b94..94b6a087fa102 100644 --- a/docs/content/cli-commands/npm-edit.md +++ b/docs/content/cli-commands/npm-edit.md @@ -41,7 +41,7 @@ The command to run for `npm edit` or `npm config edit`. ### See Also * [npm folders](/configuring-npm/folders) -* [npm explore](/cli-commands/explore) -* [npm install](/cli-commands/install) -* [npm config](/cli-commands/config) +* [npm explore](/cli-commands/npm-explore) +* [npm install](/cli-commands/npm-install) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/cli-commands/npm-explore.md b/docs/content/cli-commands/npm-explore.md index dfa4d9c073741..8ded96d40984f 100644 --- a/docs/content/cli-commands/npm-explore.md +++ b/docs/content/cli-commands/npm-explore.md @@ -44,7 +44,7 @@ The shell to run for the `npm explore` command. ### See Also * [npm folders](/configuring-npm/folders) -* [npm edit](/cli-commands/edit) -* [npm rebuild](/cli-commands/rebuild) -* [npm build](/cli-commands/build) -* [npm install](/cli-commands/install) +* [npm edit](/cli-commands/npm-edit) +* [npm rebuild](/cli-commands/npm-rebuild) +* [npm build](/cli-commands/npm-build) +* [npm install](/cli-commands/npm-install) diff --git a/docs/content/cli-commands/npm-fund.md b/docs/content/cli-commands/npm-fund.md index 73910ff7c07bd..5a751eec46687 100644 --- a/docs/content/cli-commands/npm-fund.md +++ b/docs/content/cli-commands/npm-fund.md @@ -61,8 +61,8 @@ If there are multiple funding sources, which 1-indexed source URL to open. ## See Also -* [npm docs](/cli-commands/docs) -* [npm config](/cli-commands/config) -* [npm install](/cli-commands/install) -* [npm ls](/cli-commands/ls) +* [npm docs](/cli-commands/npm-docs) +* [npm config](/cli-commands/npm-config) +* [npm install](/cli-commands/npm-install) +* [npm ls](/cli-commands/npm-ls) diff --git a/docs/content/cli-commands/npm-help-search.md b/docs/content/cli-commands/npm-help-search.md index 9678185655138..69d005cb160ed 100644 --- a/docs/content/cli-commands/npm-help-search.md +++ b/docs/content/cli-commands/npm-help-search.md @@ -40,4 +40,4 @@ If false, then help-search will just list out the help topics found. ### See Also * [npm](/cli-commands/npm) -* [npm help](/cli-commands/help) +* [npm help](/cli-commands/npm-help) diff --git a/docs/content/cli-commands/npm-help.md b/docs/content/cli-commands/npm-help.md index 358010c05ece3..c47676ffcac1d 100644 --- a/docs/content/cli-commands/npm-help.md +++ b/docs/content/cli-commands/npm-help.md @@ -38,7 +38,7 @@ Set to `"browser"` to view html help content in the default web browser. * [npm](/cli-commands/npm) * [npm folders](/configuring-npm/folders) -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) * [package.json](/configuring-npm/package-json) -* [npm help-search](/cli-commands/help-search) +* [npm help-search](/cli-commands/npm-help-search) diff --git a/docs/content/cli-commands/npm-init.md b/docs/content/cli-commands/npm-init.md index 32b7f82301991..73ad74b23ea99 100644 --- a/docs/content/cli-commands/npm-init.md +++ b/docs/content/cli-commands/npm-init.md @@ -70,5 +70,5 @@ will create a scoped package. * <https://github.com/isaacs/init-package-json> * [package.json](/configuring-npm/package-json) -* [npm version](/cli-commands/version) +* [npm version](/cli-commands/npm-version) * [npm scope](/using-npm/scope) diff --git a/docs/content/cli-commands/npm-install-ci-test.md b/docs/content/cli-commands/npm-install-ci-test.md index 09d738c79fbed..98e40f4b27a77 100644 --- a/docs/content/cli-commands/npm-install-ci-test.md +++ b/docs/content/cli-commands/npm-install-ci-test.md @@ -22,5 +22,5 @@ This command runs an `npm ci` followed immediately by an `npm test`. ### See Also -* [npm ci](/cli-commands/ci) -* [npm test](/cli-commands/test) +* [npm ci](/cli-commands/npm-ci) +* [npm test](/cli-commands/npm-test) diff --git a/docs/content/cli-commands/npm-install-test.md b/docs/content/cli-commands/npm-install-test.md index 58b8844b4fcff..b86a5199117c4 100644 --- a/docs/content/cli-commands/npm-install-test.md +++ b/docs/content/cli-commands/npm-install-test.md @@ -31,5 +31,5 @@ takes exactly the same arguments as `npm install`. ### See Also -* [npm install](/cli-commands/install) -* [npm test](/cli-commands/test) +* [npm install](/cli-commands/npm-install) +* [npm test](/cli-commands/npm-test) diff --git a/docs/content/cli-commands/npm-install.md b/docs/content/cli-commands/npm-install.md index be196fa825546..8e661bf643f39 100644 --- a/docs/content/cli-commands/npm-install.md +++ b/docs/content/cli-commands/npm-install.md @@ -32,7 +32,7 @@ common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional] [-E|--save-exa This command installs a package, and any packages that it depends on. If the package has a package-lock or shrinkwrap file, the installation of dependencies will be driven by that, with an `npm-shrinkwrap.json` taking precedence if both -files exist. See [package-lock.json](/configuring-npm/package-lock-json) and [`npm shrinkwrap`](/cli-commands/shrinkwrap). +files exist. See [package-lock.json](/configuring-npm/package-lock-json) and [`npm shrinkwrap`](/cli-commands/npm-shrinkwrap). A `package` is: @@ -40,7 +40,7 @@ A `package` is: * b) a gzipped tarball containing (a) * c) a url that resolves to (b) * d) a `<name>@<version>` that is published on the registry (see [`registry`](/using-npm/registry)) with (c) -* e) a `<name>@<tag>` (see [`npm dist-tag`](/cli-commands/dist-tag)) that points to (d) +* e) a `<name>@<tag>` (see [`npm dist-tag`](/cli-commands/npm-dist-tag)) that points to (d) * f) a `<name>` that has a "latest" tag satisfying (e) * g) a `<git remote url>` that resolves to (a) @@ -503,17 +503,17 @@ affects a real use-case, it will be investigated. ### See Also * [npm folders](/configuring-npm/folders) -* [npm update](/cli-commands/update) -* [npm audit](/cli-commands/audit) -* [npm fund](/cli-commands/fund) -* [npm link](/cli-commands/link) -* [npm rebuild](/cli-commands/rebuild) +* [npm update](/cli-commands/npm-update) +* [npm audit](/cli-commands/npm-audit) +* [npm fund](/cli-commands/npm-fund) +* [npm link](/cli-commands/npm-link) +* [npm rebuild](/cli-commands/npm-rebuild) * [npm scripts](/using-npm/scripts) -* [npm build](/cli-commands/build) -* [npm config](/cli-commands/config) +* [npm build](/cli-commands/npm-build) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) * [npm registry](/using-npm/registry) -* [npm dist-tag](/cli-commands/dist-tag) -* [npm uninstall](/cli-commands/uninstall) -* [npm shrinkwrap](/cli-commands/shrinkwrap) +* [npm dist-tag](/cli-commands/npm-dist-tag) +* [npm uninstall](/cli-commands/npm-uninstall) +* [npm shrinkwrap](/cli-commands/npm-shrinkwrap) * [package.json](/configuring-npm/package-json) diff --git a/docs/content/cli-commands/npm-link.md b/docs/content/cli-commands/npm-link.md index 3f513868dfebd..b0e97be5578e9 100644 --- a/docs/content/cli-commands/npm-link.md +++ b/docs/content/cli-commands/npm-link.md @@ -86,7 +86,7 @@ npm link @myorg/privatepackage * [npm developers](/using-npm/developers) * [package.json](/configuring-npm/package-json) -* [npm- nstall](/cli-commands/install) +* [npm install](/cli-commands/npm-install) * [npm folders](/configuring-npm/folders) -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/cli-commands/npm-logout.md b/docs/content/cli-commands/npm-logout.md index 5fb7100e8ef7d..ca7d86f2d1960 100644 --- a/docs/content/cli-commands/npm-logout.md +++ b/docs/content/cli-commands/npm-logout.md @@ -48,7 +48,7 @@ npm logout --scope=@myco ### See Also -* [npm adduser](/cli-commands/adduser) +* [npm adduser](/cli-commands/npm-adduser) * [npm registry](/using-npm/registry) -* [npm config](/cli-commands/config) -* [npm whoami](/cli-commands/whoami) +* [npm config](/cli-commands/npm-config) +* [npm whoami](/cli-commands/npm-whoami) diff --git a/docs/content/cli-commands/npm-ls.md b/docs/content/cli-commands/npm-ls.md index 797f15a50d849..64a399155ff60 100644 --- a/docs/content/cli-commands/npm-ls.md +++ b/docs/content/cli-commands/npm-ls.md @@ -119,11 +119,11 @@ Set it to false in order to use all-ansi output. ### See Also -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) * [npm folders](/configuring-npm/folders) -* [npm install](/cli-commands/install) -* [npm link](/cli-commands/link) -* [npm prune](/cli-commands/prune) -* [npm outdated](/cli-commands/outdated) -* [npm update](/cli-commands/update) +* [npm install](/cli-commands/npm-install) +* [npm link](/cli-commands/npm-link) +* [npm prune](/cli-commands/npm-prune) +* [npm outdated](/cli-commands/npm-outdated) +* [npm update](/cli-commands/npm-update) diff --git a/docs/content/cli-commands/npm-outdated.md b/docs/content/cli-commands/npm-outdated.md index 3dae28c465f4e..c7934109dca37 100644 --- a/docs/content/cli-commands/npm-outdated.md +++ b/docs/content/cli-commands/npm-outdated.md @@ -118,7 +118,7 @@ Max depth for checking dependency tree. ### See Also -* [npm update](/cli-commands/update) -* [npm dist-tag](/cli-commands/dist-tag) +* [npm update](/cli-commands/npm-update) +* [npm dist-tag](/cli-commands/npm-dist-tag) * [npm registry](/using-npm/registry) * [npm folders](/configuring-npm/folders) diff --git a/docs/content/cli-commands/npm-owner.md b/docs/content/cli-commands/npm-owner.md index 7088cdaf5cb39..bc2fbc82fb280 100644 --- a/docs/content/cli-commands/npm-owner.md +++ b/docs/content/cli-commands/npm-owner.md @@ -41,7 +41,7 @@ with `--otp`. ### See Also -* [npm publish](/cli-commands/publish) +* [npm publish](/cli-commands/npm-publish) * [npm registry](/using-npm/registry) -* [npm adduser](/cli-commands/adduser) +* [npm adduser](/cli-commands/npm-adduser) * [npm disputes](/using-npm/disputes) diff --git a/docs/content/cli-commands/npm-pack.md b/docs/content/cli-commands/npm-pack.md index d4774ff371671..acf18559c14e0 100644 --- a/docs/content/cli-commands/npm-pack.md +++ b/docs/content/cli-commands/npm-pack.md @@ -32,7 +32,7 @@ actually packing anything. Reports on what would have gone into the tarball. ### See Also -* [npm cache](/cli-commands/cache) -* [npm publish](/cli-commands/publish) -* [npm config](/cli-commands/config) +* [npm cache](/cli-commands/npm-cache) +* [npm publish](/cli-commands/npm-publish) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/cli-commands/npm-ping.md b/docs/content/cli-commands/npm-ping.md index 8f765501ac9f3..93d18b57f840b 100644 --- a/docs/content/cli-commands/npm-ping.md +++ b/docs/content/cli-commands/npm-ping.md @@ -29,5 +29,5 @@ Ping error: {*Detail about error} ### See Also -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/cli-commands/npm-prefix.md b/docs/content/cli-commands/npm-prefix.md index c6b1f7441bcd6..b82fec663a147 100644 --- a/docs/content/cli-commands/npm-prefix.md +++ b/docs/content/cli-commands/npm-prefix.md @@ -21,12 +21,12 @@ to contain a `package.json` file or `node_modules` directory, unless `-g` is also specified. If `-g` is specified, this will be the value of the global prefix. See -[`npm config`](/cli-commands/config) for more detail. +[`npm config`](/cli-commands/npm-config) for more detail. ### See Also -* [npm root](/cli-commands/root) -* [npm bin](/cli-commands/bin) +* [npm root](/cli-commands/npm-root) +* [npm bin](/cli-commands/npm-bin) * [npm folders](/configuring-npm/folders) -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/cli-commands/npm-profile.md b/docs/content/cli-commands/npm-profile.md index 7cc38e2c9c3fe..9fe82cd2d3a95 100644 --- a/docs/content/cli-commands/npm-profile.md +++ b/docs/content/cli-commands/npm-profile.md @@ -79,4 +79,4 @@ available on non npmjs.com registries. ### See Also -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) diff --git a/docs/content/cli-commands/npm-prune.md b/docs/content/cli-commands/npm-prune.md index 586c2e7024642..c6b61e62f828a 100644 --- a/docs/content/cli-commands/npm-prune.md +++ b/docs/content/cli-commands/npm-prune.md @@ -41,6 +41,6 @@ and it's up to you to run `npm prune` from time-to-time to remove them. ### See Also -* [npm uninstall](/cli-commands/uninstall) +* [npm uninstall](/cli-commands/npm-uninstall) * [npm folders](/configuring-npm/folders) -* [npm ls](/cli-commands/ls) +* [npm ls](/cli-commands/npm-ls) diff --git a/docs/content/cli-commands/npm-publish.md b/docs/content/cli-commands/npm-publish.md index 199377fa0df32..44c36e0b7ac6c 100644 --- a/docs/content/cli-commands/npm-publish.md +++ b/docs/content/cli-commands/npm-publish.md @@ -60,13 +60,13 @@ the specified registry. Once a package is published with a given name and version, that specific name and version combination can never be used again, even if -it is removed with [`npm unpublish`](/cli-commands/unpublish). +it is removed with [`npm unpublish`](/cli-commands/npm-unpublish). As of `npm@5`, both a sha1sum and an integrity field with a sha512sum of the tarball will be submitted to the registry during publication. Subsequent installs will use the strongest supported algorithm to verify downloads. -Similar to `--dry-run` see [`npm pack`](/cli-commands/pack), which figures out the files to be +Similar to `--dry-run` see [`npm pack`](/cli-commands/npm-pack), which figures out the files to be included and packs them into a tarball to be uploaded to the registry. ### See Also diff --git a/docs/content/cli-commands/npm-rebuild.md b/docs/content/cli-commands/npm-rebuild.md index 9503d6aae8426..414b9ca55a193 100644 --- a/docs/content/cli-commands/npm-rebuild.md +++ b/docs/content/cli-commands/npm-rebuild.md @@ -22,5 +22,5 @@ This command runs the `npm build` command on the matched folders. This is usefu ### See Also -* [npm build](/cli-commands/build) -* [npm install](/cli-commands/install) +* [npm build](/cli-commands/npm-build) +* [npm install](/cli-commands/npm-install) diff --git a/docs/content/cli-commands/npm-repo.md b/docs/content/cli-commands/npm-repo.md index 48021d9af5d91..ad41ea571253f 100644 --- a/docs/content/cli-commands/npm-repo.md +++ b/docs/content/cli-commands/npm-repo.md @@ -32,5 +32,5 @@ The browser that is called by the `npm repo` command to open websites. ### See Also -* [npm docs](/cli-commands/docs) -* [npm config](/cli-commands/config) +* [npm docs](/cli-commands/npm-docs) +* [npm config](/cli-commands/npm-config) diff --git a/docs/content/cli-commands/npm-restart.md b/docs/content/cli-commands/npm-restart.md index 663b8f4506608..d6d388b224ab1 100644 --- a/docs/content/cli-commands/npm-restart.md +++ b/docs/content/cli-commands/npm-restart.md @@ -41,9 +41,9 @@ behavior will be accompanied by an increase in major version number ### See Also -* [npm run-script](/cli-commands/run-script) +* [npm run-script](/cli-commands/npm-run-script) * [npm scripts](/using-npm/scripts) -* [npm test](/cli-commands/test) -* [npm start](/cli-commands/start) -* [npm stop](/cli-commands/stop) -* [npm restart](/cli-commands/restart) \ No newline at end of file +* [npm test](/cli-commands/npm-test) +* [npm start](/cli-commands/npm-start) +* [npm stop](/cli-commands/npm-stop) +* [npm restart](/cli-commands/npm-restart) \ No newline at end of file diff --git a/docs/content/cli-commands/npm-root.md b/docs/content/cli-commands/npm-root.md index fce4490de78ea..2b27878af4c6d 100644 --- a/docs/content/cli-commands/npm-root.md +++ b/docs/content/cli-commands/npm-root.md @@ -19,8 +19,8 @@ Print the effective `node_modules` folder to standard out. ### See Also -* [npm prefix](/cli-commands/prefix) -* [npm bin](/cli-commands/bin) +* [npm prefix](/cli-commands/npm-prefix) +* [npm bin](/cli-commands/npm-bin) * [npm folders](/configuring-npm/folders) -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/cli-commands/npm-run-script.md b/docs/content/cli-commands/npm-run-script.md index 1ee381e00f2f1..51def74c3c4c3 100644 --- a/docs/content/cli-commands/npm-run-script.md +++ b/docs/content/cli-commands/npm-run-script.md @@ -90,8 +90,8 @@ without breaking the execution chain. ### See Also * [npm scripts](/using-npm/scripts) -* [npm test](/cli-commands/test) -* [npm start](/cli-commands/start) -* [npm restart](/cli-commands/restart) -* [npm stop](/cli-commands/stop) -* [npm config](/cli-commands/config) +* [npm test](/cli-commands/npm-test) +* [npm start](/cli-commands/npm-start) +* [npm restart](/cli-commands/npm-restart) +* [npm stop](/cli-commands/npm-stop) +* [npm config](/cli-commands/npm-config) diff --git a/docs/content/cli-commands/npm-search.md b/docs/content/cli-commands/npm-search.md index c65e489cba27c..e066106faf71f 100644 --- a/docs/content/cli-commands/npm-search.md +++ b/docs/content/cli-commands/npm-search.md @@ -109,6 +109,6 @@ setting. ### See Also * [npm registry](/using-npm/registry) -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) -* [npm view](/cli-commands/view) +* [npm view](/cli-commands/npm-view) diff --git a/docs/content/cli-commands/npm-shrinkwrap.md b/docs/content/cli-commands/npm-shrinkwrap.md index a22aed88e125f..342fb001675ab 100644 --- a/docs/content/cli-commands/npm-shrinkwrap.md +++ b/docs/content/cli-commands/npm-shrinkwrap.md @@ -24,11 +24,11 @@ of package locks in npm, see [package-locks](/configuring-npm/package-locks). ### See Also -* [npm install](/cli-commands/install) -* [npm run-script](/cli-commands/run-script) +* [npm install](/cli-commands/npm-install) +* [npm run-script](/cli-commands/npm-run-script) * [npm scripts](/using-npm/scripts) * [package.js](/configuring-npm/package-json) * [package-locks](/configuring-npm/package-locks) * [package-lock.json](/configuring-npm/package-lock-json) * [shrinkwrap.json](/configuring-npm/shrinkwrap-json) -* [npm ls](/cli-commands/ls) +* [npm ls](/cli-commands/npm-ls) diff --git a/docs/content/cli-commands/npm-star.md b/docs/content/cli-commands/npm-star.md index 440d15d05c652..1912e9c654bc2 100644 --- a/docs/content/cli-commands/npm-star.md +++ b/docs/content/cli-commands/npm-star.md @@ -26,6 +26,6 @@ It's a boolean thing. Starring repeatedly has no additional effect. ### See Also -* [npm view](/cli-commands/view) -* [npm whoami](/cli-commands/whoami) -* [npm adduser](/cli-commands/adduser) +* [npm view](/cli-commands/npm-view) +* [npm whoami](/cli-commands/npm-whoami) +* [npm adduser](/cli-commands/npm-adduser) diff --git a/docs/content/cli-commands/npm-stars.md b/docs/content/cli-commands/npm-stars.md index 87b1664ef8595..475547bb4b7f2 100644 --- a/docs/content/cli-commands/npm-stars.md +++ b/docs/content/cli-commands/npm-stars.md @@ -23,7 +23,7 @@ you will most certainly enjoy this command. ### See Also -* [npm star](/cli-commands/star) -* [npm view](/cli-commands/view) -* [npm whoami](/cli-commands/whoami) -* [npm adduser](/cli-commands/adduser) +* [npm star](/cli-commands/npm-star) +* [npm view](/cli-commands/npm-view) +* [npm whoami](/cli-commands/npm-whoami) +* [npm adduser](/cli-commands/npm-adduser) diff --git a/docs/content/cli-commands/npm-start.md b/docs/content/cli-commands/npm-start.md index 70221c9926a5d..839528257b6d9 100644 --- a/docs/content/cli-commands/npm-start.md +++ b/docs/content/cli-commands/npm-start.md @@ -21,12 +21,12 @@ its `"scripts"` object. If no `"start"` property is specified on the `"scripts"` object, it will run `node server.js`. As of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can -use custom arguments when executing scripts. Refer to [`npm run-script`](/cli-commands/run-script) for more details. +use custom arguments when executing scripts. Refer to [`npm run-script`](/cli-commands/npm-run-script) for more details. ### See Also -* [npm run-script](/cli-commands/run-script) +* [npm run-script](/cli-commands/npm-run-script) * [npm scripts](/using-npm/scripts) -* [npm test](/cli-commands/test) -* [npm restart](/cli-commands/restart) -* [npm stop](/cli-commands/stop) +* [npm test](/cli-commands/npm-test) +* [npm restart](/cli-commands/npm-restart) +* [npm stop](/cli-commands/npm-stop) diff --git a/docs/content/cli-commands/npm-stop.md b/docs/content/cli-commands/npm-stop.md index 889f04ec41e3e..da759047cb19a 100644 --- a/docs/content/cli-commands/npm-stop.md +++ b/docs/content/cli-commands/npm-stop.md @@ -20,8 +20,8 @@ This runs a package's "stop" script, if one was provided. ### See Also -* [npm run-script](/cli-commands/run-script) +* [npm run-script](/cli-commands/npm-run-script) * [npm scripts](/using-npm/scripts) -* [npm test](/cli-commands/test) -* [npm start](/cli-commands/start) -* [npm restart](/cli-commands/restart) +* [npm test](/cli-commands/npm-test) +* [npm start](/cli-commands/npm-start) +* [npm restart](/cli-commands/npm-restart) diff --git a/docs/content/cli-commands/npm-team.md b/docs/content/cli-commands/npm-team.md index 53e084d47d14a..0d5782f0e04b4 100644 --- a/docs/content/cli-commands/npm-team.md +++ b/docs/content/cli-commands/npm-team.md @@ -62,5 +62,5 @@ use the `npm access` command to grant or revoke the appropriate permissions. ### See Also -* [npm access](/cli-commands/access) +* [npm access](/cli-commands/npm-access) * [npm registry](/using-npm/registry) diff --git a/docs/content/cli-commands/npm-test.md b/docs/content/cli-commands/npm-test.md index 11900fd2fbf5e..99c027e3e057a 100644 --- a/docs/content/cli-commands/npm-test.md +++ b/docs/content/cli-commands/npm-test.md @@ -22,8 +22,8 @@ This runs a package's "test" script, if one was provided. ### See Also -* [npm run-script](/cli-commands/run-script) +* [npm run-script](/cli-commands/npm-run-script) * [npm scripts](/using-npm/scripts) -* [npm start](/cli-commands/start) -* [npm restart](/cli-commands/restart) -* [npm stop](/cli-commands/stop) +* [npm start](/cli-commands/npm-start) +* [npm restart](/cli-commands/npm-restart) +* [npm stop](/cli-commands/npm-stop) diff --git a/docs/content/cli-commands/npm-uninstall.md b/docs/content/cli-commands/npm-uninstall.md index 2b994ba6180b6..96fdc4ebe05ba 100644 --- a/docs/content/cli-commands/npm-uninstall.md +++ b/docs/content/cli-commands/npm-uninstall.md @@ -57,8 +57,8 @@ npm uninstall lodash --no-save ### See Also -* [npm prune](/cli-commands/prune) -* [npm install](/cli-commands/install) +* [npm prune](/cli-commands/npm-prune) +* [npm install](/cli-commands/npm-install) * [npm folders](/configuring-npm/folders) -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) diff --git a/docs/content/cli-commands/npm-unpublish.md b/docs/content/cli-commands/npm-unpublish.md index 68cb30b8a2141..c40f480a8bcb8 100644 --- a/docs/content/cli-commands/npm-unpublish.md +++ b/docs/content/cli-commands/npm-unpublish.md @@ -43,8 +43,8 @@ To learn more about how unpublish is treated on the npm registry, see our <a hre ### See Also -* [npm deprecate](/cli-commands/deprecate) -* [npm publish](/cli-commands/publish) +* [npm deprecate](/cli-commands/npm-deprecate) +* [npm publish](/cli-commands/npm-publish) * [npm registry](/using-npm/registry) -* [npm adduser](/cli-commands/adduser) -* [npm owner](/cli-commands/owner) +* [npm adduser](/cli-commands/npm-adduser) +* [npm owner](/cli-commands/npm-owner) diff --git a/docs/content/cli-commands/npm-update.md b/docs/content/cli-commands/npm-update.md index 706d8acf208f9..d184b41330747 100644 --- a/docs/content/cli-commands/npm-update.md +++ b/docs/content/cli-commands/npm-update.md @@ -132,9 +132,9 @@ be _downgraded_. ### See Also -* [npm install](/cli-commands/install) -* [npm outdated](/cli-commands/outdated) -* [npm shrinkwrap](/cli-commands/shrinkwrap) +* [npm install](/cli-commands/npm-install) +* [npm outdated](/cli-commands/npm-outdated) +* [npm shrinkwrap](/cli-commands/npm-shrinkwrap) * [npm registry](/using-npm/registry) * [npm folders](/configuring-npm/folders) -* [npm ls](/cli-commands/ls) +* [npm ls](/cli-commands/npm-ls) diff --git a/docs/content/cli-commands/npm-version.md b/docs/content/cli-commands/npm-version.md index 05a2ea4c8d809..a47e9e33326ac 100644 --- a/docs/content/cli-commands/npm-version.md +++ b/docs/content/cli-commands/npm-version.md @@ -126,8 +126,8 @@ Note that you must have a default GPG key set up in your git config for this to ### See Also -* [npm init](/cli-commands/init) -* [npm run-script](/cli-commands/run-script) +* [npm init](/cli-commands/npm-init) +* [npm run-script](/cli-commands/npm-run-script) * [npm scripts](/using-npm/scripts) * [package.json](/configuring-npm/package-json) * [semver](/using-npm/semver) diff --git a/docs/content/cli-commands/npm-view.md b/docs/content/cli-commands/npm-view.md index b4c68471f5a7d..0c108e6f56615 100644 --- a/docs/content/cli-commands/npm-view.md +++ b/docs/content/cli-commands/npm-view.md @@ -117,8 +117,8 @@ the field name. ### See Also -* [npm search](/cli-commands/search) +* [npm search](/cli-commands/npm-search) * [npm registry](/using-npm/registry) -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) -* [npm docs](/cli-commands/docs) +* [npm docs](/cli-commands/npm-docs) diff --git a/docs/content/cli-commands/npm-whoami.md b/docs/content/cli-commands/npm-whoami.md index d82f1f89732de..b0eda4e46aa61 100644 --- a/docs/content/cli-commands/npm-whoami.md +++ b/docs/content/cli-commands/npm-whoami.md @@ -19,6 +19,6 @@ Print the `username` config to standard output. ### See Also -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) -* [npm adduser](/cli-commands/adduser) +* [npm adduser](/cli-commands/npm-adduser) diff --git a/docs/content/cli-commands/npm.md b/docs/content/cli-commands/npm.md index 2d9789dd77c1c..d95d24f7e0f76 100644 --- a/docs/content/cli-commands/npm.md +++ b/docs/content/cli-commands/npm.md @@ -60,8 +60,7 @@ requires compiling of C++ Code, npm will use [node-gyp](https://github.com/nodejs/node-gyp) for that task. For a Unix system, [node-gyp](https://github.com/nodejs/node-gyp) needs Python, make and a buildchain like GCC. On Windows, -Python and Microsoft Visual Studio C++ are needed. Python 3 is -not supported by [node-gyp](https://github.com/nodejs/node-gyp). +Python and Microsoft Visual Studio C++ are needed. For more information visit [the node-gyp repository](https://github.com/nodejs/node-gyp) and the [node-gyp Wiki](https://github.com/nodejs/node-gyp/wiki). diff --git a/docs/content/configuring-npm/folders.md b/docs/content/configuring-npm/folders.md index abb6133fd1702..96a8f4783d719 100644 --- a/docs/content/configuring-npm/folders.md +++ b/docs/content/configuring-npm/folders.md @@ -73,7 +73,7 @@ Man pages are not installed on Windows systems. #### Cache -See [`npm cache`](/cli-commands/cache). Cache files are stored in `~/.npm` on Posix, or +See [`npm cache`](/cli-commands/npm-cache). Cache files are stored in `~/.npm` on Posix, or `%AppData%/npm-cache` on Windows. This is controlled by the `cache` configuration param. @@ -214,10 +214,10 @@ cannot be found elsewhere. See [`package.json`](/configuring-npm/package.json) ### See also * [package.json](/configuring-npm/package-json) -* [npm install](/cli-commands/install) -* [npm pack](/cli-commands/pack) -* [npm cache](/cli-commands/cache) -* [npm config](/cli-commands/config) +* [npm install](/cli-commands/npm-install) +* [npm pack](/cli-commands/npm-pack) +* [npm cache](/cli-commands/npm-cache) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) * [config](/using-npm/config) -* [npm publish](/cli-commands/publish) +* [npm publish](/cli-commands/npm-publish) diff --git a/docs/content/configuring-npm/npmrc.md b/docs/content/configuring-npm/npmrc.md index 3439c0a8bfcf8..090ed5944fcce 100644 --- a/docs/content/configuring-npm/npmrc.md +++ b/docs/content/configuring-npm/npmrc.md @@ -97,7 +97,7 @@ manner. ### See also * [npm folders](/configuring-npm/folders) -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [config](/using-npm/config) * [package.json](/configuring-npm/package-json) * [npm](/cli-commands/npm) diff --git a/docs/content/configuring-npm/package-json.md b/docs/content/configuring-npm/package-json.md index 6d9cae346b194..98e44a415f48a 100644 --- a/docs/content/configuring-npm/package-json.md +++ b/docs/content/configuring-npm/package-json.md @@ -272,15 +272,13 @@ Conversely, some files are always ignored: * `.hg` * `.lock-wscript` * `.wafpickle-N` -* `.*.swp` * `.DS_Store` -* `._*` * `npm-debug.log` * `.npmrc` * `node_modules` * `config.gypi` -* `*.orig` * `package-lock.json` (use shrinkwrap instead) +* All files containing a `*` character (incompatible with Windows) ### main @@ -533,7 +531,7 @@ See [semver](/using-npm/semver) for more details about specifying version ranges * `range1 || range2` Passes if either range1 or range2 are satisfied. * `git...` See 'Git URLs as Dependencies' below * `user/repo` See 'GitHub URLs' below -* `tag` A specific version tagged and published as `tag` See [`npm dist-tag`](/cli-commands/dist-tag) +* `tag` A specific version tagged and published as `tag` See [`npm dist-tag`](/cli-commands/npm-dist-tag) * `path/path/path` See [Local Paths](#local-paths) below For example, these are all valid: @@ -825,8 +823,8 @@ module will run on: "os" : [ "darwin", "linux" ] ``` -You can also blacklist instead of whitelist operating systems, -just prepend the blacklisted os with a '!': +You can also block instead of allowing operating systems, +just prepend the blocked os with a '!': ```json "os" : [ "!win32" ] @@ -834,7 +832,7 @@ just prepend the blacklisted os with a '!': The host operating system is determined by `process.platform` -It is allowed to both blacklist, and whitelist, although there isn't any +It is allowed to both block and allow an item, although there isn't any good reason to do this. ### cpu @@ -846,7 +844,7 @@ you can specify which ones. "cpu" : [ "x64", "ia32" ] ``` -Like the `os` option, you can also blacklist architectures: +Like the `os` option, you can also block architectures: ```json "cpu" : [ "!arm", "!mips" ] @@ -910,10 +908,10 @@ npm will default some values based on package contents. ### SEE ALSO * [semver](/using-npm/semver) -* [npm init](/cli-commands/init) -* [npm version](/cli-commands/version) -* [npm config](/cli-commands/config) -* [npm help](/cli-commands/help) -* [npm install](/cli-commands/install) -* [npm publish](/cli-commands/publish) -* [npm uninstall](/cli-commands/uninstall) +* [npm init](/cli-commands/npm-init) +* [npm version](/cli-commands/npm-version) +* [npm config](/cli-commands/npm-config) +* [npm help](/cli-commands/npm-help) +* [npm install](/cli-commands/npm-install) +* [npm publish](/cli-commands/npm-publish) +* [npm uninstall](/cli-commands/npm-uninstall) diff --git a/docs/content/configuring-npm/package-lock-json.md b/docs/content/configuring-npm/package-lock-json.md index 0ab0aaa4ce247..9f3ca4683defe 100644 --- a/docs/content/configuring-npm/package-lock-json.md +++ b/docs/content/configuring-npm/package-lock-json.md @@ -142,8 +142,8 @@ The dependencies of this dependency, exactly as at the top level. ### See also -* [npm shrinkwrap](/cli-commands/shrinkwrap) +* [npm shrinkwrap](/cli-commands/npm-shrinkwrap) * [shrinkwrap.json](/configuring-npm/shrinkwrap-json) * [package-locks](/configuring-npm/package-locks) * [package.json](/configuring-npm/package-json) -* [npm install](/cli-commands/install) +* [npm install](/cli-commands/npm-install) diff --git a/docs/content/configuring-npm/package-locks.md b/docs/content/configuring-npm/package-locks.md index 81d21298ae84d..de65e3c634f07 100644 --- a/docs/content/configuring-npm/package-locks.md +++ b/docs/content/configuring-npm/package-locks.md @@ -10,7 +10,7 @@ description: An explanation of npm lockfiles ### Description -Conceptually, the "input" to [`npm install`](/cli-commands/install) is a [package.json](/configuring-npm/package-json), while its +Conceptually, the "input" to [`npm install`](/cli-commands/npm-install) is a [package.json](/configuring-npm/package-json), while its "output" is a fully-formed `node_modules` tree: a representation of the dependencies you declared. In an ideal world, npm would work like a pure function: the same `package.json` should produce the exact same `node_modules` @@ -179,4 +179,4 @@ pre-`npm@5.7.0` versions of npm 5, albeit a bit more noisily. Note that if * [package.json](/configuring-npm/package-json) * [package-lock.json](/configuring-npm/package-lock-json) * [shrinkwrap.json](/configuring-npm/shrinkwrap-json) -* [npm shrinkwrap](/cli-commands/shrinkwrap) +* [npm shrinkwrap](/cli-commands/npm-shrinkwrap) diff --git a/docs/content/configuring-npm/shrinkwrap-json.md b/docs/content/configuring-npm/shrinkwrap-json.md index fcb32952f9377..bc5e061d55b09 100644 --- a/docs/content/configuring-npm/shrinkwrap-json.md +++ b/docs/content/configuring-npm/shrinkwrap-json.md @@ -10,7 +10,7 @@ description: A publishable lockfile ### Description -`npm-shrinkwrap.json` is a file created by [`npm shrinkwrap`](/cli-commands/shrinkwrap). It is identical to +`npm-shrinkwrap.json` is a file created by [`npm shrinkwrap`](/cli-commands/npm-shrinkwrap). It is identical to `package-lock.json`, with one major caveat: Unlike `package-lock.json`, `npm-shrinkwrap.json` may be included when publishing a package. @@ -28,7 +28,7 @@ to the manual page for [package-lock.json](/configuring-npm/package-lock-json). ### See also -* [npm shrinkwrap](/cli-commands/shrinkwrap) +* [npm shrinkwrap](/cli-commands/npm-shrinkwrap) * [package-lock.json](/configuring-npm/package-lock-json) * [package.json](/configuring-npm/package-json) -* [npm install](/cli-commands/install) +* [npm install](/cli-commands/npm-install) diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md index fcf116d7f1ff6..7b3dd79f0a46b 100644 --- a/docs/content/using-npm/config.md +++ b/docs/content/using-npm/config.md @@ -179,7 +179,7 @@ When "dev" or "development" and running local `npm shrinkwrap`, When "true" submit audit reports alongside `npm install` runs to the default registry and all registries configured for scopes. See the documentation -for [`npm audit`](/cli-commands/audit) for details on what is submitted. +for [`npm audit`](/cli-commands/npm-audit) for details on what is submitted. #### audit-level @@ -270,7 +270,7 @@ well as for the CA information to be stored in a file on disk. * Default: Windows: `%AppData%\npm-cache`, Posix: `~/.npm` * Type: path -The location of npm's cache directory. See [`npm cache`](/cli-commands/cache) +The location of npm's cache directory. See [`npm cache`](/cli-commands/npm-cache) #### cache-lock-stale @@ -455,8 +455,8 @@ packages. * Type: Boolean When "true" displays the message at the end of each `npm install` -aknowledging the number of dependencies looking for funding. -See [`npm fund`](/cli-commands/fund) for details. +acknowledging the number of dependencies looking for funding. +See [`npm fund`](/cli-commands/npm-fund) for details. #### git @@ -571,7 +571,7 @@ If true, npm does not run scripts specified in package.json files. A module that will be loaded by the `npm init` command. See the documentation for the [init-package-json](https://github.com/isaacs/init-package-json) module -for more information, or [npm init](/cli-commands/init). +for more information, or [npm init](/cli-commands/npm-init). #### init-author-name @@ -1228,7 +1228,7 @@ version of npm than the latest. * Type: Boolean Set to show short usage output (like the -H output) -instead of complete help when doing [`npm help`](/cli-commands/help). +instead of complete help when doing [`npm help`](/cli-commands/npm-help). #### user @@ -1293,7 +1293,7 @@ Set to `"browser"` to view html help content in the default web browser. ### See also -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [npmrc](/configuring-npm/npmrc) * [npm scripts](/using-npm/scripts) * [npm folders](/configuring-npm/folders) diff --git a/docs/content/using-npm/developers.md b/docs/content/using-npm/developers.md index 80b7fee6a544d..7ef4d7bc750b5 100644 --- a/docs/content/using-npm/developers.md +++ b/docs/content/using-npm/developers.md @@ -152,8 +152,8 @@ The following paths and files are never ignored, so adding them to If, given the structure of your project, you find `.npmignore` to be a maintenance headache, you might instead try populating the `files` property of `package.json`, which is an array of file or directory names -that should be included in your package. Sometimes a whitelist is easier -to manage than a blacklist. +that should be included in your package. Sometimes manually picking +which items to allow is easier to manage than building a block list. #### Testing whether your `.npmignore` or `files` config works diff --git a/docs/content/using-npm/disputes.md b/docs/content/using-npm/disputes.md index 37a724e6b0f1c..bb2d25663cb26 100644 --- a/docs/content/using-npm/disputes.md +++ b/docs/content/using-npm/disputes.md @@ -134,4 +134,4 @@ License. ### See also * [npm registry](/using-npm/registry) -* [npm owner](/cli-commands/owner) +* [npm owner](/cli-commands/npm-owner) diff --git a/docs/content/using-npm/orgs.md b/docs/content/using-npm/orgs.md index 107bac7a9454b..9709a12d72675 100644 --- a/docs/content/using-npm/orgs.md +++ b/docs/content/using-npm/orgs.md @@ -24,8 +24,8 @@ The developer will be able to access packages based on the teams they are on. Ac There are two main commands: -1. `npm team` see [npm team](/cli-commands/team) for more details -2. `npm access` see [npm access](/cli-commands/access) for more details +1. `npm team` see [npm team](/cli-commands/npm-team) for more details +2. `npm access` see [npm access](/cli-commands/npm-access) for more details ### Team Admins create teams @@ -92,6 +92,6 @@ npm access ls-collaborators <pkg> ### See also -* [npm team](/cli-commands/team) -* [npm access](/cli-commands/access) +* [npm team](/cli-commands/npm-team) +* [npm access](/cli-commands/npm-access) * [npm scope](/using-npm/scope) diff --git a/docs/content/using-npm/registry.md b/docs/content/using-npm/registry.md index 44d0594132929..cd6a2e4d71eeb 100644 --- a/docs/content/using-npm/registry.md +++ b/docs/content/using-npm/registry.md @@ -33,7 +33,7 @@ available at <https://github.com/npm/npm-registry-couchapp>. The registry URL used is determined by the scope of the package (see [`scope`](/using-npm/scope). If no scope is specified, the default registry is used, which is -supplied by the `registry` config parameter. See [`npm config`](/cli-commands/config), +supplied by the `registry` config parameter. See [`npm config`](/cli-commands/npm-config), [`npmrc`](/configuring-npm/npmrc), and [`config`](/using-npm/config) for more on managing npm's configuration. ### Does npm send any information about me back to the registry? @@ -100,7 +100,7 @@ Yes, head over to <https://www.npmjs.com/> ### See also -* [npm config](/cli-commands/config) +* [npm config](/cli-commands/npm-config) * [config](/using-npm/config) * [npmrc](/configuring-npm/npmrc) * [npm developers](/using-npm/developers) diff --git a/docs/content/using-npm/removal.md b/docs/content/using-npm/removal.md index 20f353dc3475d..7c83684673240 100644 --- a/docs/content/using-npm/removal.md +++ b/docs/content/using-npm/removal.md @@ -66,5 +66,5 @@ find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ; ### See also -* [npm uninstall](/cli-commands/uninstall) -* [npm prune](/cli-commands/prune) +* [npm uninstall](/cli-commands/npm-uninstall) +* [npm prune](/cli-commands/npm-prune) diff --git a/docs/content/using-npm/scope.md b/docs/content/using-npm/scope.md index 81c55060ff601..2cbc108f0db92 100644 --- a/docs/content/using-npm/scope.md +++ b/docs/content/using-npm/scope.md @@ -55,7 +55,7 @@ Or in `package.json`: ``` Note that if the `@` symbol is omitted, in either case, npm will instead attempt to -install from GitHub; see [`npm install`](/cli-commands/install). +install from GitHub; see [`npm install`](/cli-commands/npm-install). ### Requiring scoped packages @@ -125,7 +125,7 @@ that registry instead. ### See also -* [npm install](/cli-commands/install) -* [npm publish](/cli-commands/publish) -* [npm access](/cli-commands/access) +* [npm install](/cli-commands/npm-install) +* [npm publish](/cli-commands/npm-publish) +* [npm access](/cli-commands/npm-access) * [npm registry](/using-npm/registry) diff --git a/docs/content/using-npm/scripts.md b/docs/content/using-npm/scripts.md index 369d8f0c9ab12..ac2d12630c2c0 100644 --- a/docs/content/using-npm/scripts.md +++ b/docs/content/using-npm/scripts.md @@ -78,7 +78,7 @@ The advantage of doing these things at `prepublish` time is that they can be don ### Life Cycle Operation Order -#### [`npm publish`](/cli-commands/publish) +#### [`npm publish`](/cli-commands/npm-publish) * `prepublishOnly` * `prepare` @@ -86,12 +86,12 @@ The advantage of doing these things at `prepublish` time is that they can be don * `publish` * `postpublish` -#### [`npm pack`](/cli-commands/pack) +#### [`npm pack`](/cli-commands/npm-pack) * `prepack` * `postpack` -#### [`npm install`](/cli-commands/install) +#### [`npm install`](/cli-commands/npm-install) * `preinstall` * `install` @@ -102,7 +102,7 @@ Also triggers * `prepublish` (when on local) * `prepare` (when on local) -#### [`npm start`](/cli-commands/start) +#### [`npm start`](/cli-commands/npm-start) `npm run start` has an `npm start` shorthand. @@ -304,7 +304,7 @@ above. ### See Also -* [npm run-script](/cli-commands/run-script) +* [npm run-script](/cli-commands/npm-run-script) * [package.json](/configuring-npm/package-json) * [npm developers](/using-npm/developers) -* [npm install](/cli-commands/install) +* [npm install](/cli-commands/npm-install) diff --git a/docs/content/using-npm/semver.md b/docs/content/using-npm/semver.md index 92c6381b7fe85..d8d7e1453ced7 100644 --- a/docs/content/using-npm/semver.md +++ b/docs/content/using-npm/semver.md @@ -1,3 +1,9 @@ +--- +section: using-npm +title: semver +description: The semantic versioner for npm +--- + semver(7) -- The semantic versioner for npm =========================================== diff --git a/lib/ci.js b/lib/ci.js index d5b5c15442512..04b2984a9ac0a 100644 --- a/lib/ci.js +++ b/lib/ci.js @@ -32,6 +32,10 @@ function ci (args, cb) { dirPacker: pack.packGitDep } + if (npm.config.get('dev')) { + log.warn('ci', 'Usage of the `--dev` option is deprecated. Use `--also=dev` instead.') + } + for (const key in npm.config.list[0]) { if (!['log', 'cache'].includes(key)) { opts[key] = npm.config.list[0][key] diff --git a/lib/doctor/check-ping.js b/lib/doctor/check-ping.js index 58f14fe69e1e0..d8eac459fd69b 100644 --- a/lib/doctor/check-ping.js +++ b/lib/doctor/check-ping.js @@ -6,7 +6,7 @@ function checkPing (cb) { tracker.info('checkPing', 'Pinging registry') ping({}, true, (err, pong) => { if (err && err.code && err.code.match(/^E\d{3}$/)) { - return cb(null, [err.code.substr(1)]) + return cb(null, [err.code.substr(1), 'failed']) } else { cb(null, [200, 'ok']) } diff --git a/lib/explore.js b/lib/explore.js index 0c9930f8e4ca7..32c93d6553ac9 100644 --- a/lib/explore.js +++ b/lib/explore.js @@ -23,14 +23,13 @@ function explore (args, cb) { var opts = {cwd: cwd, stdio: 'inherit'} var shellArgs = [] - if (args) { + if (args.length) { if (isWindows) { var execCmd = escapeExecPath(args.shift()) var execArgs = [execCmd].concat(args.map(escapeArg)) opts.windowsVerbatimArguments = true shellArgs = ['/d', '/s', '/c'].concat(execArgs) } else { - shellArgs.unshift('-c') shellArgs = ['-c', args.map(escapeArg).join(' ').trim()] } } diff --git a/lib/fetch-package-metadata.js b/lib/fetch-package-metadata.js index c4f46f513fed2..ebb378647b86b 100644 --- a/lib/fetch-package-metadata.js +++ b/lib/fetch-package-metadata.js @@ -3,6 +3,7 @@ const deprCheck = require('./utils/depr-check') const path = require('path') const log = require('npmlog') +const pacote = require('pacote') const readPackageTree = require('read-package-tree') const rimraf = require('rimraf') const validate = require('aproba') @@ -11,15 +12,17 @@ const npm = require('./npm') let npmConfig const npmlog = require('npmlog') const limit = require('call-limit') -const tempFilename = require('./utils/temp-filename') -const pacote = require('pacote') +const tempFilename = require('./utils/temp-filename.js') +const replaceInfo = require('./utils/replace-info.js') const isWindows = require('./utils/is-windows.js') function andLogAndFinish (spec, tracker, done) { validate('SOF|SZF|OOF|OZF', [spec, tracker, done]) return (er, pkg) => { if (er) { - log.silly('fetchPackageMetaData', 'error for ' + String(spec), er.message) + er.message = replaceInfo(er.message) + var spc = replaceInfo(String(spec)) + log.silly('fetchPackageMetaData', 'error for ' + spc, er.message) if (tracker) tracker.finish() } return done(er, pkg) diff --git a/lib/hook.js b/lib/hook.js index 54aea9f1e9d20..4d980cf95d15e 100644 --- a/lib/hook.js +++ b/lib/hook.js @@ -10,6 +10,7 @@ const pudding = require('figgy-pudding') const relativeDate = require('tiny-relative-date') const Table = require('cli-table3') const validate = require('aproba') +const npm = require('./npm') hook.usage = [ 'npm hook add <pkg> <url> <secret> [--type=<type>]', @@ -40,6 +41,10 @@ module.exports = (args, cb) => BB.try(() => hook(args)).then( err => err.code === 'EUSAGE' ? cb(err.message) : cb(err) ) function hook (args) { + if (args.length === 4) { // secret is passed in the args + // we have the user secret in the CLI args, we need to redact it from the referer. + redactUserSecret() + } return otplease(npmConfig(), opts => { opts = HookConfig(opts) switch (args[0]) { @@ -150,3 +155,11 @@ function hookName (hook) { if (hook.type === 'owner') { target = '~' + target } return target } + +function redactUserSecret () { + const referer = npm.referer + if (!referer) return + const splittedReferer = referer.split(' ') + splittedReferer[4] = '[REDACTED]' + npm.referer = splittedReferer.join(' ') +} diff --git a/lib/install.js b/lib/install.js index 378ada7b05c06..082eda5165e3f 100644 --- a/lib/install.js +++ b/lib/install.js @@ -197,7 +197,7 @@ function install (where, args, cb) { var dryrun = !!npm.config.get('dry-run') if (npm.config.get('dev')) { - log.warn('install', 'Usage of the `--dev` option is deprecated. Use `--only=dev` instead.') + log.warn('install', 'Usage of the `--dev` option is deprecated. Use `--also=dev` instead.') } if (where === globalTop && !args.length) { @@ -650,6 +650,9 @@ Installer.prototype.saveToDependencies = function (cb) { validate('F', arguments) if (this.failing) return cb() log.silly('install', 'saveToDependencies') + // Note idealTree will be mutated during the save operations below as the + // package is reloaded from disk to preserve additional details. This means + // steps after postInstall will see a slightly different package object. if (this.saveOnlyLock) { saveShrinkwrap(this.idealTree, cb) } else { diff --git a/lib/install/deps.js b/lib/install/deps.js index 72c7192963000..960dd375d05bb 100644 --- a/lib/install/deps.js +++ b/lib/install/deps.js @@ -76,7 +76,7 @@ function doesChildVersionMatch (child, requested, requestor) { if (childReq.rawSpec === requested.rawSpec) return true if (childReq.type === requested.type) { if (childReq.saveSpec === requested.saveSpec) return true - if (childReq.fetchSpec === requested.fetchSpec) return true + if ((childReq.fetchSpec === requested.fetchSpec) && requested.type !== 'git') return true } } // If _requested didn't exist OR if it didn't match then we'll try using diff --git a/lib/install/inflate-shrinkwrap.js b/lib/install/inflate-shrinkwrap.js index 122068c201287..f89aa815497a1 100644 --- a/lib/install/inflate-shrinkwrap.js +++ b/lib/install/inflate-shrinkwrap.js @@ -52,6 +52,14 @@ function inflateShrinkwrap (topPath, tree, swdeps, opts) { const sw = swdeps[name] const dependencies = sw.dependencies || {} const requested = realizeShrinkwrapSpecifier(name, sw, topPath) + + if (Object.keys(sw).length === 0) { + let message = `Object for dependency "${name}" is empty.\n` + message += 'Something went wrong. Regenerate the package-lock.json with "npm install".\n' + message += 'If using a shrinkwrap, regenerate with "npm shrinkwrap".' + return Promise.reject(new Error(message)) + } + return inflatableChild( onDisk[name], name, topPath, tree, sw, requested, opts ).then((child) => { diff --git a/lib/install/save.js b/lib/install/save.js index 92b44a108099b..986233a516a7c 100644 --- a/lib/install/save.js +++ b/lib/install/save.js @@ -8,6 +8,7 @@ const iferr = require('iferr') const log = require('npmlog') const moduleName = require('../utils/module-name.js') const npm = require('../npm.js') +const packageId = require('../utils/package-id.js') const parseJSON = require('../utils/parse-json.js') const path = require('path') const stringifyPackage = require('stringify-package') @@ -131,6 +132,9 @@ function savePackageJson (tree, next) { } else { writeFileAtomic(saveTarget, json, next) } + + // Restore derived id as it was removed when reloading from disk + tree.package._id = packageId(tree.package) })) } diff --git a/lib/ls.js b/lib/ls.js index 78a2b1d791c7d..c333f236bad31 100644 --- a/lib/ls.js +++ b/lib/ls.js @@ -545,7 +545,7 @@ function makeParseable_ (data, long, dir, depth, parent, d) { return data.path + ':' + (data._id || '') + - ':' + (data.realPath !== data.path ? data.realPath : '') + + (data.link && data.link !== data.path ? ':' + data.link : '') + (data.extraneous ? ':EXTRANEOUS' : '') + (data.error && data.path !== path.resolve(npm.globalDir, '..') ? ':ERROR' : '') + (data.invalid ? ':INVALID' : '') + diff --git a/lib/utils/error-handler.js b/lib/utils/error-handler.js index 3e6f176ef8206..902ad7af9b328 100644 --- a/lib/utils/error-handler.js +++ b/lib/utils/error-handler.js @@ -12,6 +12,7 @@ var exitCode = 0 var rollbacks = npm.rollbacks var chain = require('slide').chain var errorMessage = require('./error-message.js') +var replaceInfo = require('./replace-info.js') var stopMetrics = require('./metrics.js').stop const cacheFile = require('./cache-file.js') @@ -175,14 +176,16 @@ function errorHandler (er) { ].forEach(function (k) { var v = er[k] if (!v) return + v = replaceInfo(v) log.verbose(k, v) }) log.verbose('cwd', process.cwd()) var os = require('os') + var args = replaceInfo(process.argv) log.verbose('', os.type() + ' ' + os.release()) - log.verbose('argv', process.argv.map(JSON.stringify).join(' ')) + log.verbose('argv', args.map(JSON.stringify).join(' ')) log.verbose('node', process.version) log.verbose('npm ', 'v' + npm.version) diff --git a/lib/utils/error-message.js b/lib/utils/error-message.js index 3faa78f308914..78ccdeeb533d6 100644 --- a/lib/utils/error-message.js +++ b/lib/utils/error-message.js @@ -3,12 +3,17 @@ var npm = require('../npm.js') var util = require('util') var nameValidator = require('validate-npm-package-name') var npmlog = require('npmlog') +var replaceInfo = require('./replace-info.js') module.exports = errorMessage function errorMessage (er) { var short = [] var detail = [] + + er.message = replaceInfo(er.message) + er.stack = replaceInfo(er.stack) + switch (er.code) { case 'ENOAUDIT': short.push(['audit', er.message]) diff --git a/lib/utils/replace-info.js b/lib/utils/replace-info.js new file mode 100644 index 0000000000000..36e35b0785ab0 --- /dev/null +++ b/lib/utils/replace-info.js @@ -0,0 +1,22 @@ +const URL = require('url').URL + +// replaces auth info in an array +// of arguments or in a strings +function replaceInfo (arg) { + const isArray = Array.isArray(arg) + const isString = typeof arg === 'string' + + if (!isArray && !isString) return arg + + const args = isString ? arg.split(' ') : arg + const info = args.map(arg => { + try { + const url = new URL(arg) + return url.password === '' ? arg : arg.replace(url.password, '***') + } catch (e) { return arg } + }) + + return isString ? info.join(' ') : info +} + +module.exports = replaceInfo diff --git a/node_modules/.gitignore b/node_modules/.gitignore index 29f9a5a581603..57861945609db 100644 --- a/node_modules/.gitignore +++ b/node_modules/.gitignore @@ -12,10 +12,6 @@ CONTRIBUTING.md /@babel/traverse /@babel/types /@blueoak/list -/@types/caseless -/@types/node -/@types/request -/@types/tough-cookie /acorn /acorn-jsx /ajv-keywords @@ -29,7 +25,6 @@ CONTRIBUTING.md /bind-obj-methods /bl /browser-process-hrtime -/browser-request /builtin-modules /caching-transform /caller @@ -40,16 +35,11 @@ CONTRIBUTING.md /clean-yaml-object /cli-cursor /cli-width -/cloudant-follow -/coffee-script /color-support -/commander /commondir -/connect /contains-path /convert-source-map /correct-license-metadata -/couchapp /coveralls /cp-file /debug-log @@ -61,13 +51,8 @@ CONTRIBUTING.md /docopt /doctrine /domain-browser -/ee-first -/emoji-regex -/encodeurl /error-ex -/errs /es6-error -/escape-html /eslint /eslint-config-standard /eslint-config-standard-jsx @@ -92,9 +77,9 @@ CONTRIBUTING.md /fast-levenshtein /figures /file-entry-cache -/finalhandler /find-cache-dir /find-root +/find-up /flat-cache /foreground-child /fs-access @@ -105,11 +90,10 @@ CONTRIBUTING.md /get-stdin /globals /growl -/handlebars /has-ansi /hasha /hock -/http-proxy +/html-escaper /ignore /inquirer /is-arrayish @@ -124,7 +108,6 @@ CONTRIBUTING.md /js-tokens /js-yaml /jsesc -/json /json-parse-errback /json-stable-stringify-without-jsonify /jsx-ast-utils @@ -132,47 +115,46 @@ CONTRIBUTING.md /levn /licensee /load-json-file +/locate-path /lodash /lodash.flattendeep /log-driver /loose-envify /make-error +/map-age-cleaner /marked /marked-man /merge-source-map /mimic-fn -/minimist /minipass -/nano /natural-compare -/neo-async /nested-error-stacks +/nice-try /npm-license-corrections -/npm-registry-couchapp /npm-registry-mock /null-check /nyc -/on-finished /onetime -/optimist /optionator /own-or /own-or-env +/p-defer +/p-is-promise +/p-limit +/p-locate +/p-try /package-hash /parse-json -/parseurl /path-type /pinkie /pinkie-promise /pkg-conf /pkg-config /pkg-dir -/pkginfo /pluralize /prelude-ls /progress /prop-types -/querystring /read-pkg /read-pkg-up /release-zalgo @@ -198,7 +180,6 @@ CONTRIBUTING.md /stack-utils /standard /standard-engine -/statuses /strip-bom /table /tacks @@ -216,12 +197,8 @@ CONTRIBUTING.md /tsame /type-check /typescript -/uglify-js /unicode-length /uniq -/url -/utils-merge -/watch /wordwrap /write /yapool diff --git a/node_modules/bin-links/CHANGELOG.md b/node_modules/bin-links/CHANGELOG.md index e7b640c08d13f..48860e2b78e38 100644 --- a/node_modules/bin-links/CHANGELOG.md +++ b/node_modules/bin-links/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +<a name="1.1.8"></a> +## [1.1.8](https://github.com/npm/bin-links/compare/v1.1.7...v1.1.8) (2020-03-24) + + + <a name="1.1.7"></a> ## [1.1.7](https://github.com/npm/bin-links/compare/v1.1.6...v1.1.7) (2019-12-26) diff --git a/node_modules/bin-links/package.json b/node_modules/bin-links/package.json index 45393d11c5fc8..2a2659dfa8231 100644 --- a/node_modules/bin-links/package.json +++ b/node_modules/bin-links/package.json @@ -1,19 +1,19 @@ { - "_from": "bin-links@1.1.7", - "_id": "bin-links@1.1.7", + "_from": "bin-links@1.1.8", + "_id": "bin-links@1.1.8", "_inBundle": false, - "_integrity": "sha512-/eaLaTu7G7/o7PV04QPy1HRT65zf+1tFkPGv0sPTV0tRwufooYBQO3zrcyGgm+ja+ZtBf2GEuKjDRJ2pPG+yqA==", + "_integrity": "sha512-KgmVfx+QqggqP9dA3iIc5pA4T1qEEEL+hOhOhNPaUm77OTrJoOXE/C05SJLNJe6m/2wUK7F1tDSou7n5TfCDzQ==", "_location": "/bin-links", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "bin-links@1.1.7", + "raw": "bin-links@1.1.8", "name": "bin-links", "escapedName": "bin-links", - "rawSpec": "1.1.7", + "rawSpec": "1.1.8", "saveSpec": null, - "fetchSpec": "1.1.7" + "fetchSpec": "1.1.8" }, "_requiredBy": [ "#USER", @@ -21,10 +21,10 @@ "/libcipm", "/libnpm" ], - "_resolved": "https://registry.npmjs.org/bin-links/-/bin-links-1.1.7.tgz", - "_shasum": "34b79ea9d0e575d7308afeff0c6b2fc24c793359", - "_spec": "bin-links@1.1.7", - "_where": "/Users/mperrotte/npminc/cli", + "_resolved": "https://registry.npmjs.org/bin-links/-/bin-links-1.1.8.tgz", + "_shasum": "bd39aadab5dc4bdac222a07df5baf1af745b2228", + "_spec": "bin-links@1.1.8", + "_where": "/Users/claudiahdz/npm/cli", "author": { "name": "Mike Sherov" }, @@ -48,9 +48,7 @@ "rimraf": "^2.6.3", "standard": "^10.0.3", "standard-version": "^4.4.0", - "tap": "^12.1.3", - "weallbehave": "^1.2.0", - "weallcontribute": "^1.0.8" + "tap": "^12.1.3" }, "files": [ "index.js" @@ -64,6 +62,9 @@ "license": "Artistic-2.0", "main": "index.js", "name": "bin-links", + "publishConfig": { + "tag": "legacy" + }, "repository": { "type": "git", "url": "git://github.com/npm/bin-links.git" @@ -73,9 +74,7 @@ "posttest": "standard", "prerelease": "npm t", "release": "standard-version -s", - "test": "tap -J --nyc-arg=--all --coverage test/*.js --100", - "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'" + "test": "tap -J --nyc-arg=--all --coverage test/*.js --100" }, - "version": "1.1.7" + "version": "1.1.8" } diff --git a/node_modules/cliui/CHANGELOG.md b/node_modules/cliui/CHANGELOG.md index d9e6fbb9a7c91..37f259a5ce41d 100644 --- a/node_modules/cliui/CHANGELOG.md +++ b/node_modules/cliui/CHANGELOG.md @@ -2,6 +2,20 @@ 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. +# [5.0.0](https://github.com/yargs/cliui/compare/v4.1.0...v5.0.0) (2019-04-10) + + +### Bug Fixes + +* Update wrap-ansi to fix compatibility with latest versions of chalk. ([#60](https://github.com/yargs/cliui/issues/60)) ([7bf79ae](https://github.com/yargs/cliui/commit/7bf79ae)) + + +### BREAKING CHANGES + +* Drop support for node < 6. + + + <a name="4.1.0"></a> # [4.1.0](https://github.com/yargs/cliui/compare/v4.0.0...v4.1.0) (2018-04-23) diff --git a/node_modules/cliui/README.md b/node_modules/cliui/README.md index 7861976fc2d24..deacfa0dc5aaa 100644 --- a/node_modules/cliui/README.md +++ b/node_modules/cliui/README.md @@ -46,7 +46,7 @@ console.log(ui.toString()) cliui exposes a simple layout DSL: -If you create a single `ui.row`, passing a string rather than an +If you create a single `ui.div`, passing a string rather than an object: * `\n`: characters will be interpreted as new rows. diff --git a/node_modules/cliui/node_modules/ansi-regex/index.js b/node_modules/cliui/node_modules/ansi-regex/index.js index c4aaecf505063..c25448009f304 100644 --- a/node_modules/cliui/node_modules/ansi-regex/index.js +++ b/node_modules/cliui/node_modules/ansi-regex/index.js @@ -1,10 +1,14 @@ 'use strict'; -module.exports = () => { +module.exports = options => { + options = Object.assign({ + onlyFirst: false + }, options); + const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))' + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' ].join('|'); - return new RegExp(pattern, 'g'); + return new RegExp(pattern, options.onlyFirst ? undefined : 'g'); }; diff --git a/node_modules/cliui/node_modules/ansi-regex/package.json b/node_modules/cliui/node_modules/ansi-regex/package.json index 8e2c1b93e5b63..9397a8c3f4e4e 100644 --- a/node_modules/cliui/node_modules/ansi-regex/package.json +++ b/node_modules/cliui/node_modules/ansi-regex/package.json @@ -1,27 +1,27 @@ { - "_from": "ansi-regex@^3.0.0", - "_id": "ansi-regex@3.0.0", + "_from": "ansi-regex@^4.1.0", + "_id": "ansi-regex@4.1.0", "_inBundle": false, - "_integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "_integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "_location": "/cliui/ansi-regex", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "ansi-regex@^3.0.0", + "raw": "ansi-regex@^4.1.0", "name": "ansi-regex", "escapedName": "ansi-regex", - "rawSpec": "^3.0.0", + "rawSpec": "^4.1.0", "saveSpec": null, - "fetchSpec": "^3.0.0" + "fetchSpec": "^4.1.0" }, "_requiredBy": [ "/cliui/strip-ansi" ], - "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "_shasum": "ed0317c322064f79466c02966bddb605ab37d998", - "_spec": "ansi-regex@^3.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/cliui/node_modules/strip-ansi", + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "_shasum": "8b9f8f08cf1acb843756a839ca8c7e3168c51997", + "_spec": "ansi-regex@^4.1.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/cliui/node_modules/strip-ansi", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -34,11 +34,11 @@ "deprecated": false, "description": "Regular expression for matching ANSI escape codes", "devDependencies": { - "ava": "*", - "xo": "*" + "ava": "^0.25.0", + "xo": "^0.23.0" }, "engines": { - "node": ">=4" + "node": ">=6" }, "files": [ "index.js" @@ -81,5 +81,5 @@ "test": "xo && ava", "view-supported": "node fixtures/view-codes.js" }, - "version": "3.0.0" + "version": "4.1.0" } diff --git a/node_modules/cliui/node_modules/ansi-regex/readme.md b/node_modules/cliui/node_modules/ansi-regex/readme.md index 22db1c3405555..d19c44667e704 100644 --- a/node_modules/cliui/node_modules/ansi-regex/readme.md +++ b/node_modules/cliui/node_modules/ansi-regex/readme.md @@ -2,6 +2,20 @@ > Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) +--- + +<div align="center"> + <b> + <a href="https://tidelift.com/subscription/pkg/npm-ansi-regex?utm_source=npm-ansi-regex&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> + </b> + <br> + <sub> + Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. + </sub> +</div> + +--- + ## Install @@ -23,9 +37,31 @@ ansiRegex().test('cake'); '\u001B[4mcake\u001B[0m'.match(ansiRegex()); //=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] ``` +## API + +### ansiRegex([options]) + +Returns a regex for matching ANSI escape codes. + +#### options + +##### onlyFirst + +Type: `boolean`<br> +Default: `false` *(Matches any ANSI escape codes in a string)* + +Match only the first ANSI escape. + + ## FAQ ### Why do you test for codes not in the ECMA 48 standard? @@ -35,6 +71,11 @@ Some of the codes we run as a test are codes that we acquired finding various li On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + ## Maintainers - [Sindre Sorhus](https://github.com/sindresorhus) diff --git a/node_modules/cliui/node_modules/is-fullwidth-code-point/index.js b/node_modules/cliui/node_modules/is-fullwidth-code-point/index.js new file mode 100644 index 0000000000000..d506327c3e557 --- /dev/null +++ b/node_modules/cliui/node_modules/is-fullwidth-code-point/index.js @@ -0,0 +1,46 @@ +'use strict'; +/* eslint-disable yoda */ +module.exports = x => { + if (Number.isNaN(x)) { + return false; + } + + // code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + if ( + x >= 0x1100 && ( + x <= 0x115f || // Hangul Jamo + x === 0x2329 || // LEFT-POINTING ANGLE BRACKET + x === 0x232a || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) || + // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + (0x3250 <= x && x <= 0x4dbf) || + // CJK Unified Ideographs .. Yi Radicals + (0x4e00 <= x && x <= 0xa4c6) || + // Hangul Jamo Extended-A + (0xa960 <= x && x <= 0xa97c) || + // Hangul Syllables + (0xac00 <= x && x <= 0xd7a3) || + // CJK Compatibility Ideographs + (0xf900 <= x && x <= 0xfaff) || + // Vertical Forms + (0xfe10 <= x && x <= 0xfe19) || + // CJK Compatibility Forms .. Small Form Variants + (0xfe30 <= x && x <= 0xfe6b) || + // Halfwidth and Fullwidth Forms + (0xff01 <= x && x <= 0xff60) || + (0xffe0 <= x && x <= 0xffe6) || + // Kana Supplement + (0x1b000 <= x && x <= 0x1b001) || + // Enclosed Ideographic Supplement + (0x1f200 <= x && x <= 0x1f251) || + // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + (0x20000 <= x && x <= 0x3fffd) + ) + ) { + return true; + } + + return false; +}; diff --git a/node_modules/os-locale/node_modules/cross-spawn/LICENSE b/node_modules/cliui/node_modules/is-fullwidth-code-point/license similarity index 93% rename from node_modules/os-locale/node_modules/cross-spawn/LICENSE rename to node_modules/cliui/node_modules/is-fullwidth-code-point/license index 8407b9a30f51b..654d0bfe94343 100644 --- a/node_modules/os-locale/node_modules/cross-spawn/LICENSE +++ b/node_modules/cliui/node_modules/is-fullwidth-code-point/license @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Made With MOXY Lda <hello@moxy.studio> +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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 diff --git a/node_modules/cliui/node_modules/is-fullwidth-code-point/package.json b/node_modules/cliui/node_modules/is-fullwidth-code-point/package.json new file mode 100644 index 0000000000000..bea9e8359c649 --- /dev/null +++ b/node_modules/cliui/node_modules/is-fullwidth-code-point/package.json @@ -0,0 +1,77 @@ +{ + "_from": "is-fullwidth-code-point@^2.0.0", + "_id": "is-fullwidth-code-point@2.0.0", + "_inBundle": false, + "_integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "_location": "/cliui/is-fullwidth-code-point", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-fullwidth-code-point@^2.0.0", + "name": "is-fullwidth-code-point", + "escapedName": "is-fullwidth-code-point", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/cliui/string-width" + ], + "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "_shasum": "a3b30a5c4f199183167aaab93beefae3ddfb654f", + "_spec": "is-fullwidth-code-point@^2.0.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/cliui/node_modules/string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme", + "keywords": [ + "fullwidth", + "full-width", + "full", + "width", + "unicode", + "character", + "char", + "string", + "str", + "codepoint", + "code", + "point", + "is", + "detect", + "check" + ], + "license": "MIT", + "name": "is-fullwidth-code-point", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/cliui/node_modules/is-fullwidth-code-point/readme.md b/node_modules/cliui/node_modules/is-fullwidth-code-point/readme.md new file mode 100644 index 0000000000000..093b0281b2c46 --- /dev/null +++ b/node_modules/cliui/node_modules/is-fullwidth-code-point/readme.md @@ -0,0 +1,39 @@ +# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point) + +> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) + + +## Install + +``` +$ npm install --save is-fullwidth-code-point +``` + + +## Usage + +```js +const isFullwidthCodePoint = require('is-fullwidth-code-point'); + +isFullwidthCodePoint('θ°’'.codePointAt()); +//=> true + +isFullwidthCodePoint('a'.codePointAt()); +//=> false +``` + + +## API + +### isFullwidthCodePoint(input) + +#### input + +Type: `number` + +[Code point](https://en.wikipedia.org/wiki/Code_point) of a character. + + +## License + +MIT Β© [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/cliui/node_modules/string-width/index.js b/node_modules/cliui/node_modules/string-width/index.js new file mode 100644 index 0000000000000..33c9d6c06f7a5 --- /dev/null +++ b/node_modules/cliui/node_modules/string-width/index.js @@ -0,0 +1,39 @@ +'use strict'; +const stripAnsi = require('strip-ansi'); +const isFullwidthCodePoint = require('is-fullwidth-code-point'); +const emojiRegex = require('emoji-regex')(); + +module.exports = input => { + input = input.replace(emojiRegex, ' '); + + if (typeof input !== 'string' || input.length === 0) { + return 0; + } + + input = stripAnsi(input); + + let width = 0; + + for (let i = 0; i < input.length; i++) { + const code = input.codePointAt(i); + + // Ignore control characters + if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { + continue; + } + + // Ignore combining characters + if (code >= 0x300 && code <= 0x36F) { + continue; + } + + // Surrogates + if (code > 0xFFFF) { + i++; + } + + width += isFullwidthCodePoint(code) ? 2 : 1; + } + + return width; +}; diff --git a/node_modules/invert-kv/license b/node_modules/cliui/node_modules/string-width/license similarity index 100% rename from node_modules/invert-kv/license rename to node_modules/cliui/node_modules/string-width/license diff --git a/node_modules/cliui/node_modules/string-width/package.json b/node_modules/cliui/node_modules/string-width/package.json new file mode 100644 index 0000000000000..8c314e0a0f8bc --- /dev/null +++ b/node_modules/cliui/node_modules/string-width/package.json @@ -0,0 +1,88 @@ +{ + "_from": "string-width@^3.1.0", + "_id": "string-width@3.1.0", + "_inBundle": false, + "_integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "_location": "/cliui/string-width", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "string-width@^3.1.0", + "name": "string-width", + "escapedName": "string-width", + "rawSpec": "^3.1.0", + "saveSpec": null, + "fetchSpec": "^3.1.0" + }, + "_requiredBy": [ + "/cliui" + ], + "_resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "_shasum": "22767be21b62af1081574306f69ac51b62203961", + "_spec": "string-width@^3.1.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/cliui", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/string-width/issues" + }, + "bundleDependencies": false, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "deprecated": false, + "description": "Get the visual width of a string - the number of columns required to display it", + "devDependencies": { + "ava": "^1.0.1", + "xo": "^0.23.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/string-width#readme", + "keywords": [ + "string", + "str", + "character", + "char", + "unicode", + "width", + "visual", + "column", + "columns", + "fullwidth", + "full-width", + "full", + "ansi", + "escape", + "codes", + "cli", + "command-line", + "terminal", + "console", + "cjk", + "chinese", + "japanese", + "korean", + "fixed-width" + ], + "license": "MIT", + "name": "string-width", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/string-width.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.1.0" +} diff --git a/node_modules/cliui/node_modules/string-width/readme.md b/node_modules/cliui/node_modules/string-width/readme.md new file mode 100644 index 0000000000000..d39d95f56cf3f --- /dev/null +++ b/node_modules/cliui/node_modules/string-width/readme.md @@ -0,0 +1,45 @@ +# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) + +> Get the visual width of a string - the number of columns required to display it + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + +Useful to be able to measure the actual width of command-line output. + + +## Install + +``` +$ npm install string-width +``` + + +## Usage + +```js +const stringWidth = require('string-width'); + +stringWidth('叀'); +//=> 2 + +stringWidth('\u001b[1m叀\u001b[22m'); +//=> 2 + +stringWidth('a'); +//=> 1 + +stringWidth('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +// => 5 +``` + + +## Related + +- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module +- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string +- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string + + +## License + +MIT Β© [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/cliui/node_modules/strip-ansi/index.d.ts b/node_modules/cliui/node_modules/strip-ansi/index.d.ts new file mode 100644 index 0000000000000..44e954d0c724d --- /dev/null +++ b/node_modules/cliui/node_modules/strip-ansi/index.d.ts @@ -0,0 +1,15 @@ +/** +Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. + +@example +``` +import stripAnsi from 'strip-ansi'; + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` +*/ +export default function stripAnsi(string: string): string; diff --git a/node_modules/cliui/node_modules/strip-ansi/index.js b/node_modules/cliui/node_modules/strip-ansi/index.js index 96e0292c8e2f6..9788c96dfa3b0 100644 --- a/node_modules/cliui/node_modules/strip-ansi/index.js +++ b/node_modules/cliui/node_modules/strip-ansi/index.js @@ -1,4 +1,7 @@ 'use strict'; const ansiRegex = require('ansi-regex'); -module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; +const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; + +module.exports = stripAnsi; +module.exports.default = stripAnsi; diff --git a/node_modules/cliui/node_modules/strip-ansi/package.json b/node_modules/cliui/node_modules/strip-ansi/package.json index b45e23c1183f0..1185f87f66831 100644 --- a/node_modules/cliui/node_modules/strip-ansi/package.json +++ b/node_modules/cliui/node_modules/strip-ansi/package.json @@ -1,27 +1,28 @@ { - "_from": "strip-ansi@^4.0.0", - "_id": "strip-ansi@4.0.0", + "_from": "strip-ansi@^5.2.0", + "_id": "strip-ansi@5.2.0", "_inBundle": false, - "_integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "_integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "_location": "/cliui/strip-ansi", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "strip-ansi@^4.0.0", + "raw": "strip-ansi@^5.2.0", "name": "strip-ansi", "escapedName": "strip-ansi", - "rawSpec": "^4.0.0", + "rawSpec": "^5.2.0", "saveSpec": null, - "fetchSpec": "^4.0.0" + "fetchSpec": "^5.2.0" }, "_requiredBy": [ - "/cliui" + "/cliui", + "/cliui/string-width" ], - "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "_shasum": "a8479022eb1ac368a871389b635262c505ee368f", - "_spec": "strip-ansi@^4.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/cliui", + "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "_shasum": "8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae", + "_spec": "strip-ansi@^5.2.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/cliui", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -32,19 +33,21 @@ }, "bundleDependencies": false, "dependencies": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.1.0" }, "deprecated": false, - "description": "Strip ANSI escape codes", + "description": "Strip ANSI escape codes from a string", "devDependencies": { - "ava": "*", - "xo": "*" + "ava": "^1.3.1", + "tsd-check": "^0.5.0", + "xo": "^0.24.0" }, "engines": { - "node": ">=4" + "node": ">=6" }, "files": [ - "index.js" + "index.js", + "index.d.ts" ], "homepage": "https://github.com/chalk/strip-ansi#readme", "keywords": [ @@ -78,7 +81,7 @@ "url": "git+https://github.com/chalk/strip-ansi.git" }, "scripts": { - "test": "xo && ava" + "test": "xo && ava && tsd-check" }, - "version": "4.0.0" + "version": "5.2.0" } diff --git a/node_modules/cliui/node_modules/strip-ansi/readme.md b/node_modules/cliui/node_modules/strip-ansi/readme.md index dc76f0cb1a059..8681fe8af4424 100644 --- a/node_modules/cliui/node_modules/strip-ansi/readme.md +++ b/node_modules/cliui/node_modules/strip-ansi/readme.md @@ -1,7 +1,20 @@ # strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) -> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string +--- + +<div align="center"> + <b> + <a href="https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=readme">Get professional support for 'strip-ansi' with a Tidelift subscription</a> + </b> + <br> + <sub> + Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. + </sub> +</div> + +--- ## Install @@ -17,12 +30,21 @@ const stripAnsi = require('strip-ansi'); stripAnsi('\u001B[4mUnicorn\u001B[0m'); //=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' ``` +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + ## Related - [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module - [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes - [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right diff --git a/node_modules/cliui/package.json b/node_modules/cliui/package.json index 2571f5322533e..c3f92f9c564ef 100644 --- a/node_modules/cliui/package.json +++ b/node_modules/cliui/package.json @@ -1,27 +1,29 @@ { - "_from": "cliui@^4.0.0", - "_id": "cliui@4.1.0", + "_from": "cliui@^5.0.0", + "_id": "cliui@5.0.0", "_inBundle": false, - "_integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "_integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "_location": "/cliui", - "_phantomChildren": {}, + "_phantomChildren": { + "emoji-regex": "7.0.3" + }, "_requested": { "type": "range", "registry": true, - "raw": "cliui@^4.0.0", + "raw": "cliui@^5.0.0", "name": "cliui", "escapedName": "cliui", - "rawSpec": "^4.0.0", + "rawSpec": "^5.0.0", "saveSpec": null, - "fetchSpec": "^4.0.0" + "fetchSpec": "^5.0.0" }, "_requiredBy": [ "/yargs" ], - "_resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "_shasum": "348422dbe82d800b3022eef4f6ac10bf2e4d1b49", - "_spec": "cliui@^4.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/yargs", + "_resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "_shasum": "deefcfdb2e800784aa34f46fa08e06851c7bbbc5", + "_spec": "cliui@^5.0.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs", "author": { "name": "Ben Coe", "email": "ben@npmjs.com" @@ -43,23 +45,23 @@ } }, "dependencies": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" }, "deprecated": false, "description": "easily create complex multi-column command-line-interfaces", "devDependencies": { - "chai": "^3.5.0", - "chalk": "^1.1.2", - "coveralls": "^2.11.8", - "mocha": "^3.0.0", - "nyc": "^10.0.0", - "standard": "^8.0.0", - "standard-version": "^3.0.0" + "chai": "^4.2.0", + "chalk": "^2.4.2", + "coveralls": "^3.0.3", + "mocha": "^6.0.2", + "nyc": "^13.3.0", + "standard": "^12.0.1", + "standard-version": "^5.0.2" }, "engine": { - "node": ">=4" + "node": ">=6" }, "files": [ "index.js" @@ -95,5 +97,5 @@ "it" ] }, - "version": "4.1.0" + "version": "5.0.0" } diff --git a/node_modules/configstore/package.json b/node_modules/configstore/package.json index 828dc2ae6a8f8..e51a0a4e3bca1 100644 --- a/node_modules/configstore/package.json +++ b/node_modules/configstore/package.json @@ -1,8 +1,8 @@ { "_from": "configstore@^3.0.0", - "_id": "configstore@3.1.2", + "_id": "configstore@3.1.5", "_inBundle": false, - "_integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", + "_integrity": "sha512-nlOhI4+fdzoK5xmJ+NY+1gZK56bwEaWZr8fYuXohZ9Vkc1o3a4T/R3M+yE/w7x/ZVJ1zF8c+oaOvF0dztdUgmA==", "_location": "/configstore", "_phantomChildren": {}, "_requested": { @@ -18,10 +18,10 @@ "_requiredBy": [ "/update-notifier" ], - "_resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", - "_shasum": "c6f25defaeef26df12dd33414b001fe81a543f8f", + "_resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.5.tgz", + "_shasum": "e9af331fadc14dabd544d3e7e76dc446a09a530f", "_spec": "configstore@^3.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/update-notifier", + "_where": "/Users/ruyadorno/Documents/workspace/cli/latest/node_modules/update-notifier", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -32,7 +32,7 @@ }, "bundleDependencies": false, "dependencies": { - "dot-prop": "^4.1.0", + "dot-prop": "^4.2.1", "graceful-fs": "^4.1.2", "make-dir": "^1.0.0", "unique-string": "^1.0.0", @@ -42,8 +42,8 @@ "deprecated": false, "description": "Easily load and save config without having to think about where and how", "devDependencies": { - "ava": "*", - "xo": "*" + "ava": "^0.25.0", + "xo": "^0.20.3" }, "engines": { "node": ">=4" @@ -75,5 +75,5 @@ "scripts": { "test": "xo && ava" }, - "version": "3.1.2" + "version": "3.1.5" } diff --git a/node_modules/configstore/readme.md b/node_modules/configstore/readme.md index 6af37719bc0ea..5cdba305d4061 100644 --- a/node_modules/configstore/readme.md +++ b/node_modules/configstore/readme.md @@ -1,4 +1,4 @@ -# configstore [![Build Status](https://travis-ci.org/yeoman/configstore.svg?branch=master)](https://travis-ci.org/yeoman/configstore) +# configstore [![Build Status](https://travis-ci.org/yeoman/configstore.svg?branch=legacy-v3)](https://travis-ci.org/yeoman/configstore) > Easily load and persist config without having to think about where and how diff --git a/node_modules/dot-prop/index.js b/node_modules/dot-prop/index.js index 15282bb392402..189831cf00f81 100644 --- a/node_modules/dot-prop/index.js +++ b/node_modules/dot-prop/index.js @@ -1,6 +1,14 @@ 'use strict'; const isObj = require('is-obj'); +const disallowedKeys = [ + '__proto__', + 'prototype', + 'constructor' +]; + +const isValidPath = pathSegments => !pathSegments.some(segment => disallowedKeys.includes(segment)); + function getPathSegments(path) { const pathArr = path.split('.'); const parts = []; @@ -16,6 +24,10 @@ function getPathSegments(path) { parts.push(p); } + if (!isValidPath(parts)) { + return []; + } + return parts; } @@ -26,6 +38,9 @@ module.exports = { } const pathArr = getPathSegments(path); + if (pathArr.length === 0) { + return; + } for (let i = 0; i < pathArr.length; i++) { if (!Object.prototype.propertyIsEnumerable.call(obj, pathArr[i])) { @@ -58,6 +73,9 @@ module.exports = { const root = obj; const pathArr = getPathSegments(path); + if (pathArr.length === 0) { + return; + } for (let i = 0; i < pathArr.length; i++) { const p = pathArr[i]; diff --git a/node_modules/dot-prop/package.json b/node_modules/dot-prop/package.json index 40fefa363d353..674ab4308e6e2 100644 --- a/node_modules/dot-prop/package.json +++ b/node_modules/dot-prop/package.json @@ -1,27 +1,27 @@ { - "_from": "dot-prop@^4.1.0", - "_id": "dot-prop@4.2.0", + "_from": "dot-prop@^4.2.1", + "_id": "dot-prop@4.2.1", "_inBundle": false, - "_integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "_integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==", "_location": "/dot-prop", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "dot-prop@^4.1.0", + "raw": "dot-prop@^4.2.1", "name": "dot-prop", "escapedName": "dot-prop", - "rawSpec": "^4.1.0", + "rawSpec": "^4.2.1", "saveSpec": null, - "fetchSpec": "^4.1.0" + "fetchSpec": "^4.2.1" }, "_requiredBy": [ "/configstore" ], - "_resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "_shasum": "1f19e0c2e1aa0e32797c49799f2837ac6af69c57", - "_spec": "dot-prop@^4.1.0", - "_where": "/Users/rebecca/code/npm/node_modules/configstore", + "_resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz", + "_shasum": "45884194a71fc2cda71cbb4bceb3a4dd2f433ba4", + "_spec": "dot-prop@^4.2.1", + "_where": "/Users/ruyadorno/Documents/workspace/cli/latest/node_modules/configstore", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -37,9 +37,9 @@ "deprecated": false, "description": "Get, set, or delete a property from a nested object using a dot path", "devDependencies": { - "ava": "*", + "ava": "1.4.1", "matcha": "^0.7.0", - "xo": "*" + "xo": "0.24.0" }, "engines": { "node": ">=4" @@ -73,7 +73,7 @@ "bench": "matcha bench.js", "test": "xo && ava" }, - "version": "4.2.0", + "version": "4.2.1", "xo": { "esnext": true } diff --git a/node_modules/dot-prop/readme.md b/node_modules/dot-prop/readme.md index fab3b7afe00ac..0e18f78656034 100644 --- a/node_modules/dot-prop/readme.md +++ b/node_modules/dot-prop/readme.md @@ -85,6 +85,8 @@ Path of the property in the object, using `.` to separate each nested key. Use `\\.` if you have a `.` in the key. +The following path components are invalid and results in `undefined` being returned: `__proto__`, `prototype`, `constructor`. + #### value Type: `any` diff --git a/node_modules/emoji-regex/LICENSE-MIT.txt b/node_modules/emoji-regex/LICENSE-MIT.txt new file mode 100644 index 0000000000000..a41e0a7ef970e --- /dev/null +++ b/node_modules/emoji-regex/LICENSE-MIT.txt @@ -0,0 +1,20 @@ +Copyright Mathias Bynens <https://mathiasbynens.be/> + +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/emoji-regex/README.md b/node_modules/emoji-regex/README.md new file mode 100644 index 0000000000000..37cf14e01f72a --- /dev/null +++ b/node_modules/emoji-regex/README.md @@ -0,0 +1,73 @@ +# emoji-regex [![Build status](https://travis-ci.org/mathiasbynens/emoji-regex.svg?branch=master)](https://travis-ci.org/mathiasbynens/emoji-regex) + +_emoji-regex_ offers a regular expression to match all emoji symbols (including textual representations of emoji) as per the Unicode Standard. + +This repository contains a script that generates this regular expression based on [the data from Unicode Technical Report #51](https://github.com/mathiasbynens/unicode-tr51). Because of this, the regular expression can easily be updated whenever new emoji are added to the Unicode standard. + +## Installation + +Via [npm](https://www.npmjs.com/): + +```bash +npm install emoji-regex +``` + +In [Node.js](https://nodejs.org/): + +```js +const emojiRegex = require('emoji-regex'); +// Note: because the regular expression has the global flag set, this module +// exports a function that returns the regex rather than exporting the regular +// expression itself, to make it impossible to (accidentally) mutate the +// original regular expression. + +const text = ` +\u{231A}: ⌚ default emoji presentation character (Emoji_Presentation) +\u{2194}\u{FE0F}: ↔️ default text presentation character rendered as emoji +\u{1F469}: πŸ‘© emoji modifier base (Emoji_Modifier_Base) +\u{1F469}\u{1F3FF}: πŸ‘©πŸΏ emoji modifier base followed by a modifier +`; + +const regex = emojiRegex(); +let match; +while (match = regex.exec(text)) { + const emoji = match[0]; + console.log(`Matched sequence ${ emoji } β€” code points: ${ [...emoji].length }`); +} +``` + +Console output: + +``` +Matched sequence ⌚ β€” code points: 1 +Matched sequence ⌚ β€” code points: 1 +Matched sequence ↔️ β€” code points: 2 +Matched sequence ↔️ β€” code points: 2 +Matched sequence πŸ‘© β€” code points: 1 +Matched sequence πŸ‘© β€” code points: 1 +Matched sequence πŸ‘©πŸΏ β€” code points: 2 +Matched sequence πŸ‘©πŸΏ β€” code points: 2 +``` + +To match emoji in their textual representation as well (i.e. emoji that are not `Emoji_Presentation` symbols and that aren’t forced to render as emoji by a variation selector), `require` the other regex: + +```js +const emojiRegex = require('emoji-regex/text.js'); +``` + +Additionally, in environments which support ES2015 Unicode escapes, you may `require` ES2015-style versions of the regexes: + +```js +const emojiRegex = require('emoji-regex/es2015/index.js'); +const emojiRegexText = require('emoji-regex/es2015/text.js'); +``` + +## Author + +| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | +|---| +| [Mathias Bynens](https://mathiasbynens.be/) | + +## License + +_emoji-regex_ is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/emoji-regex/es2015/index.js b/node_modules/emoji-regex/es2015/index.js new file mode 100644 index 0000000000000..0216db95876da --- /dev/null +++ b/node_modules/emoji-regex/es2015/index.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = () => { + // https://mths.be/emoji + return /\u{1F3F4}(?:\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074})\u{E007F}|\u200D\u2620\uFE0F)|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F468}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|[\u{1F3FB}-\u{1F3FF}]\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|\u{1F469}\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]\u200D[\u2695\u2696\u2708]|\u{1F468}(?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F469}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F468}(?:\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|[\u{1F3FB}-\u{1F3FF}])|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F469}\u200D\u{1F467}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u{1F469}\u200D\u{1F466}|\u{1F1F6}\u{1F1E6}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|[#\*0-9]\uFE0F\u20E3|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9D1}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6F9}\u{1F910}-\u{1F93A}\u{1F93C}-\u{1F93E}\u{1F940}-\u{1F945}\u{1F947}-\u{1F970}\u{1F973}-\u{1F976}\u{1F97A}\u{1F97C}-\u{1F9A2}\u{1F9B0}-\u{1F9B9}\u{1F9C0}-\u{1F9C2}\u{1F9D0}-\u{1F9FF}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6F9}\u{1F910}-\u{1F93A}\u{1F93C}-\u{1F93E}\u{1F940}-\u{1F945}\u{1F947}-\u{1F970}\u{1F973}-\u{1F976}\u{1F97A}\u{1F97C}-\u{1F9A2}\u{1F9B0}-\u{1F9B9}\u{1F9C0}-\u{1F9C2}\u{1F9D0}-\u{1F9FF}]\uFE0F|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F469}\u{1F46E}\u{1F470}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9D1}-\u{1F9DD}]/gu; +}; diff --git a/node_modules/emoji-regex/es2015/text.js b/node_modules/emoji-regex/es2015/text.js new file mode 100644 index 0000000000000..d0a771d36e487 --- /dev/null +++ b/node_modules/emoji-regex/es2015/text.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = () => { + // https://mths.be/emoji + return /\u{1F3F4}(?:\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074})\u{E007F}|\u200D\u2620\uFE0F)|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F468}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|[\u{1F3FB}-\u{1F3FF}]\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|\u{1F469}\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]\u200D[\u2695\u2696\u2708]|\u{1F468}(?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F469}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F468}(?:\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|[\u{1F3FB}-\u{1F3FF}])|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F469}\u200D\u{1F467}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u{1F469}\u200D\u{1F466}|\u{1F1F6}\u{1F1E6}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F469}[\u{1F3FB}-\u{1F3FF}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|[#\*0-9]\uFE0F\u20E3|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9D1}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6F9}\u{1F910}-\u{1F93A}\u{1F93C}-\u{1F93E}\u{1F940}-\u{1F945}\u{1F947}-\u{1F970}\u{1F973}-\u{1F976}\u{1F97A}\u{1F97C}-\u{1F9A2}\u{1F9B0}-\u{1F9B9}\u{1F9C0}-\u{1F9C2}\u{1F9D0}-\u{1F9FF}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6F9}\u{1F910}-\u{1F93A}\u{1F93C}-\u{1F93E}\u{1F940}-\u{1F945}\u{1F947}-\u{1F970}\u{1F973}-\u{1F976}\u{1F97A}\u{1F97C}-\u{1F9A2}\u{1F9B0}-\u{1F9B9}\u{1F9C0}-\u{1F9C2}\u{1F9D0}-\u{1F9FF}]\uFE0F?|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F469}\u{1F46E}\u{1F470}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9D1}-\u{1F9DD}]/gu; +}; diff --git a/node_modules/emoji-regex/index.d.ts b/node_modules/emoji-regex/index.d.ts new file mode 100644 index 0000000000000..2c317cdad43db --- /dev/null +++ b/node_modules/emoji-regex/index.d.ts @@ -0,0 +1,5 @@ +declare module 'emoji-regex' { + function emojiRegex(): RegExp; + + export default emojiRegex; +} diff --git a/node_modules/emoji-regex/index.js b/node_modules/emoji-regex/index.js new file mode 100644 index 0000000000000..e2237a4e80532 --- /dev/null +++ b/node_modules/emoji-regex/index.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function () { + // https://mths.be/emoji + return /\uD83C\uDFF4(?:\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\u200D\u2620\uFE0F)|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDD1-\uDDDD])/g; +}; diff --git a/node_modules/emoji-regex/package.json b/node_modules/emoji-regex/package.json new file mode 100644 index 0000000000000..356ae530db017 --- /dev/null +++ b/node_modules/emoji-regex/package.json @@ -0,0 +1,82 @@ +{ + "_args": [ + [ + "emoji-regex@7.0.3", + "/Users/claudiahdz/npm/cli" + ] + ], + "_development": true, + "_from": "emoji-regex@7.0.3", + "_id": "emoji-regex@7.0.3", + "_inBundle": false, + "_integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "_location": "/emoji-regex", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "emoji-regex@7.0.3", + "name": "emoji-regex", + "escapedName": "emoji-regex", + "rawSpec": "7.0.3", + "saveSpec": null, + "fetchSpec": "7.0.3" + }, + "_requiredBy": [ + "/nyc/string-width" + ], + "_resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "_spec": "7.0.3", + "_where": "/Users/claudiahdz/npm/cli", + "author": { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + }, + "bugs": { + "url": "https://github.com/mathiasbynens/emoji-regex/issues" + }, + "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.", + "devDependencies": { + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "mocha": "^5.2.0", + "regexgen": "^1.3.0", + "unicode-11.0.0": "^0.7.7", + "unicode-tr51": "^9.0.1" + }, + "files": [ + "LICENSE-MIT.txt", + "index.js", + "index.d.ts", + "text.js", + "es2015/index.js", + "es2015/text.js" + ], + "homepage": "https://mths.be/emoji-regex", + "keywords": [ + "unicode", + "regex", + "regexp", + "regular expressions", + "code points", + "symbols", + "characters", + "emoji" + ], + "license": "MIT", + "main": "index.js", + "name": "emoji-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/mathiasbynens/emoji-regex.git" + }, + "scripts": { + "build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src -d ./es2015; node script/inject-sequences.js", + "test": "mocha", + "test:watch": "npm run test -- --watch" + }, + "types": "index.d.ts", + "version": "7.0.3" +} diff --git a/node_modules/emoji-regex/text.js b/node_modules/emoji-regex/text.js new file mode 100644 index 0000000000000..199ae3be35b41 --- /dev/null +++ b/node_modules/emoji-regex/text.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = function () { + // https://mths.be/emoji + return /\uD83C\uDFF4(?:\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74)\uDB40\uDC7F|\u200D\u2620\uFE0F)|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|\uD83D\uDC69\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83D\uDC69\u200D[\u2695\u2696\u2708])\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC68(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])\uFE0F?|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDD1-\uDDDD])/g; +}; diff --git a/node_modules/gentle-fs/CHANGELOG.md b/node_modules/gentle-fs/CHANGELOG.md index 50dfcd74c99f1..116c0118f0efe 100644 --- a/node_modules/gentle-fs/CHANGELOG.md +++ b/node_modules/gentle-fs/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +<a name="2.3.1"></a> +## [2.3.1](https://github.com/npm/gentle-fs/compare/v2.3.0...v2.3.1) (2020-03-25) + + + <a name="2.3.0"></a> # [2.3.0](https://github.com/npm/gentle-fs/compare/v2.2.1...v2.3.0) (2019-12-11) diff --git a/node_modules/gentle-fs/README.md b/node_modules/gentle-fs/README.md index 54af51cf99288..f8a3020ac5093 100644 --- a/node_modules/gentle-fs/README.md +++ b/node_modules/gentle-fs/README.md @@ -11,7 +11,6 @@ * [Example](#example) * [Features](#features) -* [Contributing](#contributing) * [API](#api) * [`rm`](#rm) * [`link`](#link) @@ -28,14 +27,6 @@ * Performs filesystem operations "gently". Please see details in the API specs below for a more precise definition of "gently". -### Contributing - -The npm team enthusiastically welcomes contributions and project participation! -There's a bunch of things you can do if you want to contribute! The [Contributor -Guide](CONTRIBUTING.md) has all the information you need for everything from -reporting bugs to contributing entire new features. Please don't hesitate to -jump in if you'd like to, or even ask us questions if something isn't clear. - ### API #### <a name="rm"></a> `> rm(target, opts, cb)` diff --git a/node_modules/gentle-fs/package.json b/node_modules/gentle-fs/package.json index d162899757b0f..b01e0c16beeaf 100644 --- a/node_modules/gentle-fs/package.json +++ b/node_modules/gentle-fs/package.json @@ -1,29 +1,29 @@ { - "_from": "gentle-fs@2.3.0", - "_id": "gentle-fs@2.3.0", + "_from": "gentle-fs@2.3.1", + "_id": "gentle-fs@2.3.1", "_inBundle": false, - "_integrity": "sha512-3k2CgAmPxuz7S6nKK+AqFE2AdM1QuwqKLPKzIET3VRwK++3q96MsNFobScDjlCrq97ZJ8y5R725MOlm6ffUCjg==", + "_integrity": "sha512-OlwBBwqCFPcjm33rF2BjW+Pr6/ll2741l+xooiwTCeaX2CA1ZuclavyMBe0/KlR21/XGsgY6hzEQZ15BdNa13Q==", "_location": "/gentle-fs", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "gentle-fs@2.3.0", + "raw": "gentle-fs@2.3.1", "name": "gentle-fs", "escapedName": "gentle-fs", - "rawSpec": "2.3.0", + "rawSpec": "2.3.1", "saveSpec": null, - "fetchSpec": "2.3.0" + "fetchSpec": "2.3.1" }, "_requiredBy": [ "#USER", "/", "/bin-links" ], - "_resolved": "https://registry.npmjs.org/gentle-fs/-/gentle-fs-2.3.0.tgz", - "_shasum": "13538db5029400f98684be4894e8a7d8f0d1ea7f", - "_spec": "gentle-fs@2.3.0", - "_where": "/Users/isaacs/dev/npm/cli", + "_resolved": "https://registry.npmjs.org/gentle-fs/-/gentle-fs-2.3.1.tgz", + "_shasum": "11201bf66c18f930ddca72cf69460bdfa05727b1", + "_spec": "gentle-fs@2.3.1", + "_where": "/Users/claudiahdz/npm/cli", "author": { "name": "Mike Sherov" }, @@ -52,9 +52,7 @@ "require-inject": "^1.4.2", "standard": "^10.0.3", "standard-version": "^4.2.0", - "tap": "^10.7.2", - "weallbehave": "^1.2.0", - "weallcontribute": "^1.0.8" + "tap": "^10.7.2" }, "files": [ "index.js", @@ -78,9 +76,7 @@ "posttest": "standard", "prerelease": "npm t", "release": "standard-version -s", - "test": "tap -J --nyc-arg=--all --coverage test", - "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'" + "test": "tap -J --nyc-arg=--all --coverage test" }, - "version": "2.3.0" + "version": "2.3.1" } diff --git a/node_modules/get-caller-file/README.md b/node_modules/get-caller-file/README.md index 194492736bc4f..a7d8c07970735 100644 --- a/node_modules/get-caller-file/README.md +++ b/node_modules/get-caller-file/README.md @@ -2,3 +2,40 @@ [![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) + +This is a utility, which allows a function to figure out from which file it was invoked. It does so by inspecting v8's stack trace at the time it is invoked. + +Inspired by http://stackoverflow.com/questions/13227489 + +*note: this relies on Node/V8 specific APIs, as such other runtimes may not work* + +## Installation + +```bash +yarn add get-caller-file +``` + +## Usage + +Given: + +```js +// ./foo.js +const getCallerFile = require('get-caller-file'); + +module.exports = function() { + return getCallerFile(); // figures out who called it +}; +``` + +```js +// index.js +const foo = require('./foo'); + +foo() // => /full/path/to/this/file/index.js +``` + + +## Options: + +* `getCallerFile(position = 2)`: where position is stack frame whos fileName we want. diff --git a/node_modules/get-caller-file/index.d.ts b/node_modules/get-caller-file/index.d.ts new file mode 100644 index 0000000000000..babed696ae00e --- /dev/null +++ b/node_modules/get-caller-file/index.d.ts @@ -0,0 +1,2 @@ +declare const _default: (position?: number) => any; +export = _default; diff --git a/node_modules/get-caller-file/index.js b/node_modules/get-caller-file/index.js index 03e7dfc39b040..57304f80345dd 100644 --- a/node_modules/get-caller-file/index.js +++ b/node_modules/get-caller-file/index.js @@ -1,20 +1,22 @@ -'use strict'; - +"use strict"; // Call this function in a another function to find out the file from // which that function was called from. (Inspects the v8 stack trace) // // Inspired by http://stackoverflow.com/questions/13227489 - -module.exports = function getCallerFile(_position) { - var oldPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = function(err, stack) { return stack; }; - var stack = new Error().stack; - Error.prepareStackTrace = oldPrepareStackTrace; - - var position = _position ? _position : 2; - - // stack[0] holds this file - // stack[1] holds where this function was called - // stack[2] holds the file we're interested in - return stack[position] ? stack[position].getFileName() : undefined; +module.exports = function getCallerFile(position) { + if (position === void 0) { position = 2; } + if (position >= Error.stackTraceLimit) { + throw new TypeError('getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `' + position + '` and Error.stackTraceLimit was: `' + Error.stackTraceLimit + '`'); + } + var oldPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function (_, stack) { return stack; }; + var stack = new Error().stack; + Error.prepareStackTrace = oldPrepareStackTrace; + if (stack !== null && typeof stack === 'object') { + // stack[0] holds this file + // stack[1] holds where this function was called + // stack[2] holds the file we're interested in + return stack[position] ? stack[position].getFileName() : undefined; + } }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/get-caller-file/index.js.map b/node_modules/get-caller-file/index.js.map new file mode 100644 index 0000000000000..89c655c06da4a --- /dev/null +++ b/node_modules/get-caller-file/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,qEAAqE;AACrE,EAAE;AACF,0DAA0D;AAE1D,iBAAS,SAAS,aAAa,CAAC,QAAY;IAAZ,yBAAA,EAAA,YAAY;IAC1C,IAAI,QAAQ,IAAI,KAAK,CAAC,eAAe,EAAE;QACrC,MAAM,IAAI,SAAS,CAAC,kGAAkG,GAAG,QAAQ,GAAG,oCAAoC,GAAG,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC,CAAC;KACzM;IAED,IAAM,oBAAoB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACrD,KAAK,CAAC,iBAAiB,GAAG,UAAC,CAAC,EAAE,KAAK,IAAM,OAAA,KAAK,EAAL,CAAK,CAAC;IAC/C,IAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,KAAK,CAAC;IAChC,KAAK,CAAC,iBAAiB,GAAG,oBAAoB,CAAC;IAG/C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC/C,2BAA2B;QAC3B,gDAAgD;QAChD,8CAA8C;QAC9C,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAE,KAAK,CAAC,QAAQ,CAAS,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KAC7E;AACH,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/get-caller-file/package.json b/node_modules/get-caller-file/package.json index e853deec1b056..5e58bc7cc07a8 100644 --- a/node_modules/get-caller-file/package.json +++ b/node_modules/get-caller-file/package.json @@ -1,27 +1,27 @@ { - "_from": "get-caller-file@^1.0.1", - "_id": "get-caller-file@1.0.3", + "_from": "get-caller-file@^2.0.1", + "_id": "get-caller-file@2.0.5", "_inBundle": false, - "_integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "_integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "_location": "/get-caller-file", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "get-caller-file@^1.0.1", + "raw": "get-caller-file@^2.0.1", "name": "get-caller-file", "escapedName": "get-caller-file", - "rawSpec": "^1.0.1", + "rawSpec": "^2.0.1", "saveSpec": null, - "fetchSpec": "^1.0.1" + "fetchSpec": "^2.0.1" }, "_requiredBy": [ "/yargs" ], - "_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/mperrotte/npminc/cli/node_modules/yargs", + "_resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "_shasum": "4f94412a82db32f36e3b0b9741f8a97feb031f7e", + "_spec": "get-caller-file@^2.0.1", + "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs", "author": { "name": "Stefan Penner" }, @@ -32,15 +32,25 @@ "deprecated": false, "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": { + "@types/chai": "^4.1.7", + "@types/ensure-posix-path": "^1.0.0", + "@types/mocha": "^5.2.6", + "@types/node": "^11.10.5", "chai": "^4.1.2", "ensure-posix-path": "^1.0.1", - "mocha": "^5.2.0" + "mocha": "^5.2.0", + "typescript": "^3.3.3333" }, "directories": { "test": "tests" }, + "engines": { + "node": "6.* || 8.* || >= 10.*" + }, "files": [ - "index.js" + "index.js", + "index.js.map", + "index.d.ts" ], "homepage": "https://github.com/stefanpenner/get-caller-file#readme", "license": "ISC", @@ -51,8 +61,9 @@ "url": "git+https://github.com/stefanpenner/get-caller-file.git" }, "scripts": { + "prepare": "tsc", "test": "mocha test", "test:debug": "mocha test" }, - "version": "1.0.3" + "version": "2.0.5" } diff --git a/node_modules/html-escaper/LICENSE.txt b/node_modules/html-escaper/LICENSE.txt new file mode 100644 index 0000000000000..dcfa0aebdc54c --- /dev/null +++ b/node_modules/html-escaper/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (C) 2017-present by Andrea Giammarchi - @WebReflection + +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/html-escaper/README.md b/node_modules/html-escaper/README.md new file mode 100644 index 0000000000000..3dca3412f019b --- /dev/null +++ b/node_modules/html-escaper/README.md @@ -0,0 +1,97 @@ +# html-escaper [![Build Status](https://travis-ci.org/WebReflection/html-escaper.svg?branch=master)](https://travis-ci.org/WebReflection/html-escaper) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/html-escaper/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/html-escaper?branch=master) +A simple module to escape/unescape common problematic entities. + + +### How +This package is available in npm so `npm install html-escaper` is all you need to do, using eventually the global flag too. + +Once the module is present +```js +var html = require('html-escaper'); + +// two basic methods +html.escape('string'); +html.unescape('escaped string'); +``` + + +### Why +there is basically one rule only: do not **ever** replace one char after another if you are transforming a string into another. + +```js +// WARNING: THIS IS WRONG +// if you are that kind of dev that does this +function escape(s) { + return s.replace(/&/g, "&") + .replace(/</g, "<") + .replace(/>/g, ">") + .replace(/'/g, "'") + .replace(/"/g, """); +} + +// you might be the same dev that does this too +function unescape(s) { + return s.replace(/&/g, "&") + .replace(/</g, "<") + .replace(/>/g, ">") + .replace(/'/g, "'") + .replace(/"/g, '"'); +} + +// guess what we have here ? +unescape('&lt;'); + +// now guess this XSS too ... +unescape('&lt;script&gt;alert("yo")&lt;/script&gt;'); + + +``` + +The last example will produce `<script>alert("yo")</script>` instead of the expected `<script>alert("yo")</script>`. + +Nothing like this could possibly happen if we grab all chars at once and either ways. +It's just a fortunate case that after swapping `&` with `&` no other replace will be affected, but it's not portable and universally a bad practice. + +Grab all chars at once, no excuses! + + + +**more details** +As somebody might think it's an `unescape` issue only, it's not. Being an anti-pattern with side effects works both ways. + +As example, changing the order of the replacement in escaping would produce the unexpected: +```js +function escape(s) { + return s.replace(/</g, "<") + .replace(/>/g, ">") + .replace(/'/g, "'") + .replace(/"/g, """) + .replace(/&/g, "&"); +} + +escape('<'); // &lt; instead of < +``` +If we do not want to code with the fear that the order wasn't perfect or that our order in either escaping or unescaping is different from the order another method or function used, if we understand the issue and we agree it's potentially a disaster prone approach, if we add the fact in this case creating 4 RegExp objects each time and invoking 4 times `.replace` trough the `String.prototype` is also potentially slower than creating one function only holding one object, or holding the function too, we should agree there is not absolutely any valid reason to keep proposing a char-by-char implementation. + +We have proofs this approach can fail already so ... why should we risk? Just avoid and grab all chars at once or simply use this tiny utility. + +### Backtick +Internt explorer < 9 has [some backtick issue](https://html5sec.org/#102) + +For compatibility sake with common server-side HTML entities encoders and decoders, and in order to have the most reliable I/O, this little utility will NOT fix this IE < 9 problem. + +It is also important to note that if we create valid HTML and we set attributes at runtime through this utility, backticks in strings cannot possibly affect attribute behaviors. + +```js +var img = new Image(); +img.src = html.escape( + 'x` `<script>alert(1)</script>"` `' +); +// it won't cause problems even in IE < 9 +``` + +**However**, if you use `innerHTML` and you target IE < 9 then [this **might** be a problem](https://github.com/nette/nette/issues/1496). + +Accordingly, if you need more chars and/or backticks to be escaped and unescaped, feel free to use alternatives like [lodash](https://github.com/lodash/lodash) or [he](https://www.npmjs.com/package/he) + +Here a bit more of [my POV](https://github.com/WebReflection/html-escaper/commit/52d554fc6e8583b6ffdd357967cf71962fc07cf6#commitcomment-10625122) and why I haven't implemented same thing alternatives did. Good news: those are alternatives ;-) \ No newline at end of file diff --git a/node_modules/html-escaper/cjs/index.js b/node_modules/html-escaper/cjs/index.js new file mode 100644 index 0000000000000..164a34cb6fd4f --- /dev/null +++ b/node_modules/html-escaper/cjs/index.js @@ -0,0 +1,65 @@ +'use strict'; +/** + * Copyright (C) 2017-present by Andrea Giammarchi - @WebReflection + * + * 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. + */ + +var replace = ''.replace; + +var ca = /[&<>'"]/g; +var es = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g; + +var esca = { + '&': '&', + '<': '<', + '>': '>', + "'": ''', + '"': '"' +}; +var unes = { + '&': '&', + '&': '&', + '<': '<', + '<': '<', + '>': '>', + '>': '>', + ''': "'", + ''': "'", + '"': '"', + '"': '"' +}; + +function escape(es) { + return replace.call(es, ca, pe); +} +exports.escape = escape; + +function unescape(un) { + return replace.call(un, es, cape); +} +exports.unescape = unescape; + +function pe(m) { + return esca[m]; +} + +function cape(m) { + return unes[m]; +} diff --git a/node_modules/html-escaper/cjs/package.json b/node_modules/html-escaper/cjs/package.json new file mode 100644 index 0000000000000..0292b9956f2e4 --- /dev/null +++ b/node_modules/html-escaper/cjs/package.json @@ -0,0 +1 @@ +{"type":"commonjs"} \ No newline at end of file diff --git a/node_modules/html-escaper/esm/index.js b/node_modules/html-escaper/esm/index.js new file mode 100644 index 0000000000000..e05b93f6a1760 --- /dev/null +++ b/node_modules/html-escaper/esm/index.js @@ -0,0 +1,62 @@ +/** + * Copyright (C) 2017-present by Andrea Giammarchi - @WebReflection + * + * 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. + */ + +var replace = ''.replace; + +var ca = /[&<>'"]/g; +var es = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g; + +var esca = { + '&': '&', + '<': '<', + '>': '>', + "'": ''', + '"': '"' +}; +var unes = { + '&': '&', + '&': '&', + '<': '<', + '<': '<', + '>': '>', + '>': '>', + ''': "'", + ''': "'", + '"': '"', + '"': '"' +}; + +export function escape(es) { + return replace.call(es, ca, pe); +}; + +export function unescape(un) { + return replace.call(un, es, cape); +}; + +function pe(m) { + return esca[m]; +} + +function cape(m) { + return unes[m]; +} diff --git a/node_modules/html-escaper/index.js b/node_modules/html-escaper/index.js new file mode 100644 index 0000000000000..6c3f2ab4dfea3 --- /dev/null +++ b/node_modules/html-escaper/index.js @@ -0,0 +1,70 @@ +var html = (function (exports) { + 'use strict'; + + /** + * Copyright (C) 2017-present by Andrea Giammarchi - @WebReflection + * + * 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. + */ + + var replace = ''.replace; + + var ca = /[&<>'"]/g; + var es = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g; + + var esca = { + '&': '&', + '<': '<', + '>': '>', + "'": ''', + '"': '"' + }; + var unes = { + '&': '&', + '&': '&', + '<': '<', + '<': '<', + '>': '>', + '>': '>', + ''': "'", + ''': "'", + '"': '"', + '"': '"' + }; + + function escape(es) { + return replace.call(es, ca, pe); + } + function unescape(un) { + return replace.call(un, es, cape); + } + function pe(m) { + return esca[m]; + } + + function cape(m) { + return unes[m]; + } + + exports.escape = escape; + exports.unescape = unescape; + + return exports; + +}({})); diff --git a/node_modules/html-escaper/min.js b/node_modules/html-escaper/min.js new file mode 100644 index 0000000000000..54d0c2356b834 --- /dev/null +++ b/node_modules/html-escaper/min.js @@ -0,0 +1 @@ +var html=function(t){"use strict";var n="".replace,u=/[&<>'"]/g,r=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g,a={"&":"&","<":"<",">":">","'":"'",'"':"""},e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'};function c(t){return a[t]}function o(t){return e[t]}return t.escape=function(t){return n.call(t,u,c)},t.unescape=function(t){return n.call(t,r,o)},t}({}); \ No newline at end of file diff --git a/node_modules/html-escaper/package.json b/node_modules/html-escaper/package.json new file mode 100644 index 0000000000000..15e3a466e5e5f --- /dev/null +++ b/node_modules/html-escaper/package.json @@ -0,0 +1,69 @@ +{ + "_from": "html-escaper@^2.0.0", + "_id": "html-escaper@2.0.2", + "_inBundle": false, + "_integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "_location": "/html-escaper", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "html-escaper@^2.0.0", + "name": "html-escaper", + "escapedName": "html-escaper", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/istanbul-reports" + ], + "_resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "_shasum": "dfd60027da36a36dfcbe236262c00a5822681453", + "_spec": "html-escaper@^2.0.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/istanbul-reports", + "author": { + "name": "Andrea Giammarchi" + }, + "bugs": { + "url": "https://github.com/WebReflection/html-escaper/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "fast and safe way to escape and unescape &<>'\" chars", + "devDependencies": { + "ascjs": "^3.1.2", + "coveralls": "^3.0.11", + "istanbul": "^0.4.5", + "rollup": "^2.1.0", + "uglify-js": "^3.8.0" + }, + "homepage": "https://github.com/WebReflection/html-escaper", + "keywords": [ + "html", + "escape", + "encode", + "unescape", + "decode", + "entities" + ], + "license": "MIT", + "main": "./cjs/index.js", + "module": "./esm/index.js", + "name": "html-escaper", + "repository": { + "type": "git", + "url": "git+https://github.com/WebReflection/html-escaper.git" + }, + "scripts": { + "build": "npm run cjs && npm run rollup && npm run minify && npm test && npm run size", + "cjs": "ascjs esm cjs", + "coveralls": "cat ./coverage/lcov.info | coveralls", + "minify": "uglifyjs index.js --comments=/^!/ --compress --mangle -o min.js", + "rollup": "rollup --config rollup.config.js", + "size": "cat index.js | wc -c;cat min.js | wc -c;gzip -c min.js | wc -c", + "test": "istanbul cover ./test/index.js" + }, + "unpkg": "min.js", + "version": "2.0.2" +} diff --git a/node_modules/html-escaper/test/index.js b/node_modules/html-escaper/test/index.js new file mode 100644 index 0000000000000..0eb00dee48636 --- /dev/null +++ b/node_modules/html-escaper/test/index.js @@ -0,0 +1,23 @@ +delete Object.freeze; + +var html = require('../cjs'); + +console.assert( + html.escape('&<>\'"') === '&<>'"', + 'correct escape' +); + +console.assert( + html.escape('<>\'"&') === '<>'"&', + 'correct inverted escape' +); + +console.assert( + '&<>\'"' === html.unescape('&<>'"'), + 'correct unescape' +); + +console.assert( + '<>\'"&' === html.unescape('<>'"&'), + 'correct inverted unescape' +); diff --git a/node_modules/html-escaper/test/package.json b/node_modules/html-escaper/test/package.json new file mode 100644 index 0000000000000..0292b9956f2e4 --- /dev/null +++ b/node_modules/html-escaper/test/package.json @@ -0,0 +1 @@ +{"type":"commonjs"} \ No newline at end of file diff --git a/node_modules/invert-kv/index.js b/node_modules/invert-kv/index.js deleted file mode 100644 index 27f9cbb8eaf28..0000000000000 --- a/node_modules/invert-kv/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -module.exports = object => { - if (typeof object !== 'object') { - throw new TypeError('Expected an object'); - } - - const ret = {}; - - for (const key of Object.keys(object)) { - const value = object[key]; - ret[value] = key; - } - - return ret; -}; diff --git a/node_modules/invert-kv/package.json b/node_modules/invert-kv/package.json deleted file mode 100644 index beb77fa37f6fa..0000000000000 --- a/node_modules/invert-kv/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "invert-kv@^2.0.0", - "_id": "invert-kv@2.0.0", - "_inBundle": false, - "_integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "_location": "/invert-kv", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "invert-kv@^2.0.0", - "name": "invert-kv", - "escapedName": "invert-kv", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/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": "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'}`", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/invert-kv#readme", - "keywords": [ - "object", - "key", - "value", - "kv", - "invert" - ], - "license": "MIT", - "name": "invert-kv", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/invert-kv.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0" -} diff --git a/node_modules/invert-kv/readme.md b/node_modules/invert-kv/readme.md deleted file mode 100644 index 365a97997cac3..0000000000000 --- a/node_modules/invert-kv/readme.md +++ /dev/null @@ -1,25 +0,0 @@ -# invert-kv [![Build Status](https://travis-ci.org/sindresorhus/invert-kv.svg?branch=master)](https://travis-ci.org/sindresorhus/invert-kv) - -> Invert the key/value of an object. Example: `{foo: 'bar'}` β†’ `{bar: 'foo'}` - - -## Install - -``` -$ npm install invert-kv -``` - - -## Usage - -```js -const invertKv = require('invert-kv'); - -invertKv({foo: 'bar', unicorn: 'rainbow'}); -//=> {bar: 'foo', rainbow: 'unicorn'} -``` - - -## License - -MIT Β© [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/lcid/index.js b/node_modules/lcid/index.js deleted file mode 100644 index b666ef00a4504..0000000000000 --- a/node_modules/lcid/index.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; -const invertKv = require('invert-kv'); -const all = require('./lcid.json'); - -const inverted = invertKv(all); - -exports.from = lcidCode => { - if (typeof lcidCode !== 'number') { - throw new TypeError('Expected a number'); - } - - return inverted[lcidCode]; -}; - -exports.to = localeId => { - if (typeof localeId !== 'string') { - throw new TypeError('Expected a string'); - } - - return all[localeId]; -}; - -exports.all = all; diff --git a/node_modules/lcid/lcid.json b/node_modules/lcid/lcid.json deleted file mode 100644 index 9c89f6a496548..0000000000000 --- a/node_modules/lcid/lcid.json +++ /dev/null @@ -1,203 +0,0 @@ -{ - "af_ZA": 1078, - "am_ET": 1118, - "ar_AE": 14337, - "ar_BH": 15361, - "ar_DZ": 5121, - "ar_EG": 3073, - "ar_IQ": 2049, - "ar_JO": 11265, - "ar_KW": 13313, - "ar_LB": 12289, - "ar_LY": 4097, - "ar_MA": 6145, - "ar_OM": 8193, - "ar_QA": 16385, - "ar_SA": 1025, - "ar_SY": 10241, - "ar_TN": 7169, - "ar_YE": 9217, - "arn_CL": 1146, - "as_IN": 1101, - "az_AZ": 2092, - "ba_RU": 1133, - "be_BY": 1059, - "bg_BG": 1026, - "bn_IN": 1093, - "bo_BT": 2129, - "bo_CN": 1105, - "br_FR": 1150, - "bs_BA": 8218, - "ca_ES": 1027, - "co_FR": 1155, - "cs_CZ": 1029, - "cy_GB": 1106, - "da_DK": 1030, - "de_AT": 3079, - "de_CH": 2055, - "de_DE": 1031, - "de_LI": 5127, - "de_LU": 4103, - "div_MV": 1125, - "dsb_DE": 2094, - "el_GR": 1032, - "en_AU": 3081, - "en_BZ": 10249, - "en_CA": 4105, - "en_CB": 9225, - "en_GB": 2057, - "en_IE": 6153, - "en_IN": 18441, - "en_JA": 8201, - "en_MY": 17417, - "en_NZ": 5129, - "en_PH": 13321, - "en_TT": 11273, - "en_US": 1033, - "en_ZA": 7177, - "en_ZW": 12297, - "es_AR": 11274, - "es_BO": 16394, - "es_CL": 13322, - "es_CO": 9226, - "es_CR": 5130, - "es_DO": 7178, - "es_EC": 12298, - "es_ES": 3082, - "es_GT": 4106, - "es_HN": 18442, - "es_MX": 2058, - "es_NI": 19466, - "es_PA": 6154, - "es_PE": 10250, - "es_PR": 20490, - "es_PY": 15370, - "es_SV": 17418, - "es_UR": 14346, - "es_US": 21514, - "es_VE": 8202, - "et_EE": 1061, - "eu_ES": 1069, - "fa_IR": 1065, - "fi_FI": 1035, - "fil_PH": 1124, - "fo_FO": 1080, - "fr_BE": 2060, - "fr_CA": 3084, - "fr_CH": 4108, - "fr_FR": 1036, - "fr_LU": 5132, - "fr_MC": 6156, - "fy_NL": 1122, - "ga_IE": 2108, - "gbz_AF": 1164, - "gl_ES": 1110, - "gsw_FR": 1156, - "gu_IN": 1095, - "ha_NG": 1128, - "he_IL": 1037, - "hi_IN": 1081, - "hr_BA": 4122, - "hr_HR": 1050, - "hu_HU": 1038, - "hy_AM": 1067, - "id_ID": 1057, - "ii_CN": 1144, - "is_IS": 1039, - "it_CH": 2064, - "it_IT": 1040, - "iu_CA": 2141, - "ja_JP": 1041, - "ka_GE": 1079, - "kh_KH": 1107, - "kk_KZ": 1087, - "kl_GL": 1135, - "kn_IN": 1099, - "ko_KR": 1042, - "kok_IN": 1111, - "ky_KG": 1088, - "lb_LU": 1134, - "lo_LA": 1108, - "lt_LT": 1063, - "lv_LV": 1062, - "mi_NZ": 1153, - "mk_MK": 1071, - "ml_IN": 1100, - "mn_CN": 2128, - "mn_MN": 1104, - "moh_CA": 1148, - "mr_IN": 1102, - "ms_BN": 2110, - "ms_MY": 1086, - "mt_MT": 1082, - "my_MM": 1109, - "nb_NO": 1044, - "ne_NP": 1121, - "nl_BE": 2067, - "nl_NL": 1043, - "nn_NO": 2068, - "ns_ZA": 1132, - "oc_FR": 1154, - "or_IN": 1096, - "pa_IN": 1094, - "pl_PL": 1045, - "ps_AF": 1123, - "pt_BR": 1046, - "pt_PT": 2070, - "qut_GT": 1158, - "quz_BO": 1131, - "quz_EC": 2155, - "quz_PE": 3179, - "rm_CH": 1047, - "ro_RO": 1048, - "ru_RU": 1049, - "rw_RW": 1159, - "sa_IN": 1103, - "sah_RU": 1157, - "se_FI": 3131, - "se_NO": 1083, - "se_SE": 2107, - "si_LK": 1115, - "sk_SK": 1051, - "sl_SI": 1060, - "sma_NO": 6203, - "sma_SE": 7227, - "smj_NO": 4155, - "smj_SE": 5179, - "smn_FI": 9275, - "sms_FI": 8251, - "sq_AL": 1052, - "sr_BA": 7194, - "sr_SP": 3098, - "sv_FI": 2077, - "sv_SE": 1053, - "sw_KE": 1089, - "syr_SY": 1114, - "ta_IN": 1097, - "te_IN": 1098, - "tg_TJ": 1064, - "th_TH": 1054, - "tk_TM": 1090, - "tmz_DZ": 2143, - "tn_ZA": 1074, - "tr_TR": 1055, - "tt_RU": 1092, - "ug_CN": 1152, - "uk_UA": 1058, - "ur_IN": 2080, - "ur_PK": 1056, - "uz_UZ": 2115, - "vi_VN": 1066, - "wen_DE": 1070, - "wo_SN": 1160, - "xh_ZA": 1076, - "yo_NG": 1130, - "zh_CHS": 4, - "zh_CHT": 31748, - "zh_CN": 2052, - "zh_HK": 3076, - "zh_MO": 5124, - "zh_SG": 4100, - "zh_TW": 1028, - "zu_ZA": 1077 -} diff --git a/node_modules/lcid/package.json b/node_modules/lcid/package.json deleted file mode 100644 index 3de023722441e..0000000000000 --- a/node_modules/lcid/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "_from": "lcid@^2.0.0", - "_id": "lcid@2.0.0", - "_inBundle": false, - "_integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "_location": "/lcid", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "lcid@^2.0.0", - "name": "lcid", - "escapedName": "lcid", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/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", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/lcid/issues" - }, - "bundleDependencies": false, - "dependencies": { - "invert-kv": "^2.0.0" - }, - "deprecated": false, - "description": "Mapping between standard locale identifiers and Windows locale identifiers (LCID)", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "lcid.json" - ], - "homepage": "https://github.com/sindresorhus/lcid#readme", - "keywords": [ - "lcid", - "locale", - "string", - "str", - "id", - "identifier", - "windows", - "language", - "lang", - "map", - "mapping", - "convert", - "json", - "bcp47", - "ietf", - "tag" - ], - "license": "MIT", - "name": "lcid", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/lcid.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0" -} diff --git a/node_modules/lcid/readme.md b/node_modules/lcid/readme.md deleted file mode 100644 index 2b1aa798b6930..0000000000000 --- a/node_modules/lcid/readme.md +++ /dev/null @@ -1,35 +0,0 @@ -# lcid [![Build Status](https://travis-ci.org/sindresorhus/lcid.svg?branch=master)](https://travis-ci.org/sindresorhus/lcid) - -> 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/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. - - -## Install - -``` -$ npm install lcid -``` - - -## Usage - -```js -const lcid = require('lcid'); - -lcid.from(1044); -//=> 'nb_NO' - -lcid.to('nb_NO'); -//=> 1044 - -lcid.all; -//=> {'af_ZA': 1078, ...} -``` - - -## License - -MIT Β© [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/libcipm/CHANGELOG.md b/node_modules/libcipm/CHANGELOG.md index 80411f300698c..985d6df39e5f7 100644 --- a/node_modules/libcipm/CHANGELOG.md +++ b/node_modules/libcipm/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +<a name="4.0.8"></a> +## [4.0.8](https://github.com/npm/libcipm/compare/v4.0.7...v4.0.8) (2020-03-25) + + +### Bug Fixes + +* add repo to bin pkg, bump to 2.0.1 ([ed2d735](https://github.com/npm/libcipm/commit/ed2d735)) + + + <a name="4.0.7"></a> ## [4.0.7](https://github.com/npm/libcipm/compare/v4.0.4...v4.0.7) (2019-10-09) diff --git a/node_modules/libcipm/README.md b/node_modules/libcipm/README.md index 3dd9cbe149220..2316f0eaabf85 100644 --- a/node_modules/libcipm/README.md +++ b/node_modules/libcipm/README.md @@ -1,4 +1,9 @@ -[![npm](https://img.shields.io/npm/v/libcipm.svg)](https://npm.im/libcipm) [![license](https://img.shields.io/npm/l/libcipm.svg)](https://npm.im/libcipm) [![Travis](https://img.shields.io/travis/npm/libcipm.svg)](https://travis-ci.org/npm/libcipm) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/npm/libcipm?svg=true)](https://ci.appveyor.com/project/npm/libcipm) [![Coverage Status](https://coveralls.io/repos/github/npm/libcipm/badge.svg?branch=latest)](https://coveralls.io/github/npm/libcipm?branch=latest) +# Note: pending imminent deprecation + +**This module will be deprecated once npm v7 is released. Please do not rely +on it more than absolutely necessary.** + +---- [`libcipm`](https://github.com/npm/libcipm) installs npm projects in a way that's optimized for continuous integration/deployment/etc scenarios. It gives up @@ -16,7 +21,6 @@ For documentation about the associated command-line tool, see ## Table of Contents * [Features](#features) -* [Contributing](#contributing) * [API](#api) ### Features @@ -26,12 +30,3 @@ For documentation about the associated command-line tool, see * blazing fast * npm-compatible caching * errors if `package.json` and `package-lock.json` are out of sync, instead of fixing it like npm does. Essentially provides a `--frozen` install. - -### Contributing - -The libcipm team enthusiastically welcomes contributions and project -participation! There's a bunch of things you can do if you want to contribute! -The [Contributor Guide](CONTRIBUTING.md) has all the information you need for -everything from reporting bugs to contributing entire new features. Please don't -hesitate to jump in if you'd like to, or even ask us questions if something -isn't clear. diff --git a/node_modules/libcipm/package.json b/node_modules/libcipm/package.json index 1411b40950004..f2317ba5f5fe8 100644 --- a/node_modules/libcipm/package.json +++ b/node_modules/libcipm/package.json @@ -1,28 +1,28 @@ { - "_from": "libcipm@4.0.7", - "_id": "libcipm@4.0.7", + "_from": "libcipm@4.0.8", + "_id": "libcipm@4.0.8", "_inBundle": false, - "_integrity": "sha512-fTq33otU3PNXxxCTCYCYe7V96o59v/o7bvtspmbORXpgFk+wcWrGf5x6tBgui5gCed/45/wtPomBsZBYm5KbIw==", + "_integrity": "sha512-IN3hh2yDJQtZZ5paSV4fbvJg4aHxCCg5tcZID/dSVlTuUiWktsgaldVljJv6Z5OUlYspx6xQkbR0efNodnIrOA==", "_location": "/libcipm", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "libcipm@4.0.7", + "raw": "libcipm@4.0.8", "name": "libcipm", "escapedName": "libcipm", - "rawSpec": "4.0.7", + "rawSpec": "4.0.8", "saveSpec": null, - "fetchSpec": "4.0.7" + "fetchSpec": "4.0.8" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/libcipm/-/libcipm-4.0.7.tgz", - "_shasum": "76cd675c98bdaae64db88b782b01b804b6d02c8a", - "_spec": "libcipm@4.0.7", - "_where": "/Users/mperrotte/npminc/cli", + "_resolved": "https://registry.npmjs.org/libcipm/-/libcipm-4.0.8.tgz", + "_shasum": "dcea4919e10dfbce420327e63901613b9141bc89", + "_spec": "libcipm@4.0.8", + "_where": "/Users/claudiahdz/npm/cli", "author": { "name": "Kat MarchΓ‘n", "email": "kzm@sykosomatic.org" @@ -46,7 +46,7 @@ "find-npm-prefix": "^1.0.2", "graceful-fs": "^4.1.11", "ini": "^1.3.5", - "lock-verify": "^2.0.2", + "lock-verify": "^2.1.0", "mkdirp": "^0.5.1", "npm-lifecycle": "^3.0.0", "npm-logical-tree": "^1.2.1", @@ -65,9 +65,7 @@ "standard": "^11.0.1", "standard-version": "^4.4.0", "tacks": "^1.2.6", - "tap": "^12.0.1", - "weallbehave": "^1.2.0", - "weallcontribute": "^1.0.8" + "tap": "^12.0.1" }, "files": [ "*.js", @@ -92,9 +90,7 @@ "prerelease": "npm t", "pretest": "standard", "release": "standard-version -s", - "test": "tap -J --nyc-arg=--all --coverage test/specs", - "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'" + "test": "tap -J --nyc-arg=--all --coverage test/specs" }, - "version": "4.0.7" + "version": "4.0.8" } diff --git a/node_modules/libnpx/CHANGELOG.md b/node_modules/libnpx/CHANGELOG.md index 74da62235d696..d8ea8b4e87411 100644 --- a/node_modules/libnpx/CHANGELOG.md +++ b/node_modules/libnpx/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +<a name="10.2.4"></a> +## [10.2.4](https://github.com/npm/npx/compare/v10.2.3...v10.2.4) (2020-07-20) + + + +<a name="10.2.3"></a> +## [10.2.3](https://github.com/npm/npx/compare/v10.2.2...v10.2.3) (2020-03-24) + + + <a name="10.2.2"></a> ## [10.2.2](https://github.com/npm/npx/compare/v10.2.1...v10.2.2) (2020-01-28) diff --git a/node_modules/libnpx/libnpx.1 b/node_modules/libnpx/libnpx.1 index aea3ffe8f4192..1f5669d3c9d76 100644 --- a/node_modules/libnpx/libnpx.1 +++ b/node_modules/libnpx/libnpx.1 @@ -1,4 +1,4 @@ -.TH "NPX" "1" "January 2020" "libnpx@10.2.1" "User Commands" +.TH "NPX" "1" "July 2020" "libnpx@10.2.3" "User Commands" .SH "NAME" \fBnpx\fR \- execute npm package binaries .SH SYNOPSIS diff --git a/node_modules/libnpx/package.json b/node_modules/libnpx/package.json index 9b9949cd3ca4f..53073ae79a2a0 100644 --- a/node_modules/libnpx/package.json +++ b/node_modules/libnpx/package.json @@ -1,28 +1,28 @@ { - "_from": "libnpx@10.2.2", - "_id": "libnpx@10.2.2", + "_from": "libnpx@10.2.4", + "_id": "libnpx@10.2.4", "_inBundle": false, - "_integrity": "sha512-ujaYToga1SAX5r7FU5ShMFi88CWpY75meNZtr6RtEyv4l2ZK3+Wgvxq2IqlwWBiDZOqhumdeiocPS1aKrCMe3A==", + "_integrity": "sha512-BPc0D1cOjBeS8VIBKUu5F80s6njm0wbVt7CsGMrIcJ+SI7pi7V0uVPGpEMH9H5L8csOcclTxAXFE2VAsJXUhfA==", "_location": "/libnpx", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "libnpx@10.2.2", + "raw": "libnpx@10.2.4", "name": "libnpx", "escapedName": "libnpx", - "rawSpec": "10.2.2", + "rawSpec": "10.2.4", "saveSpec": null, - "fetchSpec": "10.2.2" + "fetchSpec": "10.2.4" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/libnpx/-/libnpx-10.2.2.tgz", - "_shasum": "5a4171b9b92dd031463ef66a4af9f5cbd6b09572", - "_spec": "libnpx@10.2.2", - "_where": "/Users/mperrotte/npminc/cli", + "_resolved": "https://registry.npmjs.org/libnpx/-/libnpx-10.2.4.tgz", + "_shasum": "ef0e3258e29aef2ec7ee3276115e20e67f67d4ee", + "_spec": "libnpx@10.2.4", + "_where": "/Users/claudiahdz/npm/cli", "author": { "name": "Kat MarchΓ‘n", "email": "kzm@sykosomatic.org" @@ -47,7 +47,7 @@ "update-notifier": "^2.3.0", "which": "^1.3.0", "y18n": "^4.0.0", - "yargs": "^11.0.0" + "yargs": "^14.2.3" }, "deprecated": false, "description": "support library for npx -- an tool for executing npm-based packages.", @@ -62,9 +62,7 @@ "standard": "^11.0.0", "standard-version": "^4.3.0", "tacks": "^1.2.6", - "tap": "^11.1.2", - "weallbehave": "^1.2.0", - "weallcontribute": "^1.0.8" + "tap": "^11.1.2" }, "engines": { "node": ">=4" @@ -101,9 +99,7 @@ "pretest": "standard *.js test bin/*.js locales", "publish-bin": "npm run bin && cd bin && npm publish", "release": "standard-version -s", - "test": "cross-env NPX_UPDATE_LOCALE_FILES=true LC_ALL=en nyc --all -- tap -J test/*.js", - "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'" + "test": "cross-env NPX_UPDATE_LOCALE_FILES=true LC_ALL=en nyc --all -- tap -J test/*.js" }, - "version": "10.2.2" + "version": "10.2.4" } diff --git a/node_modules/meant/.github/workflows/ci.yml b/node_modules/meant/.github/workflows/ci.yml new file mode 100644 index 0000000000000..b11451fa603d5 --- /dev/null +++ b/node_modules/meant/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: Node.js CI + +on: [push, pull_request] + +jobs: + build: + strategy: + matrix: + node-version: [6.x, 8.x, 10.x, 12.x] + os: [ubuntu-latest, windows-latest, macOS-latest] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm test diff --git a/node_modules/meant/.npmignore b/node_modules/meant/.npmignore deleted file mode 100644 index 5148e527a7e28..0000000000000 --- a/node_modules/meant/.npmignore +++ /dev/null @@ -1,37 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules -jspm_packages - -# Optional npm cache directory -.npm - -# Optional REPL history -.node_repl_history diff --git a/node_modules/meant/.travis.yml b/node_modules/meant/.travis.yml deleted file mode 100644 index 413d5de7f1a64..0000000000000 --- a/node_modules/meant/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -script: - - "npm test" - -language: node_js - -node_js: - - "5" - - "4" - - iojs - - "0.12" - -sudo: false - -cache: - directories: - - node_modules diff --git a/node_modules/meant/CHANGELOG.md b/node_modules/meant/CHANGELOG.md index a26b8aadfa1f5..89b0e6f94e1cc 100644 --- a/node_modules/meant/CHANGELOG.md +++ b/node_modules/meant/CHANGELOG.md @@ -1,7 +1,15 @@ -# Change Log +# Changelog 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. +### [1.0.2](https://github.com/watilde/meant/compare/v1.0.1...v1.0.2) (2020-07-19) + + +### Bug Fixes + +* **deps:** bump standard, standard-version and tap ([d31fb06](https://github.com/watilde/meant/commit/d31fb064495b031dd1152726da9bd2198daa36ff)) +* **deps:** patch update in lock file ([4e699ee](https://github.com/watilde/meant/commit/4e699ee8751a69923dddf18c940acce630f4bf29)) + <a name="1.0.1"></a> ## [1.0.1](https://github.com/watilde/meant/compare/v1.0.0...v1.0.1) (2017-08-23) diff --git a/node_modules/meant/README.md b/node_modules/meant/README.md index 90cc0ac77c16b..2fe43b610a71d 100644 --- a/node_modules/meant/README.md +++ b/node_modules/meant/README.md @@ -1,4 +1,4 @@ -# meant [![Build Status](https://travis-ci.org/watilde/meant.png?branch=master)](https://travis-ci.org/watilde/meant) +# meant ![Build status](https://github.com/watilde/meant/workflows/Node.js%20CI/badge.svg) Like the `Did you mean?` in git for npm diff --git a/node_modules/meant/package.json b/node_modules/meant/package.json index a22398f4bd24e..64fb15b983f08 100644 --- a/node_modules/meant/package.json +++ b/node_modules/meant/package.json @@ -1,43 +1,41 @@ { - "_args": [ - [ - "meant@1.0.1", - "/Users/rebecca/code/npm" - ] - ], - "_from": "meant@1.0.1", - "_id": "meant@1.0.1", + "_from": "meant@1.0.2", + "_id": "meant@1.0.2", "_inBundle": false, - "_integrity": "sha512-UakVLFjKkbbUwNWJ2frVLnnAtbb7D7DsloxRd3s/gDpI8rdv8W5Hp3NaDb+POBI1fQdeussER6NB8vpcRURvlg==", + "_integrity": "sha512-KN+1uowN/NK+sT/Lzx7WSGIj2u+3xe5n2LbwObfjOhPZiA+cCfCm6idVl0RkEfjThkw5XJ96CyRcanq6GmKtUg==", "_location": "/meant", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "meant@1.0.1", + "raw": "meant@1.0.2", "name": "meant", "escapedName": "meant", - "rawSpec": "1.0.1", + "rawSpec": "1.0.2", "saveSpec": null, - "fetchSpec": "1.0.1" + "fetchSpec": "1.0.2" }, "_requiredBy": [ + "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/meant/-/meant-1.0.1.tgz", - "_spec": "1.0.1", - "_where": "/Users/rebecca/code/npm", + "_resolved": "https://registry.npmjs.org/meant/-/meant-1.0.2.tgz", + "_shasum": "5d0c78310a3d8ae1408a16be0fe0bd42a969f560", + "_spec": "meant@1.0.2", + "_where": "/Users/ruyadorno/Documents/workspace/cli/latest", "author": { "name": "Daijiro Wachi" }, "bugs": { "url": "https://github.com/watilde/meant/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "Like the `Did you mean?` in git for npm", "devDependencies": { - "standard": "^8.0.0", - "standard-version": "^2.4.0", - "tap": "^7.1.1" + "standard": "^11.0.1", + "standard-version": "^8.0.1", + "tap": "^12.7.0" }, "homepage": "https://github.com/watilde/meant#readme", "keywords": [ @@ -54,5 +52,5 @@ "release": "standard-version", "test": "standard && tap test.js" }, - "version": "1.0.1" + "version": "1.0.2" } diff --git a/node_modules/mem/index.d.ts b/node_modules/mem/index.d.ts deleted file mode 100644 index 786625520b203..0000000000000 --- a/node_modules/mem/index.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -declare namespace mem { - interface CacheStorage<KeyType extends unknown, ValueType extends unknown> { - 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<CacheKeyType, {data: ReturnType; maxAge: number}>; - - /** - 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<ArgumentsType, CacheKeyType, ReturnType> - ): (...arguments: ArgumentsType) => ReturnType; - - /** - Clear all cached data of a memoized function. - - @param fn - Memoized function. - */ - clear<ArgumentsType extends unknown[], ReturnType extends unknown>( - 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 deleted file mode 100644 index 51faf012c2fc4..0000000000000 --- a/node_modules/mem/index.js +++ /dev/null @@ -1,88 +0,0 @@ -'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 = (...arguments_) => { - if (arguments_.length === 0) { - return '__defaultKey'; - } - - if (arguments_.length === 1) { - const [firstArgument] = arguments_; - if ( - firstArgument === null || - firstArgument === undefined || - (typeof firstArgument !== 'function' && typeof firstArgument !== 'object') - ) { - return firstArgument; - } - } - - return JSON.stringify(arguments_); -}; - -const mem = (fn, options) => { - options = Object.assign({ - cacheKey: defaultCacheKey, - cache: new Map(), - cachePromiseRejection: false - }, options); - - if (typeof options.maxAge === 'number') { - mapAgeCleaner(options.cache); - } - - const {cache} = options; - options.maxAge = options.maxAge || 0; - - const setData = (key, data) => { - cache.set(key, { - data, - maxAge: Date.now() + options.maxAge - }); - }; - - const memoized = function (...arguments_) { - const key = options.cacheKey(...arguments_); - - if (cache.has(key)) { - return cache.get(key).data; - } - - const cacheItem = fn.call(this, ...arguments_); - - 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 cacheItem; - }; - - 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, 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); - - if (cache && typeof cache.clear === 'function') { - cache.clear(); - } -}; diff --git a/node_modules/mem/node_modules/mimic-fn/index.d.ts b/node_modules/mem/node_modules/mimic-fn/index.d.ts deleted file mode 100644 index b4047d58902eb..0000000000000 --- a/node_modules/mem/node_modules/mimic-fn/index.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -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 deleted file mode 100644 index 1a597051750da..0000000000000 --- a/node_modules/mem/node_modules/mimic-fn/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'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/package.json b/node_modules/mem/node_modules/mimic-fn/package.json deleted file mode 100644 index b4970a28d40c8..0000000000000 --- a/node_modules/mem/node_modules/mimic-fn/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_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 deleted file mode 100644 index 0ef8a13d7e0d9..0000000000000 --- a/node_modules/mem/node_modules/mimic-fn/readme.md +++ /dev/null @@ -1,69 +0,0 @@ -# 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 deleted file mode 100644 index eedf07469c4c3..0000000000000 --- a/node_modules/mem/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_from": "mem@^4.0.0", - "_id": "mem@4.3.0", - "_inBundle": false, - "_integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "_location": "/mem", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "mem@^4.0.0", - "name": "mem", - "escapedName": "mem", - "rawSpec": "^4.0.0", - "saveSpec": null, - "fetchSpec": "^4.0.0" - }, - "_requiredBy": [ - "/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", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/mem/issues" - }, - "bundleDependencies": false, - "dependencies": { - "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": "^1.4.1", - "delay": "^4.1.0", - "tsd": "^0.7.1", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/sindresorhus/mem#readme", - "keywords": [ - "memoize", - "function", - "mem", - "memoization", - "cache", - "caching", - "optimize", - "performance", - "ttl", - "expire", - "promise" - ], - "license": "MIT", - "name": "mem", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/mem.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "4.3.0" -} diff --git a/node_modules/mem/readme.md b/node_modules/mem/readme.md deleted file mode 100644 index add4222b62d71..0000000000000 --- a/node_modules/mem/readme.md +++ /dev/null @@ -1,167 +0,0 @@ -# mem [![Build Status](https://travis-ci.org/sindresorhus/mem.svg?branch=master)](https://travis-ci.org/sindresorhus/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 - -Memory is automatically released when an item expires. - - -## Install - -``` -$ npm install mem -``` - - -## Usage - -```js -const 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 -``` - -##### Works fine with promise returning functions - -```js -const mem = require('mem'); - -let i = 0; -const counter = async () => ++i; -const memoized = mem(counter); - -(async () => { - console.log(await memoized()); - //=> 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}); - -(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'); -})(); -``` - - -## API - -### mem(fn, [options]) - -#### fn - -Type: `Function` - -Function to be memoized. - -#### options - -Type: `Object` - -##### maxAge - -Type: `number`<br> -Default: `Infinity` - -Milliseconds until the cache expires. - -##### cacheKey - -Type: `Function` - -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)`. - -##### cache - -Type: `Object`<br> -Default: `new Map()` - -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`<br> -Default: `false` - -Cache rejected promises. - -### mem.clear(fn) - -Clear all cached data of a memoized function. - -#### fn - -Type: `Function` - -Memoized function. - - -## Tips - -### Cache statistics - -If you want to know how many times your cache had a hit or a miss, you can make use of [stats-map](https://github.com/SamVerschueren/stats-map) as a replacement for the default cache. - -#### Example - -```js -const mem = require('mem'); -const StatsMap = require('stats-map'); -const got = require('got'); - -const cache = new StatsMap(); -const memGot = mem(got, {cache}); - -(async () => { - await memGot('sindresorhus.com'); - await memGot('sindresorhus.com'); - await memGot('sindresorhus.com'); - - 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/minimist/.travis.yml b/node_modules/minimist/.travis.yml index cc4dba29d959a..74c57bf15e239 100644 --- a/node_modules/minimist/.travis.yml +++ b/node_modules/minimist/.travis.yml @@ -2,3 +2,7 @@ language: node_js node_js: - "0.8" - "0.10" + - "0.12" + - "iojs" +before_install: + - npm install -g npm@~1.4.6 diff --git a/node_modules/minimist/example/parse.js b/node_modules/minimist/example/parse.js index abff3e8ee8f5e..f7c8d49807f32 100644 --- a/node_modules/minimist/example/parse.js +++ b/node_modules/minimist/example/parse.js @@ -1,2 +1,2 @@ var argv = require('../')(process.argv.slice(2)); -console.dir(argv); +console.log(argv); diff --git a/node_modules/minimist/index.js b/node_modules/minimist/index.js index 584f551a6da73..d2afe5e4d4056 100644 --- a/node_modules/minimist/index.js +++ b/node_modules/minimist/index.js @@ -1,15 +1,19 @@ module.exports = function (args, opts) { if (!opts) opts = {}; - var flags = { bools : {}, strings : {} }; - - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - }); + var flags = { bools : {}, strings : {}, unknownFn: null }; + + if (typeof opts['unknown'] === 'function') { + flags.unknownFn = opts['unknown']; + } + + if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { + flags.allBools = true; + } else { + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + } var aliases = {}; Object.keys(opts.alias || {}).forEach(function (key) { @@ -20,7 +24,14 @@ module.exports = function (args, opts) { })); }); }); - + + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + if (aliases[key]) { + flags.strings[aliases[key]] = true; + } + }); + var defaults = opts['default'] || {}; var argv = { _ : [] }; @@ -35,7 +46,16 @@ module.exports = function (args, opts) { args = args.slice(0, args.indexOf('--')); } - function setArg (key, val) { + function argDefined(key, arg) { + return (flags.allBools && /^--[^=]+$/.test(arg)) || + flags.strings[key] || flags.bools[key] || aliases[key]; + } + + function setArg (key, val, arg) { + if (arg && flags.unknownFn && !argDefined(key, arg)) { + if (flags.unknownFn(arg) === false) return; + } + var value = !flags.strings[key] && isNumber(val) ? Number(val) : val ; @@ -45,7 +65,41 @@ module.exports = function (args, opts) { setKey(argv, x.split('.'), value); }); } + + function setKey (obj, keys, value) { + var o = obj; + for (var i = 0; i < keys.length-1; i++) { + var key = keys[i]; + if (key === '__proto__') return; + if (o[key] === undefined) o[key] = {}; + if (o[key] === Object.prototype || o[key] === Number.prototype + || o[key] === String.prototype) o[key] = {}; + if (o[key] === Array.prototype) o[key] = []; + o = o[key]; + } + + var key = keys[keys.length - 1]; + if (key === '__proto__') return; + if (o === Object.prototype || o === Number.prototype + || o === String.prototype) o = {}; + if (o === Array.prototype) o = []; + if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } + } + function aliasIsBoolean(key) { + return aliases[key].some(function (x) { + return flags.bools[x]; + }); + } + for (var i = 0; i < args.length; i++) { var arg = args[i]; @@ -54,27 +108,33 @@ module.exports = function (args, opts) { // 'dotall' regex modifier. See: // http://stackoverflow.com/a/1068308/13216 var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); + var key = m[1]; + var value = m[2]; + if (flags.bools[key]) { + value = value !== 'false'; + } + setArg(key, value, arg); } else if (/^--no-.+/.test(arg)) { var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); + setArg(key, false, arg); } else if (/^--.+/.test(arg)) { var key = arg.match(/^--(.+)/)[1]; var next = args[i + 1]; if (next !== undefined && !/^-/.test(next) && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); + && !flags.allBools + && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, next, arg); i++; } else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); + setArg(key, next === 'true', arg); i++; } else { - setArg(key, flags.strings[key] ? '' : true); + setArg(key, flags.strings[key] ? '' : true, arg); } } else if (/^-[^-]+/.test(arg)) { @@ -85,24 +145,30 @@ module.exports = function (args, opts) { var next = arg.slice(j+2); if (next === '-') { - setArg(letters[j], next) + setArg(letters[j], next, arg) continue; } + if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) { + setArg(letters[j], next.split('=')[1], arg); + broken = true; + break; + } + if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next); + setArg(letters[j], next, arg); broken = true; break; } if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); + setArg(letters[j], arg.slice(j+2), arg); broken = true; break; } else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true); + setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); } } @@ -110,23 +176,29 @@ module.exports = function (args, opts) { if (!broken && key !== '-') { if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); + && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, args[i+1], arg); i++; } - else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); + else if (args[i+1] && /^(true|false)$/.test(args[i+1])) { + setArg(key, args[i+1] === 'true', arg); i++; } else { - setArg(key, flags.strings[key] ? '' : true); + setArg(key, flags.strings[key] ? '' : true, arg); } } } else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); + if (!flags.unknownFn || flags.unknownFn(arg) !== false) { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + if (opts.stopEarly) { + argv._.push.apply(argv._, args.slice(i + 1)); + break; + } } } @@ -140,9 +212,17 @@ module.exports = function (args, opts) { } }); - notFlags.forEach(function(key) { - argv._.push(key); - }); + if (opts['--']) { + argv['--'] = new Array(); + notFlags.forEach(function(key) { + argv['--'].push(key); + }); + } + else { + notFlags.forEach(function(key) { + argv._.push(key); + }); + } return argv; }; @@ -157,31 +237,9 @@ function hasKey (obj, keys) { return key in o; } -function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } -} - function isNumber (x) { if (typeof x === 'number') return true; if (/^0x[0-9a-f]+$/i.test(x)) return true; return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); } -function longest (xs) { - return Math.max.apply(null, xs.map(function (x) { return x.length })); -} diff --git a/node_modules/minimist/package.json b/node_modules/minimist/package.json index 0a1961342b71b..502b798942f81 100644 --- a/node_modules/minimist/package.json +++ b/node_modules/minimist/package.json @@ -1,27 +1,27 @@ { - "_from": "minimist@0.0.8", - "_id": "minimist@0.0.8", + "_from": "minimist@^1.2.0", + "_id": "minimist@1.2.5", "_inBundle": false, - "_integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "_integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "_location": "/minimist", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "minimist@0.0.8", + "raw": "minimist@^1.2.0", "name": "minimist", "escapedName": "minimist", - "rawSpec": "0.0.8", + "rawSpec": "^1.2.0", "saveSpec": null, - "fetchSpec": "0.0.8" + "fetchSpec": "^1.2.0" }, "_requiredBy": [ - "/mkdirp" + "/rc" ], - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", - "_spec": "minimist@0.0.8", - "_where": "/Users/rebecca/code/npm/node_modules/mkdirp", + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "_shasum": "67d66014b66a6a8aaa0c083c5fd58df4e4e97602", + "_spec": "minimist@^1.2.0", + "_where": "/Users/ruyadorno/Documents/workspace/cli/latest/node_modules/rc", "author": { "name": "James Halliday", "email": "mail@substack.net", @@ -34,8 +34,9 @@ "deprecated": false, "description": "parse argument options", "devDependencies": { + "covert": "^1.0.0", "tap": "~0.4.0", - "tape": "~1.0.4" + "tape": "^3.5.0" }, "homepage": "https://github.com/substack/minimist", "keywords": [ @@ -52,6 +53,7 @@ "url": "git://github.com/substack/minimist.git" }, "scripts": { + "coverage": "covert test/*.js", "test": "tap test/*.js" }, "testling": { @@ -67,5 +69,5 @@ "opera/12" ] }, - "version": "0.0.8" + "version": "1.2.5" } diff --git a/node_modules/minimist/readme.markdown b/node_modules/minimist/readme.markdown index c25635323e166..5fd97ab11ee9d 100644 --- a/node_modules/minimist/readme.markdown +++ b/node_modules/minimist/readme.markdown @@ -5,15 +5,11 @@ parse argument options This module is the guts of optimist's argument parser without all the fanciful decoration. -[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) - -[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) - # example ``` js var argv = require('minimist')(process.argv.slice(2)); -console.dir(argv); +console.log(argv); ``` ``` @@ -33,6 +29,13 @@ $ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz beep: 'boop' } ``` +# security + +Previous versions had a prototype pollution bug that could cause privilege +escalation in some circumstances when handling untrusted user input. + +Please use version 1.2.3 or later: https://snyk.io/vuln/SNYK-JS-MINIMIST-559764 + # methods ``` js @@ -55,10 +58,29 @@ options can be: * `opts.string` - a string or array of strings argument names to always treat as strings -* `opts.boolean` - a string or array of strings to always treat as booleans +* `opts.boolean` - a boolean, string or array of strings to always treat as +booleans. if `true` will treat all double hyphenated arguments without equal signs +as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) * `opts.alias` - an object mapping string names to strings or arrays of string argument names to use as aliases * `opts.default` - an object mapping string argument names to default values +* `opts.stopEarly` - when true, populate `argv._` with everything after the +first non-option +* `opts['--']` - when true, populate `argv._` with everything before the `--` +and `argv['--']` with everything after the `--`. Here's an example: + + ``` + > require('./')('one two three -- four five --six'.split(' '), { '--': true }) + { _: [ 'one', 'two', 'three' ], + '--': [ 'four', 'five', '--six' ] } + ``` + + Note that with `opts['--']` set, parsing for arguments still stops after the + `--`. + +* `opts.unknown` - a function which is invoked with a command line parameter not +defined in the `opts` configuration object. If the function returns `false`, the +unknown option is not added to `argv`. # install diff --git a/node_modules/rc/node_modules/minimist/test/all_bool.js b/node_modules/minimist/test/all_bool.js similarity index 100% rename from node_modules/rc/node_modules/minimist/test/all_bool.js rename to node_modules/minimist/test/all_bool.js diff --git a/node_modules/rc/node_modules/minimist/test/bool.js b/node_modules/minimist/test/bool.js similarity index 100% rename from node_modules/rc/node_modules/minimist/test/bool.js rename to node_modules/minimist/test/bool.js diff --git a/node_modules/minimist/test/dash.js b/node_modules/minimist/test/dash.js index 8b034b99a9eac..5a4fa5be41859 100644 --- a/node_modules/minimist/test/dash.js +++ b/node_modules/minimist/test/dash.js @@ -22,3 +22,10 @@ test('-a -- b', function (t) { t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); }); + +test('move arguments after the -- into their own `--` array', function(t) { + t.plan(1); + t.deepEqual( + parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }), + { name: 'John', _: [ 'before' ], '--': [ 'after' ] }); +}); diff --git a/node_modules/minimist/test/default_bool.js b/node_modules/minimist/test/default_bool.js index f0041ee40cd05..780a311270fcd 100644 --- a/node_modules/minimist/test/default_bool.js +++ b/node_modules/minimist/test/default_bool.js @@ -18,3 +18,18 @@ test('boolean default false', function (t) { t.equal(argv.somefalse, false); t.end(); }); + +test('boolean default to null', function (t) { + var argv = parse([], { + boolean: 'maybe', + default: { maybe: null } + }); + t.equal(argv.maybe, null); + var argv = parse(['--maybe'], { + boolean: 'maybe', + default: { maybe: null } + }); + t.equal(argv.maybe, true); + t.end(); + +}) diff --git a/node_modules/minimist/test/dotted.js b/node_modules/minimist/test/dotted.js index ef0ae349bf3bf..d8b3e856ec795 100644 --- a/node_modules/minimist/test/dotted.js +++ b/node_modules/minimist/test/dotted.js @@ -14,3 +14,9 @@ test('dotted default', function (t) { t.equal(argv.aa.bb, 11); t.end(); }); + +test('dotted default with no alias', function (t) { + var argv = parse('', {default: {'a.b': 11}}); + t.equal(argv.a.b, 11); + t.end(); +}); diff --git a/node_modules/rc/node_modules/minimist/test/kv_short.js b/node_modules/minimist/test/kv_short.js similarity index 100% rename from node_modules/rc/node_modules/minimist/test/kv_short.js rename to node_modules/minimist/test/kv_short.js diff --git a/node_modules/rc/node_modules/minimist/test/num.js b/node_modules/minimist/test/num.js similarity index 100% rename from node_modules/rc/node_modules/minimist/test/num.js rename to node_modules/minimist/test/num.js diff --git a/node_modules/minimist/test/parse.js b/node_modules/minimist/test/parse.js index 8a90646696628..7b4a2a17c0dda 100644 --- a/node_modules/minimist/test/parse.js +++ b/node_modules/minimist/test/parse.js @@ -42,32 +42,6 @@ test('comprehensive', function (t) { t.end(); }); -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789' - ]); - t.deepEqual(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ] - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - test('flag boolean', function (t) { var argv = parse([ '-t', 'moo' ], { boolean: 't' }); t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); @@ -92,42 +66,6 @@ test('flag boolean value', function (t) { t.end(); }); -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false } - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { - boolean: ['x','y','z'] - }); - - t.deepEqual(argv, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ] - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); - test('newlines in params' , function (t) { var args = parse([ '-s', "X\nX" ]) t.deepEqual(args, { _ : [], s : "X\nX" }); @@ -183,6 +121,29 @@ test('empty strings', function(t) { }); +test('string and alias', function(t) { + var x = parse([ '--str', '000123' ], { + string: 's', + alias: { s: 'str' } + }); + + t.equal(x.str, '000123'); + t.equal(typeof x.str, 'string'); + t.equal(x.s, '000123'); + t.equal(typeof x.s, 'string'); + + var y = parse([ '-s', '000123' ], { + string: 'str', + alias: { str: 's' } + }); + + t.equal(y.str, '000123'); + t.equal(typeof y.str, 'string'); + t.equal(y.s, '000123'); + t.equal(typeof y.s, 'string'); + t.end(); +}); + test('slashBreak', function (t) { t.same( parse([ '-I/foo/bar/baz' ]), @@ -234,85 +195,3 @@ test('nested dotted objects', function (t) { t.same(argv.beep, { boop : true }); t.end(); }); - -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - alias: { 'h': 'herp' }, - boolean: 'herp' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/node_modules/minimist/test/parse_modified.js b/node_modules/minimist/test/parse_modified.js index 21851b036ee6d..ab620dc5e4dc3 100644 --- a/node_modules/minimist/test/parse_modified.js +++ b/node_modules/minimist/test/parse_modified.js @@ -5,5 +5,5 @@ test('parse with modifier functions' , function (t) { t.plan(1); var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: ['123'] }); + t.deepEqual(argv, { b: true, _: [123] }); }); diff --git a/node_modules/rc/node_modules/minimist/test/proto.js b/node_modules/minimist/test/proto.js similarity index 100% rename from node_modules/rc/node_modules/minimist/test/proto.js rename to node_modules/minimist/test/proto.js diff --git a/node_modules/rc/node_modules/minimist/test/stop_early.js b/node_modules/minimist/test/stop_early.js similarity index 100% rename from node_modules/rc/node_modules/minimist/test/stop_early.js rename to node_modules/minimist/test/stop_early.js diff --git a/node_modules/rc/node_modules/minimist/test/unknown.js b/node_modules/minimist/test/unknown.js similarity index 100% rename from node_modules/rc/node_modules/minimist/test/unknown.js rename to node_modules/minimist/test/unknown.js diff --git a/node_modules/npm-audit-report/CHANGELOG.md b/node_modules/npm-audit-report/CHANGELOG.md index 941a18741b600..58819a43b4d11 100644 --- a/node_modules/npm-audit-report/CHANGELOG.md +++ b/node_modules/npm-audit-report/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +<a name="1.3.3"></a> +## [1.3.3](https://github.com/npm/npm-audit-report/compare/v1.3.2...v1.3.3) (2020-03-26) + + + <a name="1.3.2"></a> ## [1.3.2](https://github.com/npm/npm-audit-report/compare/v1.3.1...v1.3.2) (2018-12-18) diff --git a/node_modules/npm-audit-report/package.json b/node_modules/npm-audit-report/package.json index 905c0ce33da3d..dfc8bda28f844 100644 --- a/node_modules/npm-audit-report/package.json +++ b/node_modules/npm-audit-report/package.json @@ -1,28 +1,28 @@ { - "_from": "npm-audit-report@1.3.2", - "_id": "npm-audit-report@1.3.2", + "_from": "npm-audit-report@1.3.3", + "_id": "npm-audit-report@1.3.3", "_inBundle": false, - "_integrity": "sha512-abeqS5ONyXNaZJPGAf6TOUMNdSe1Y6cpc9MLBRn+CuUoYbfdca6AxOyXVlfIv9OgKX+cacblbG5w7A6ccwoTPw==", + "_integrity": "sha512-8nH/JjsFfAWMvn474HB9mpmMjrnKb1Hx/oTAdjv4PT9iZBvBxiZ+wtDUapHCJwLqYGQVPaAfs+vL5+5k9QndXw==", "_location": "/npm-audit-report", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "npm-audit-report@1.3.2", + "raw": "npm-audit-report@1.3.3", "name": "npm-audit-report", "escapedName": "npm-audit-report", - "rawSpec": "1.3.2", + "rawSpec": "1.3.3", "saveSpec": null, - "fetchSpec": "1.3.2" + "fetchSpec": "1.3.3" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-1.3.2.tgz", - "_shasum": "303bc78cd9e4c226415076a4f7e528c89fc77018", - "_spec": "npm-audit-report@1.3.2", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-1.3.3.tgz", + "_shasum": "8226deeb253b55176ed147592a3995442f2179ed", + "_spec": "npm-audit-report@1.3.3", + "_where": "/Users/claudiahdz/npm/cli", "author": { "name": "Adam Baldwin" }, @@ -40,9 +40,7 @@ "keyfob": "^1.0.0", "standard": "^11.0.1", "standard-version": "^4.3.0", - "tap": "^11.1.5", - "weallbehave": "^1.2.0", - "weallcontribute": "^1.0.8" + "tap": "^11.1.5" }, "directories": { "lib": "lib", @@ -72,9 +70,7 @@ "prerelease": "npm t", "pretest": "standard", "release": "standard-version -s", - "test": "tap --100 -J --coverage test/*.js", - "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'" + "test": "tap --100 -J --coverage test/*.js" }, - "version": "1.3.2" + "version": "1.3.3" } diff --git a/node_modules/npm-lifecycle/CHANGELOG.md b/node_modules/npm-lifecycle/CHANGELOG.md index ccdd777ee1975..cf10c2f580ace 100644 --- a/node_modules/npm-lifecycle/CHANGELOG.md +++ b/node_modules/npm-lifecycle/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +<a name="3.1.5"></a> +## [3.1.5](https://github.com/npm/lifecycle/compare/v3.1.4...v3.1.5) (2020-03-26) + + + <a name="3.1.4"></a> ## [3.1.4](https://github.com/npm/lifecycle/compare/v3.1.3...v3.1.4) (2019-09-18) diff --git a/node_modules/npm-lifecycle/README.md b/node_modules/npm-lifecycle/README.md index c81d3d7a10df7..a22adf1c22421 100644 --- a/node_modules/npm-lifecycle/README.md +++ b/node_modules/npm-lifecycle/README.md @@ -1,4 +1,15 @@ -# npm-lifecycle [![npm version](https://img.shields.io/npm/v/npm-lifecycle.svg)](https://npm.im/npm-lifecycle) [![license](https://img.shields.io/npm/l/npm-lifecycle.svg)](https://npm.im/npm-lifecycle) [![Travis](https://img.shields.io/travis/npm/npm-lifecycle/latest.svg)](https://travis-ci.org/npm/npm-lifecycle) [![AppVeyor](https://img.shields.io/appveyor/ci/npm/npm-lifecycle/latest.svg)](https://ci.appveyor.com/project/npm/npm-lifecycle) [![Coverage Status](https://coveralls.io/repos/github/npm/npm-lifecycle/badge.svg?branch=latest)](https://coveralls.io/github/npm/npm-lifecycle?branch=latest) +# Note: pending imminent deprecation + +**This module will be deprecated once npm v7 is released. Please do not rely +on it more than absolutely necessary.** + +The lifecycle script runner used in npm v7 is +[@npmcli/run-script](http://npm.im/@npmcli/run-script). Please use that +module moving forward. + +----- + +# npm-lifecycle [`npm-lifecycle`](https://github.com/npm/npm-lifecycle) is a standalone library for executing packages' lifecycle scripts. It is extracted from npm itself and @@ -22,18 +33,6 @@ intended to be fully compatible with the way npm executes individual scripts. // idk yet ``` -### Features - -* something cool - -### Contributing - -The npm team enthusiastically welcomes contributions and project participation! -There's a bunch of things you can do if you want to contribute! The [Contributor -Guide](CONTRIBUTING.md) has all the information you need for everything from -reporting bugs to contributing entire new features. Please don't hesitate to -jump in if you'd like to, or even ask us questions if something isn't clear. - ### API #### <a name="lifecycle"></a> `> lifecycle(name, pkg, wd, [opts]) -> Promise` diff --git a/node_modules/npm-lifecycle/package.json b/node_modules/npm-lifecycle/package.json index beeb598957898..35fdaa709901f 100644 --- a/node_modules/npm-lifecycle/package.json +++ b/node_modules/npm-lifecycle/package.json @@ -1,19 +1,19 @@ { - "_from": "npm-lifecycle@3.1.4", - "_id": "npm-lifecycle@3.1.4", + "_from": "npm-lifecycle@3.1.5", + "_id": "npm-lifecycle@3.1.5", "_inBundle": false, - "_integrity": "sha512-tgs1PaucZwkxECGKhC/stbEgFyc3TGh2TJcg2CDr6jbvQRdteHNhmMeljRzpe4wgFAXQADoy1cSqqi7mtiAa5A==", + "_integrity": "sha512-lDLVkjfZmvmfvpvBzA4vzee9cn+Me4orq0QF8glbswJVEbIcSNWib7qGOffolysc3teCqbbPZZkzbr3GQZTL1g==", "_location": "/npm-lifecycle", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "npm-lifecycle@3.1.4", + "raw": "npm-lifecycle@3.1.5", "name": "npm-lifecycle", "escapedName": "npm-lifecycle", - "rawSpec": "3.1.4", + "rawSpec": "3.1.5", "saveSpec": null, - "fetchSpec": "3.1.4" + "fetchSpec": "3.1.5" }, "_requiredBy": [ "#USER", @@ -21,10 +21,10 @@ "/libcipm", "/libnpm" ], - "_resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-3.1.4.tgz", - "_shasum": "de6975c7d8df65f5150db110b57cce498b0b604c", - "_spec": "npm-lifecycle@3.1.4", - "_where": "/Users/mperrotte/npminc/cli", + "_resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-3.1.5.tgz", + "_shasum": "9882d3642b8c82c815782a12e6a1bfeed0026309", + "_spec": "npm-lifecycle@3.1.5", + "_where": "/Users/claudiahdz/npm/cli", "author": { "name": "Mike Sherov" }, @@ -49,9 +49,7 @@ "sinon": "^7.2.3", "standard": "^12.0.1", "standard-version": "^4.4.0", - "tap": "^12.7.0", - "weallbehave": "^1.2.0", - "weallcontribute": "^1.0.8" + "tap": "^12.7.0" }, "files": [ "index.js", @@ -78,9 +76,7 @@ "pretest": "standard", "release": "standard-version -s", "snap": "TAP_SNAPSHOT=1 npm test", - "test": "tap -J --cov test/*.js", - "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'" + "test": "tap -J --cov test/*.js" }, - "version": "3.1.4" + "version": "3.1.5" } diff --git a/node_modules/npm-registry-fetch/CHANGELOG.md b/node_modules/npm-registry-fetch/CHANGELOG.md index 75b74eec60144..04a4dd901b0f8 100644 --- a/node_modules/npm-registry-fetch/CHANGELOG.md +++ b/node_modules/npm-registry-fetch/CHANGELOG.md @@ -2,6 +2,31 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +<a name="4.0.7"></a> +## [4.0.7](https://github.com/npm/registry-fetch/compare/v4.0.6...v4.0.7) (2020-08-17) + + +### Bug Fixes + +* correct password redaction ([110032b](https://github.com/npm/registry-fetch/commit/110032b)) + + + +<a name="4.0.6"></a> +## [4.0.6](https://github.com/npm/registry-fetch/compare/v4.0.5...v4.0.6) (2020-08-14) + + +### Bug Fixes + +* import URL from url module ([cd35987](https://github.com/npm/registry-fetch/commit/cd35987)) + + + +<a name="4.0.5"></a> +## [4.0.5](https://github.com/npm/registry-fetch/compare/v4.0.4...v4.0.5) (2020-06-30) + + + <a name="4.0.4"></a> ## [4.0.4](https://github.com/npm/registry-fetch/compare/v4.0.3...v4.0.4) (2020-04-28) diff --git a/node_modules/npm-registry-fetch/check-response.js b/node_modules/npm-registry-fetch/check-response.js index 14058239ba3f5..79170a7fbdaf3 100644 --- a/node_modules/npm-registry-fetch/check-response.js +++ b/node_modules/npm-registry-fetch/check-response.js @@ -29,9 +29,22 @@ function logRequest (method, res, startTime, opts) { const attempt = res.headers.get('x-fetch-attempts') const attemptStr = attempt && attempt > 1 ? ` attempt #${attempt}` : '' const cacheStr = res.headers.get('x-local-cache') ? ' (from cache)' : '' + + let urlStr + try { + const URL = require('url').URL + const url = new URL(res.url) + if (url.password) { + url.password = '***' + } + urlStr = url.toString() + } catch (er) { + urlStr = res.url + } + opts.log.http( 'fetch', - `${method.toUpperCase()} ${res.status} ${res.url} ${elapsedTime}ms${attemptStr}${cacheStr}` + `${method.toUpperCase()} ${res.status} ${urlStr} ${elapsedTime}ms${attemptStr}${cacheStr}` ) } diff --git a/node_modules/npm-registry-fetch/node_modules/safe-buffer/README.md b/node_modules/npm-registry-fetch/node_modules/safe-buffer/README.md index 356e3519302cf..e9a81afd0406f 100644 --- a/node_modules/npm-registry-fetch/node_modules/safe-buffer/README.md +++ b/node_modules/npm-registry-fetch/node_modules/safe-buffer/README.md @@ -22,8 +22,6 @@ npm install safe-buffer ``` -[Get supported safe-buffer with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-safe-buffer?utm_source=npm-safe-buffer&utm_medium=referral&utm_campaign=readme) - ## usage The goal of this package is to provide a safe replacement for the node.js `Buffer`. diff --git a/node_modules/npm-registry-fetch/node_modules/safe-buffer/index.js b/node_modules/npm-registry-fetch/node_modules/safe-buffer/index.js index 054c8d30ddafb..f8d3ec98852f4 100644 --- a/node_modules/npm-registry-fetch/node_modules/safe-buffer/index.js +++ b/node_modules/npm-registry-fetch/node_modules/safe-buffer/index.js @@ -1,3 +1,4 @@ +/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ /* eslint-disable node/no-deprecated-api */ var buffer = require('buffer') var Buffer = buffer.Buffer diff --git a/node_modules/npm-registry-fetch/node_modules/safe-buffer/package.json b/node_modules/npm-registry-fetch/node_modules/safe-buffer/package.json index 576c453b23322..5062922aecfe7 100644 --- a/node_modules/npm-registry-fetch/node_modules/safe-buffer/package.json +++ b/node_modules/npm-registry-fetch/node_modules/safe-buffer/package.json @@ -1,8 +1,8 @@ { "_from": "safe-buffer@^5.2.0", - "_id": "safe-buffer@5.2.0", + "_id": "safe-buffer@5.2.1", "_inBundle": false, - "_integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", + "_integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "_location": "/npm-registry-fetch/safe-buffer", "_phantomChildren": {}, "_requested": { @@ -18,14 +18,14 @@ "_requiredBy": [ "/npm-registry-fetch" ], - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "_shasum": "b74daec49b1148f88c64b68d49b1e815c1f2f519", + "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "_shasum": "1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6", "_spec": "safe-buffer@^5.2.0", - "_where": "/Users/mperrotte/npminc/cli/node_modules/npm-registry-fetch", + "_where": "/Users/claudiahdz/npm/cli/node_modules/npm-registry-fetch", "author": { "name": "Feross Aboukhadijeh", "email": "feross@feross.org", - "url": "http://feross.org" + "url": "https://feross.org" }, "bugs": { "url": "https://github.com/feross/safe-buffer/issues" @@ -35,8 +35,22 @@ "description": "Safer Node.js Buffer API", "devDependencies": { "standard": "*", - "tape": "^4.0.0" + "tape": "^5.0.0" }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "homepage": "https://github.com/feross/safe-buffer", "keywords": [ "buffer", @@ -58,5 +72,5 @@ "test": "standard && tape test/*.js" }, "types": "index.d.ts", - "version": "5.2.0" + "version": "5.2.1" } diff --git a/node_modules/npm-registry-fetch/package.json b/node_modules/npm-registry-fetch/package.json index c1582514e36e1..a5ac4817ff51b 100644 --- a/node_modules/npm-registry-fetch/package.json +++ b/node_modules/npm-registry-fetch/package.json @@ -1,19 +1,19 @@ { - "_from": "npm-registry-fetch@4.0.4", - "_id": "npm-registry-fetch@4.0.4", + "_from": "npm-registry-fetch@4.0.7", + "_id": "npm-registry-fetch@4.0.7", "_inBundle": false, - "_integrity": "sha512-6jb34hX/iYNQebqWUHtU8YF6Cjb1H6ouTFPClYsyiW6lpFkljTpdeftm53rRojtja1rKAvKNIIiTS5Sjpw4wsA==", + "_integrity": "sha512-cny9v0+Mq6Tjz+e0erFAB+RYJ/AVGzkjnISiobqP8OWj9c9FLoZZu8/SPSKJWE17F1tk4018wfjV+ZbIbqC7fQ==", "_location": "/npm-registry-fetch", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "npm-registry-fetch@4.0.4", + "raw": "npm-registry-fetch@4.0.7", "name": "npm-registry-fetch", "escapedName": "npm-registry-fetch", - "rawSpec": "4.0.4", + "rawSpec": "4.0.7", "saveSpec": null, - "fetchSpec": "4.0.4" + "fetchSpec": "4.0.7" }, "_requiredBy": [ "#USER", @@ -28,10 +28,10 @@ "/npm-profile", "/pacote" ], - "_resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.4.tgz", - "_shasum": "2da1ecf3f43d419d96abf313664291a4623d3ea5", - "_spec": "npm-registry-fetch@4.0.4", - "_where": "/Users/ruyadorno/Documents/workspace/cli", + "_resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.7.tgz", + "_shasum": "57951bf6541e0246b34c9f9a38ab73607c9449d7", + "_spec": "npm-registry-fetch@4.0.7", + "_where": "/Users/ruyadorno/Documents/workspace/cli/latest", "author": { "name": "Kat MarchΓ‘n", "email": "kzm@sykosomatic.org" @@ -95,12 +95,12 @@ }, "scripts": { "postrelease": "npm publish && git push --follow-tags", + "posttest": "standard", "prerelease": "npm t", - "pretest": "standard", "release": "standard-version -s", "test": "tap -J --coverage test/*.js", "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": "4.0.4" + "version": "4.0.7" } diff --git a/node_modules/os-locale/index.js b/node_modules/os-locale/index.js deleted file mode 100644 index 8c73c99f20e2f..0000000000000 --- a/node_modules/os-locale/index.js +++ /dev/null @@ -1,114 +0,0 @@ -'use strict'; -const execa = require('execa'); -const lcid = require('lcid'); -const mem = require('mem'); - -const defaultOptions = {spawn: true}; -const defaultLocale = 'en_US'; - -function getEnvLocale(env = process.env) { - return env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE; -} - -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(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 Promise.all([ - execa.stdout('defaults', ['read', '-globalDomain', 'AppleLocale']), - getLocales() - ]).then(results => getSupportedLocale(results[0], results[1])); -} - -function getAppleLocaleSync() { - return getSupportedLocale( - execa.sync('defaults', ['read', '-globalDomain', 'AppleLocale']).stdout, - getLocalesSync() - ); -} - -function getUnixLocale() { - if (process.platform === 'darwin') { - return getAppleLocale(); - } - - return execa.stdout('locale') - .then(stdout => getLocale(parseLocale(stdout))); -} - -function getUnixLocaleSync() { - if (process.platform === 'darwin') { - return getAppleLocaleSync(); - } - - return getLocale(parseLocale(execa.sync('locale').stdout)); -} - -function getWinLocale() { - return execa.stdout('wmic', ['os', 'get', 'locale']) - .then(stdout => { - const lcidCode = parseInt(stdout.replace('Locale', ''), 16); - return lcid.from(lcidCode); - }); -} - -function getWinLocaleSync() { - const {stdout} = execa.sync('wmic', ['os', 'get', 'locale']); - const lcidCode = parseInt(stdout.replace('Locale', ''), 16); - return lcid.from(lcidCode); -} - -module.exports = mem((options = defaultOptions) => { - const envLocale = getEnvLocale(); - - let thenable; - if (envLocale || options.spawn === false) { - thenable = Promise.resolve(getLocale(envLocale)); - } else if (process.platform === 'win32') { - thenable = getWinLocale(); - } else { - thenable = getUnixLocale(); - } - - return thenable - .then(locale => locale || defaultLocale) - .catch(() => defaultLocale); -}); - -module.exports.sync = mem((options = defaultOptions) => { - const envLocale = getEnvLocale(); - - let res; - if (envLocale || options.spawn === false) { - res = getLocale(envLocale); - } else { - try { - res = process.platform === 'win32' ? getWinLocaleSync() : getUnixLocaleSync(); - } catch (_) {} - } - - return res || defaultLocale; -}); diff --git a/node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md b/node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md deleted file mode 100644 index ded9620b18d25..0000000000000 --- a/node_modules/os-locale/node_modules/cross-spawn/CHANGELOG.md +++ /dev/null @@ -1,100 +0,0 @@ -# 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. - -<a name="6.0.5"></a> -## [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) - - - -<a name="6.0.4"></a> -## [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) - - - -<a name="6.0.3"></a> -## [6.0.3](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.2...v6.0.3) (2018-01-23) - - - -<a name="6.0.2"></a> -## [6.0.2](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.1...v6.0.2) (2018-01-23) - - - -<a name="6.0.1"></a> -## [6.0.1](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.0...v6.0.1) (2018-01-23) - - - -<a name="6.0.0"></a> -# [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 - - -<a name="5.1.0"></a> -## [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) - - -<a name="5.0.1"></a> -## [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 - - -<a name="5.0.0"></a> -# [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/README.md b/node_modules/os-locale/node_modules/cross-spawn/README.md deleted file mode 100644 index e895cd7a77747..0000000000000 --- a/node_modules/os-locale/node_modules/cross-spawn/README.md +++ /dev/null @@ -1,94 +0,0 @@ -# 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 `<v4.8` - -All these issues are handled correctly by `cross-spawn`. -There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments. - - -## Usage - -Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) or [`spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options), so it's a drop in replacement. - - -```js -const spawn = require('cross-spawn'); - -// Spawn NPM asynchronously -const child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' }); - -// Spawn NPM synchronously -const result = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' }); -``` - - -## Caveats - -### Using `options.shell` as an alternative to `cross-spawn` - -Starting from node `v4.8`, `spawn` has a `shell` option that allows you run commands from within a shell. This new option solves -the [PATHEXT](https://github.com/joyent/node/issues/2318) issue but: - -- It's not supported in node `<v4.8` -- You must manually escape the command and arguments which is very error prone, specially when passing user input -- There are a lot of other unresolved issues from the [Why](#why) section that you must take into account - -If you are using the `shell` option to spawn a command in a cross platform way, consider using `cross-spawn` instead. You have been warned. - -### `options.shell` support - -While `cross-spawn` adds support for `options.shell` in node `<v4.8`, all of its enhancements are disabled. - -This mimics the Node.js behavior. More specifically, the command and its arguments will not be automatically escaped nor shebang support will be offered. This is by design because if you are using `options.shell` you are probably targeting a specific platform anyway and you don't want things to get into your way. - -### Shebangs support - -While `cross-spawn` handles shebangs on Windows, its support is limited. More specifically, it just supports `#!/usr/bin/env <program>` where `<program>` must not contain any arguments. -If you would like to have the shebang support improved, feel free to contribute via a pull-request. - -Remember to always test your code on Windows! - - -## Tests - -`$ npm test` -`$ npm test -- --watch` during development - -## License - -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 deleted file mode 100644 index 5509742ca9fa8..0000000000000 --- a/node_modules/os-locale/node_modules/cross-spawn/index.js +++ /dev/null @@ -1,39 +0,0 @@ -'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 deleted file mode 100644 index 14df9b623d0a2..0000000000000 --- a/node_modules/os-locale/node_modules/cross-spawn/lib/enoent.js +++ /dev/null @@ -1,59 +0,0 @@ -'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 deleted file mode 100644 index 962827a94e8c0..0000000000000 --- a/node_modules/os-locale/node_modules/cross-spawn/lib/parse.js +++ /dev/null @@ -1,125 +0,0 @@ -'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 deleted file mode 100644 index b0bb84c3a1409..0000000000000 --- a/node_modules/os-locale/node_modules/cross-spawn/lib/util/escape.js +++ /dev/null @@ -1,45 +0,0 @@ -'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 deleted file mode 100644 index bd4f1280c9cad..0000000000000 --- a/node_modules/os-locale/node_modules/cross-spawn/lib/util/readShebang.js +++ /dev/null @@ -1,32 +0,0 @@ -'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 deleted file mode 100644 index 2fd5ad2705607..0000000000000 --- a/node_modules/os-locale/node_modules/cross-spawn/lib/util/resolveCommand.js +++ /dev/null @@ -1,47 +0,0 @@ -'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 deleted file mode 100644 index 3fdff9f498b27..0000000000000 --- a/node_modules/os-locale/node_modules/cross-spawn/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "_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 deleted file mode 100644 index aad9ac88775cb..0000000000000 --- a/node_modules/os-locale/node_modules/execa/index.js +++ /dev/null @@ -1,361 +0,0 @@ -'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 deleted file mode 100644 index e367837b28cb9..0000000000000 --- a/node_modules/os-locale/node_modules/execa/lib/errname.js +++ /dev/null @@ -1,39 +0,0 @@ -'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 deleted file mode 100644 index a82d46838ac9b..0000000000000 --- a/node_modules/os-locale/node_modules/execa/lib/stdio.js +++ /dev/null @@ -1,41 +0,0 @@ -'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/package.json b/node_modules/os-locale/node_modules/execa/package.json deleted file mode 100644 index 7ab0a5777c7cd..0000000000000 --- a/node_modules/os-locale/node_modules/execa/package.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "_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 deleted file mode 100644 index f3f533d92915e..0000000000000 --- a/node_modules/os-locale/node_modules/execa/readme.md +++ /dev/null @@ -1,327 +0,0 @@ -# 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 -``` - -<a href="https://www.patreon.com/sindresorhus"> - <img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160"> -</a> - - -## 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`<br> -Default: `process.cwd()` - -Current working directory of the child process. - -#### env - -Type: `Object`<br> -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`<br> -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`<br> -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`<br> -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`<br> -Default: `true` - -[Strip EOF](https://github.com/sindresorhus/strip-eof) (last newline) from the output. - -#### preferLocal - -Type: `boolean`<br> -Default: `true` - -Prefer locally installed binaries when looking for a binary to execute.<br> -If you `$ npm install foo`, you can then `execa('foo')`. - -#### localDir - -Type: `string`<br> -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.<br> -Streams are not allowed when using the synchronous methods. - -#### reject - -Type: `boolean`<br> -Default: `true` - -Setting this to `false` resolves the promise with the error instead of rejecting it. - -#### cleanup - -Type: `boolean`<br> -Default: `true` - -Keep track of the spawned process and `kill` it when the parent process exits. - -#### encoding - -Type: `string`<br> -Default: `utf8` - -Specify the character encoding used to decode the `stdout` and `stderr` output. - -#### timeout - -Type: `number`<br> -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`<br> -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`<br> -Default: `10000000` (10MB) - -Largest amount of data in bytes allowed on `stdout` or `stderr`. - -#### killSignal - -Type: `string` `number`<br> -Default: `SIGTERM` - -Signal value to be used when the spawned process will be killed. - -#### stdin - -Type: `string` `number` `Stream` `undefined` `null`<br> -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`<br> -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`<br> -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`<br> -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 deleted file mode 100644 index fb6646ec9974b..0000000000000 --- a/node_modules/os-locale/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_from": "os-locale@^3.1.0", - "_id": "os-locale@3.1.0", - "_inBundle": false, - "_integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "_location": "/os-locale", - "_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@^3.1.0", - "name": "os-locale", - "escapedName": "os-locale", - "rawSpec": "^3.1.0", - "saveSpec": null, - "fetchSpec": "^3.1.0" - }, - "_requiredBy": [ - "/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", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/os-locale/issues" - }, - "bundleDependencies": false, - "dependencies": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - }, - "deprecated": false, - "description": "Get the system locale", - "devDependencies": { - "ava": "^1.0.1", - "import-fresh": "^3.0.0", - "xo": "^0.23.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/os-locale#readme", - "keywords": [ - "locale", - "lang", - "language", - "system", - "os", - "string", - "str", - "user", - "country", - "id", - "identifier", - "region" - ], - "license": "MIT", - "name": "os-locale", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/os-locale.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "3.1.0" -} diff --git a/node_modules/os-locale/readme.md b/node_modules/os-locale/readme.md deleted file mode 100644 index 8f9c280eedb85..0000000000000 --- a/node_modules/os-locale/readme.md +++ /dev/null @@ -1,71 +0,0 @@ -# os-locale [![Build Status](https://travis-ci.org/sindresorhus/os-locale.svg?branch=master)](https://travis-ci.org/sindresorhus/os-locale) - -> Get the system [locale](https://en.wikipedia.org/wiki/Locale_(computer_software)) - -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. - ---- - -<div align="center"> - <b> - <a href="https://tidelift.com/subscription/pkg/npm-os-locale?utm_source=npm-os-locale&utm_medium=referral&utm_campaign=readme">Get professional support for 'os-locale' with a Tidelift subscription</a> - </b> - <br> - <sub> - Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. - </sub> -</div> - ---- - -## Install - -``` -$ npm install os-locale -``` - - -## Usage - -```js -const osLocale = require('os-locale'); - -(async () => { - console.log(await osLocale()); - //=> 'en_US' -})(); -``` - - -## API - -### osLocale([options]) - -Returns a `Promise` for the locale. - -### osLocale.sync([options]) - -Returns the locale. - -#### options - -Type: `Object` - -##### spawn - -Type: `boolean`<br> -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/rc/node_modules/minimist/.travis.yml b/node_modules/rc/node_modules/minimist/.travis.yml deleted file mode 100644 index 74c57bf15e239..0000000000000 --- a/node_modules/rc/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.12" - - "iojs" -before_install: - - npm install -g npm@~1.4.6 diff --git a/node_modules/rc/node_modules/minimist/LICENSE b/node_modules/rc/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4b4412b..0000000000000 --- a/node_modules/rc/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/rc/node_modules/minimist/example/parse.js b/node_modules/rc/node_modules/minimist/example/parse.js deleted file mode 100644 index f7c8d49807f32..0000000000000 --- a/node_modules/rc/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,2 +0,0 @@ -var argv = require('../')(process.argv.slice(2)); -console.log(argv); diff --git a/node_modules/rc/node_modules/minimist/index.js b/node_modules/rc/node_modules/minimist/index.js deleted file mode 100644 index d2afe5e4d4056..0000000000000 --- a/node_modules/rc/node_modules/minimist/index.js +++ /dev/null @@ -1,245 +0,0 @@ -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {}, unknownFn: null }; - - if (typeof opts['unknown'] === 'function') { - flags.unknownFn = opts['unknown']; - } - - if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { - flags.allBools = true; - } else { - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - } - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - if (aliases[key]) { - flags.strings[aliases[key]] = true; - } - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } - - function argDefined(key, arg) { - return (flags.allBools && /^--[^=]+$/.test(arg)) || - flags.strings[key] || flags.bools[key] || aliases[key]; - } - - function setArg (key, val, arg) { - if (arg && flags.unknownFn && !argDefined(key, arg)) { - if (flags.unknownFn(arg) === false) return; - } - - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - function setKey (obj, keys, value) { - var o = obj; - for (var i = 0; i < keys.length-1; i++) { - var key = keys[i]; - if (key === '__proto__') return; - if (o[key] === undefined) o[key] = {}; - if (o[key] === Object.prototype || o[key] === Number.prototype - || o[key] === String.prototype) o[key] = {}; - if (o[key] === Array.prototype) o[key] = []; - o = o[key]; - } - - var key = keys[keys.length - 1]; - if (key === '__proto__') return; - if (o === Object.prototype || o === Number.prototype - || o === String.prototype) o = {}; - if (o === Array.prototype) o = []; - if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } - } - - function aliasIsBoolean(key) { - return aliases[key].some(function (x) { - return flags.bools[x]; - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - var key = m[1]; - var value = m[2]; - if (flags.bools[key]) { - value = value !== 'false'; - } - setArg(key, value, arg); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false, arg); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && !flags.allBools - && (aliases[key] ? !aliasIsBoolean(key) : true)) { - setArg(key, next, arg); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true', arg); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next, arg) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) { - setArg(letters[j], next.split('=')[1], arg); - broken = true; - break; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next, arg); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2), arg); - broken = true; - break; - } - else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !aliasIsBoolean(key) : true)) { - setArg(key, args[i+1], arg); - i++; - } - else if (args[i+1] && /^(true|false)$/.test(args[i+1])) { - setArg(key, args[i+1] === 'true', arg); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } - } - else { - if (!flags.unknownFn || flags.unknownFn(arg) !== false) { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - if (opts.stopEarly) { - argv._.push.apply(argv._, args.slice(i + 1)); - break; - } - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - if (opts['--']) { - argv['--'] = new Array(); - notFlags.forEach(function(key) { - argv['--'].push(key); - }); - } - else { - notFlags.forEach(function(key) { - argv._.push(key); - }); - } - - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - diff --git a/node_modules/rc/node_modules/minimist/package.json b/node_modules/rc/node_modules/minimist/package.json deleted file mode 100644 index 86e9c8ee28bd2..0000000000000 --- a/node_modules/rc/node_modules/minimist/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_from": "minimist@^1.2.0", - "_id": "minimist@1.2.5", - "_inBundle": false, - "_integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "_location": "/rc/minimist", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "minimist@^1.2.0", - "name": "minimist", - "escapedName": "minimist", - "rawSpec": "^1.2.0", - "saveSpec": null, - "fetchSpec": "^1.2.0" - }, - "_requiredBy": [ - "/rc" - ], - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "_shasum": "67d66014b66a6a8aaa0c083c5fd58df4e4e97602", - "_spec": "minimist@^1.2.0", - "_where": "/Users/ruyadorno/Documents/workspace/cli/node_modules/rc", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "parse argument options", - "devDependencies": { - "covert": "^1.0.0", - "tap": "~0.4.0", - "tape": "^3.5.0" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "license": "MIT", - "main": "index.js", - "name": "minimist", - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "scripts": { - "coverage": "covert test/*.js", - "test": "tap test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "version": "1.2.5" -} diff --git a/node_modules/rc/node_modules/minimist/readme.markdown b/node_modules/rc/node_modules/minimist/readme.markdown deleted file mode 100644 index 5fd97ab11ee9d..0000000000000 --- a/node_modules/rc/node_modules/minimist/readme.markdown +++ /dev/null @@ -1,95 +0,0 @@ -# minimist - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.log(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ _: [ 'foo', 'bar', 'baz' ], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' } -``` - -# security - -Previous versions had a prototype pollution bug that could cause privilege -escalation in some circumstances when handling untrusted user input. - -Please use version 1.2.3 or later: https://snyk.io/vuln/SNYK-JS-MINIMIST-559764 - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a boolean, string or array of strings to always treat as -booleans. if `true` will treat all double hyphenated arguments without equal signs -as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values -* `opts.stopEarly` - when true, populate `argv._` with everything after the -first non-option -* `opts['--']` - when true, populate `argv._` with everything before the `--` -and `argv['--']` with everything after the `--`. Here's an example: - - ``` - > require('./')('one two three -- four five --six'.split(' '), { '--': true }) - { _: [ 'one', 'two', 'three' ], - '--': [ 'four', 'five', '--six' ] } - ``` - - Note that with `opts['--']` set, parsing for arguments still stops after the - `--`. - -* `opts.unknown` - a function which is invoked with a command line parameter not -defined in the `opts` configuration object. If the function returns `false`, the -unknown option is not added to `argv`. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/node_modules/rc/node_modules/minimist/test/dash.js b/node_modules/rc/node_modules/minimist/test/dash.js deleted file mode 100644 index 5a4fa5be41859..0000000000000 --- a/node_modules/rc/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,31 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(5); - t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); - t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); - t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); - t.deepEqual( - parse([ '-b', '-' ], { boolean: 'b' }), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - parse([ '-s', '-' ], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(3); - t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); -}); - -test('move arguments after the -- into their own `--` array', function(t) { - t.plan(1); - t.deepEqual( - parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }), - { name: 'John', _: [ 'before' ], '--': [ 'after' ] }); -}); diff --git a/node_modules/rc/node_modules/minimist/test/default_bool.js b/node_modules/rc/node_modules/minimist/test/default_bool.js deleted file mode 100644 index 780a311270fcd..0000000000000 --- a/node_modules/rc/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,35 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true } - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false } - }); - t.equal(argv.somefalse, false); - t.end(); -}); - -test('boolean default to null', function (t) { - var argv = parse([], { - boolean: 'maybe', - default: { maybe: null } - }); - t.equal(argv.maybe, null); - var argv = parse(['--maybe'], { - boolean: 'maybe', - default: { maybe: null } - }); - t.equal(argv.maybe, true); - t.end(); - -}) diff --git a/node_modules/rc/node_modules/minimist/test/dotted.js b/node_modules/rc/node_modules/minimist/test/dotted.js deleted file mode 100644 index d8b3e856ec795..0000000000000 --- a/node_modules/rc/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,22 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); - -test('dotted default with no alias', function (t) { - var argv = parse('', {default: {'a.b': 11}}); - t.equal(argv.a.b, 11); - t.end(); -}); diff --git a/node_modules/rc/node_modules/minimist/test/long.js b/node_modules/rc/node_modules/minimist/test/long.js deleted file mode 100644 index 5d3a1e09d3b64..0000000000000 --- a/node_modules/rc/node_modules/minimist/test/long.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse([ '--bool' ]), - { bool : true, _ : [] }, - 'long boolean' - ); - t.deepEqual( - parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture sp' - ); - t.deepEqual( - parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture eq' - ); - t.deepEqual( - parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures sp' - ); - t.deepEqual( - parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/node_modules/rc/node_modules/minimist/test/parse.js b/node_modules/rc/node_modules/minimist/test/parse.js deleted file mode 100644 index 7b4a2a17c0dda..0000000000000 --- a/node_modules/rc/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,197 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse([ '--no-moo' ]), - { moo : false, _ : [] }, - 'no' - ); - t.deepEqual( - parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ] - } - ); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse([ '-t', 'moo' ], { boolean: 't' }); - t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: [ 't', 'verbose' ], - default: { verbose: true } - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = parse([ '-s', "X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse([ "--s=X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - t.end(); -}); - -test('strings' , function (t) { - var s = parse([ '-s', '0001234' ], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse([ '-x', '56' ], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([ ' ', ' ' ], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('empty strings', function(t) { - var s = parse([ '-s' ], { string: 's' }).s; - t.equal(s, ''); - t.equal(typeof s, 'string'); - - var str = parse([ '--str' ], { string: 'str' }).str; - t.equal(str, ''); - t.equal(typeof str, 'string'); - - var letters = parse([ '-art' ], { - string: [ 'a', 't' ] - }); - - t.equal(letters.a, ''); - t.equal(letters.r, true); - t.equal(letters.t, ''); - - t.end(); -}); - - -test('string and alias', function(t) { - var x = parse([ '--str', '000123' ], { - string: 's', - alias: { s: 'str' } - }); - - t.equal(x.str, '000123'); - t.equal(typeof x.str, 'string'); - t.equal(x.s, '000123'); - t.equal(typeof x.s, 'string'); - - var y = parse([ '-s', '000123' ], { - string: 'str', - alias: { str: 's' } - }); - - t.equal(y.str, '000123'); - t.equal(typeof y.str, 'string'); - t.equal(y.s, '000123'); - t.equal(typeof y.s, 'string'); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [] } - ); - t.same( - parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: 'zoom' } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: [ 'zm', 'zoom' ] } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]); - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - } - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); diff --git a/node_modules/rc/node_modules/minimist/test/parse_modified.js b/node_modules/rc/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index ab620dc5e4dc3..0000000000000 --- a/node_modules/rc/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,9 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: [123] }); -}); diff --git a/node_modules/rc/node_modules/minimist/test/short.js b/node_modules/rc/node_modules/minimist/test/short.js deleted file mode 100644 index d513a1c252909..0000000000000 --- a/node_modules/rc/node_modules/minimist/test/short.js +++ /dev/null @@ -1,67 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); - t.deepEqual( - parse([ '-123', '456' ]), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse([ '-b' ]), - { b : true, _ : [] }, - 'short boolean' - ); - t.deepEqual( - parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ] }, - 'bare' - ); - t.deepEqual( - parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [] }, - 'group' - ); - t.deepEqual( - parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [] }, - 'short group next' - ); - t.deepEqual( - parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [] }, - 'short capture' - ); - t.deepEqual( - parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); diff --git a/node_modules/rc/node_modules/minimist/test/whitespace.js b/node_modules/rc/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 8a52a58cecfd7..0000000000000 --- a/node_modules/rc/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/node_modules/require-main-filename/.npmignore b/node_modules/require-main-filename/.npmignore deleted file mode 100644 index 6f9fe6badf97d..0000000000000 --- a/node_modules/require-main-filename/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -.DS_Store -.nyc_output diff --git a/node_modules/require-main-filename/.travis.yml b/node_modules/require-main-filename/.travis.yml deleted file mode 100644 index ab61ce77ebe3d..0000000000000 --- a/node_modules/require-main-filename/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -os: - - linux -node_js: - - "0.10" - - "0.12" - - "4.1" - - "node" diff --git a/node_modules/require-main-filename/CHANGELOG.md b/node_modules/require-main-filename/CHANGELOG.md new file mode 100644 index 0000000000000..717d59e35e2e1 --- /dev/null +++ b/node_modules/require-main-filename/CHANGELOG.md @@ -0,0 +1,26 @@ +# 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. + +<a name="2.0.0"></a> +# [2.0.0](https://github.com/yargs/require-main-filename/compare/v1.0.2...v2.0.0) (2019-01-28) + + +### Chores + +* drop support for Node 0.10 ([#11](https://github.com/yargs/require-main-filename/issues/11)) ([87f4e13](https://github.com/yargs/require-main-filename/commit/87f4e13)) + + +### BREAKING CHANGES + +* drop support for Node 0.10/0.12 + + + +<a name="1.0.2"></a> +## [1.0.2](https://github.com/yargs/require-main-filename/compare/v1.0.1...v1.0.2) (2017-06-16) + + +### Bug Fixes + +* add files to package.json ([#4](https://github.com/yargs/require-main-filename/issues/4)) ([fa29988](https://github.com/yargs/require-main-filename/commit/fa29988)) diff --git a/node_modules/require-main-filename/package.json b/node_modules/require-main-filename/package.json index ed6ca5399fb5d..db63765c7fa72 100644 --- a/node_modules/require-main-filename/package.json +++ b/node_modules/require-main-filename/package.json @@ -1,27 +1,27 @@ { - "_from": "require-main-filename@^1.0.1", - "_id": "require-main-filename@1.0.1", + "_from": "require-main-filename@^2.0.0", + "_id": "require-main-filename@2.0.0", "_inBundle": false, - "_integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "_integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "_location": "/require-main-filename", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "require-main-filename@^1.0.1", + "raw": "require-main-filename@^2.0.0", "name": "require-main-filename", "escapedName": "require-main-filename", - "rawSpec": "^1.0.1", + "rawSpec": "^2.0.0", "saveSpec": null, - "fetchSpec": "^1.0.1" + "fetchSpec": "^2.0.0" }, "_requiredBy": [ "/yargs" ], - "_resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "_shasum": "97f717b69d48784f5f526a6c5aa8ffdda055a4d1", - "_spec": "require-main-filename@^1.0.1", - "_where": "/Users/rebecca/code/npm/node_modules/yargs", + "_resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "_shasum": "d0b329ecc7cc0f61649f62215be69af54aa8989b", + "_spec": "require-main-filename@^2.0.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs", "author": { "name": "Ben Coe", "email": "ben@npmjs.com" @@ -33,10 +33,14 @@ "deprecated": false, "description": "shim for require.main.filename() that works in as many environments as possible", "devDependencies": { - "chai": "^3.5.0", - "standard": "^6.0.5", - "tap": "^5.2.0" + "chai": "^4.0.0", + "standard": "^10.0.3", + "standard-version": "^4.0.0", + "tap": "^11.0.0" }, + "files": [ + "index.js" + ], "homepage": "https://github.com/yargs/require-main-filename#readme", "keywords": [ "require", @@ -52,7 +56,8 @@ }, "scripts": { "pretest": "standard", + "release": "standard-version", "test": "tap --coverage test.js" }, - "version": "1.0.1" + "version": "2.0.0" } diff --git a/node_modules/require-main-filename/test.js b/node_modules/require-main-filename/test.js deleted file mode 100644 index d89e7dcbaf03d..0000000000000 --- a/node_modules/require-main-filename/test.js +++ /dev/null @@ -1,36 +0,0 @@ -/* global describe, it */ - -var requireMainFilename = require('./') - -require('tap').mochaGlobals() -require('chai').should() - -describe('require-main-filename', function () { - it('returns require.main.filename in normal circumstances', function () { - requireMainFilename().should.match(/test\.js/) - }) - - it('should use children[0].filename when running on iisnode', function () { - var main = { - filename: 'D:\\Program Files (x86)\\iisnode\\interceptor.js', - children: [ {filename: 'D:\\home\\site\\wwwroot\\server.js'} ] - } - requireMainFilename({ - main: main - }).should.match(/server\.js/) - }) - - it('should not use children[0] if no children exist', function () { - var main = { - filename: 'D:\\Program Files (x86)\\iisnode\\interceptor.js', - children: [] - } - requireMainFilename({ - main: main - }).should.match(/interceptor\.js/) - }) - - it('should default to process.cwd() if require.main is undefined', function () { - requireMainFilename({}).should.match(/require-main-filename/) - }) -}) diff --git a/node_modules/spdx-license-ids/README.md b/node_modules/spdx-license-ids/README.md index c7b5b5f320845..699514d1a28aa 100644 --- a/node_modules/spdx-license-ids/README.md +++ b/node_modules/spdx-license-ids/README.md @@ -1,13 +1,13 @@ # spdx-license-ids -[![npm version](https://img.shields.io/npm/v/spdx-license-ids.svg)](https://www.npmjs.org/package/spdx-license-ids) -[![Build Status](https://travis-ci.org/shinnn/spdx-license-ids.svg?branch=master)](https://travis-ci.org/shinnn/spdx-license-ids) +[![npm version](https://img.shields.io/npm/v/spdx-license-ids.svg)](https://www.npmjs.com/package/spdx-license-ids) +[![Github Actions](https://action-badges.now.sh/shinnn/spdx-license-ids)](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/results/shinnn/spdx-license-ids) A list of [SPDX license](https://spdx.org/licenses/) identifiers ## Installation -[Download JSON directly](https://raw.githubusercontent.com/shinnn/spdx-license-ids/master/index.json), or [use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/getting-started/what-is-npm): +[Download JSON directly](https://raw.githubusercontent.com/shinnn/spdx-license-ids/master/index.json), or [use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/): ``` npm install spdx-license-ids @@ -17,13 +17,13 @@ npm install spdx-license-ids ### require('spdx-license-ids') -Type: `<Array<string>>` +Type: `string[]` All license IDs except for the currently deprecated ones. ```javascript const ids = require('spdx-license-ids'); -//=> ['0BSD', 'AAL', 'Abstyles', 'Adobe-2006', 'Adobe-Glyph', 'ADSL', 'AFL-1.1', 'AFL-1.2', ...] +//=> ['0BSD', 'AAL', 'ADSL', 'AFL-1.1', 'AFL-1.2', 'AFL-2.0', 'AFL-2.1', 'AFL-3.0', 'AGPL-1.0-only', ...] ids.includes('BSD-3-Clause'); //=> true ids.includes('CC-BY-1.0'); //=> true @@ -33,13 +33,13 @@ ids.includes('GPL-3.0'); //=> false ### require('spdx-license-ids/deprecated') -Type: `<Array<string>>` +Type: `string[]` Deprecated license IDs. ```javascript const deprecatedIds = require('spdx-license-ids/deprecated'); -//=> ['AGPL-1.0', 'AGPL-3.0', 'eCos-2.0', 'GFDL-1.1', 'GFDL-1.2', 'GFDL-1.3', 'GPL-1.0', ...] +//=> ['AGPL-1.0', 'AGPL-3.0', 'GFDL-1.1', 'GFDL-1.2', 'GFDL-1.3', 'GPL-1.0', 'GPL-2.0', ...] deprecatedIds.includes('BSD-3-Clause'); //=> false deprecatedIds.includes('CC-BY-1.0'); //=> false diff --git a/node_modules/spdx-license-ids/index.json b/node_modules/spdx-license-ids/index.json index ed06199127e0c..5283c78dc77c3 100644 --- a/node_modules/spdx-license-ids/index.json +++ b/node_modules/spdx-license-ids/index.json @@ -45,6 +45,7 @@ "BSD-3-Clause-No-Nuclear-License", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause-No-Nuclear-Warranty", + "BSD-3-Clause-Open-MPI", "BSD-4-Clause", "BSD-4-Clause-UC", "BSD-Protection", @@ -55,6 +56,7 @@ "Beerware", "BitTorrent-1.0", "BitTorrent-1.1", + "BlueOak-1.0.0", "Borceux", "CATOSL-1.1", "CC-BY-1.0", @@ -87,6 +89,7 @@ "CC-BY-SA-2.5", "CC-BY-SA-3.0", "CC-BY-SA-4.0", + "CC-PDDC", "CC0-1.0", "CDDL-1.0", "CDDL-1.1", @@ -98,6 +101,8 @@ "CECILL-2.1", "CECILL-B", "CECILL-C", + "CERN-OHL-1.1", + "CERN-OHL-1.2", "CNRI-Jython", "CNRI-Python", "CNRI-Python-GPL-Compatible", @@ -152,6 +157,7 @@ "Glide", "Glulxe", "HPND", + "HPND-sell-variant", "HaskellReport", "IBM-pibs", "ICU", @@ -165,6 +171,7 @@ "Intel", "Intel-ACPI", "Interbase-1.0", + "JPNIC", "JSON", "JasPer-2.0", "LAL-1.2", @@ -265,6 +272,7 @@ "PDDL-1.0", "PHP-3.0", "PHP-3.01", + "Parity-6.0.0", "Plexus", "PostgreSQL", "Python-2.0", @@ -283,12 +291,15 @@ "SGI-B-1.0", "SGI-B-1.1", "SGI-B-2.0", + "SHL-0.5", + "SHL-0.51", "SISSL", "SISSL-1.2", "SMLNJ", "SMPPL", "SNIA", "SPL-1.0", + "SSPL-1.0", "SWL", "Saxpath", "Sendmail", @@ -299,6 +310,7 @@ "Spencer-94", "Spencer-99", "SugarCRM-1.1.3", + "TAPR-OHL-1.0", "TCL", "TCP-wrappers", "TMate", @@ -335,6 +347,7 @@ "Zimbra-1.3", "Zimbra-1.4", "Zlib", + "blessing", "bzip2-1.0.5", "bzip2-1.0.6", "copyleft-next-0.3.0", @@ -346,6 +359,7 @@ "gSOAP-1.3b", "gnuplot", "iMatix", + "libpng-2.0", "libtiff", "mpich2", "psfrag", diff --git a/node_modules/spdx-license-ids/package.json b/node_modules/spdx-license-ids/package.json index 84fd02c3d6022..45cc6c3041aa7 100644 --- a/node_modules/spdx-license-ids/package.json +++ b/node_modules/spdx-license-ids/package.json @@ -1,19 +1,19 @@ { - "_from": "spdx-license-ids@3.0.3", - "_id": "spdx-license-ids@3.0.3", + "_from": "spdx-license-ids@3.0.5", + "_id": "spdx-license-ids@3.0.5", "_inBundle": false, - "_integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", + "_integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", "_location": "/spdx-license-ids", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "spdx-license-ids@3.0.3", + "raw": "spdx-license-ids@3.0.5", "name": "spdx-license-ids", "escapedName": "spdx-license-ids", - "rawSpec": "3.0.3", + "rawSpec": "3.0.5", "saveSpec": null, - "fetchSpec": "3.0.3" + "fetchSpec": "3.0.5" }, "_requiredBy": [ "#USER", @@ -21,10 +21,10 @@ "/spdx-correct", "/spdx-expression-parse" ], - "_resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", - "_shasum": "81c0ce8f21474756148bbb5f3bfc0f36bf15d76e", - "_spec": "spdx-license-ids@3.0.3", - "_where": "/Users/zkat/Documents/code/work/npm", + "_resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "_shasum": "3694b5804567a458d3c8045842a6358632f62654", + "_spec": "spdx-license-ids@3.0.5", + "_where": "/home/kyle/cli", "author": { "name": "Shinnosuke Watanabe", "url": "https://github.com/shinnn" @@ -73,5 +73,5 @@ "pretest": "eslint .", "test": "node test.js" }, - "version": "3.0.3" + "version": "3.0.5" } diff --git a/node_modules/update-notifier/package.json b/node_modules/update-notifier/package.json index c2c81fb3c7d73..fd049446e1301 100644 --- a/node_modules/update-notifier/package.json +++ b/node_modules/update-notifier/package.json @@ -23,7 +23,7 @@ "_resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", "_shasum": "d0744593e13f161e406acb1d9408b72cad08aff6", "_spec": "update-notifier@2.5.0", - "_where": "/Users/ruyadorno/Documents/workspace/cli", + "_where": "/Users/ruyadorno/Documents/workspace/cli/latest", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", diff --git a/node_modules/wrap-ansi/index.js b/node_modules/wrap-ansi/index.js index ff625435fa105..5038bb0c534ae 100755 --- a/node_modules/wrap-ansi/index.js +++ b/node_modules/wrap-ansi/index.js @@ -1,68 +1,42 @@ 'use strict'; -var stringWidth = require('string-width'); -var stripAnsi = require('strip-ansi'); - -var ESCAPES = [ - '\u001b', - '\u009b' -]; - -var END_CODE = 39; - -var ESCAPE_CODES = { - 0: 0, - 1: 22, - 2: 22, - 3: 23, - 4: 24, - 7: 27, - 8: 28, - 9: 29, - 30: 39, - 31: 39, - 32: 39, - 33: 39, - 34: 39, - 35: 39, - 36: 39, - 37: 39, - 90: 39, - 40: 49, - 41: 49, - 42: 49, - 43: 49, - 44: 49, - 45: 49, - 46: 49, - 47: 49 -}; +const stringWidth = require('string-width'); +const stripAnsi = require('strip-ansi'); +const ansiStyles = require('ansi-styles'); + +const ESCAPES = new Set([ + '\u001B', + '\u009B' +]); + +const END_CODE = 39; + +const wrapAnsi = code => `${ESCAPES.values().next().value}[${code}m`; -function wrapAnsi(code) { - return ESCAPES[0] + '[' + code + 'm'; -} +// Calculate the length of words split on ' ', ignoring +// the extra characters added by ansi escape codes +const wordLengths = string => string.split(' ').map(character => stringWidth(character)); -// calculate the length of words split on ' ', ignoring -// the extra characters added by ansi escape codes. -function wordLengths(str) { - return str.split(' ').map(function (s) { - return stringWidth(s); - }); -} +// Wrap a long word across multiple rows +// Ansi escape codes do not count towards length +const wrapWord = (rows, word, columns) => { + const characters = [...word]; -// wrap a long word across multiple rows. -// ansi escape codes do not count towards length. -function wrapWord(rows, word, cols) { - var insideEscape = false; - var visible = stripAnsi(rows[rows.length - 1]).length; + let insideEscape = false; + let visible = stringWidth(stripAnsi(rows[rows.length - 1])); - for (var i = 0; i < word.length; i++) { - var x = word[i]; + for (const [index, character] of characters.entries()) { + const characterLength = stringWidth(character); - rows[rows.length - 1] += x; + if (visible + characterLength <= columns) { + rows[rows.length - 1] += character; + } else { + rows.push(character); + visible = 0; + } - if (ESCAPES.indexOf(x) !== -1) { + if (ESCAPES.has(character)) { insideEscape = true; - } else if (insideEscape && x === 'm') { + } else if (insideEscape && character === 'm') { insideEscape = false; continue; } @@ -71,98 +45,144 @@ function wrapWord(rows, word, cols) { continue; } - visible++; + visible += characterLength; - if (visible >= cols && i < word.length - 1) { + if (visible === columns && index < characters.length - 1) { rows.push(''); visible = 0; } } - // it's possible that the last row we copy over is only - // ansi escape characters, handle this edge-case. + // It's possible that the last row we copy over is only + // ansi escape characters, handle this edge-case if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { rows[rows.length - 2] += rows.pop(); } -} +}; + +// Trims spaces from a string ignoring invisible sequences +const stringVisibleTrimSpacesRight = str => { + const words = str.split(' '); + let last = words.length; + + while (last > 0) { + if (stringWidth(words[last - 1]) > 0) { + break; + } + + last--; + } + + if (last === words.length) { + return str; + } + + return words.slice(0, last).join(' ') + words.slice(last).join(''); +}; -// the wrap-ansi module can be invoked -// in either 'hard' or 'soft' wrap mode. +// The wrap-ansi module can be invoked +// in either 'hard' or 'soft' wrap mode // // 'hard' will never allow a string to take up more -// than cols characters. +// than columns characters // -// 'soft' allows long words to expand past the column length. -function exec(str, cols, opts) { - var options = opts || {}; +// 'soft' allows long words to expand past the column length +const exec = (string, columns, options = {}) => { + if (options.trim !== false && string.trim() === '') { + return ''; + } + + let pre = ''; + let ret = ''; + let escapeCode; + + const lengths = wordLengths(string); + let rows = ['']; - var pre = ''; - var ret = ''; - var escapeCode; + for (const [index, word] of string.split(' ').entries()) { + if (options.trim !== false) { + rows[rows.length - 1] = rows[rows.length - 1].trimLeft(); + } - var lengths = wordLengths(str); - var words = str.split(' '); - var rows = ['']; + let rowLength = stringWidth(rows[rows.length - 1]); - for (var i = 0, word; (word = words[i]) !== undefined; i++) { - var rowLength = stringWidth(rows[rows.length - 1]); + if (index !== 0) { + if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) { + // If we start with a new word but the current row length equals the length of the columns, add a new row + rows.push(''); + rowLength = 0; + } - if (rowLength) { - rows[rows.length - 1] += ' '; - rowLength++; + if (rowLength > 0 || options.trim === false) { + rows[rows.length - 1] += ' '; + rowLength++; + } } - // in 'hard' wrap mode, the length of a line is - // never allowed to extend past 'cols'. - if (lengths[i] > cols && options.hard) { - if (rowLength) { + // In 'hard' wrap mode, the length of a line is + // never allowed to extend past 'columns' + if (options.hard && lengths[index] > columns) { + const remainingColumns = (columns - rowLength); + const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); + const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); + if (breaksStartingNextLine < breaksStartingThisLine) { rows.push(''); } - wrapWord(rows, word, cols); + + wrapWord(rows, word, columns); continue; } - if (rowLength + lengths[i] > cols && rowLength > 0) { - if (options.wordWrap === false && rowLength < cols) { - wrapWord(rows, word, cols); + if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { + if (options.wordWrap === false && rowLength < columns) { + wrapWord(rows, word, columns); continue; } rows.push(''); } + if (rowLength + lengths[index] > columns && options.wordWrap === false) { + wrapWord(rows, word, columns); + continue; + } + rows[rows.length - 1] += word; } - pre = rows.map(function (r) { - return r.trim(); - }).join('\n'); + if (options.trim !== false) { + rows = rows.map(stringVisibleTrimSpacesRight); + } - for (var j = 0; j < pre.length; j++) { - var y = pre[j]; + pre = rows.join('\n'); - ret += y; + for (const [index, character] of [...pre].entries()) { + ret += character; - if (ESCAPES.indexOf(y) !== -1) { - var code = parseFloat(/[0-9][^m]*/.exec(pre.slice(j, j + 4))); + if (ESCAPES.has(character)) { + const code = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4))); escapeCode = code === END_CODE ? null : code; } - if (escapeCode && ESCAPE_CODES[escapeCode]) { - if (pre[j + 1] === '\n') { - ret += wrapAnsi(ESCAPE_CODES[escapeCode]); - } else if (y === '\n') { + const code = ansiStyles.codes.get(Number(escapeCode)); + + if (escapeCode && code) { + if (pre[index + 1] === '\n') { + ret += wrapAnsi(code); + } else if (character === '\n') { ret += wrapAnsi(escapeCode); } } } return ret; -} +}; -// for each line break, invoke the method separately. -module.exports = function (str, cols, opts) { - return String(str).split('\n').map(function (substr) { - return exec(substr, cols, opts); - }).join('\n'); +// For each newline, invoke the method separately +module.exports = (string, columns, options) => { + return String(string) + .normalize() + .split('\n') + .map(line => exec(line, columns, options)) + .join('\n'); }; diff --git a/node_modules/wrap-ansi/license b/node_modules/wrap-ansi/license index 654d0bfe94343..e7af2f77107d7 100644 --- a/node_modules/wrap-ansi/license +++ b/node_modules/wrap-ansi/license @@ -1,21 +1,9 @@ -The MIT License (MIT) +MIT License Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/wrap-ansi/node_modules/ansi-regex/index.js b/node_modules/wrap-ansi/node_modules/ansi-regex/index.js new file mode 100644 index 0000000000000..c25448009f304 --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/ansi-regex/index.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = options => { + options = Object.assign({ + onlyFirst: false + }, options); + + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, options.onlyFirst ? undefined : 'g'); +}; diff --git a/node_modules/lcid/license b/node_modules/wrap-ansi/node_modules/ansi-regex/license similarity index 100% rename from node_modules/lcid/license rename to node_modules/wrap-ansi/node_modules/ansi-regex/license diff --git a/node_modules/wrap-ansi/node_modules/ansi-regex/package.json b/node_modules/wrap-ansi/node_modules/ansi-regex/package.json new file mode 100644 index 0000000000000..d12a58a622317 --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/ansi-regex/package.json @@ -0,0 +1,85 @@ +{ + "_from": "ansi-regex@^4.1.0", + "_id": "ansi-regex@4.1.0", + "_inBundle": false, + "_integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "_location": "/wrap-ansi/ansi-regex", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-regex@^4.1.0", + "name": "ansi-regex", + "escapedName": "ansi-regex", + "rawSpec": "^4.1.0", + "saveSpec": null, + "fetchSpec": "^4.1.0" + }, + "_requiredBy": [ + "/wrap-ansi/strip-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "_shasum": "8b9f8f08cf1acb843756a839ca8c7e3168c51997", + "_spec": "ansi-regex@^4.1.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/wrap-ansi/node_modules/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-regex/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "ava": "^0.25.0", + "xo": "^0.23.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/ansi-regex#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "license": "MIT", + "name": "ansi-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-regex.git" + }, + "scripts": { + "test": "xo && ava", + "view-supported": "node fixtures/view-codes.js" + }, + "version": "4.1.0" +} diff --git a/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md b/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000000000..d19c44667e704 --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md @@ -0,0 +1,87 @@ +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) + +> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + +--- + +<div align="center"> + <b> + <a href="https://tidelift.com/subscription/pkg/npm-ansi-regex?utm_source=npm-ansi-regex&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> + </b> + <br> + <sub> + Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. + </sub> +</div> + +--- + + +## Install + +``` +$ npm install ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] +``` + + +## API + +### ansiRegex([options]) + +Returns a regex for matching ANSI escape codes. + +#### options + +##### onlyFirst + +Type: `boolean`<br> +Default: `false` *(Matches any ANSI escape codes in a string)* + +Match only the first ANSI escape. + + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js b/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js new file mode 100644 index 0000000000000..d506327c3e557 --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js @@ -0,0 +1,46 @@ +'use strict'; +/* eslint-disable yoda */ +module.exports = x => { + if (Number.isNaN(x)) { + return false; + } + + // code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + if ( + x >= 0x1100 && ( + x <= 0x115f || // Hangul Jamo + x === 0x2329 || // LEFT-POINTING ANGLE BRACKET + x === 0x232a || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) || + // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + (0x3250 <= x && x <= 0x4dbf) || + // CJK Unified Ideographs .. Yi Radicals + (0x4e00 <= x && x <= 0xa4c6) || + // Hangul Jamo Extended-A + (0xa960 <= x && x <= 0xa97c) || + // Hangul Syllables + (0xac00 <= x && x <= 0xd7a3) || + // CJK Compatibility Ideographs + (0xf900 <= x && x <= 0xfaff) || + // Vertical Forms + (0xfe10 <= x && x <= 0xfe19) || + // CJK Compatibility Forms .. Small Form Variants + (0xfe30 <= x && x <= 0xfe6b) || + // Halfwidth and Fullwidth Forms + (0xff01 <= x && x <= 0xff60) || + (0xffe0 <= x && x <= 0xffe6) || + // Kana Supplement + (0x1b000 <= x && x <= 0x1b001) || + // Enclosed Ideographic Supplement + (0x1f200 <= x && x <= 0x1f251) || + // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + (0x20000 <= x && x <= 0x3fffd) + ) + ) { + return true; + } + + return false; +}; diff --git a/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license b/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license new file mode 100644 index 0000000000000..654d0bfe94343 --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/wrap-ansi/node_modules/is-fullwidth-code-point/package.json b/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json new file mode 100644 index 0000000000000..f28d7996ce3a7 --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json @@ -0,0 +1,77 @@ +{ + "_from": "is-fullwidth-code-point@^2.0.0", + "_id": "is-fullwidth-code-point@2.0.0", + "_inBundle": false, + "_integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "_location": "/wrap-ansi/is-fullwidth-code-point", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-fullwidth-code-point@^2.0.0", + "name": "is-fullwidth-code-point", + "escapedName": "is-fullwidth-code-point", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/wrap-ansi/string-width" + ], + "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "_shasum": "a3b30a5c4f199183167aaab93beefae3ddfb654f", + "_spec": "is-fullwidth-code-point@^2.0.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/wrap-ansi/node_modules/string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme", + "keywords": [ + "fullwidth", + "full-width", + "full", + "width", + "unicode", + "character", + "char", + "string", + "str", + "codepoint", + "code", + "point", + "is", + "detect", + "check" + ], + "license": "MIT", + "name": "is-fullwidth-code-point", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md b/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md new file mode 100644 index 0000000000000..093b0281b2c46 --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md @@ -0,0 +1,39 @@ +# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point) + +> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) + + +## Install + +``` +$ npm install --save is-fullwidth-code-point +``` + + +## Usage + +```js +const isFullwidthCodePoint = require('is-fullwidth-code-point'); + +isFullwidthCodePoint('θ°’'.codePointAt()); +//=> true + +isFullwidthCodePoint('a'.codePointAt()); +//=> false +``` + + +## API + +### isFullwidthCodePoint(input) + +#### input + +Type: `number` + +[Code point](https://en.wikipedia.org/wiki/Code_point) of a character. + + +## License + +MIT Β© [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/wrap-ansi/node_modules/string-width/index.js b/node_modules/wrap-ansi/node_modules/string-width/index.js index b9bec62440a46..33c9d6c06f7a5 100644 --- a/node_modules/wrap-ansi/node_modules/string-width/index.js +++ b/node_modules/wrap-ansi/node_modules/string-width/index.js @@ -1,36 +1,38 @@ 'use strict'; -var stripAnsi = require('strip-ansi'); -var codePointAt = require('code-point-at'); -var isFullwidthCodePoint = require('is-fullwidth-code-point'); +const stripAnsi = require('strip-ansi'); +const isFullwidthCodePoint = require('is-fullwidth-code-point'); +const emojiRegex = require('emoji-regex')(); -// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1345 -module.exports = function (str) { - if (typeof str !== 'string' || str.length === 0) { +module.exports = input => { + input = input.replace(emojiRegex, ' '); + + if (typeof input !== 'string' || input.length === 0) { return 0; } - var width = 0; + input = stripAnsi(input); - str = stripAnsi(str); + let width = 0; - for (var i = 0; i < str.length; i++) { - var code = codePointAt(str, i); + for (let i = 0; i < input.length; i++) { + const code = input.codePointAt(i); - // ignore control characters - if (code <= 0x1f || (code >= 0x7f && code <= 0x9f)) { + // Ignore control characters + if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { continue; } - // surrogates - if (code >= 0x10000) { - i++; + // Ignore combining characters + if (code >= 0x300 && code <= 0x36F) { + continue; } - if (isFullwidthCodePoint(code)) { - width += 2; - } else { - width++; + // Surrogates + if (code > 0xFFFF) { + i++; } + + width += isFullwidthCodePoint(code) ? 2 : 1; } return width; diff --git a/node_modules/wrap-ansi/node_modules/string-width/license b/node_modules/wrap-ansi/node_modules/string-width/license index 654d0bfe94343..e7af2f77107d7 100644 --- a/node_modules/wrap-ansi/node_modules/string-width/license +++ b/node_modules/wrap-ansi/node_modules/string-width/license @@ -1,21 +1,9 @@ -The MIT License (MIT) +MIT License Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/wrap-ansi/node_modules/string-width/package.json b/node_modules/wrap-ansi/node_modules/string-width/package.json index 1f4dda52ae19e..d68196008b767 100644 --- a/node_modules/wrap-ansi/node_modules/string-width/package.json +++ b/node_modules/wrap-ansi/node_modules/string-width/package.json @@ -1,27 +1,27 @@ { - "_from": "string-width@^1.0.1", - "_id": "string-width@1.0.2", + "_from": "string-width@^3.0.0", + "_id": "string-width@3.1.0", "_inBundle": false, - "_integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "_integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "_location": "/wrap-ansi/string-width", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "string-width@^1.0.1", + "raw": "string-width@^3.0.0", "name": "string-width", "escapedName": "string-width", - "rawSpec": "^1.0.1", + "rawSpec": "^3.0.0", "saveSpec": null, - "fetchSpec": "^1.0.1" + "fetchSpec": "^3.0.0" }, "_requiredBy": [ "/wrap-ansi" ], - "_resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "_shasum": "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3", - "_spec": "string-width@^1.0.1", - "_where": "/Users/rebecca/code/npm/node_modules/wrap-ansi", + "_resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "_shasum": "22767be21b62af1081574306f69ac51b62203961", + "_spec": "string-width@^3.0.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/wrap-ansi", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -32,18 +32,18 @@ }, "bundleDependencies": false, "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" }, "deprecated": false, "description": "Get the visual width of a string - the number of columns required to display it", "devDependencies": { - "ava": "*", - "xo": "*" + "ava": "^1.0.1", + "xo": "^0.23.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6" }, "files": [ "index.js" @@ -84,5 +84,5 @@ "scripts": { "test": "xo && ava" }, - "version": "1.0.2" + "version": "3.1.0" } diff --git a/node_modules/wrap-ansi/node_modules/string-width/readme.md b/node_modules/wrap-ansi/node_modules/string-width/readme.md index 1ab42c93580ec..d39d95f56cf3f 100644 --- a/node_modules/wrap-ansi/node_modules/string-width/readme.md +++ b/node_modules/wrap-ansi/node_modules/string-width/readme.md @@ -2,7 +2,7 @@ > Get the visual width of a string - the number of columns required to display it -Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. Useful to be able to measure the actual width of command-line output. @@ -10,7 +10,7 @@ Useful to be able to measure the actual width of command-line output. ## Install ``` -$ npm install --save string-width +$ npm install string-width ``` @@ -27,6 +27,9 @@ stringWidth('\u001b[1m叀\u001b[22m'); stringWidth('a'); //=> 1 + +stringWidth('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +// => 5 ``` diff --git a/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts b/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts new file mode 100644 index 0000000000000..44e954d0c724d --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts @@ -0,0 +1,15 @@ +/** +Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. + +@example +``` +import stripAnsi from 'strip-ansi'; + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` +*/ +export default function stripAnsi(string: string): string; diff --git a/node_modules/wrap-ansi/node_modules/strip-ansi/index.js b/node_modules/wrap-ansi/node_modules/strip-ansi/index.js new file mode 100644 index 0000000000000..9788c96dfa3b0 --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/strip-ansi/index.js @@ -0,0 +1,7 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; + +module.exports = stripAnsi; +module.exports.default = stripAnsi; diff --git a/node_modules/mem/license b/node_modules/wrap-ansi/node_modules/strip-ansi/license similarity index 100% rename from node_modules/mem/license rename to node_modules/wrap-ansi/node_modules/strip-ansi/license diff --git a/node_modules/wrap-ansi/node_modules/strip-ansi/package.json b/node_modules/wrap-ansi/node_modules/strip-ansi/package.json new file mode 100644 index 0000000000000..c217180370483 --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/strip-ansi/package.json @@ -0,0 +1,87 @@ +{ + "_from": "strip-ansi@^5.0.0", + "_id": "strip-ansi@5.2.0", + "_inBundle": false, + "_integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "_location": "/wrap-ansi/strip-ansi", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "strip-ansi@^5.0.0", + "name": "strip-ansi", + "escapedName": "strip-ansi", + "rawSpec": "^5.0.0", + "saveSpec": null, + "fetchSpec": "^5.0.0" + }, + "_requiredBy": [ + "/wrap-ansi", + "/wrap-ansi/string-width" + ], + "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "_shasum": "8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae", + "_spec": "strip-ansi@^5.0.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/wrap-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/strip-ansi/issues" + }, + "bundleDependencies": false, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "deprecated": false, + "description": "Strip ANSI escape codes from a string", + "devDependencies": { + "ava": "^1.3.1", + "tsd-check": "^0.5.0", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/chalk/strip-ansi#readme", + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "name": "strip-ansi", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/strip-ansi.git" + }, + "scripts": { + "test": "xo && ava && tsd-check" + }, + "version": "5.2.0" +} diff --git a/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md b/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md new file mode 100644 index 0000000000000..8681fe8af4424 --- /dev/null +++ b/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md @@ -0,0 +1,61 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string + +--- + +<div align="center"> + <b> + <a href="https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=readme">Get professional support for 'strip-ansi' with a Tidelift subscription</a> + </b> + <br> + <sub> + Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. + </sub> +</div> + +--- + +## Install + +``` +$ npm install strip-ansi +``` + + +## Usage + +```js +const stripAnsi = require('strip-ansi'); + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` + + +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/wrap-ansi/package.json b/node_modules/wrap-ansi/package.json index 6ac0d86498986..f4e7ba490720d 100644 --- a/node_modules/wrap-ansi/package.json +++ b/node_modules/wrap-ansi/package.json @@ -1,31 +1,29 @@ { - "_from": "wrap-ansi@^2.0.0", - "_id": "wrap-ansi@2.1.0", + "_from": "wrap-ansi@^5.1.0", + "_id": "wrap-ansi@5.1.0", "_inBundle": false, - "_integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "_integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "_location": "/wrap-ansi", "_phantomChildren": { - "code-point-at": "1.1.0", - "number-is-nan": "1.0.1" + "emoji-regex": "7.0.3" }, "_requested": { "type": "range", "registry": true, - "raw": "wrap-ansi@^2.0.0", + "raw": "wrap-ansi@^5.1.0", "name": "wrap-ansi", "escapedName": "wrap-ansi", - "rawSpec": "^2.0.0", + "rawSpec": "^5.1.0", "saveSpec": null, - "fetchSpec": "^2.0.0" + "fetchSpec": "^5.1.0" }, "_requiredBy": [ - "/cliui", - "/tacks/cliui" + "/cliui" ], - "_resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "_shasum": "d8fc3d284dd05794fe84973caecdd1cf824fdd85", - "_spec": "wrap-ansi@^2.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/cliui", + "_resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "_shasum": "1fd1f67235d5b6d0fee781056001bfb694c03b09", + "_spec": "wrap-ansi@^5.1.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/cliui", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", @@ -36,22 +34,22 @@ }, "bundleDependencies": false, "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" }, "deprecated": false, "description": "Wordwrap a string with ANSI escape codes", "devDependencies": { - "ava": "^0.16.0", - "chalk": "^1.1.0", - "coveralls": "^2.11.4", - "has-ansi": "^2.0.0", - "nyc": "^6.2.1", - "strip-ansi": "^3.0.0", - "xo": "*" + "ava": "^1.2.1", + "chalk": "^2.4.2", + "coveralls": "^3.0.3", + "has-ansi": "^3.0.0", + "nyc": "^13.3.0", + "xo": "^0.24.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6" }, "files": [ "index.js" @@ -85,36 +83,13 @@ "text" ], "license": "MIT", - "maintainers": [ - { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - { - "name": "Joshua Appelman", - "email": "jappelman@xebia.com", - "url": "jbnicolai.com" - }, - { - "name": "JD Ballard", - "email": "i.am.qix@gmail.com", - "url": "github.com/qix-" - }, - { - "name": "Benjamin Coe", - "email": "ben@npmjs.com", - "url": "github.com/bcoe" - } - ], "name": "wrap-ansi", "repository": { "type": "git", "url": "git+https://github.com/chalk/wrap-ansi.git" }, "scripts": { - "coveralls": "nyc report --reporter=text-lcov | coveralls", "test": "xo && nyc ava" }, - "version": "2.1.0" + "version": "5.1.0" } diff --git a/node_modules/wrap-ansi/readme.md b/node_modules/wrap-ansi/readme.md index 59fc96bda4c0c..73b87de22f52f 100644 --- a/node_modules/wrap-ansi/readme.md +++ b/node_modules/wrap-ansi/readme.md @@ -1,12 +1,12 @@ # wrap-ansi [![Build Status](https://travis-ci.org/chalk/wrap-ansi.svg?branch=master)](https://travis-ci.org/chalk/wrap-ansi) [![Coverage Status](https://coveralls.io/repos/github/chalk/wrap-ansi/badge.svg?branch=master)](https://coveralls.io/github/chalk/wrap-ansi?branch=master) -> Wordwrap a string with [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) +> Wordwrap a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) ## Install ``` -$ npm install --save wrap-ansi +$ npm install wrap-ansi ``` @@ -24,6 +24,20 @@ console.log(wrapAnsi(input, 20)); <img width="331" src="screenshot.png"> +--- + +<div align="center"> + <b> + <a href="https://tidelift.com/subscription/pkg/npm-wrap_ansi?utm_source=npm-wrap-ansi&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> + </b> + <br> + <sub> + Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. + </sub> +</div> + +--- + ## API @@ -45,6 +59,8 @@ Number of columns to wrap the text to. #### options +Type: `Object` + ##### hard Type: `boolean`<br> @@ -59,6 +75,13 @@ Default: `true` By default, an attempt is made to split words at spaces, ensuring that they don't extend past the configured columns. If wordWrap is `false`, each column will instead be completely filled splitting words as necessary. +##### trim + +Type: `boolean`<br> +Default: `true` + +Whitespace on all lines is removed by default. Set this option to `false` if you don't want to trim. + ## Related @@ -68,6 +91,18 @@ By default, an attempt is made to split words at spaces, ensuring that they don' - [jsesc](https://github.com/mathiasbynens/jsesc) - Generate ASCII-only output from Unicode strings. Useful for creating test fixtures. +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) +- [Benjamin Coe](https://github.com/bcoe) + + +## 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) +MIT diff --git a/node_modules/yargs-parser/CHANGELOG.md b/node_modules/yargs-parser/CHANGELOG.md index a0186f2330f1c..18ed4b34cbcca 100644 --- a/node_modules/yargs-parser/CHANGELOG.md +++ b/node_modules/yargs-parser/CHANGELOG.md @@ -1,7 +1,214 @@ -# Change Log +# Changelog 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. +## [15.0.0](https://github.com/yargs/yargs-parser/compare/v14.0.0...v15.0.0) (2019-10-07) + + +### Features + +* rework `collect-unknown-options` into `unknown-options-as-args`, providing more comprehensive functionality ([ef771ca](https://github.com/yargs/yargs-parser/commit/ef771ca)) + + +### BREAKING CHANGES + +* rework `collect-unknown-options` into `unknown-options-as-args`, providing more comprehensive functionality + + + +## [14.0.0](https://github.com/yargs/yargs-parser/compare/v13.1.1...v14.0.0) (2019-09-06) + + +### Bug Fixes + +* boolean arrays with default values ([#185](https://github.com/yargs/yargs-parser/issues/185)) ([7d42572](https://github.com/yargs/yargs-parser/commit/7d42572)) +* boolean now behaves the same as other array types ([#184](https://github.com/yargs/yargs-parser/issues/184)) ([17ca3bd](https://github.com/yargs/yargs-parser/commit/17ca3bd)) +* eatNargs() for 'opt.narg === 0' and boolean typed options ([#188](https://github.com/yargs/yargs-parser/issues/188)) ([c5a1db0](https://github.com/yargs/yargs-parser/commit/c5a1db0)) +* maybeCoerceNumber now takes precedence over coerce return value ([#182](https://github.com/yargs/yargs-parser/issues/182)) ([2f26436](https://github.com/yargs/yargs-parser/commit/2f26436)) +* take into account aliases when appending arrays from config object ([#199](https://github.com/yargs/yargs-parser/issues/199)) ([f8a2d3f](https://github.com/yargs/yargs-parser/commit/f8a2d3f)) + + +### Features + +* add configuration option to "collect-unknown-options" ([#181](https://github.com/yargs/yargs-parser/issues/181)) ([7909cc4](https://github.com/yargs/yargs-parser/commit/7909cc4)) +* maybeCoerceNumber() now takes into account arrays ([#187](https://github.com/yargs/yargs-parser/issues/187)) ([31c204b](https://github.com/yargs/yargs-parser/commit/31c204b)) + + +### BREAKING CHANGES + +* unless "parse-numbers" is set to "false", arrays of numeric strings are now parsed as numbers, rather than strings. +* we have dropped the broken "defaulted" functionality; we would like to revisit adding this in the future. +* maybeCoerceNumber now takes precedence over coerce return value (#182) + + + +### [13.1.1](https://www.github.com/yargs/yargs-parser/compare/v13.1.0...v13.1.1) (2019-06-10) + + +### Bug Fixes + +* convert values to strings when tokenizing ([#167](https://www.github.com/yargs/yargs-parser/issues/167)) ([57b7883](https://www.github.com/yargs/yargs-parser/commit/57b7883)) +* nargs should allow duplicates when duplicate-arguments-array=false ([#164](https://www.github.com/yargs/yargs-parser/issues/164)) ([47ccb0b](https://www.github.com/yargs/yargs-parser/commit/47ccb0b)) +* should populate "_" when given config with "short-option-groups" false ([#179](https://www.github.com/yargs/yargs-parser/issues/179)) ([6055974](https://www.github.com/yargs/yargs-parser/commit/6055974)) + +## [13.1.0](https://github.com/yargs/yargs-parser/compare/v13.0.0...v13.1.0) (2019-05-05) + + +### Features + +* add `strip-aliased` and `strip-dashed` configuration options. ([#172](https://github.com/yargs/yargs-parser/issues/172)) ([a3936aa](https://github.com/yargs/yargs-parser/commit/a3936aa)) +* support boolean which do not consume next argument. ([#171](https://github.com/yargs/yargs-parser/issues/171)) ([0ae7fcb](https://github.com/yargs/yargs-parser/commit/0ae7fcb)) + + + +<a name="13.0.0"></a> +# [13.0.0](https://github.com/yargs/yargs-parser/compare/v12.0.0...v13.0.0) (2019-02-02) + + +### Features + +* don't coerce number from string with leading '0' or '+' ([#158](https://github.com/yargs/yargs-parser/issues/158)) ([18d0fd5](https://github.com/yargs/yargs-parser/commit/18d0fd5)) + + +### BREAKING CHANGES + +* options with leading '+' or '0' now parse as strings + + + +<a name="12.0.0"></a> +# [12.0.0](https://github.com/yargs/yargs-parser/compare/v11.1.1...v12.0.0) (2019-01-29) + + +### Bug Fixes + +* better handling of quoted strings ([#153](https://github.com/yargs/yargs-parser/issues/153)) ([2fb71b2](https://github.com/yargs/yargs-parser/commit/2fb71b2)) + + +### Features + +* default value is now used if no right-hand value provided for numbers/strings ([#156](https://github.com/yargs/yargs-parser/issues/156)) ([5a7c46a](https://github.com/yargs/yargs-parser/commit/5a7c46a)) + + +### BREAKING CHANGES + +* a flag with no right-hand value no longer populates defaulted options with `undefined`. +* quotes at beginning and endings of strings are not removed during parsing. + + + +<a name="11.1.1"></a> +## [11.1.1](https://github.com/yargs/yargs-parser/compare/v11.1.0...v11.1.1) (2018-11-19) + + +### Bug Fixes + +* ensure empty string is added into argv._ ([#140](https://github.com/yargs/yargs-parser/issues/140)) ([79cda98](https://github.com/yargs/yargs-parser/commit/79cda98)) + + +### Reverts + +* make requiresArg work in conjunction with arrays ([#136](https://github.com/yargs/yargs-parser/issues/136)) ([f4a3063](https://github.com/yargs/yargs-parser/commit/f4a3063)) + + + +<a name="11.1.0"></a> +# [11.1.0](https://github.com/yargs/yargs-parser/compare/v11.0.0...v11.1.0) (2018-11-10) + + +### Bug Fixes + +* handling of one char alias ([#139](https://github.com/yargs/yargs-parser/issues/139)) ([ee56e31](https://github.com/yargs/yargs-parser/commit/ee56e31)) + + +### Features + +* add halt-at-non-option configuration option ([#130](https://github.com/yargs/yargs-parser/issues/130)) ([a849fce](https://github.com/yargs/yargs-parser/commit/a849fce)) + + + +<a name="11.0.0"></a> +# [11.0.0](https://github.com/yargs/yargs-parser/compare/v10.1.0...v11.0.0) (2018-10-06) + + +### Bug Fixes + +* flatten-duplicate-arrays:false for more than 2 arrays ([#128](https://github.com/yargs/yargs-parser/issues/128)) ([2bc395f](https://github.com/yargs/yargs-parser/commit/2bc395f)) +* hyphenated flags combined with dot notation broke parsing ([#131](https://github.com/yargs/yargs-parser/issues/131)) ([dc788da](https://github.com/yargs/yargs-parser/commit/dc788da)) +* make requiresArg work in conjunction with arrays ([#136](https://github.com/yargs/yargs-parser/issues/136)) ([77ae1d4](https://github.com/yargs/yargs-parser/commit/77ae1d4)) + + +### Chores + +* update dependencies ([6dc42a1](https://github.com/yargs/yargs-parser/commit/6dc42a1)) + + +### Features + +* also add camelCase array options ([#125](https://github.com/yargs/yargs-parser/issues/125)) ([08c0117](https://github.com/yargs/yargs-parser/commit/08c0117)) +* array.type can now be provided, supporting coercion ([#132](https://github.com/yargs/yargs-parser/issues/132)) ([4b8cfce](https://github.com/yargs/yargs-parser/commit/4b8cfce)) + + +### BREAKING CHANGES + +* drops Node 4 support +* the argv object is now populated differently (correctly) when hyphens and dot notation are used in conjunction. + + + +<a name="10.1.0"></a> +# [10.1.0](https://github.com/yargs/yargs-parser/compare/v10.0.0...v10.1.0) (2018-06-29) + + +### Features + +* add `set-placeholder-key` configuration ([#123](https://github.com/yargs/yargs-parser/issues/123)) ([19386ee](https://github.com/yargs/yargs-parser/commit/19386ee)) + + + +<a name="10.0.0"></a> +# [10.0.0](https://github.com/yargs/yargs-parser/compare/v9.0.2...v10.0.0) (2018-04-04) + + +### Bug Fixes + +* do not set boolean flags if not defined in `argv` ([#119](https://github.com/yargs/yargs-parser/issues/119)) ([f6e6599](https://github.com/yargs/yargs-parser/commit/f6e6599)) + + +### BREAKING CHANGES + +* `boolean` flags defined without a `default` value will now behave like other option type and won't be set in the parsed results when the user doesn't set the corresponding CLI arg. + +Previous behavior: +```js +var parse = require('yargs-parser'); + +parse('--flag', {boolean: ['flag']}); +// => { _: [], flag: true } + +parse('--no-flag', {boolean: ['flag']}); +// => { _: [], flag: false } + +parse('', {boolean: ['flag']}); +// => { _: [], flag: false } +``` + +New behavior: +```js +var parse = require('yargs-parser'); + +parse('--flag', {boolean: ['flag']}); +// => { _: [], flag: true } + +parse('--no-flag', {boolean: ['flag']}); +// => { _: [], flag: false } + +parse('', {boolean: ['flag']}); +// => { _: [] } => flag not set similarly to other option type +``` + + + <a name="9.0.2"></a> ## [9.0.2](https://github.com/yargs/yargs-parser/compare/v9.0.1...v9.0.2) (2018-01-20) diff --git a/node_modules/yargs-parser/README.md b/node_modules/yargs-parser/README.md index 6d6d0d4c9c683..5f1ccb987db44 100644 --- a/node_modules/yargs-parser/README.md +++ b/node_modules/yargs-parser/README.md @@ -1,9 +1,8 @@ # yargs-parser -[![Build Status](https://travis-ci.org/yargs/yargs-parser.png)](https://travis-ci.org/yargs/yargs-parser) +[![Build Status](https://travis-ci.org/yargs/yargs-parser.svg)](https://travis-ci.org/yargs/yargs-parser) [![Coverage Status](https://coveralls.io/repos/yargs/yargs-parser/badge.svg?branch=)](https://coveralls.io/r/yargs/yargs-parser?branch=master) [![NPM version](https://img.shields.io/npm/v/yargs-parser.svg)](https://www.npmjs.com/package/yargs-parser) -[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/yargs-parser/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/yargs-parser) [![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) @@ -32,7 +31,7 @@ node example.js --foo=33 --bar hello _or parse a string!_ ```js -var argv = require('./')('--foo=99 --bar=33') +var argv = require('yargs-parser')('--foo=99 --bar=33') console.log(argv) ``` @@ -59,20 +58,24 @@ Parses command line arguments returning a simple mapping of keys and values. * `args`: a string or array of strings representing the options to parse. * `opts`: provide a set of hints indicating how `args` should be parsed: * `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`. - * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`. + * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.<br> + Indicate that keys should be parsed as an array and coerced to booleans / numbers:<br> + `{array: [{ key: 'foo', boolean: true }, {key: 'bar', number: true}]}`. * `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`. - * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed). * `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided - (or throws an error), e.g. `{coerce: {foo: function (arg) {return modifiedArg}}}`. + (or throws an error). For arrays the function is called only once for the entire array:<br> + `{coerce: {foo: function (arg) {return modifiedArg}}}`. + * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed). + * `opts.configObjects`: configuration objects to parse, their properties will be set as arguments:<br> + `{configObjects: [{'x': 5, 'y': 33}, {'z': 44}]}`. + * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)). * `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`. * `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`. * `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed. * `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`. * `opts.normalize`: `path.normalize()` will be applied to values set to this key. - * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`). - * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)). * `opts.number`: keys should be treated as numbers. - * `opts['--']`: arguments after the end-of-options flag `--` will be set to the `argv.['--']` array instead of being set to the `argv._` array. + * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`). **returns:** @@ -298,6 +301,113 @@ node example.js a -b -- x y { _: [ 'a' ], '--': [ 'x', 'y' ], b: true } ``` +### set placeholder key + +* default: `false`. +* key: `set-placeholder-key`. + +Should a placeholder be added for keys not set via the corresponding CLI argument? + +_If disabled:_ + +```sh +node example.js -a 1 -c 2 +{ _: [], a: 1, c: 2 } +``` + +_If enabled:_ + +```sh +node example.js -a 1 -c 2 +{ _: [], a: 1, b: undefined, c: 2 } +``` + +### halt at non-option + +* default: `false`. +* key: `halt-at-non-option`. + +Should parsing stop at the first positional argument? This is similar to how e.g. `ssh` parses its command line. + +_If disabled:_ + +```sh +node example.js -a run b -x y +{ _: [ 'b' ], a: 'run', x: 'y' } +``` + +_If enabled:_ + +```sh +node example.js -a run b -x y +{ _: [ 'b', '-x', 'y' ], a: 'run' } +``` + +### strip aliased + +* default: `false` +* key: `strip-aliased` + +Should aliases be removed before returning results? + +_If disabled:_ + +```sh +node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1, 'test-alias': 1, testAlias: 1 } +``` + +_If enabled:_ + +```sh +node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1 } +``` + +### strip dashed + +* default: `false` +* key: `strip-dashed` + +Should dashed keys be removed before returning results? This option has no effect if +`camel-case-expansion` is disabled. + +_If disabled:_ + +```sh +node example.js --test-field 1 +{ _: [], 'test-field': 1, testField: 1 } +``` + +_If enabled:_ + +```sh +node example.js --test-field 1 +{ _: [], testField: 1 } +``` + +### unknown options as args + +* default: `false` +* key: `unknown-options-as-args` + +Should unknown options be treated like regular arguments? An unknown option is one that is not +configured in `opts`. + +_If disabled_ + +```sh +node example.js --unknown-option --known-option 2 --string-option --unknown-option2 +{ _: [], unknownOption: true, knownOption: 2, stringOption: '', unknownOption2: true } +``` + +_If enabled_ + +```sh +node example.js --unknown-option --known-option 2 --string-option --unknown-option2 +{ _: ['--unknown-option'], knownOption: 2, stringOption: '--unknown-option2' } +``` + ## Special Thanks The yargs project evolves from optimist and minimist. It owes its diff --git a/node_modules/yargs-parser/index.js b/node_modules/yargs-parser/index.js index d39414b73782b..7268553211994 100644 --- a/node_modules/yargs-parser/index.js +++ b/node_modules/yargs-parser/index.js @@ -1,4 +1,5 @@ var camelCase = require('camelcase') +var decamelize = require('decamelize') var path = require('path') var tokenizeArgString = require('./lib/tokenize-arg-string') var util = require('util') @@ -8,9 +9,10 @@ function parse (args, opts) { // allow a string argument to be passed in rather // than an argv array. args = tokenizeArgString(args) + // aliases might have transitive relationships, normalize this. var aliases = combineAliases(opts.alias || {}) - var configuration = assign({ + var configuration = Object.assign({ 'short-option-groups': true, 'camel-case-expansion': true, 'dot-notation': true, @@ -20,7 +22,12 @@ function parse (args, opts) { 'duplicate-arguments-array': true, 'flatten-duplicate-arrays': true, 'populate--': false, - 'combine-arrays': false + 'combine-arrays': false, + 'set-placeholder-key': false, + 'halt-at-non-option': false, + 'strip-aliased': false, + 'strip-dashed': false, + 'unknown-options-as-args': false }, opts.configuration) var defaults = opts.default || {} var configObjects = opts.configObjects || [] @@ -29,9 +36,7 @@ function parse (args, opts) { var notFlagsArgv = notFlagsOption ? '--' : '_' var newAliases = {} // allow a i18n handler to be passed in, default to a fake one (util.format). - var __ = opts.__ || function (str) { - return util.format.apply(util, Array.prototype.slice.call(arguments)) - } + var __ = opts.__ || util.format var error = null var flags = { aliases: {}, @@ -42,43 +47,67 @@ function parse (args, opts) { counts: {}, normalize: {}, configs: {}, - defaulted: {}, nargs: {}, - coercions: {} + coercions: {}, + keys: [] } var negative = /^-[0-9]+(\.[0-9]+)?/ var negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)') - ;[].concat(opts.array).filter(Boolean).forEach(function (key) { + ;[].concat(opts.array).filter(Boolean).forEach(function (opt) { + var key = opt.key || opt + + // assign to flags[bools|strings|numbers] + const assignment = Object.keys(opt).map(function (key) { + return ({ + boolean: 'bools', + string: 'strings', + number: 'numbers' + })[key] + }).filter(Boolean).pop() + + // assign key to be coerced + if (assignment) { + flags[assignment][key] = true + } + flags.arrays[key] = true + flags.keys.push(key) }) ;[].concat(opts.boolean).filter(Boolean).forEach(function (key) { flags.bools[key] = true + flags.keys.push(key) }) ;[].concat(opts.string).filter(Boolean).forEach(function (key) { flags.strings[key] = true + flags.keys.push(key) }) ;[].concat(opts.number).filter(Boolean).forEach(function (key) { flags.numbers[key] = true + flags.keys.push(key) }) ;[].concat(opts.count).filter(Boolean).forEach(function (key) { flags.counts[key] = true + flags.keys.push(key) }) ;[].concat(opts.normalize).filter(Boolean).forEach(function (key) { flags.normalize[key] = true + flags.keys.push(key) }) Object.keys(opts.narg || {}).forEach(function (k) { flags.nargs[k] = opts.narg[k] + flags.keys.push(k) }) Object.keys(opts.coerce || {}).forEach(function (k) { flags.coercions[k] = opts.coerce[k] + flags.keys.push(k) }) if (Array.isArray(opts.config) || typeof opts.config === 'string') { @@ -103,17 +132,7 @@ function parse (args, opts) { }) var argv = { _: [] } - - Object.keys(flags.bools).forEach(function (key) { - setArg(key, !(key in defaults) ? false : defaults[key]) - setDefaulted(key) - }) - var notFlags = [] - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--') + 1) - args = args.slice(0, args.indexOf('--')) - } for (var i = 0; i < args.length; i++) { var arg = args[i] @@ -124,8 +143,10 @@ function parse (args, opts) { var next var value - // -- seperated by = - if (arg.match(/^--.+=/) || ( + if (isUnknownOptionAsArg(arg)) { + argv._.push(arg) + // -- separated by = + } else if (arg.match(/^--.+=/) || ( !configuration['short-option-groups'] && arg.match(/^-.+=/) )) { // Using [\s\S] instead of . because js doesn't support the @@ -138,7 +159,7 @@ function parse (args, opts) { args.splice(i + 1, 0, m[2]) i = eatNargs(i, m[1], args) // arrays format = '--f=a b c' - } else if (checkAllAliases(m[1], flags.arrays) && args.length > i + 1) { + } else if (checkAllAliases(m[1], flags.arrays)) { args.splice(i + 1, 0, m[2]) i = eatArray(i, m[1], args) } else { @@ -146,19 +167,20 @@ function parse (args, opts) { } } else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { key = arg.match(negatedBoolean)[1] - setArg(key, false) + setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false) - // -- seperated by space. + // -- separated by space. } else if (arg.match(/^--.+/) || ( - !configuration['short-option-groups'] && arg.match(/^-.+/) + !configuration['short-option-groups'] && arg.match(/^-[^-]+/) )) { key = arg.match(/^--?(.+)/)[1] // nargs format = '--foo a b c' - if (checkAllAliases(key, flags.nargs)) { + // should be truthy even if: flags.nargs[key] === 0 + if (checkAllAliases(key, flags.nargs) !== false) { i = eatNargs(i, key, args) // array format = '--foo a b c' - } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { + } else if (checkAllAliases(key, flags.arrays)) { i = eatArray(i, key, args) } else { next = args[i + 1] @@ -173,16 +195,16 @@ function parse (args, opts) { setArg(key, next) i++ } else { - setArg(key, defaultForType(guessType(key, flags))) + setArg(key, defaultValue(key)) } } - // dot-notation flag seperated by '='. + // dot-notation flag separated by '='. } else if (arg.match(/^-.\..+=/)) { m = arg.match(/^-([^=]+)=([\s\S]*)$/) setArg(m[1], m[2]) - // dot-notation flag seperated by space. + // dot-notation flag separated by space. } else if (arg.match(/^-.\..+/)) { next = args[i + 1] key = arg.match(/^-(.\..+)/)[1] @@ -193,7 +215,7 @@ function parse (args, opts) { setArg(key, next) i++ } else { - setArg(key, defaultForType(guessType(key, flags))) + setArg(key, defaultValue(key)) } } else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { letters = arg.slice(1, -1).split('') @@ -211,7 +233,7 @@ function parse (args, opts) { args.splice(i + 1, 0, value) i = eatNargs(i, key, args) // array format = '-f=a b c' - } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { + } else if (checkAllAliases(key, flags.arrays)) { args.splice(i + 1, 0, value) i = eatArray(i, key, args) } else { @@ -240,7 +262,7 @@ function parse (args, opts) { broken = true break } else { - setArg(letters[j], defaultForType(guessType(letters[j], flags))) + setArg(letters[j], defaultValue(letters[j])) } } @@ -248,10 +270,11 @@ function parse (args, opts) { if (!broken && key !== '-') { // nargs format = '-f a b c' - if (checkAllAliases(key, flags.nargs)) { + // should be truthy even if: flags.nargs[key] === 0 + if (checkAllAliases(key, flags.nargs) !== false) { i = eatNargs(i, key, args) // array format = '-f a b c' - } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) { + } else if (checkAllAliases(key, flags.arrays)) { i = eatArray(i, key, args) } else { next = args[i + 1] @@ -266,10 +289,16 @@ function parse (args, opts) { setArg(key, next) i++ } else { - setArg(key, defaultForType(guessType(key, flags))) + setArg(key, defaultValue(key)) } } } + } else if (arg === '--') { + notFlags = args.slice(i + 1) + break + } else if (configuration['halt-at-non-option']) { + notFlags = args.slice(i) + break } else { argv._.push(maybeCoerceNumber('_', arg)) } @@ -287,6 +316,7 @@ function parse (args, opts) { setConfigObjects() applyDefaultsAndAliases(argv, flags.aliases, defaults) applyCoercions(argv) + if (configuration['set-placeholder-key']) setPlaceholderKeys(argv) // for any counts either not in args or without an explicit default, set to 0 Object.keys(flags.counts).forEach(function (key) { @@ -299,17 +329,39 @@ function parse (args, opts) { argv[notFlagsArgv].push(key) }) + if (configuration['camel-case-expansion'] && configuration['strip-dashed']) { + Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => { + delete argv[key] + }) + } + + if (configuration['strip-aliased']) { + // XXX Switch to [].concat(...Object.values(aliases)) once node.js 6 is dropped + ;[].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { + if (configuration['camel-case-expansion']) { + delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')] + } + + delete argv[alias] + }) + } + // how many arguments should we consume, based // on the nargs option? function eatNargs (i, key, args) { var ii const toEat = checkAllAliases(key, flags.nargs) + if (toEat === 0) { + setArg(key, defaultValue(key)) + return i + } + // nargs will not consume flag arguments, e.g., -abc, --foo, // and terminates when one is observed. var available = 0 for (ii = i + 1; ii < args.length; ii++) { - if (!args[ii].match(/^-[^0-9]/)) available++ + if (!args[ii].match(/^-[^0-9]/) || isUnknownOptionAsArg(args[ii])) available++ else break } @@ -327,38 +379,36 @@ function parse (args, opts) { // following it... YUM! // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"] function eatArray (i, key, args) { - var start = i + 1 - var argsToSet = [] - var multipleArrayFlag = i > 0 - for (var ii = i + 1; ii < args.length; ii++) { - if (/^-/.test(args[ii]) && !negative.test(args[ii])) { - if (ii === start) { - setArg(key, defaultForType('array')) - } - multipleArrayFlag = true - break + let argsToSet = [] + let next = args[i + 1] + + if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) { + argsToSet.push(true) + } else if (isUndefined(next) || (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) { + // for keys without value ==> argsToSet remains an empty [] + // set user default value, if available + if (defaults.hasOwnProperty(key)) { + argsToSet.push(defaults[key]) } - i = ii - argsToSet.push(args[ii]) - } - if (multipleArrayFlag) { - setArg(key, argsToSet.map(function (arg) { - return processValue(key, arg) - })) } else { - argsToSet.forEach(function (arg) { - setArg(key, arg) - }) + for (var ii = i + 1; ii < args.length; ii++) { + next = args[ii] + if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) break + i = ii + argsToSet.push(processValue(key, next)) + } } + setArg(key, argsToSet) return i } function setArg (key, val) { - unsetDefaulted(key) - if (/-/.test(key) && configuration['camel-case-expansion']) { - addNewAlias(key, camelCase(key)) + var alias = key.split('.').map(function (prop) { + return camelCase(prop) + }).join('.') + addNewAlias(key, alias) } var value = processValue(key, val) @@ -367,7 +417,7 @@ function parse (args, opts) { setKey(argv, splitKey, value) // handle populating aliases of the full key - if (flags.aliases[key]) { + if (flags.aliases[key] && flags.aliases[key].forEach) { flags.aliases[key].forEach(function (x) { x = x.split('.') setKey(argv, x, value) @@ -414,12 +464,22 @@ function parse (args, opts) { } function processValue (key, val) { + // strings may be quoted, clean this up as we assign values. + if (typeof val === 'string' && + (val[0] === "'" || val[0] === '"') && + val[val.length - 1] === val[0] + ) { + val = val.substring(1, val.length - 1) + } + // handle parsing boolean arguments --foo=true --bar false. if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { if (typeof val === 'string') val = val === 'true' } - var value = maybeCoerceNumber(key, val) + var value = Array.isArray(val) + ? val.map(function (v) { return maybeCoerceNumber(key, v) }) + : maybeCoerceNumber(key, val) // increment a count given as arg (either no value or value parsed as boolean) if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { @@ -435,7 +495,7 @@ function parse (args, opts) { } function maybeCoerceNumber (key, value) { - if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.coercions)) { + if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) { const shouldCoerceNumber = isNumber(value) && configuration['parse-numbers'] && ( Number.isSafeInteger(Math.floor(value)) ) @@ -498,7 +558,7 @@ function parse (args, opts) { } else { // setting arguments via CLI takes precedence over // values within the config file. - if (!hasKey(argv, fullKey.split('.')) || (flags.defaulted[fullKey]) || (flags.arrays[fullKey] && configuration['combine-arrays'])) { + if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) { setArg(fullKey, value) } } @@ -527,7 +587,7 @@ function parse (args, opts) { return camelCase(key) }) - if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && (!hasKey(argv, keys) || flags.defaulted[keys.join('.')])) { + if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) { setArg(keys.join('.'), process.env[envVar]) } } @@ -542,7 +602,7 @@ function parse (args, opts) { coerce = checkAllAliases(key, flags.coercions) if (typeof coerce === 'function') { try { - var value = coerce(argv[key]) + var value = maybeCoerceNumber(key, coerce(argv[key])) ;([].concat(flags.aliases[key] || [], key)).forEach(ali => { applied[ali] = argv[ali] = value }) @@ -554,6 +614,15 @@ function parse (args, opts) { }) } + function setPlaceholderKeys (argv) { + flags.keys.forEach((key) => { + // don't set placeholder keys for dot notation options 'foo.bar'. + if (~key.indexOf('.')) return + if (typeof argv[key] === 'undefined') argv[key] = undefined + }) + return argv + } + function applyDefaultsAndAliases (obj, aliases, defaults) { Object.keys(defaults).forEach(function (key) { if (!hasKey(obj, key.split('.'))) { @@ -588,6 +657,10 @@ function parse (args, opts) { if (!configuration['dot-notation']) keys = [keys.join('.')] keys.slice(0, -1).forEach(function (key, index) { + // TODO(bcoe): in the next major version of yargs, switch to + // Object.create(null) for dot notation: + key = sanitizeKey(key) + if (typeof o === 'object' && o[key] === undefined) { o[key] = {} } @@ -607,17 +680,27 @@ function parse (args, opts) { } }) - var key = keys[keys.length - 1] + // TODO(bcoe): in the next major version of yargs, switch to + // Object.create(null) for dot notation: + const key = sanitizeKey(keys[keys.length - 1]) + + const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays) + const isValueArray = Array.isArray(value) + let duplicate = configuration['duplicate-arguments-array'] - var isTypeArray = checkAllAliases(keys.join('.'), flags.arrays) - var isValueArray = Array.isArray(value) - var duplicate = configuration['duplicate-arguments-array'] + // nargs has higher priority than duplicate + if (!duplicate && checkAllAliases(key, flags.nargs)) { + duplicate = true + if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) { + o[key] = undefined + } + } if (value === increment) { o[key] = increment(o[key]) } else if (Array.isArray(o[key])) { if (duplicate && isTypeArray && isValueArray) { - o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : [o[key]].concat([value]) + o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]) } else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { o[key] = value } else { @@ -625,7 +708,7 @@ function parse (args, opts) { } } else if (o[key] === undefined && isTypeArray) { o[key] = isValueArray ? value : [value] - } else if (duplicate && !(o[key] === undefined || checkAllAliases(key, flags.bools) || checkAllAliases(keys.join('.'), flags.bools) || checkAllAliases(key, flags.counts))) { + } else if (duplicate && !(o[key] === undefined || checkAllAliases(key, flags.counts))) { o[key] = [ o[key], value ] } else { o[key] = value @@ -633,8 +716,8 @@ function parse (args, opts) { } // extend the aliases list with inferred aliases. - function extendAliases () { - Array.prototype.slice.call(arguments).forEach(function (obj) { + function extendAliases (...args) { + args.forEach(function (obj) { Object.keys(obj || {}).forEach(function (key) { // short-circuit if we've already added a key // to the aliases array, for example it might @@ -652,6 +735,16 @@ function parse (args, opts) { } } }) + // For "--optionName", also set argv['option-name'] + flags.aliases[key].concat(key).forEach(function (x) { + if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) { + var c = decamelize(x, '-') + if (c !== key && flags.aliases[key].indexOf(c) === -1) { + flags.aliases[key].push(c) + newAliases[c] = true + } + } + }) flags.aliases[key].forEach(function (x) { flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { return x !== y @@ -667,24 +760,89 @@ function parse (args, opts) { var toCheck = [].concat(flags.aliases[key] || [], key) toCheck.forEach(function (key) { - if (flag[key]) isSet = flag[key] + if (flag.hasOwnProperty(key)) isSet = flag[key] }) return isSet } - function setDefaulted (key) { - [].concat(flags.aliases[key] || [], key).forEach(function (k) { - flags.defaulted[k] = true + function hasAnyFlag (key) { + // XXX Switch to [].concat(...Object.values(flags)) once node.js 6 is dropped + var toCheck = [].concat(...Object.keys(flags).map(k => flags[k])) + + return toCheck.some(function (flag) { + return flag[key] }) } - function unsetDefaulted (key) { - [].concat(flags.aliases[key] || [], key).forEach(function (k) { - delete flags.defaulted[k] + function hasFlagsMatching (arg, ...patterns) { + var toCheck = [].concat(...patterns) + return toCheck.some(function (pattern) { + var match = arg.match(pattern) + return match && hasAnyFlag(match[1]) }) } + // based on a simplified version of the short flag group parsing logic + function hasAllShortFlags (arg) { + // if this is a negative number, or doesn't start with a single hyphen, it's not a short flag group + if (arg.match(negative) || !arg.match(/^-[^-]+/)) { return false } + var hasAllFlags = true + var letters = arg.slice(1).split('') + var next + for (var j = 0; j < letters.length; j++) { + next = arg.slice(j + 2) + + if (!hasAnyFlag(letters[j])) { + hasAllFlags = false + break + } + + if ((letters[j + 1] && letters[j + 1] === '=') || + next === '-' || + (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) || + (letters[j + 1] && letters[j + 1].match(/\W/))) { + break + } + } + return hasAllFlags + } + + function isUnknownOptionAsArg (arg) { + return configuration['unknown-options-as-args'] && isUnknownOption(arg) + } + + function isUnknownOption (arg) { + // ignore negative numbers + if (arg.match(negative)) { return false } + // if this is a short option group and all of them are configured, it isn't unknown + if (hasAllShortFlags(arg)) { return false } + // e.g. '--count=2' + const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/ + // e.g. '-a' or '--arg' + const normalFlag = /^-+([^=]+?)$/ + // e.g. '-a-' + const flagEndingInHyphen = /^-+([^=]+?)-$/ + // e.g. '-abc123' + const flagEndingInDigits = /^-+([^=]+?)\d+$/ + // e.g. '-a/usr/local' + const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/ + // check the different types of flag styles, including negatedBoolean, a pattern defined near the start of the parse method + return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters) + } + + // make a best effor to pick a default value + // for an option based on name and type. + function defaultValue (key) { + if (!checkAllAliases(key, flags.bools) && + !checkAllAliases(key, flags.counts) && + `${key}` in defaults) { + return defaults[key] + } else { + return defaultForType(guessType(key)) + } + } + // return a default value, given the type of a flag., // e.g., key of type 'string' will default to '', rather than 'true'. function defaultForType (type) { @@ -699,20 +857,26 @@ function parse (args, opts) { } // given a flag, enforce a default type. - function guessType (key, flags) { + function guessType (key) { var type = 'boolean' if (checkAllAliases(key, flags.strings)) type = 'string' else if (checkAllAliases(key, flags.numbers)) type = 'number' + else if (checkAllAliases(key, flags.bools)) type = 'boolean' else if (checkAllAliases(key, flags.arrays)) type = 'array' return type } function isNumber (x) { + if (x === null || x === undefined) return false + // if loaded from config, may already be a number. if (typeof x === 'number') return true + // hexadecimal. if (/^0x[0-9a-f]+$/i.test(x)) return true - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x) + // don't treat 0123 as a number; as it drops the leading '0'. + if (x.length > 1 && x[0] === '0') return false + return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x) } function isUndefined (num) { @@ -775,20 +939,6 @@ function combineAliases (aliases) { return combined } -function assign (defaults, configuration) { - var o = {} - configuration = configuration || {} - - Object.keys(defaults).forEach(function (k) { - o[k] = defaults[k] - }) - Object.keys(configuration).forEach(function (k) { - o[k] = configuration[k] - }) - - return o -} - // this function should only be called when a count is given as an arg // it is NOT called to set a default value // thus we can start the count at 1 instead of 0 @@ -808,4 +958,11 @@ Parser.detailed = function (args, opts) { return parse(args.slice(), opts) } +// TODO(bcoe): in the next major version of yargs, switch to +// Object.create(null) for dot notation: +function sanitizeKey (key) { + if (key === '__proto__') return '___proto___' + return key +} + module.exports = Parser diff --git a/node_modules/yargs-parser/lib/tokenize-arg-string.js b/node_modules/yargs-parser/lib/tokenize-arg-string.js index 6c8d23ef2143a..fe05e27fdda7c 100644 --- a/node_modules/yargs-parser/lib/tokenize-arg-string.js +++ b/node_modules/yargs-parser/lib/tokenize-arg-string.js @@ -1,6 +1,8 @@ // take an un-split argv string and tokenize it. module.exports = function (argString) { - if (Array.isArray(argString)) return argString + if (Array.isArray(argString)) { + return argString.map(e => typeof e !== 'string' ? e + '' : e) + } argString = argString.trim() @@ -26,10 +28,8 @@ module.exports = function (argString) { // opening or closing single and double quotes. if (c === opening) { opening = null - continue } else if ((c === "'" || c === '"') && !opening) { opening = c - continue } if (!args[i]) args[i] = '' diff --git a/node_modules/yargs-parser/node_modules/camelcase/index.d.ts b/node_modules/yargs-parser/node_modules/camelcase/index.d.ts new file mode 100644 index 0000000000000..58f2069adc52b --- /dev/null +++ b/node_modules/yargs-parser/node_modules/camelcase/index.d.ts @@ -0,0 +1,63 @@ +declare namespace camelcase { + interface Options { + /** + Uppercase the first character: `foo-bar` β†’ `FooBar`. + + @default false + */ + readonly pascalCase?: boolean; + } +} + +declare const camelcase: { + /** + Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` β†’ `fooBar`. + + @param input - String to convert to camel case. + + @example + ``` + import camelCase = require('camelcase'); + + camelCase('foo-bar'); + //=> 'fooBar' + + camelCase('foo_bar'); + //=> 'fooBar' + + camelCase('Foo-Bar'); + //=> 'fooBar' + + camelCase('Foo-Bar', {pascalCase: true}); + //=> 'FooBar' + + camelCase('--foo.bar', {pascalCase: false}); + //=> 'fooBar' + + camelCase('foo bar'); + //=> 'fooBar' + + console.log(process.argv[3]); + //=> '--foo-bar' + camelCase(process.argv[3]); + //=> 'fooBar' + + camelCase(['foo', 'bar']); + //=> 'fooBar' + + camelCase(['__foo__', '--bar'], {pascalCase: true}); + //=> 'FooBar' + ``` + */ + (input: string | ReadonlyArray<string>, options?: camelcase.Options): string; + + // TODO: Remove this for the next major release, refactor the whole definition to: + // declare function camelcase( + // input: string | ReadonlyArray<string>, + // options?: camelcase.Options + // ): string; + // export = camelcase; + default: typeof camelcase; +}; + +export = camelcase; diff --git a/node_modules/yargs-parser/node_modules/camelcase/index.js b/node_modules/yargs-parser/node_modules/camelcase/index.js new file mode 100644 index 0000000000000..579f99b47f772 --- /dev/null +++ b/node_modules/yargs-parser/node_modules/camelcase/index.js @@ -0,0 +1,76 @@ +'use strict'; + +const preserveCamelCase = string => { + let isLastCharLower = false; + let isLastCharUpper = false; + let isLastLastCharUpper = false; + + for (let i = 0; i < string.length; i++) { + const character = string[i]; + + if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) { + string = string.slice(0, i) + '-' + string.slice(i); + isLastCharLower = false; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = true; + i++; + } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) { + string = string.slice(0, i - 1) + '-' + string.slice(i - 1); + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = false; + isLastCharLower = true; + } else { + isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character; + } + } + + return string; +}; + +const camelCase = (input, options) => { + if (!(typeof input === 'string' || Array.isArray(input))) { + throw new TypeError('Expected the input to be `string | string[]`'); + } + + options = Object.assign({ + pascalCase: false + }, options); + + const postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x; + + if (Array.isArray(input)) { + input = input.map(x => x.trim()) + .filter(x => x.length) + .join('-'); + } else { + input = input.trim(); + } + + if (input.length === 0) { + return ''; + } + + if (input.length === 1) { + return options.pascalCase ? input.toUpperCase() : input.toLowerCase(); + } + + const hasUpperCase = input !== input.toLowerCase(); + + if (hasUpperCase) { + input = preserveCamelCase(input); + } + + input = input + .replace(/^[_.\- ]+/, '') + .toLowerCase() + .replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()) + .replace(/\d+(\w|$)/g, m => m.toUpperCase()); + + return postProcess(input); +}; + +module.exports = camelCase; +// TODO: Remove this for the next major release +module.exports.default = camelCase; diff --git a/node_modules/mem/node_modules/mimic-fn/license b/node_modules/yargs-parser/node_modules/camelcase/license similarity index 100% rename from node_modules/mem/node_modules/mimic-fn/license rename to node_modules/yargs-parser/node_modules/camelcase/license diff --git a/node_modules/yargs-parser/node_modules/camelcase/package.json b/node_modules/yargs-parser/node_modules/camelcase/package.json new file mode 100644 index 0000000000000..560c2e1d7356f --- /dev/null +++ b/node_modules/yargs-parser/node_modules/camelcase/package.json @@ -0,0 +1,75 @@ +{ + "_from": "camelcase@^5.0.0", + "_id": "camelcase@5.3.1", + "_inBundle": false, + "_integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "_location": "/yargs-parser/camelcase", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "camelcase@^5.0.0", + "name": "camelcase", + "escapedName": "camelcase", + "rawSpec": "^5.0.0", + "saveSpec": null, + "fetchSpec": "^5.0.0" + }, + "_requiredBy": [ + "/yargs-parser" + ], + "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "_shasum": "e3c9b31569e106811df242f715725a1f4c494320", + "_spec": "camelcase@^5.0.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs-parser", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/camelcase/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` β†’ `fooBar`", + "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/camelcase#readme", + "keywords": [ + "camelcase", + "camel-case", + "camel", + "case", + "dash", + "hyphen", + "dot", + "underscore", + "separator", + "string", + "text", + "convert", + "pascalcase", + "pascal-case" + ], + "license": "MIT", + "name": "camelcase", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/camelcase.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "5.3.1" +} diff --git a/node_modules/yargs-parser/node_modules/camelcase/readme.md b/node_modules/yargs-parser/node_modules/camelcase/readme.md new file mode 100644 index 0000000000000..fde27261b2a82 --- /dev/null +++ b/node_modules/yargs-parser/node_modules/camelcase/readme.md @@ -0,0 +1,99 @@ +# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) + +> Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` β†’ `fooBar` + +--- + +<div align="center"> + <b> + <a href="https://tidelift.com/subscription/pkg/npm-camelcase?utm_source=npm-camelcase&utm_medium=referral&utm_campaign=readme">Get professional support for 'camelcase' with a Tidelift subscription</a> + </b> + <br> + <sub> + Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. + </sub> +</div> + +--- + +## Install + +``` +$ npm install camelcase +``` + + +## Usage + +```js +const camelCase = require('camelcase'); + +camelCase('foo-bar'); +//=> 'fooBar' + +camelCase('foo_bar'); +//=> 'fooBar' + +camelCase('Foo-Bar'); +//=> 'fooBar' + +camelCase('Foo-Bar', {pascalCase: true}); +//=> 'FooBar' + +camelCase('--foo.bar', {pascalCase: false}); +//=> 'fooBar' + +camelCase('foo bar'); +//=> 'fooBar' + +console.log(process.argv[3]); +//=> '--foo-bar' +camelCase(process.argv[3]); +//=> 'fooBar' + +camelCase(['foo', 'bar']); +//=> 'fooBar' + +camelCase(['__foo__', '--bar'], {pascalCase: true}); +//=> 'FooBar' +``` + + +## API + +### camelCase(input, [options]) + +#### input + +Type: `string` `string[]` + +String to convert to camel case. + +#### options + +Type: `Object` + +##### pascalCase + +Type: `boolean`<br> +Default: `false` + +Uppercase the first character: `foo-bar` β†’ `FooBar` + + +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + +## Related + +- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module +- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase +- [titleize](https://github.com/sindresorhus/titleize) - Capitalize every word in string +- [humanize-string](https://github.com/sindresorhus/humanize-string) - Convert a camelized/dasherized/underscored string into a humanized one + + +## License + +MIT Β© [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs-parser/package.json b/node_modules/yargs-parser/package.json index c4d1ca1ce5990..467593e5d9f89 100644 --- a/node_modules/yargs-parser/package.json +++ b/node_modules/yargs-parser/package.json @@ -1,27 +1,27 @@ { - "_from": "yargs-parser@^9.0.2", - "_id": "yargs-parser@9.0.2", + "_from": "yargs-parser@^15.0.1", + "_id": "yargs-parser@15.0.1", "_inBundle": false, - "_integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "_integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==", "_location": "/yargs-parser", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "yargs-parser@^9.0.2", + "raw": "yargs-parser@^15.0.1", "name": "yargs-parser", "escapedName": "yargs-parser", - "rawSpec": "^9.0.2", + "rawSpec": "^15.0.1", "saveSpec": null, - "fetchSpec": "^9.0.2" + "fetchSpec": "^15.0.1" }, "_requiredBy": [ "/yargs" ], - "_resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "_shasum": "9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077", - "_spec": "yargs-parser@^9.0.2", - "_where": "/Users/rebecca/code/npm/node_modules/yargs", + "_resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz", + "_shasum": "54786af40b820dcb2fb8025b11b4d659d76323b3", + "_spec": "yargs-parser@^15.0.1", + "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs", "author": { "name": "Ben Coe", "email": "ben@npmjs.com" @@ -31,17 +31,21 @@ }, "bundleDependencies": false, "dependencies": { - "camelcase": "^4.1.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" }, "deprecated": false, "description": "the mighty option parser used by yargs", "devDependencies": { - "chai": "^3.5.0", - "coveralls": "^2.11.12", - "mocha": "^3.0.1", - "nyc": "^11.4.1", - "standard": "^10.0.2", - "standard-version": "^4.3.0" + "chai": "^4.2.0", + "coveralls": "^3.0.2", + "mocha": "^5.2.0", + "nyc": "^14.1.0", + "standard": "^12.0.1", + "standard-version": "^6.0.0" + }, + "engine": { + "node": ">=6" }, "files": [ "lib", @@ -71,5 +75,5 @@ "release": "standard-version", "test": "nyc mocha test/*.js" }, - "version": "9.0.2" + "version": "15.0.1" } diff --git a/node_modules/yargs/CHANGELOG.md b/node_modules/yargs/CHANGELOG.md index 2cccca04c4113..343ffc9ab0718 100644 --- a/node_modules/yargs/CHANGELOG.md +++ b/node_modules/yargs/CHANGELOG.md @@ -1,11 +1,265 @@ -# Change Log +# Changelog All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -<a name="11.1.1"></a> -# [11.1.1](https://github.com/yargs/yargs/compare/v11.1.0...v11.1.1) (2019-10-06) +### 14.2.2 + +### Bug Fixes + +* temporary fix for libraries that call Object.freeze() ([#1483](https://www.github.com/yargs/yargs/issues/1483)) ([99c2dc8](https://www.github.com/yargs/yargs/commit/99c2dc850e67c606644f8b0c0bca1a59c87dcbcd)) + +### [14.2.1](https://github.com/yargs/yargs/compare/v14.2.0...v14.2.1) (2019-10-30) + + +### Bug Fixes + +* stop-parse was not being respected by commands ([#1459](https://github.com/yargs/yargs/issues/1459)) ([e78e76e](https://github.com/yargs/yargs/commit/e78e76e3ac0551d4f30c71a05ddb21582960fcef)) + +## [14.2.0](https://github.com/yargs/yargs/compare/v14.1.0...v14.2.0) (2019-10-07) + + +### Bug Fixes + +* async middleware was called twice ([#1422](https://github.com/yargs/yargs/issues/1422)) ([9a42b63](https://github.com/yargs/yargs/commit/9a42b63)) +* fix promise check to accept any spec conform object ([#1424](https://github.com/yargs/yargs/issues/1424)) ([0be43d2](https://github.com/yargs/yargs/commit/0be43d2)) +* groups were not being maintained for nested commands ([#1430](https://github.com/yargs/yargs/issues/1430)) ([d38650e](https://github.com/yargs/yargs/commit/d38650e)) +* **docs:** broken markdown link ([#1426](https://github.com/yargs/yargs/issues/1426)) ([236e24e](https://github.com/yargs/yargs/commit/236e24e)) +* support merging deeply nested configuration ([#1423](https://github.com/yargs/yargs/issues/1423)) ([bae66fe](https://github.com/yargs/yargs/commit/bae66fe)) + + +### Features + +* **deps:** introduce yargs-parser with support for unknown-options-as-args ([#1440](https://github.com/yargs/yargs/issues/1440)) ([4d21520](https://github.com/yargs/yargs/commit/4d21520)) + +## [14.1.0](https://github.com/yargs/yargs/compare/v14.0.0...v14.1.0) (2019-09-06) + + +### Bug Fixes + +* **docs:** fix incorrect parserConfiguration documentation ([2a99124](https://github.com/yargs/yargs/commit/2a99124)) +* detect zsh when zsh isnt run as a login prompt ([#1395](https://github.com/yargs/yargs/issues/1395)) ([8792d13](https://github.com/yargs/yargs/commit/8792d13)) +* populate correct value on yargs.parsed and stop warning on access ([#1412](https://github.com/yargs/yargs/issues/1412)) ([bb0eb52](https://github.com/yargs/yargs/commit/bb0eb52)) +* showCompletionScript was logging script twice ([#1388](https://github.com/yargs/yargs/issues/1388)) ([07c8537](https://github.com/yargs/yargs/commit/07c8537)) +* strict() should not ignore hyphenated arguments ([#1414](https://github.com/yargs/yargs/issues/1414)) ([b774b5e](https://github.com/yargs/yargs/commit/b774b5e)) +* **docs:** formalize existing callback argument to showHelp ([#1386](https://github.com/yargs/yargs/issues/1386)) ([d217764](https://github.com/yargs/yargs/commit/d217764)) + + +### Features + +* make it possible to merge configurations when extending other config. ([#1411](https://github.com/yargs/yargs/issues/1411)) ([5d7ad98](https://github.com/yargs/yargs/commit/5d7ad98)) + +## [14.0.0](https://github.com/yargs/yargs/compare/v13.3.0...v14.0.0) (2019-07-30) + + +### ⚠ BREAKING CHANGES + +* we now only officially support yargs.$0 parameter and discourage direct access to yargs.parsed +* previously to this fix methods like `yargs.getOptions()` contained the state of the last command to execute. +* do not allow additional positionals in strict mode + +### Bug Fixes + +* calling parse multiple times now appropriately maintains state ([#1137](https://github.com/yargs/yargs/issues/1137)) ([#1369](https://github.com/yargs/yargs/issues/1369)) ([026b151](https://github.com/yargs/yargs/commit/026b151)) +* prefer user supplied script name in usage ([#1383](https://github.com/yargs/yargs/issues/1383)) ([28c74b9](https://github.com/yargs/yargs/commit/28c74b9)) +* **deps:** use decamelize from npm instead of vendored copy ([#1377](https://github.com/yargs/yargs/issues/1377)) ([015eeb9](https://github.com/yargs/yargs/commit/015eeb9)) +* **examples:** fix usage-options.js to reflect current API ([#1375](https://github.com/yargs/yargs/issues/1375)) ([6e5b76b](https://github.com/yargs/yargs/commit/6e5b76b)) +* do not allow additional positionals in strict mode ([35d777c](https://github.com/yargs/yargs/commit/35d777c)) +* properties accessed on singleton now reflect current state of instance ([#1366](https://github.com/yargs/yargs/issues/1366)) ([409d35b](https://github.com/yargs/yargs/commit/409d35b)) +* tolerate null prototype for config objects with `extends` ([#1376](https://github.com/yargs/yargs/issues/1376)) ([3d26d11](https://github.com/yargs/yargs/commit/3d26d11)), closes [#1372](https://github.com/yargs/yargs/issues/1372) +* yargs.parsed now populated before returning, when yargs.parse() called with no args (#1382) ([e3981fd](https://github.com/yargs/yargs/commit/e3981fd)), closes [#1382](https://github.com/yargs/yargs/issues/1382) + +### Features + +* adds support for multiple epilog messages ([#1384](https://github.com/yargs/yargs/issues/1384)) ([07a5554](https://github.com/yargs/yargs/commit/07a5554)) +* allow completionCommand to be set via showCompletionScript ([#1385](https://github.com/yargs/yargs/issues/1385)) ([5562853](https://github.com/yargs/yargs/commit/5562853)) + +## [13.3.0](https://www.github.com/yargs/yargs/compare/v13.2.4...v13.3.0) (2019-06-10) + + +### Bug Fixes + +* **deps:** yargs-parser update addressing several parsing bugs ([#1357](https://www.github.com/yargs/yargs/issues/1357)) ([e230d5b](https://www.github.com/yargs/yargs/commit/e230d5b)) + + +### Features + +* **i18n:** swap out os-locale dependency for simple inline implementation ([#1356](https://www.github.com/yargs/yargs/issues/1356)) ([4dfa19b](https://www.github.com/yargs/yargs/commit/4dfa19b)) +* support defaultDescription for positional arguments ([812048c](https://www.github.com/yargs/yargs/commit/812048c)) + +### [13.2.4](https://github.com/yargs/yargs/compare/v13.2.3...v13.2.4) (2019-05-13) + + +### Bug Fixes + +* **i18n:** rename unclear 'implication failed' to 'missing dependent arguments' ([#1317](https://github.com/yargs/yargs/issues/1317)) ([bf46813](https://github.com/yargs/yargs/commit/bf46813)) + + + +### [13.2.3](https://github.com/yargs/yargs/compare/v13.2.2...v13.2.3) (2019-05-05) + + +### Bug Fixes + +* **deps:** upgrade cliui for compatibility with latest chalk. ([#1330](https://github.com/yargs/yargs/issues/1330)) ([b20db65](https://github.com/yargs/yargs/commit/b20db65)) +* address issues with dutch translation ([#1316](https://github.com/yargs/yargs/issues/1316)) ([0295132](https://github.com/yargs/yargs/commit/0295132)) + + +### Tests + +* accept differently formatted output ([#1327](https://github.com/yargs/yargs/issues/1327)) ([c294d1b](https://github.com/yargs/yargs/commit/c294d1b)) + + + +## [13.2.2](https://github.com/yargs/yargs/compare/v13.2.1...v13.2.2) (2019-03-06) + + + +## [13.2.1](https://github.com/yargs/yargs/compare/v13.2.0...v13.2.1) (2019-02-18) + + +### Bug Fixes + +* add zsh script to files array ([3180224](https://github.com/yargs/yargs/commit/3180224)) +* support options/sub-commands in zsh completion ([0a96394](https://github.com/yargs/yargs/commit/0a96394)) + + +# [13.2.0](https://github.com/yargs/yargs/compare/v13.1.0...v13.2.0) (2019-02-15) + + +### Features + +* zsh auto completion ([#1292](https://github.com/yargs/yargs/issues/1292)) ([16c5d25](https://github.com/yargs/yargs/commit/16c5d25)), closes [#1156](https://github.com/yargs/yargs/issues/1156) + + +<a name="13.1.0"></a> +# [13.1.0](https://github.com/yargs/yargs/compare/v13.0.0...v13.1.0) (2019-02-12) + + +### Features + +* add applyBeforeValidation, for applying sync middleware before validation ([5be206a](https://github.com/yargs/yargs/commit/5be206a)) + + + +<a name="13.0.0"></a> +# [13.0.0](https://github.com/yargs/yargs/compare/v12.0.5...v13.0.0) (2019-02-02) + + +### Bug Fixes + +* **deps:** Update os-locale to avoid security vulnerability ([#1270](https://github.com/yargs/yargs/issues/1270)) ([27bf739](https://github.com/yargs/yargs/commit/27bf739)) +* **validation:** Use the error as a message when none exists otherwise ([#1268](https://github.com/yargs/yargs/issues/1268)) ([0510fe6](https://github.com/yargs/yargs/commit/0510fe6)) +* better bash path completion ([#1272](https://github.com/yargs/yargs/issues/1272)) ([da75ea2](https://github.com/yargs/yargs/commit/da75ea2)) +* middleware added multiple times due to reference bug ([#1282](https://github.com/yargs/yargs/issues/1282)) ([64af518](https://github.com/yargs/yargs/commit/64af518)) + + +### Chores + +* ~drop Node 6 from testing matrix ([#1287](https://github.com/yargs/yargs/issues/1287)) ([ef16792](https://github.com/yargs/yargs/commit/ef16792))~ + * _opting to not drop Node 6 support until April, [see](https://github.com/nodejs/Release)._ +* update dependencies ([#1284](https://github.com/yargs/yargs/issues/1284)) ([f25de4f](https://github.com/yargs/yargs/commit/f25de4f)) + + +### Features + +* Add `.parserConfiguration()` method, deprecating package.json config ([#1262](https://github.com/yargs/yargs/issues/1262)) ([3c6869a](https://github.com/yargs/yargs/commit/3c6869a)) +* adds config option for sorting command output ([#1256](https://github.com/yargs/yargs/issues/1256)) ([6916ce9](https://github.com/yargs/yargs/commit/6916ce9)) +* options/positionals with leading '+' and '0' no longer parse as numbers ([#1286](https://github.com/yargs/yargs/issues/1286)) ([e9dc3aa](https://github.com/yargs/yargs/commit/e9dc3aa)) +* support promises in middleware ([f3a4e4f](https://github.com/yargs/yargs/commit/f3a4e4f)) + + +### BREAKING CHANGES + +* options with leading '+' or '0' now parse as strings +* dropping Node 6 which hits end of life in April 2019 +* see [yargs-parser@12.0.0 CHANGELOG](https://github.com/yargs/yargs-parser/blob/master/CHANGELOG.md#breaking-changes) +* we now warn if the yargs stanza package.json is used. + + + +<a name="12.0.5"></a> +## [12.0.5](https://github.com/yargs/yargs/compare/v12.0.4...v12.0.5) (2018-11-19) + + +### Bug Fixes + +* allows camel-case, variadic arguments, and strict mode to be combined ([#1247](https://github.com/yargs/yargs/issues/1247)) ([eacc035](https://github.com/yargs/yargs/commit/eacc035)) + + + +<a name="12.0.4"></a> +## [12.0.4](https://github.com/yargs/yargs/compare/v12.0.3...v12.0.4) (2018-11-10) + + +### Bug Fixes + +* don't load config when processing positionals ([5d0dc92](https://github.com/yargs/yargs/commit/5d0dc92)) + + + +<a name="12.0.3"></a> +## [12.0.3](https://github.com/yargs/yargs/compare/v12.0.2...v12.0.3) (2018-10-06) + + +### Bug Fixes + +* $0 contains first arg in bundled electron apps ([#1206](https://github.com/yargs/yargs/issues/1206)) ([567820b](https://github.com/yargs/yargs/commit/567820b)) +* accept single function for middleware ([66fd6f7](https://github.com/yargs/yargs/commit/66fd6f7)), closes [#1214](https://github.com/yargs/yargs/issues/1214) [#1214](https://github.com/yargs/yargs/issues/1214) +* hide `hidden` options from help output even if they are in a group ([#1221](https://github.com/yargs/yargs/issues/1221)) ([da54028](https://github.com/yargs/yargs/commit/da54028)) +* improve Norwegian BokmΓ₯l translations ([#1208](https://github.com/yargs/yargs/issues/1208)) ([a458fa4](https://github.com/yargs/yargs/commit/a458fa4)) +* improve Norwegian Nynorsk translations ([#1207](https://github.com/yargs/yargs/issues/1207)) ([d422eb5](https://github.com/yargs/yargs/commit/d422eb5)) + + + +<a name="12.0.2"></a> +## [12.0.2](https://github.com/yargs/yargs/compare/v12.0.1...v12.0.2) (2018-09-04) + + +### Bug Fixes + +* middleware should work regardless of when method is called ([664b265](https://github.com/yargs/yargs/commit/664b265)), closes [#1178](https://github.com/yargs/yargs/issues/1178) +* translation not working when using __ with a single parameter ([#1183](https://github.com/yargs/yargs/issues/1183)) ([f449aea](https://github.com/yargs/yargs/commit/f449aea)) +* upgrade os-locale to version that addresses license issue ([#1195](https://github.com/yargs/yargs/issues/1195)) ([efc0970](https://github.com/yargs/yargs/commit/efc0970)) + + + +<a name="12.0.1"></a> +## [12.0.1](https://github.com/yargs/yargs/compare/v12.0.0...v12.0.1) (2018-06-29) + + + +<a name="12.0.0"></a> +# [12.0.0](https://github.com/yargs/yargs/compare/v11.1.0...v12.0.0) (2018-06-26) + + +### Bug Fixes + +* .argv and .parse() now invoke identical code path ([#1126](https://github.com/yargs/yargs/issues/1126)) ([f13ebf4](https://github.com/yargs/yargs/commit/f13ebf4)) +* remove the trailing white spaces from the help output ([#1090](https://github.com/yargs/yargs/issues/1090)) ([3f0746c](https://github.com/yargs/yargs/commit/3f0746c)) +* **completion:** Avoid default command and recommendations during completion ([#1123](https://github.com/yargs/yargs/issues/1123)) ([036e7c5](https://github.com/yargs/yargs/commit/036e7c5)) + + +### Chores + +* test Node.js 6, 8 and 10 ([#1160](https://github.com/yargs/yargs/issues/1160)) ([84f9d2b](https://github.com/yargs/yargs/commit/84f9d2b)) +* upgrade to version of yargs-parser that does not populate value for unset boolean ([#1104](https://github.com/yargs/yargs/issues/1104)) ([d4705f4](https://github.com/yargs/yargs/commit/d4705f4)) + + +### Features + +* add support for global middleware, useful for shared tasks like metrics ([#1119](https://github.com/yargs/yargs/issues/1119)) ([9d71ac7](https://github.com/yargs/yargs/commit/9d71ac7)) +* allow setting scriptName $0 ([#1143](https://github.com/yargs/yargs/issues/1143)) ([a2f2eae](https://github.com/yargs/yargs/commit/a2f2eae)) +* remove `setPlaceholderKeys` ([#1105](https://github.com/yargs/yargs/issues/1105)) ([6ee2c82](https://github.com/yargs/yargs/commit/6ee2c82)) + + +### BREAKING CHANGES + +* Options absent from `argv` (not set via CLI argument) are now absent from the parsed result object rather than being set with `undefined` +* drop Node 4 from testing matrix, such that we'll gradually start drifting away from supporting Node 4. +* yargs-parser does not populate 'false' when boolean flag is not passed +* tests that assert against help output will need to be updated + -* backport security fix for os-locale. <a name="11.1.0"></a> # [11.1.0](https://github.com/yargs/yargs/compare/v11.0.0...v11.1.0) (2018-03-04) @@ -21,6 +275,8 @@ All notable changes to this project will be documented in this file. See [standa * 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)) + + <a name="11.0.0"></a> # [11.0.0](https://github.com/yargs/yargs/compare/v10.1.2...v11.0.0) (2018-01-22) @@ -656,7 +912,7 @@ All notable changes to this project will be documented in this file. See [standa - [#308](https://github.com/bcoe/yargs/pull/308) Yargs now handles environment variables (@nexdrew) - [#302](https://github.com/bcoe/yargs/pull/302) Add Indonesian translation (@rilut) - [#300](https://github.com/bcoe/yargs/pull/300) Add Turkish translation (@feyzo) -- [#298](https://github.com/bcoe/yargs/pull/298) Add Norwegian Bokmål translation (@sindresorhus) +- [#298](https://github.com/bcoe/yargs/pull/298) Add Norwegian BokmΓ₯l translation (@sindresorhus) - [#297](https://github.com/bcoe/yargs/pull/297) Fix for layout of cjk characters (@disjukr) - [#296](https://github.com/bcoe/yargs/pull/296) Add Korean translation (@disjukr) diff --git a/node_modules/yargs/README.md b/node_modules/yargs/README.md index d16b82d177c11..679a3eeea9e6b 100644 --- a/node_modules/yargs/README.md +++ b/node_modules/yargs/README.md @@ -1,20 +1,24 @@ -# Yargs +<p align="center"> + <img width="250" src="/yargs-logo.png"> +</p> +<h1 align="center"> Yargs </h1> +<p align="center"> + <b >Yargs be a node.js library fer hearties tryin' ter parse optstrings</b> +</p> + +<br> [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![NPM version][npm-image]][npm-url] -[![Windows Tests][windows-image]][windows-url] [![js-standard-style][standard-image]][standard-url] [![Conventional Commits][conventional-commits-image]][conventional-commits-url] [![Slack][slack-image]][slack-url] -_Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com)_. - -> Yargs be a node.js library fer hearties tryin' ter parse optstrings. +## Description : +Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. -<img width="250" src="/yargs-logo.png"> - -Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. It gives you: +It gives you: * commands and (grouped) options (`my-program.js serve --port=5000`). * a dynamically generated help menu based on your arguments. @@ -26,11 +30,19 @@ Yargs helps you build interactive command line tools, by parsing arguments and g ## Installation +Stable version: +```bash +npm i yargs +``` + +Bleeding edge version with the most recent features: ```bash -npm i yargs --save +npm i yargs@next ``` -## Simple Example +## Usage : + +### Simple Example ````javascript #!/usr/bin/env node @@ -51,9 +63,9 @@ $ ./plunder.js --ships 12 --distance 98.7 Retreat from the xupptumblers! ``` -## Complex Example +### Complex Example -```js +```javascript #!/usr/bin/env node require('yargs') // eslint-disable-line .command('serve [port]', 'start the server', (yargs) => { @@ -68,14 +80,31 @@ require('yargs') // eslint-disable-line }) .option('verbose', { alias: 'v', - default: false + type: 'boolean', + description: 'Run with verbose logging' }) .argv ``` Run the example above with `--help` to see the help for the application. -## Table of Contents +## TypeScript + +yargs has type definitions at [@types/yargs][type-definitions]. + +``` +npm i @types/yargs --save-dev +``` + +See usage examples in [docs](/docs/typescript.md). + +## Community : + +Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com). + +## Documentation : + +### Table of Contents * [Yargs' API](/docs/api.md) * [Examples](/docs/examples.md) @@ -85,6 +114,7 @@ Run the example above with `--help` to see the help for the application. * [Numbers](/docs/tricks.md#numbers) * [Arrays](/docs/tricks.md#arrays) * [Objects](/docs/tricks.md#objects) + * [Quotes](/docs/tricks.md#quotes) * [Advanced Topics](/docs/advanced.md) * [Composing Your App Using Commands](/docs/advanced.md#commands) * [Building Configurable CLI Apps](/docs/advanced.md#configuration) @@ -97,11 +127,10 @@ Run the example above with `--help` to see the help for the application. [coveralls-image]: https://img.shields.io/coveralls/yargs/yargs.svg [npm-url]: https://www.npmjs.com/package/yargs [npm-image]: https://img.shields.io/npm/v/yargs.svg -[windows-url]: https://ci.appveyor.com/project/bcoe/yargs-ljwvf -[windows-image]: https://img.shields.io/appveyor/ci/bcoe/yargs-ljwvf/master.svg?label=Windows%20Tests [standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg [standard-url]: http://standardjs.com/ [conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg [conventional-commits-url]: https://conventionalcommits.org/ [slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg [slack-url]: http://devtoolscommunity.herokuapp.com +[type-definitions]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs diff --git a/node_modules/yargs/completion.sh.hbs b/node_modules/yargs/completion.sh.hbs deleted file mode 100644 index 819c8ae83a7e4..0000000000000 --- a/node_modules/yargs/completion.sh.hbs +++ /dev/null @@ -1,28 +0,0 @@ -###-begin-{{app_name}}-completions-### -# -# yargs command completion script -# -# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc -# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX. -# -_yargs_completions() -{ - local cur_word args type_list - - cur_word="${COMP_WORDS[COMP_CWORD]}" - args=("${COMP_WORDS[@]}") - - # ask yargs to generate completions. - type_list=$({{app_path}} --get-yargs-completions "${args[@]}") - - COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) ) - - # if no match was found, fall back to filename completion - if [ ${#COMPREPLY[@]} -eq 0 ]; then - COMPREPLY=( $(compgen -f -- "${cur_word}" ) ) - fi - - return 0 -} -complete -F _yargs_completions {{app_name}} -###-end-{{app_name}}-completions-### diff --git a/node_modules/yargs/index.js b/node_modules/yargs/index.js index dfed54bc51686..2db543ed3a698 100644 --- a/node_modules/yargs/index.js +++ b/node_modules/yargs/index.js @@ -25,8 +25,15 @@ function singletonify (inst) { Object.keys(inst).forEach((key) => { if (key === 'argv') { Argv.__defineGetter__(key, inst.__lookupGetter__(key)) + } else if (typeof inst[key] === 'function') { + Argv[key] = inst[key].bind(inst) } else { - Argv[key] = typeof inst[key] === 'function' ? inst[key].bind(inst) : inst[key] + Argv.__defineGetter__('$0', () => { + return inst.$0 + }) + Argv.__defineGetter__('parsed', () => { + return inst.parsed + }) } }) } diff --git a/node_modules/yargs/lib/apply-extends.js b/node_modules/yargs/lib/apply-extends.js index 530b022ac57b5..643c91335a090 100644 --- a/node_modules/yargs/lib/apply-extends.js +++ b/node_modules/yargs/lib/apply-extends.js @@ -16,12 +16,26 @@ function getPathToDefaultConfig (cwd, pathToExtend) { return path.resolve(cwd, pathToExtend) } -function applyExtends (config, cwd) { +function mergeDeep (config1, config2) { + const target = {} + const isObject = obj => obj && typeof obj === 'object' && !Array.isArray(obj) + Object.assign(target, config1) + for (let key of Object.keys(config2)) { + if (isObject(config2[key]) && isObject(target[key])) { + target[key] = mergeDeep(config1[key], config2[key]) + } else { + target[key] = config2[key] + } + } + return target +} + +function applyExtends (config, cwd, mergeExtends) { let defaultConfig = {} - if (config.hasOwnProperty('extends')) { + if (Object.prototype.hasOwnProperty.call(config, 'extends')) { if (typeof config.extends !== 'string') return defaultConfig - const isPath = /\.json$/.test(config.extends) + const isPath = /\.json|\..*rc$/.test(config.extends) let pathToDefault = null if (!isPath) { try { @@ -42,12 +56,12 @@ function applyExtends (config, cwd) { defaultConfig = isPath ? JSON.parse(fs.readFileSync(pathToDefault, 'utf8')) : require(config.extends) delete config.extends - defaultConfig = applyExtends(defaultConfig, path.dirname(pathToDefault)) + defaultConfig = applyExtends(defaultConfig, path.dirname(pathToDefault), mergeExtends) } previouslyVisitedConfigs = [] - return Object.assign({}, defaultConfig, config) + return mergeExtends ? mergeDeep(defaultConfig, config) : Object.assign({}, defaultConfig, config) } module.exports = applyExtends diff --git a/node_modules/yargs/lib/argsert.js b/node_modules/yargs/lib/argsert.js index ed1d598713df9..f310b4e7479a6 100644 --- a/node_modules/yargs/lib/argsert.js +++ b/node_modules/yargs/lib/argsert.js @@ -1,16 +1,18 @@ 'use strict' + +// hoisted due to circular dependency on command. +module.exports = argsert const command = require('./command')() const YError = require('./yerror') const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth'] - -module.exports = function argsert (expected, callerArguments, length) { +function argsert (expected, callerArguments, length) { // TODO: should this eventually raise an exception. try { // preface the argument description with "cmd", so // that we can run it through yargs' command parser. let position = 0 - let parsed = {demanded: [], optional: []} + let parsed = { demanded: [], optional: [] } if (typeof expected === 'object') { length = callerArguments callerArguments = expected diff --git a/node_modules/yargs/lib/command.js b/node_modules/yargs/lib/command.js index 65322dbbdbd3d..d2a6e4d49355b 100644 --- a/node_modules/yargs/lib/command.js +++ b/node_modules/yargs/lib/command.js @@ -1,6 +1,8 @@ 'use strict' const inspect = require('util').inspect +const isPromise = require('./is-promise') +const { applyMiddleware, commandMiddlewareFactory } = require('./middleware') const path = require('path') const Parser = require('yargs-parser') @@ -9,15 +11,18 @@ const DEFAULT_MARKER = /(^\*)|(^\$0)/ // handles parsing positional arguments, // and populating argv with said positional // arguments. -module.exports = function command (yargs, usage, validation) { +module.exports = function command (yargs, usage, validation, globalMiddleware) { const self = {} let handlers = {} let aliasMap = {} let defaultCommand - self.addHandler = function addHandler (cmd, description, builder, handler, middlewares) { + globalMiddleware = globalMiddleware || [] + + self.addHandler = function addHandler (cmd, description, builder, handler, commandMiddleware) { let aliases = [] + const middlewares = commandMiddlewareFactory(commandMiddleware) handler = handler || (() => {}) - middlewares = middlewares || [] + if (Array.isArray(cmd)) { aliases = cmd.slice(1) cmd = cmd[0] @@ -169,7 +174,7 @@ module.exports = function command (yargs, usage, validation) { let numFiles = currentContext.files.length const parentCommands = currentContext.commands.slice() - // what does yargs look like after the buidler is run? + // what does yargs look like after the builder is run? let innerArgv = parsed.argv let innerYargs = null let positionalMap = {} @@ -181,24 +186,17 @@ module.exports = function command (yargs, usage, validation) { // a function can be provided, which builds // up a yargs chain and possibly returns it. innerYargs = commandHandler.builder(yargs.reset(parsed.aliases)) - // if the builder function did not yet parse argv with reset yargs - // and did not explicitly set a usage() string, then apply the - // original command string as usage() for consistent behavior with - // options object below. - if (yargs.parsed === false) { - if (shouldUpdateUsage(yargs)) { - yargs.getUsageInstance().usage( - usageFromParentCommandsCommandHandler(parentCommands, commandHandler), - commandHandler.description - ) - } - innerArgv = innerYargs ? innerYargs._parseArgs(null, null, true, commandIndex) : yargs._parseArgs(null, null, true, commandIndex) - } else { - innerArgv = yargs.parsed.argv + if (!innerYargs || (typeof innerYargs._parseArgs !== 'function')) { + innerYargs = yargs } - - if (innerYargs && yargs.parsed === false) aliases = innerYargs.parsed.aliases - else aliases = yargs.parsed.aliases + if (shouldUpdateUsage(innerYargs)) { + innerYargs.getUsageInstance().usage( + usageFromParentCommandsCommandHandler(parentCommands, commandHandler), + commandHandler.description + ) + } + innerArgv = innerYargs._parseArgs(null, null, true, commandIndex) + aliases = innerYargs.parsed.aliases } else if (typeof commandHandler.builder === 'object') { // as a short hand, an object can instead be provided, specifying // the options that a command takes. @@ -220,24 +218,37 @@ module.exports = function command (yargs, usage, validation) { positionalMap = populatePositionals(commandHandler, innerArgv, currentContext, yargs) } + const middlewares = globalMiddleware.slice(0).concat(commandHandler.middlewares || []) + applyMiddleware(innerArgv, yargs, middlewares, true) + // we apply validation post-hoc, so that custom // checks get passed populated positional arguments. if (!yargs._hasOutput()) yargs._runValidation(innerArgv, aliases, positionalMap, yargs.parsed.error) if (commandHandler.handler && !yargs._hasOutput()) { yargs._setHasOutput() - if (commandHandler.middlewares.length > 0) { - const middlewareArgs = commandHandler.middlewares.reduce(function (initialObj, middleware) { - return Object.assign(initialObj, middleware(innerArgv)) - }, {}) - Object.assign(innerArgv, middlewareArgs) + // to simplify the parsing of positionals in commands, + // we temporarily populate '--' rather than _, with arguments + const populateDoubleDash = !!yargs.getOptions().configuration['populate--'] + if (!populateDoubleDash) yargs._copyDoubleDash(innerArgv) + + innerArgv = applyMiddleware(innerArgv, yargs, middlewares, false) + let handlerResult + if (isPromise(innerArgv)) { + handlerResult = innerArgv.then(argv => commandHandler.handler(argv)) + } else { + handlerResult = commandHandler.handler(innerArgv) } - const handlerResult = commandHandler.handler(innerArgv) - if (handlerResult && typeof handlerResult.then === 'function') { - handlerResult.then( - null, - (error) => yargs.getUsageInstance().fail(null, error) - ) + + if (isPromise(handlerResult)) { + yargs.getUsageInstance().cacheHelpMessage() + handlerResult.catch(error => { + try { + yargs.getUsageInstance().fail(null, error) + } catch (err) { + // fail's throwing would cause an unhandled rejection. + } + }) } } @@ -328,6 +339,7 @@ module.exports = function command (yargs, usage, validation) { options.default = Object.assign(parseOptions.default, options.default) options.alias = Object.assign(parseOptions.alias, options.alias) options.array = options.array.concat(parseOptions.array) + delete options.config // don't load config when processing positionals. const unparsed = [] Object.keys(positionalMap).forEach((key) => { @@ -340,7 +352,12 @@ module.exports = function command (yargs, usage, validation) { // short-circuit parse. if (!unparsed.length) return - const parsed = Parser.detailed(unparsed, options) + const config = Object.assign({}, options.configuration, { + 'populate--': true + }) + const parsed = Parser.detailed(unparsed, Object.assign({}, options, { + configuration: config + })) if (parsed.error) { yargs.getUsageInstance().fail(parsed.error.message, parsed.error) @@ -354,6 +371,9 @@ module.exports = function command (yargs, usage, validation) { Object.keys(parsed.argv).forEach((key) => { if (positionalKeys.indexOf(key) !== -1) { + // any new aliases need to be placed in positionalMap, which + // is used for validation. + if (!positionalMap[key]) positionalMap[key] = parsed.argv[key] argv[key] = parsed.argv[key] } }) @@ -408,18 +428,19 @@ module.exports = function command (yargs, usage, validation) { // the state of commands such that // we can apply .parse() multiple times // with the same yargs instance. - let frozen + let frozens = [] self.freeze = () => { - frozen = {} + let frozen = {} + frozens.push(frozen) frozen.handlers = handlers frozen.aliasMap = aliasMap frozen.defaultCommand = defaultCommand } self.unfreeze = () => { + let frozen = frozens.pop() handlers = frozen.handlers aliasMap = frozen.aliasMap defaultCommand = frozen.defaultCommand - frozen = undefined } return self diff --git a/node_modules/yargs/lib/completion-templates.js b/node_modules/yargs/lib/completion-templates.js new file mode 100644 index 0000000000000..43714fb6ed96a --- /dev/null +++ b/node_modules/yargs/lib/completion-templates.js @@ -0,0 +1,49 @@ +exports.completionShTemplate = +`###-begin-{{app_name}}-completions-### +# +# yargs command completion script +# +# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc +# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX. +# +_yargs_completions() +{ + local cur_word args type_list + + cur_word="\${COMP_WORDS[COMP_CWORD]}" + args=("\${COMP_WORDS[@]}") + + # ask yargs to generate completions. + type_list=$({{app_path}} --get-yargs-completions "\${args[@]}") + + COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) ) + + # if no match was found, fall back to filename completion + if [ \${#COMPREPLY[@]} -eq 0 ]; then + COMPREPLY=() + fi + + return 0 +} +complete -o default -F _yargs_completions {{app_name}} +###-end-{{app_name}}-completions-### +` + +exports.completionZshTemplate = `###-begin-{{app_name}}-completions-### +# +# yargs command completion script +# +# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc +# or {{app_path}} {{completion_command}} >> ~/.zsh_profile on OSX. +# +_{{app_name}}_yargs_completions() +{ + local reply + local si=$IFS + IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}")) + IFS=$si + _describe 'values' reply +} +compdef _{{app_name}}_yargs_completions {{app_name}} +###-end-{{app_name}}-completions-### +` diff --git a/node_modules/yargs/lib/completion.js b/node_modules/yargs/lib/completion.js index ad6969a2d932f..3f3bf16e1c938 100644 --- a/node_modules/yargs/lib/completion.js +++ b/node_modules/yargs/lib/completion.js @@ -1,5 +1,4 @@ 'use strict' -const fs = require('fs') const path = require('path') // add bash completions to your @@ -9,6 +8,8 @@ module.exports = function completion (yargs, usage, command) { completionKey: 'get-yargs-completions' } + const zshShell = (process.env.SHELL && process.env.SHELL.indexOf('zsh') !== -1) || + (process.env.ZSH_NAME && process.env.ZSH_NAME.indexOf('zsh') !== -1) // get a list of completion commands. // 'args' is the array of strings from the line to be completed self.getCompletion = function getCompletion (args, done) { @@ -16,6 +17,7 @@ module.exports = function completion (yargs, usage, command) { const current = args.length ? args[args.length - 1] : '' const argv = yargs.parse(args, true) const aliases = yargs.parsed.aliases + const parentCommands = yargs.getContext().commands // a custom completion function can be provided // to completion(). @@ -54,22 +56,33 @@ module.exports = function completion (yargs, usage, command) { } } - if (!current.match(/^-/)) { + if (!current.match(/^-/) && parentCommands[parentCommands.length - 1] !== current) { usage.getCommands().forEach((usageCommand) => { const commandName = command.parseCommand(usageCommand[0]).cmd if (args.indexOf(commandName) === -1) { - completions.push(commandName) + if (!zshShell) { + completions.push(commandName) + } else { + const desc = usageCommand[1] || '' + completions.push(commandName.replace(/:/g, '\\:') + ':' + desc) + } } }) } - if (current.match(/^-/)) { + if (current.match(/^-/) || (current === '' && completions.length === 0)) { + const descs = usage.getDescriptions() Object.keys(yargs.getOptions().key).forEach((key) => { // If the key and its aliases aren't in 'args', add the key to 'completions' const keyAndAliases = [key].concat(aliases[key] || []) const notInArgs = keyAndAliases.every(val => args.indexOf(`--${val}`) === -1) if (notInArgs) { - completions.push(`--${key}`) + if (!zshShell) { + completions.push(`--${key}`) + } else { + const desc = descs[key] || '' + completions.push(`--${key.replace(/:/g, '\\:')}:${desc.replace('__yargsString__:', '')}`) + } } }) } @@ -79,10 +92,8 @@ module.exports = function completion (yargs, usage, command) { // generate the completion script to add to your .bashrc. self.generateCompletionScript = function generateCompletionScript ($0, cmd) { - let script = fs.readFileSync( - path.resolve(__dirname, '../completion.sh.hbs'), - 'utf-8' - ) + const templates = require('./completion-templates') + let script = zshShell ? templates.completionZshTemplate : templates.completionShTemplate const name = path.basename($0) // add ./to applications not yet installed as bin. diff --git a/node_modules/yargs/lib/is-promise.js b/node_modules/yargs/lib/is-promise.js new file mode 100644 index 0000000000000..271d93b2d121a --- /dev/null +++ b/node_modules/yargs/lib/is-promise.js @@ -0,0 +1,3 @@ +module.exports = function isPromise (maybePromise) { + return !!maybePromise && !!maybePromise.then && (typeof maybePromise.then === 'function') +} diff --git a/node_modules/yargs/lib/levenshtein.js b/node_modules/yargs/lib/levenshtein.js index f32b0c277125f..c66c1babbc3d9 100644 --- a/node_modules/yargs/lib/levenshtein.js +++ b/node_modules/yargs/lib/levenshtein.js @@ -1,11 +1,22 @@ /* Copyright (c) 2011 Andrei Mackenzie -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. +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. */ // levenshtein distance algorithm, pulled from Andrei Mackenzie's MIT licensed. @@ -37,8 +48,8 @@ module.exports = function levenshtein (a, b) { matrix[i][j] = matrix[i - 1][j - 1] } else { matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution - Math.min(matrix[i][j - 1] + 1, // insertion - matrix[i - 1][j] + 1)) // deletion + Math.min(matrix[i][j - 1] + 1, // insertion + matrix[i - 1][j] + 1)) // deletion } } } diff --git a/node_modules/yargs/lib/middleware.js b/node_modules/yargs/lib/middleware.js new file mode 100644 index 0000000000000..56dab75277b47 --- /dev/null +++ b/node_modules/yargs/lib/middleware.js @@ -0,0 +1,64 @@ +'use strict' + +// hoisted due to circular dependency on command. +module.exports = { + applyMiddleware, + commandMiddlewareFactory, + globalMiddlewareFactory +} +const isPromise = require('./is-promise') +const argsert = require('./argsert') + +function globalMiddlewareFactory (globalMiddleware, context) { + return function (callback, applyBeforeValidation = false) { + argsert('<array|function> [boolean]', [callback, applyBeforeValidation], arguments.length) + if (Array.isArray(callback)) { + for (let i = 0; i < callback.length; i++) { + if (typeof callback[i] !== 'function') { + throw Error('middleware must be a function') + } + callback[i].applyBeforeValidation = applyBeforeValidation + } + Array.prototype.push.apply(globalMiddleware, callback) + } else if (typeof callback === 'function') { + callback.applyBeforeValidation = applyBeforeValidation + globalMiddleware.push(callback) + } + return context + } +} + +function commandMiddlewareFactory (commandMiddleware) { + if (!commandMiddleware) return [] + return commandMiddleware.map(middleware => { + middleware.applyBeforeValidation = false + return middleware + }) +} + +function applyMiddleware (argv, yargs, middlewares, beforeValidation) { + const beforeValidationError = new Error('middleware cannot return a promise when applyBeforeValidation is true') + return middlewares + .reduce((accumulation, middleware) => { + if (middleware.applyBeforeValidation !== beforeValidation) { + return accumulation + } + + if (isPromise(accumulation)) { + return accumulation + .then(initialObj => + Promise.all([initialObj, middleware(initialObj, yargs)]) + ) + .then(([initialObj, middlewareObj]) => + Object.assign(initialObj, middlewareObj) + ) + } else { + const result = middleware(argv, yargs) + if (beforeValidation && isPromise(result)) throw beforeValidationError + + return isPromise(result) + ? result.then(middlewareObj => Object.assign(accumulation, middlewareObj)) + : Object.assign(accumulation, result) + } + }, argv) +} diff --git a/node_modules/yargs/lib/usage.js b/node_modules/yargs/lib/usage.js index bd0906a89dbc2..92bf378620c5c 100644 --- a/node_modules/yargs/lib/usage.js +++ b/node_modules/yargs/lib/usage.js @@ -1,6 +1,7 @@ 'use strict' // this file handles outputting usage instructions, // failures, etc. keeps logging in one place. +const decamelize = require('decamelize') const stringWidth = require('string-width') const objFilter = require('./obj-filter') const path = require('path') @@ -45,7 +46,10 @@ module.exports = function usage (yargs, y18n) { // don't output failure message more than once if (!failureOutput) { failureOutput = true - if (showHelpOnFail) yargs.showHelp('error') + if (showHelpOnFail) { + yargs.showHelp('error') + logger.error() + } if (msg || err) logger.error(msg || err) if (failMessage) { if (msg || err) logger.error('') @@ -118,9 +122,9 @@ module.exports = function usage (yargs, y18n) { } self.getDescriptions = () => descriptions - let epilog + let epilogs = [] self.epilog = (msg) => { - epilog = msg + epilogs.push(msg) } let wrapSet = false @@ -144,24 +148,26 @@ module.exports = function usage (yargs, y18n) { const defaultGroup = 'Options:' self.help = function help () { + if (cachedHelpMessage) return cachedHelpMessage normalizeAliases() // handle old demanded API - const base$0 = path.basename(yargs.$0) + const base$0 = yargs.customScriptName ? yargs.$0 : path.basename(yargs.$0) const demandedOptions = yargs.getDemandedOptions() const demandedCommands = yargs.getDemandedCommands() const groups = yargs.getGroups() const options = yargs.getOptions() - let keys = Object.keys( - Object.keys(descriptions) - .concat(Object.keys(demandedOptions)) - .concat(Object.keys(demandedCommands)) - .concat(Object.keys(options.default)) - .reduce((acc, key) => { - if (key !== '_') acc[key] = true - return acc - }, {}) - ) + + let keys = [] + keys = keys.concat(Object.keys(descriptions)) + keys = keys.concat(Object.keys(demandedOptions)) + keys = keys.concat(Object.keys(demandedCommands)) + keys = keys.concat(Object.keys(options.default)) + keys = keys.filter(filterHiddenOptions) + keys = Object.keys(keys.reduce((acc, key) => { + if (key !== '_') acc[key] = true + return acc + }, {})) const theWrap = getWrap() const ui = require('cliui')({ @@ -176,7 +182,7 @@ module.exports = function usage (yargs, y18n) { usages.forEach((usage) => { ui.div(`${usage[0].replace(/\$0/g, base$0)}`) if (usage[1]) { - ui.div({text: `${usage[1]}`, padding: [1, 0, 0, 0]}) + ui.div({ text: `${usage[1]}`, padding: [1, 0, 0, 0] }) } }) ui.div() @@ -200,6 +206,10 @@ module.exports = function usage (yargs, y18n) { const context = yargs.getContext() const parentCommands = context.commands.length ? `${context.commands.join(' ')} ` : '' + if (yargs.getParserConfiguration()['sort-commands'] === true) { + commands = commands.sort((a, b) => a[0].localeCompare(b[0])) + } + commands.forEach((command) => { const commandString = `${base$0} ${parentCommands}${command[0].replace(/^\$0 ?/, '')}` // drop $0 from default commands. ui.span( @@ -208,7 +218,7 @@ module.exports = function usage (yargs, y18n) { padding: [0, 2, 0, 2], width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4 }, - {text: command[1]} + { text: command[1] } ) const hints = [] if (command[2]) hints.push(`[${__('default:').slice(0, -1)}]`) // TODO hacking around i18n here @@ -216,7 +226,7 @@ module.exports = function usage (yargs, y18n) { hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`) } if (hints.length) { - ui.div({text: hints.join(' '), padding: [0, 0, 0, 2], align: 'right'}) + ui.div({ text: hints.join(' '), padding: [0, 0, 0, 2], align: 'right' }) } else { ui.div() } @@ -241,11 +251,9 @@ module.exports = function usage (yargs, y18n) { Object.keys(groups).forEach((groupName) => { if (!groups[groupName].length) return - ui.div(__(groupName)) - // if we've grouped the key 'f', but 'f' aliases 'foobar', // normalizedKeys should contain only 'foobar'. - const normalizedKeys = groups[groupName].map((key) => { + const normalizedKeys = groups[groupName].filter(filterHiddenOptions).map((key) => { if (~aliasKeys.indexOf(key)) return key for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) { if (~(options.alias[aliasKey] || []).indexOf(key)) return aliasKey @@ -253,6 +261,10 @@ module.exports = function usage (yargs, y18n) { return key }) + if (normalizedKeys.length < 1) return + + ui.div(__(groupName)) + // actually generate the switches string --foo, -f, --bar. const switches = normalizedKeys.reduce((acc, key) => { acc[key] = [ key ].concat(options.alias[key] || []) @@ -290,11 +302,11 @@ module.exports = function usage (yargs, y18n) { ].filter(Boolean).join(' ') ui.span( - {text: kswitch, padding: [0, 2, 0, 2], width: maxWidth(switches, theWrap) + 4}, + { text: kswitch, padding: [0, 2, 0, 2], width: maxWidth(switches, theWrap) + 4 }, desc ) - if (extra) ui.div({text: extra, padding: [0, 0, 0, 2], align: 'right'}) + if (extra) ui.div({ text: extra, padding: [0, 0, 0, 2], align: 'right' }) else ui.div() }) @@ -334,12 +346,13 @@ module.exports = function usage (yargs, y18n) { } // the usage string. - if (epilog) { - const e = epilog.replace(/\$0/g, base$0) + if (epilogs.length > 0) { + const e = epilogs.map(epilog => epilog.replace(/\$0/g, base$0)).join('\n') ui.div(`${e}\n`) } - return ui.toString() + // Remove the trailing white spaces + return ui.toString().replace(/\s*$/, '') } // return the maximum width of a string @@ -391,6 +404,13 @@ module.exports = function usage (yargs, y18n) { }) } + // if yargs is executing an async handler, we take a snapshot of the + // help message to display on failure: + let cachedHelpMessage + self.cacheHelpMessage = function () { + cachedHelpMessage = this.help() + } + // given a set of keys, place any keys that are // ungrouped under the 'Options:' grouping. function addUngroupedKeys (keys, aliases, groups) { @@ -409,6 +429,10 @@ module.exports = function usage (yargs, y18n) { return groupedKeys } + function filterHiddenOptions (key) { + return yargs.getOptions().hiddenOptions.indexOf(key) < 0 || yargs.parsed.argv[yargs.getOptions().showHiddenOpt] + } + self.showHelp = (level) => { const logger = yargs._getLoggerInstance() if (!level) level = 'error' @@ -417,7 +441,7 @@ module.exports = function usage (yargs, y18n) { } self.functionDescription = (fn) => { - const description = fn.name ? require('decamelize')(fn.name, '-') : __('generated-value') + const description = fn.name ? decamelize(fn.name, '-') : __('generated-value') return ['(', description, ')'].join('') } @@ -489,35 +513,36 @@ module.exports = function usage (yargs, y18n) { failureOutput = false usages = [] usageDisabled = false - epilog = undefined + epilogs = [] examples = [] commands = [] descriptions = objFilter(descriptions, (k, v) => !localLookup[k]) return self } - let frozen + let frozens = [] self.freeze = function freeze () { - frozen = {} + let frozen = {} + frozens.push(frozen) frozen.failMessage = failMessage frozen.failureOutput = failureOutput frozen.usages = usages frozen.usageDisabled = usageDisabled - frozen.epilog = epilog + frozen.epilogs = epilogs frozen.examples = examples frozen.commands = commands frozen.descriptions = descriptions } self.unfreeze = function unfreeze () { + let frozen = frozens.pop() failMessage = frozen.failMessage failureOutput = frozen.failureOutput usages = frozen.usages usageDisabled = frozen.usageDisabled - epilog = frozen.epilog + epilogs = frozen.epilogs examples = frozen.examples commands = frozen.commands descriptions = frozen.descriptions - frozen = undefined } return self diff --git a/node_modules/yargs/lib/validation.js b/node_modules/yargs/lib/validation.js index f4655b4fdc7ac..35659a356b810 100644 --- a/node_modules/yargs/lib/validation.js +++ b/node_modules/yargs/lib/validation.js @@ -37,7 +37,7 @@ module.exports = function validation (yargs, usage, y18n) { ) } else { usage.fail( - __('Too many non-option arguments: got %s, maximum of %s', _s, demandedCommands._.max) + __('Too many non-option arguments: got %s, maximum of %s', _s, demandedCommands._.max) ) } } @@ -96,13 +96,13 @@ module.exports = function validation (yargs, usage, y18n) { if (specialKeys.indexOf(key) === -1 && !positionalMap.hasOwnProperty(key) && !yargs._getParseContext().hasOwnProperty(key) && - !aliases.hasOwnProperty(key) + !self.isValidAndSomeAliasIsNotNew(key, aliases) ) { unknown.push(key) } }) - if (commandKeys.length > 0) { + if ((currentContext.commands.length > 0) || (commandKeys.length > 0)) { argv._.slice(currentContext.commands.length).forEach((key) => { if (commandKeys.indexOf(key) === -1) { unknown.push(key) @@ -120,6 +120,21 @@ module.exports = function validation (yargs, usage, y18n) { } } + // check for a key that is not an alias, or for which every alias is new, + // implying that it was invented by the parser, e.g., during camelization + self.isValidAndSomeAliasIsNotNew = function isValidAndSomeAliasIsNotNew (key, aliases) { + if (!aliases.hasOwnProperty(key)) { + return false + } + const newAliases = yargs.parsed.newAliases + for (let a of [key, ...aliases[key]]) { + if (!newAliases.hasOwnProperty(a) || !newAliases[key]) { + return true + } + } + return false + } + // validate arguments limited to enumerated choices self.limitedChoices = function limitedChoices (argv) { const options = yargs.getOptions() @@ -209,43 +224,36 @@ module.exports = function validation (yargs, usage, y18n) { return implied } + function keyExists (argv, val) { + // convert string '1' to number 1 + let num = Number(val) + val = isNaN(num) ? val : num + + if (typeof val === 'number') { + // check length of argv._ + val = argv._.length >= val + } else if (val.match(/^--no-.+/)) { + // check if key/value doesn't exist + val = val.match(/^--no-(.+)/)[1] + val = !argv[val] + } else { + // check if key/value exists + val = argv[val] + } + return val + } + self.implications = function implications (argv) { const implyFail = [] Object.keys(implied).forEach((key) => { const origKey = key ;(implied[key] || []).forEach((value) => { - let num let key = origKey const origValue = value + key = keyExists(argv, key) + value = keyExists(argv, value) - // convert string '1' to number 1 - num = Number(key) - key = isNaN(num) ? key : num - - if (typeof key === 'number') { - // check length of argv._ - key = argv._.length >= key - } else if (key.match(/^--no-.+/)) { - // check if key doesn't exist - key = key.match(/^--no-(.+)/)[1] - key = !argv[key] - } else { - // check if key exists - key = argv[key] - } - - num = Number(value) - value = isNaN(num) ? value : num - - if (typeof value === 'number') { - value = argv._.length >= value - } else if (value.match(/^--no-.+/)) { - value = value.match(/^--no-(.+)/)[1] - value = !argv[value] - } else { - value = argv[value] - } if (key && !value) { implyFail.push(` ${origKey} -> ${origValue}`) } @@ -292,7 +300,7 @@ module.exports = function validation (yargs, usage, y18n) { // we default keys to 'undefined' that have been configured, we should not // apply conflicting check unless they are a value other than 'undefined'. if (value && argv[key] !== undefined && argv[value] !== undefined) { - usage.fail(__(`Arguments ${key} and ${value} are mutually exclusive`)) + usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)) } }) } @@ -323,18 +331,19 @@ module.exports = function validation (yargs, usage, y18n) { return self } - let frozen + let frozens = [] self.freeze = function freeze () { - frozen = {} + let frozen = {} + frozens.push(frozen) frozen.implied = implied frozen.checks = checks frozen.conflicting = conflicting } self.unfreeze = function unfreeze () { + let frozen = frozens.pop() implied = frozen.implied checks = frozen.checks conflicting = frozen.conflicting - frozen = undefined } return self diff --git a/node_modules/yargs/locales/de.json b/node_modules/yargs/locales/de.json index d805710b09a54..05d983737140f 100644 --- a/node_modules/yargs/locales/de.json +++ b/node_modules/yargs/locales/de.json @@ -29,7 +29,7 @@ "Invalid values:": "UnzulΓ€ssige Werte:", "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeben: %s, MΓΆglichkeiten: %s", "Argument check failed: %s": "Argumente-Check fehlgeschlagen: %s", - "Implications failed:": "Implikationen fehlgeschlagen:", + "Implications failed:": "Fehlende abhΓ€ngige Argumente:", "Not enough arguments following: %s": "Nicht genΓΌgend Argumente nach: %s", "Invalid JSON config file: %s": "Fehlerhafte JSON-Config Datei: %s", "Path to JSON config file": "Pfad zur JSON-Config Datei", diff --git a/node_modules/yargs/locales/en.json b/node_modules/yargs/locales/en.json index fc65c2a0d86f0..b32a63f27adba 100644 --- a/node_modules/yargs/locales/en.json +++ b/node_modules/yargs/locales/en.json @@ -29,7 +29,7 @@ "Invalid values:": "Invalid values:", "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Given: %s, Choices: %s", "Argument check failed: %s": "Argument check failed: %s", - "Implications failed:": "Implications failed:", + "Implications failed:": "Missing dependent arguments:", "Not enough arguments following: %s": "Not enough arguments following: %s", "Invalid JSON config file: %s": "Invalid JSON config file: %s", "Path to JSON config file": "Path to JSON config file", diff --git a/node_modules/yargs/locales/fr.json b/node_modules/yargs/locales/fr.json index 481f47e37fbc9..cf9c74bf5b750 100644 --- a/node_modules/yargs/locales/fr.json +++ b/node_modules/yargs/locales/fr.json @@ -28,7 +28,7 @@ "Invalid values:": "Valeurs invalides:", "Argument: %s, Given: %s, Choices: %s": "Argument: %s, DonnΓ©: %s, Choix: %s", "Argument check failed: %s": "Echec de la vΓ©rification de l'argument: %s", - "Implications failed:": "Implications Γ©chouΓ©es:", + "Implications failed:": "Arguments dΓ©pendants manquants:", "Not enough arguments following: %s": "Pas assez d'arguments suivant: %s", "Invalid JSON config file: %s": "Fichier de configuration JSON invalide: %s", "Path to JSON config file": "Chemin du fichier de configuration JSON", diff --git a/node_modules/yargs/locales/it.json b/node_modules/yargs/locales/it.json index f9eb3756eacc1..9ee900d34aca9 100644 --- a/node_modules/yargs/locales/it.json +++ b/node_modules/yargs/locales/it.json @@ -29,7 +29,7 @@ "Invalid values:": "Valori non validi:", "Argument: %s, Given: %s, Choices: %s": "Argomento: %s, Richiesto: %s, Scelte: %s", "Argument check failed: %s": "Controllo dell'argomento fallito: %s", - "Implications failed:": "Argomenti impliciti non soddisfatti:", + "Implications failed:": "Argomenti dipendenti mancanti:", "Not enough arguments following: %s": "Argomenti insufficienti dopo: %s", "Invalid JSON config file: %s": "File di configurazione JSON non valido: %s", "Path to JSON config file": "Percorso del file di configurazione JSON", diff --git a/node_modules/yargs/locales/nb.json b/node_modules/yargs/locales/nb.json index fc607fb1e19c1..55be1fbedeb69 100644 --- a/node_modules/yargs/locales/nb.json +++ b/node_modules/yargs/locales/nb.json @@ -27,7 +27,7 @@ }, "Invalid values:": "Ugyldige verdier:", "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gitt: %s, Valg: %s", - "Argument check failed: %s": "Argument sjekk mislyktes: %s", + "Argument check failed: %s": "Argumentsjekk mislyktes: %s", "Implications failed:": "Konsekvensene mislyktes:", "Not enough arguments following: %s": "Ikke nok fΓΈlgende argumenter: %s", "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", diff --git a/node_modules/yargs/locales/nl.json b/node_modules/yargs/locales/nl.json index 1d144724ec3b6..5d62e0fc3b611 100644 --- a/node_modules/yargs/locales/nl.json +++ b/node_modules/yargs/locales/nl.json @@ -1,42 +1,42 @@ { - "Commands:": "Opdrachten:", + "Commands:": "Commando's:", "Options:": "Opties:", "Examples:": "Voorbeelden:", - "boolean": "boolean", + "boolean": "booleaans", "count": "aantal", - "string": "text", - "number": "nummer", + "string": "string", + "number": "getal", "array": "lijst", "required": "verplicht", "default:": "standaard:", "choices:": "keuzes:", "aliases:": "aliassen:", "generated-value": "gegenereerde waarde", - "Not enough non-option arguments: got %s, need at least %s": "Niet genoeg non-optie argumenten. Gekregen: %s, minstens nodig: %s", - "Too many non-option arguments: got %s, maximum of %s": "Te veel non-optie argumenten. Gekregen: %s, maximum: %s", + "Not enough non-option arguments: got %s, need at least %s": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig", + "Too many non-option arguments: got %s, maximum of %s": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s", "Missing argument value: %s": { - "one": "Missing argument value: %s", - "other": "Missing argument values: %s" + "one": "Missende argumentwaarde: %s", + "other": "Missende argumentwaarden: %s" }, "Missing required argument: %s": { - "one": "Missend verplichte argument: %s", + "one": "Missend verplicht argument: %s", "other": "Missende verplichte argumenten: %s" }, "Unknown argument: %s": { "one": "Onbekend argument: %s", "other": "Onbekende argumenten: %s" }, - "Invalid values:": "Ongeldige waardes:", + "Invalid values:": "Ongeldige waarden:", "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s", - "Argument check failed: %s": "Argument check mislukt: %s", - "Implications failed:": "Implicaties mislukt:", + "Argument check failed: %s": "Argumentcontrole mislukt: %s", + "Implications failed:": "Ontbrekende afhankelijke argumenten:", "Not enough arguments following: %s": "Niet genoeg argumenten na: %s", - "Invalid JSON config file: %s": "Ongeldig JSON configuratiebestand: %s", - "Path to JSON config file": "Pad naar JSON configuratiebestand", + "Invalid JSON config file: %s": "Ongeldig JSON-config-bestand: %s", + "Path to JSON config file": "Pad naar JSON-config-bestand", "Show help": "Toon help", - "Show version number": "Toon versie nummer", + "Show version number": "Toon versienummer", "Did you mean %s?": "Bedoelde u misschien %s?", - "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s zijn onderling uitsluitend", + "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s kunnen niet tegelijk gebruikt worden", "Positionals:": "Positie-afhankelijke argumenten", "command": "commando" } diff --git a/node_modules/yargs/locales/nn.json b/node_modules/yargs/locales/nn.json index 5e03c505ab75b..5a3c9514dc5b0 100644 --- a/node_modules/yargs/locales/nn.json +++ b/node_modules/yargs/locales/nn.json @@ -29,9 +29,9 @@ }, "Invalid values:": "Ugyldige verdiar:", "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gjeve: %s, Val: %s", - "Argument check failed: %s": "Argument sjekk mislukkast: %s", + "Argument check failed: %s": "Argumentsjekk mislukkast: %s", "Implications failed:": "Konsekvensane mislukkast:", - "Not enough arguments following: %s": "Ikkje nok fylgande argument: %s", + "Not enough arguments following: %s": "Ikkje nok fylgjande argument: %s", "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", "Path to JSON config file": "Bane til JSON konfigurasjonsfil", "Show help": "Vis hjelp", diff --git a/node_modules/yargs/locales/pirate.json b/node_modules/yargs/locales/pirate.json index 1f4e19e65de5e..dcb5cb75377d7 100644 --- a/node_modules/yargs/locales/pirate.json +++ b/node_modules/yargs/locales/pirate.json @@ -8,5 +8,6 @@ "other": "Ye be havin' to set the followin' arguments land lubber: %s" }, "Show help": "Parlay this here code of conduct", - "Show version number": "'Tis the version ye be askin' fer" + "Show version number": "'Tis the version ye be askin' fer", + "Arguments %s and %s are mutually exclusive" : "Yon scurvy dogs %s and %s be as bad as rum and a prudish wench" } diff --git a/node_modules/yargs/node_modules/ansi-regex/index.js b/node_modules/yargs/node_modules/ansi-regex/index.js new file mode 100644 index 0000000000000..c25448009f304 --- /dev/null +++ b/node_modules/yargs/node_modules/ansi-regex/index.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = options => { + options = Object.assign({ + onlyFirst: false + }, options); + + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, options.onlyFirst ? undefined : 'g'); +}; diff --git a/node_modules/os-locale/license b/node_modules/yargs/node_modules/ansi-regex/license similarity index 100% rename from node_modules/os-locale/license rename to node_modules/yargs/node_modules/ansi-regex/license diff --git a/node_modules/yargs/node_modules/ansi-regex/package.json b/node_modules/yargs/node_modules/ansi-regex/package.json new file mode 100644 index 0000000000000..32d176534fee2 --- /dev/null +++ b/node_modules/yargs/node_modules/ansi-regex/package.json @@ -0,0 +1,85 @@ +{ + "_from": "ansi-regex@^4.1.0", + "_id": "ansi-regex@4.1.0", + "_inBundle": false, + "_integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "_location": "/yargs/ansi-regex", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-regex@^4.1.0", + "name": "ansi-regex", + "escapedName": "ansi-regex", + "rawSpec": "^4.1.0", + "saveSpec": null, + "fetchSpec": "^4.1.0" + }, + "_requiredBy": [ + "/yargs/strip-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "_shasum": "8b9f8f08cf1acb843756a839ca8c7e3168c51997", + "_spec": "ansi-regex@^4.1.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs/node_modules/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-regex/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "ava": "^0.25.0", + "xo": "^0.23.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/ansi-regex#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "license": "MIT", + "name": "ansi-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-regex.git" + }, + "scripts": { + "test": "xo && ava", + "view-supported": "node fixtures/view-codes.js" + }, + "version": "4.1.0" +} diff --git a/node_modules/yargs/node_modules/ansi-regex/readme.md b/node_modules/yargs/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000000000..d19c44667e704 --- /dev/null +++ b/node_modules/yargs/node_modules/ansi-regex/readme.md @@ -0,0 +1,87 @@ +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) + +> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + +--- + +<div align="center"> + <b> + <a href="https://tidelift.com/subscription/pkg/npm-ansi-regex?utm_source=npm-ansi-regex&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> + </b> + <br> + <sub> + Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. + </sub> +</div> + +--- + + +## Install + +``` +$ npm install ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] +``` + + +## API + +### ansiRegex([options]) + +Returns a regex for matching ANSI escape codes. + +#### options + +##### onlyFirst + +Type: `boolean`<br> +Default: `false` *(Matches any ANSI escape codes in a string)* + +Match only the first ANSI escape. + + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/yargs/node_modules/find-up/index.js b/node_modules/yargs/node_modules/find-up/index.js new file mode 100644 index 0000000000000..8e83819cea5a9 --- /dev/null +++ b/node_modules/yargs/node_modules/find-up/index.js @@ -0,0 +1,46 @@ +'use strict'; +const path = require('path'); +const locatePath = require('locate-path'); + +module.exports = (filename, opts = {}) => { + const startDir = path.resolve(opts.cwd || ''); + const {root} = path.parse(startDir); + + const filenames = [].concat(filename); + + return new Promise(resolve => { + (function find(dir) { + locatePath(filenames, {cwd: dir}).then(file => { + if (file) { + resolve(path.join(dir, file)); + } else if (dir === root) { + resolve(null); + } else { + find(path.dirname(dir)); + } + }); + })(startDir); + }); +}; + +module.exports.sync = (filename, opts = {}) => { + let dir = path.resolve(opts.cwd || ''); + const {root} = path.parse(dir); + + const filenames = [].concat(filename); + + // eslint-disable-next-line no-constant-condition + while (true) { + const file = locatePath.sync(filenames, {cwd: dir}); + + if (file) { + return path.join(dir, file); + } + + if (dir === root) { + return null; + } + + dir = path.dirname(dir); + } +}; diff --git a/node_modules/os-locale/node_modules/execa/license b/node_modules/yargs/node_modules/find-up/license similarity index 100% rename from node_modules/os-locale/node_modules/execa/license rename to node_modules/yargs/node_modules/find-up/license diff --git a/node_modules/yargs/node_modules/find-up/package.json b/node_modules/yargs/node_modules/find-up/package.json new file mode 100644 index 0000000000000..4ea5014dd40c6 --- /dev/null +++ b/node_modules/yargs/node_modules/find-up/package.json @@ -0,0 +1,82 @@ +{ + "_from": "find-up@^3.0.0", + "_id": "find-up@3.0.0", + "_inBundle": false, + "_integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "_location": "/yargs/find-up", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "find-up@^3.0.0", + "name": "find-up", + "escapedName": "find-up", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "_shasum": "49169f1d7993430646da61ecc5ae355c21c97b73", + "_spec": "find-up@^3.0.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/find-up/issues" + }, + "bundleDependencies": false, + "dependencies": { + "locate-path": "^3.0.0" + }, + "deprecated": false, + "description": "Find a file or directory by walking up parent directories", + "devDependencies": { + "ava": "*", + "tempy": "^0.2.1", + "xo": "*" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/find-up#readme", + "keywords": [ + "find", + "up", + "find-up", + "findup", + "look-up", + "look", + "file", + "search", + "match", + "package", + "resolve", + "parent", + "parents", + "folder", + "directory", + "dir", + "walk", + "walking", + "path" + ], + "license": "MIT", + "name": "find-up", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/find-up.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/node_modules/yargs/node_modules/find-up/readme.md b/node_modules/yargs/node_modules/find-up/readme.md new file mode 100644 index 0000000000000..810ad7ceb5276 --- /dev/null +++ b/node_modules/yargs/node_modules/find-up/readme.md @@ -0,0 +1,87 @@ +# find-up [![Build Status: Linux and macOS](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/l0cyjmvh5lq72vq2/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/find-up/branch/master) + +> Find a file or directory by walking up parent directories + + +## Install + +``` +$ npm install find-up +``` + + +## Usage + +``` +/ +└── Users + └── sindresorhus + β”œβ”€β”€ unicorn.png + └── foo + └── bar + β”œβ”€β”€ baz + └── example.js +``` + +`example.js` + +```js +const findUp = require('find-up'); + +(async () => { + console.log(await findUp('unicorn.png')); + //=> '/Users/sindresorhus/unicorn.png' + + console.log(await findUp(['rainbow.png', 'unicorn.png'])); + //=> '/Users/sindresorhus/unicorn.png' +})(); +``` + + +## API + +### findUp(filename, [options]) + +Returns a `Promise` for either the filepath or `null` if it couldn't be found. + +### findUp([filenameA, filenameB], [options]) + +Returns a `Promise` for either the first filepath found (by respecting the order) or `null` if none could be found. + +### findUp.sync(filename, [options]) + +Returns a filepath or `null`. + +### findUp.sync([filenameA, filenameB], [options]) + +Returns the first filepath found (by respecting the order) or `null`. + +#### filename + +Type: `string` + +Filename of the file to find. + +#### options + +Type: `Object` + +##### cwd + +Type: `string`<br> +Default: `process.cwd()` + +Directory to start from. + + +## Related + +- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module +- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file +- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package +- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module like `require.resolve()` but from a given path + + +## License + +MIT Β© [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs/node_modules/is-fullwidth-code-point/index.js b/node_modules/yargs/node_modules/is-fullwidth-code-point/index.js new file mode 100644 index 0000000000000..d506327c3e557 --- /dev/null +++ b/node_modules/yargs/node_modules/is-fullwidth-code-point/index.js @@ -0,0 +1,46 @@ +'use strict'; +/* eslint-disable yoda */ +module.exports = x => { + if (Number.isNaN(x)) { + return false; + } + + // code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + if ( + x >= 0x1100 && ( + x <= 0x115f || // Hangul Jamo + x === 0x2329 || // LEFT-POINTING ANGLE BRACKET + x === 0x232a || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) || + // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + (0x3250 <= x && x <= 0x4dbf) || + // CJK Unified Ideographs .. Yi Radicals + (0x4e00 <= x && x <= 0xa4c6) || + // Hangul Jamo Extended-A + (0xa960 <= x && x <= 0xa97c) || + // Hangul Syllables + (0xac00 <= x && x <= 0xd7a3) || + // CJK Compatibility Ideographs + (0xf900 <= x && x <= 0xfaff) || + // Vertical Forms + (0xfe10 <= x && x <= 0xfe19) || + // CJK Compatibility Forms .. Small Form Variants + (0xfe30 <= x && x <= 0xfe6b) || + // Halfwidth and Fullwidth Forms + (0xff01 <= x && x <= 0xff60) || + (0xffe0 <= x && x <= 0xffe6) || + // Kana Supplement + (0x1b000 <= x && x <= 0x1b001) || + // Enclosed Ideographic Supplement + (0x1f200 <= x && x <= 0x1f251) || + // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + (0x20000 <= x && x <= 0x3fffd) + ) + ) { + return true; + } + + return false; +}; diff --git a/node_modules/yargs/node_modules/is-fullwidth-code-point/license b/node_modules/yargs/node_modules/is-fullwidth-code-point/license new file mode 100644 index 0000000000000..654d0bfe94343 --- /dev/null +++ b/node_modules/yargs/node_modules/is-fullwidth-code-point/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/yargs/node_modules/is-fullwidth-code-point/package.json b/node_modules/yargs/node_modules/is-fullwidth-code-point/package.json new file mode 100644 index 0000000000000..88ca7956f1970 --- /dev/null +++ b/node_modules/yargs/node_modules/is-fullwidth-code-point/package.json @@ -0,0 +1,77 @@ +{ + "_from": "is-fullwidth-code-point@^2.0.0", + "_id": "is-fullwidth-code-point@2.0.0", + "_inBundle": false, + "_integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "_location": "/yargs/is-fullwidth-code-point", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-fullwidth-code-point@^2.0.0", + "name": "is-fullwidth-code-point", + "escapedName": "is-fullwidth-code-point", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/yargs/string-width" + ], + "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "_shasum": "a3b30a5c4f199183167aaab93beefae3ddfb654f", + "_spec": "is-fullwidth-code-point@^2.0.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs/node_modules/string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme", + "keywords": [ + "fullwidth", + "full-width", + "full", + "width", + "unicode", + "character", + "char", + "string", + "str", + "codepoint", + "code", + "point", + "is", + "detect", + "check" + ], + "license": "MIT", + "name": "is-fullwidth-code-point", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/yargs/node_modules/is-fullwidth-code-point/readme.md b/node_modules/yargs/node_modules/is-fullwidth-code-point/readme.md new file mode 100644 index 0000000000000..093b0281b2c46 --- /dev/null +++ b/node_modules/yargs/node_modules/is-fullwidth-code-point/readme.md @@ -0,0 +1,39 @@ +# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point) + +> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) + + +## Install + +``` +$ npm install --save is-fullwidth-code-point +``` + + +## Usage + +```js +const isFullwidthCodePoint = require('is-fullwidth-code-point'); + +isFullwidthCodePoint('θ°’'.codePointAt()); +//=> true + +isFullwidthCodePoint('a'.codePointAt()); +//=> false +``` + + +## API + +### isFullwidthCodePoint(input) + +#### input + +Type: `number` + +[Code point](https://en.wikipedia.org/wiki/Code_point) of a character. + + +## License + +MIT Β© [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs/node_modules/locate-path/index.js b/node_modules/yargs/node_modules/locate-path/index.js new file mode 100644 index 0000000000000..5aae6ee4ad027 --- /dev/null +++ b/node_modules/yargs/node_modules/locate-path/index.js @@ -0,0 +1,24 @@ +'use strict'; +const path = require('path'); +const pathExists = require('path-exists'); +const pLocate = require('p-locate'); + +module.exports = (iterable, options) => { + options = Object.assign({ + cwd: process.cwd() + }, options); + + return pLocate(iterable, el => pathExists(path.resolve(options.cwd, el)), options); +}; + +module.exports.sync = (iterable, options) => { + options = Object.assign({ + cwd: process.cwd() + }, options); + + for (const el of iterable) { + if (pathExists.sync(path.resolve(options.cwd, el))) { + return el; + } + } +}; diff --git a/node_modules/yargs/node_modules/locate-path/license b/node_modules/yargs/node_modules/locate-path/license new file mode 100644 index 0000000000000..e7af2f77107d7 --- /dev/null +++ b/node_modules/yargs/node_modules/locate-path/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/yargs/node_modules/locate-path/package.json b/node_modules/yargs/node_modules/locate-path/package.json new file mode 100644 index 0000000000000..4800b6856bf92 --- /dev/null +++ b/node_modules/yargs/node_modules/locate-path/package.json @@ -0,0 +1,76 @@ +{ + "_from": "locate-path@^3.0.0", + "_id": "locate-path@3.0.0", + "_inBundle": false, + "_integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "_location": "/yargs/locate-path", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "locate-path@^3.0.0", + "name": "locate-path", + "escapedName": "locate-path", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/yargs/find-up" + ], + "_resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "_shasum": "dbec3b3ab759758071b58fe59fc41871af21400e", + "_spec": "locate-path@^3.0.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs/node_modules/find-up", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/locate-path/issues" + }, + "bundleDependencies": false, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "deprecated": false, + "description": "Get the first path that exists on disk of multiple paths", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/locate-path#readme", + "keywords": [ + "locate", + "path", + "paths", + "file", + "files", + "exists", + "find", + "finder", + "search", + "searcher", + "array", + "iterable", + "iterator" + ], + "license": "MIT", + "name": "locate-path", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/locate-path.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/node_modules/yargs/node_modules/locate-path/readme.md b/node_modules/yargs/node_modules/locate-path/readme.md new file mode 100644 index 0000000000000..a1d2e628328c2 --- /dev/null +++ b/node_modules/yargs/node_modules/locate-path/readme.md @@ -0,0 +1,99 @@ +# locate-path [![Build Status](https://travis-ci.org/sindresorhus/locate-path.svg?branch=master)](https://travis-ci.org/sindresorhus/locate-path) + +> Get the first path that exists on disk of multiple paths + + +## Install + +``` +$ npm install locate-path +``` + + +## Usage + +Here we find the first file that exists on disk, in array order. + +```js +const locatePath = require('locate-path'); + +const files = [ + 'unicorn.png', + 'rainbow.png', // Only this one actually exists on disk + 'pony.png' +]; + +(async () => { + console(await locatePath(files)); + //=> 'rainbow' +})(); +``` + + +## API + +### locatePath(input, [options]) + +Returns a `Promise` for the first path that exists or `undefined` if none exists. + +#### input + +Type: `Iterable<string>` + +Paths to check. + +#### options + +Type: `Object` + +##### concurrency + +Type: `number`<br> +Default: `Infinity`<br> +Minimum: `1` + +Number of concurrently pending promises. + +##### preserveOrder + +Type: `boolean`<br> +Default: `true` + +Preserve `input` order when searching. + +Disable this to improve performance if you don't care about the order. + +##### cwd + +Type: `string`<br> +Default: `process.cwd()` + +Current working directory. + +### locatePath.sync(input, [options]) + +Returns the first path that exists or `undefined` if none exists. + +#### input + +Type: `Iterable<string>` + +Paths to check. + +#### options + +Type: `Object` + +##### cwd + +Same as above. + + +## Related + +- [path-exists](https://github.com/sindresorhus/path-exists) - Check if a path exists + + +## License + +MIT Β© [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs/node_modules/p-limit/index.d.ts b/node_modules/yargs/node_modules/p-limit/index.d.ts new file mode 100644 index 0000000000000..6bbfad4ac7766 --- /dev/null +++ b/node_modules/yargs/node_modules/p-limit/index.d.ts @@ -0,0 +1,38 @@ +export interface Limit { + /** + @param fn - Promise-returning/async function. + @param arguments - Any arguments to pass through to `fn`. Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a lot of functions. + @returns The promise returned by calling `fn(...arguments)`. + */ + <Arguments extends unknown[], ReturnType>( + fn: (...arguments: Arguments) => PromiseLike<ReturnType> | ReturnType, + ...arguments: Arguments + ): Promise<ReturnType>; + + /** + The number of promises that are currently running. + */ + readonly activeCount: number; + + /** + The number of promises that are waiting to run (i.e. their internal `fn` was not called yet). + */ + readonly pendingCount: number; + + /** + Discard pending promises that are waiting to run. + + This might be useful if you want to teardown the queue at the end of your program's lifecycle or discard any function calls referencing an intermediary state of your app. + + Note: This does not cancel promises that are already running. + */ + clearQueue(): void; +} + +/** +Run multiple promise-returning & async functions with limited concurrency. + +@param concurrency - Concurrency limit. Minimum: `1`. +@returns A `limit` function. +*/ +export default function pLimit(concurrency: number): Limit; diff --git a/node_modules/yargs/node_modules/p-limit/index.js b/node_modules/yargs/node_modules/p-limit/index.js new file mode 100644 index 0000000000000..6a72a4c4fc3c7 --- /dev/null +++ b/node_modules/yargs/node_modules/p-limit/index.js @@ -0,0 +1,57 @@ +'use strict'; +const pTry = require('p-try'); + +const pLimit = concurrency => { + if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { + return Promise.reject(new TypeError('Expected `concurrency` to be a number from 1 and up')); + } + + const queue = []; + let activeCount = 0; + + const next = () => { + activeCount--; + + if (queue.length > 0) { + queue.shift()(); + } + }; + + const run = (fn, resolve, ...args) => { + activeCount++; + + const result = pTry(fn, ...args); + + resolve(result); + + result.then(next, next); + }; + + const enqueue = (fn, resolve, ...args) => { + if (activeCount < concurrency) { + run(fn, resolve, ...args); + } else { + queue.push(run.bind(null, fn, resolve, ...args)); + } + }; + + const generator = (fn, ...args) => new Promise(resolve => enqueue(fn, resolve, ...args)); + Object.defineProperties(generator, { + activeCount: { + get: () => activeCount + }, + pendingCount: { + get: () => queue.length + }, + clearQueue: { + value: () => { + queue.length = 0; + } + } + }); + + return generator; +}; + +module.exports = pLimit; +module.exports.default = pLimit; diff --git a/node_modules/yargs/node_modules/p-limit/license b/node_modules/yargs/node_modules/p-limit/license new file mode 100644 index 0000000000000..e7af2f77107d7 --- /dev/null +++ b/node_modules/yargs/node_modules/p-limit/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/yargs/node_modules/p-limit/package.json b/node_modules/yargs/node_modules/p-limit/package.json new file mode 100644 index 0000000000000..1aef677a31751 --- /dev/null +++ b/node_modules/yargs/node_modules/p-limit/package.json @@ -0,0 +1,84 @@ +{ + "_from": "p-limit@^2.0.0", + "_id": "p-limit@2.3.0", + "_inBundle": false, + "_integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "_location": "/yargs/p-limit", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "p-limit@^2.0.0", + "name": "p-limit", + "escapedName": "p-limit", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/yargs/p-locate" + ], + "_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "_shasum": "3dd33c647a214fdfffd835933eb086da0dc21db1", + "_spec": "p-limit@^2.0.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs/node_modules/p-locate", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/p-limit/issues" + }, + "bundleDependencies": false, + "dependencies": { + "p-try": "^2.0.0" + }, + "deprecated": false, + "description": "Run multiple promise-returning & async functions with limited concurrency", + "devDependencies": { + "ava": "^1.2.1", + "delay": "^4.1.0", + "in-range": "^1.0.0", + "random-int": "^1.0.0", + "time-span": "^2.0.0", + "tsd-check": "^0.3.0", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "funding": "https://github.com/sponsors/sindresorhus", + "homepage": "https://github.com/sindresorhus/p-limit#readme", + "keywords": [ + "promise", + "limit", + "limited", + "concurrency", + "throttle", + "throat", + "rate", + "batch", + "ratelimit", + "task", + "queue", + "async", + "await", + "promises", + "bluebird" + ], + "license": "MIT", + "name": "p-limit", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-limit.git" + }, + "scripts": { + "test": "xo && ava && tsd-check" + }, + "version": "2.3.0" +} diff --git a/node_modules/yargs/node_modules/p-limit/readme.md b/node_modules/yargs/node_modules/p-limit/readme.md new file mode 100644 index 0000000000000..64aa476e2370c --- /dev/null +++ b/node_modules/yargs/node_modules/p-limit/readme.md @@ -0,0 +1,101 @@ +# p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit) + +> Run multiple promise-returning & async functions with limited concurrency + +## Install + +``` +$ npm install p-limit +``` + +## Usage + +```js +const pLimit = require('p-limit'); + +const limit = pLimit(1); + +const input = [ + limit(() => fetchSomething('foo')), + limit(() => fetchSomething('bar')), + limit(() => doSomething()) +]; + +(async () => { + // Only one promise is run at once + const result = await Promise.all(input); + console.log(result); +})(); +``` + +## API + +### pLimit(concurrency) + +Returns a `limit` function. + +#### concurrency + +Type: `number`\ +Minimum: `1`\ +Default: `Infinity` + +Concurrency limit. + +### limit(fn, ...args) + +Returns the promise returned by calling `fn(...args)`. + +#### fn + +Type: `Function` + +Promise-returning/async function. + +#### args + +Any arguments to pass through to `fn`. + +Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions. + +### limit.activeCount + +The number of promises that are currently running. + +### limit.pendingCount + +The number of promises that are waiting to run (i.e. their internal `fn` was not called yet). + +### limit.clearQueue() + +Discard pending promises that are waiting to run. + +This might be useful if you want to teardown the queue at the end of your program's lifecycle or discard any function calls referencing an intermediary state of your app. + +Note: This does not cancel promises that are already running. + +## FAQ + +### How is this different from the [`p-queue`](https://github.com/sindresorhus/p-queue) package? + +This package is only about limiting the number of concurrent executions, while `p-queue` is a fully featured queue implementation with lots of different options, introspection, and ability to pause the queue. + +## Related + +- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control +- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions +- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions +- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency +- [More…](https://github.com/sindresorhus/promise-fun) + +--- + +<div align="center"> + <b> + <a href="https://tidelift.com/subscription/pkg/npm-p-limit?utm_source=npm-p-limit&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> + </b> + <br> + <sub> + Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. + </sub> +</div> diff --git a/node_modules/yargs/node_modules/p-locate/index.js b/node_modules/yargs/node_modules/p-locate/index.js new file mode 100644 index 0000000000000..4bd08aad19312 --- /dev/null +++ b/node_modules/yargs/node_modules/p-locate/index.js @@ -0,0 +1,34 @@ +'use strict'; +const pLimit = require('p-limit'); + +class EndError extends Error { + constructor(value) { + super(); + this.value = value; + } +} + +// The input can also be a promise, so we `Promise.resolve()` it +const testElement = (el, tester) => Promise.resolve(el).then(tester); + +// The input can also be a promise, so we `Promise.all()` them both +const finder = el => Promise.all(el).then(val => val[1] === true && Promise.reject(new EndError(val[0]))); + +module.exports = (iterable, tester, opts) => { + opts = Object.assign({ + concurrency: Infinity, + preserveOrder: true + }, opts); + + const limit = pLimit(opts.concurrency); + + // Start all the promises concurrently with optional limit + const items = [...iterable].map(el => [el, limit(testElement, el, tester)]); + + // Check the promises either serially or concurrently + const checkLimit = pLimit(opts.preserveOrder ? 1 : Infinity); + + return Promise.all(items.map(el => checkLimit(finder, el))) + .then(() => {}) + .catch(err => err instanceof EndError ? err.value : Promise.reject(err)); +}; diff --git a/node_modules/yargs/node_modules/p-locate/license b/node_modules/yargs/node_modules/p-locate/license new file mode 100644 index 0000000000000..e7af2f77107d7 --- /dev/null +++ b/node_modules/yargs/node_modules/p-locate/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/yargs/node_modules/p-locate/package.json b/node_modules/yargs/node_modules/p-locate/package.json new file mode 100644 index 0000000000000..b6cefbf4248c5 --- /dev/null +++ b/node_modules/yargs/node_modules/p-locate/package.json @@ -0,0 +1,83 @@ +{ + "_from": "p-locate@^3.0.0", + "_id": "p-locate@3.0.0", + "_inBundle": false, + "_integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "_location": "/yargs/p-locate", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "p-locate@^3.0.0", + "name": "p-locate", + "escapedName": "p-locate", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/yargs/locate-path" + ], + "_resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "_shasum": "322d69a05c0264b25997d9f40cd8a891ab0064a4", + "_spec": "p-locate@^3.0.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs/node_modules/locate-path", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/p-locate/issues" + }, + "bundleDependencies": false, + "dependencies": { + "p-limit": "^2.0.0" + }, + "deprecated": false, + "description": "Get the first fulfilled promise that satisfies the provided testing function", + "devDependencies": { + "ava": "*", + "delay": "^3.0.0", + "in-range": "^1.0.0", + "time-span": "^2.0.0", + "xo": "*" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/p-locate#readme", + "keywords": [ + "promise", + "locate", + "find", + "finder", + "search", + "searcher", + "test", + "array", + "collection", + "iterable", + "iterator", + "race", + "fulfilled", + "fastest", + "async", + "await", + "promises", + "bluebird" + ], + "license": "MIT", + "name": "p-locate", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-locate.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/node_modules/yargs/node_modules/p-locate/readme.md b/node_modules/yargs/node_modules/p-locate/readme.md new file mode 100644 index 0000000000000..3b0173bc4ea78 --- /dev/null +++ b/node_modules/yargs/node_modules/p-locate/readme.md @@ -0,0 +1,88 @@ +# p-locate [![Build Status](https://travis-ci.org/sindresorhus/p-locate.svg?branch=master)](https://travis-ci.org/sindresorhus/p-locate) + +> Get the first fulfilled promise that satisfies the provided testing function + +Think of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find). + + +## Install + +``` +$ npm install p-locate +``` + + +## Usage + +Here we find the first file that exists on disk, in array order. + +```js +const pathExists = require('path-exists'); +const pLocate = require('p-locate'); + +const files = [ + 'unicorn.png', + 'rainbow.png', // Only this one actually exists on disk + 'pony.png' +]; + +(async () => { + const foundPath = await pLocate(files, file => pathExists(file)); + + console.log(foundPath); + //=> 'rainbow' +})(); +``` + +*The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.* + + +## API + +### pLocate(input, tester, [options]) + +Returns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`. + +#### input + +Type: `Iterable<Promise|any>` + +#### tester(element) + +Type: `Function` + +Expected to return a `Promise<boolean>` or boolean. + +#### options + +Type: `Object` + +##### concurrency + +Type: `number`<br> +Default: `Infinity`<br> +Minimum: `1` + +Number of concurrently pending promises returned by `tester`. + +##### preserveOrder + +Type: `boolean`<br> +Default: `true` + +Preserve `input` order when searching. + +Disable this to improve performance if you don't care about the order. + + +## Related + +- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently +- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently +- [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT Β© [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs/node_modules/p-try/index.d.ts b/node_modules/yargs/node_modules/p-try/index.d.ts new file mode 100644 index 0000000000000..2a7319ec2a556 --- /dev/null +++ b/node_modules/yargs/node_modules/p-try/index.d.ts @@ -0,0 +1,39 @@ +declare const pTry: { + /** + Start a promise chain. + + @param fn - The function to run to start the promise chain. + @param arguments - Arguments to pass to `fn`. + @returns The value of calling `fn(...arguments)`. If the function throws an error, the returned `Promise` will be rejected with that error. + + @example + ``` + import pTry = require('p-try'); + + (async () => { + try { + const value = await pTry(() => { + return synchronousFunctionThatMightThrow(); + }); + console.log(value); + } catch (error) { + console.error(error); + } + })(); + ``` + */ + <ValueType, ArgumentsType extends unknown[]>( + fn: (...arguments: ArgumentsType) => PromiseLike<ValueType> | ValueType, + ...arguments: ArgumentsType + ): Promise<ValueType>; + + // TODO: remove this in the next major version, refactor the whole definition to: + // declare function pTry<ValueType, ArgumentsType extends unknown[]>( + // fn: (...arguments: ArgumentsType) => PromiseLike<ValueType> | ValueType, + // ...arguments: ArgumentsType + // ): Promise<ValueType>; + // export = pTry; + default: typeof pTry; +}; + +export = pTry; diff --git a/node_modules/yargs/node_modules/p-try/index.js b/node_modules/yargs/node_modules/p-try/index.js new file mode 100644 index 0000000000000..db858da29252b --- /dev/null +++ b/node_modules/yargs/node_modules/p-try/index.js @@ -0,0 +1,9 @@ +'use strict'; + +const pTry = (fn, ...arguments_) => new Promise(resolve => { + resolve(fn(...arguments_)); +}); + +module.exports = pTry; +// TODO: remove this in the next major version +module.exports.default = pTry; diff --git a/node_modules/yargs/node_modules/p-try/license b/node_modules/yargs/node_modules/p-try/license new file mode 100644 index 0000000000000..e7af2f77107d7 --- /dev/null +++ b/node_modules/yargs/node_modules/p-try/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/yargs/node_modules/p-try/package.json b/node_modules/yargs/node_modules/p-try/package.json new file mode 100644 index 0000000000000..7ed46850f64d4 --- /dev/null +++ b/node_modules/yargs/node_modules/p-try/package.json @@ -0,0 +1,74 @@ +{ + "_from": "p-try@^2.0.0", + "_id": "p-try@2.2.0", + "_inBundle": false, + "_integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "_location": "/yargs/p-try", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "p-try@^2.0.0", + "name": "p-try", + "escapedName": "p-try", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/yargs/p-limit" + ], + "_resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "_shasum": "cb2868540e313d61de58fafbe35ce9004d5540e6", + "_spec": "p-try@^2.0.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs/node_modules/p-limit", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/p-try/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "`Start a promise chain", + "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/p-try#readme", + "keywords": [ + "promise", + "try", + "resolve", + "function", + "catch", + "async", + "await", + "promises", + "settled", + "ponyfill", + "polyfill", + "shim", + "bluebird" + ], + "license": "MIT", + "name": "p-try", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-try.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "2.2.0" +} diff --git a/node_modules/yargs/node_modules/p-try/readme.md b/node_modules/yargs/node_modules/p-try/readme.md new file mode 100644 index 0000000000000..4d7bd64dfcb8b --- /dev/null +++ b/node_modules/yargs/node_modules/p-try/readme.md @@ -0,0 +1,58 @@ +# p-try [![Build Status](https://travis-ci.org/sindresorhus/p-try.svg?branch=master)](https://travis-ci.org/sindresorhus/p-try) + +> Start a promise chain + +[How is it useful?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/) + + +## Install + +``` +$ npm install p-try +``` + + +## Usage + +```js +const pTry = require('p-try'); + +(async () => { + try { + const value = await pTry(() => { + return synchronousFunctionThatMightThrow(); + }); + console.log(value); + } catch (error) { + console.error(error); + } +})(); +``` + + +## API + +### pTry(fn, ...arguments) + +Returns a `Promise` resolved with the value of calling `fn(...arguments)`. If the function throws an error, the returned `Promise` will be rejected with that error. + +Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions. + +#### fn + +The function to run to start the promise chain. + +#### arguments + +Arguments to pass to `fn`. + + +## Related + +- [p-finally](https://github.com/sindresorhus/p-finally) - `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT Β© [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs/node_modules/string-width/index.js b/node_modules/yargs/node_modules/string-width/index.js new file mode 100644 index 0000000000000..33c9d6c06f7a5 --- /dev/null +++ b/node_modules/yargs/node_modules/string-width/index.js @@ -0,0 +1,39 @@ +'use strict'; +const stripAnsi = require('strip-ansi'); +const isFullwidthCodePoint = require('is-fullwidth-code-point'); +const emojiRegex = require('emoji-regex')(); + +module.exports = input => { + input = input.replace(emojiRegex, ' '); + + if (typeof input !== 'string' || input.length === 0) { + return 0; + } + + input = stripAnsi(input); + + let width = 0; + + for (let i = 0; i < input.length; i++) { + const code = input.codePointAt(i); + + // Ignore control characters + if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { + continue; + } + + // Ignore combining characters + if (code >= 0x300 && code <= 0x36F) { + continue; + } + + // Surrogates + if (code > 0xFFFF) { + i++; + } + + width += isFullwidthCodePoint(code) ? 2 : 1; + } + + return width; +}; diff --git a/node_modules/yargs/node_modules/string-width/license b/node_modules/yargs/node_modules/string-width/license new file mode 100644 index 0000000000000..e7af2f77107d7 --- /dev/null +++ b/node_modules/yargs/node_modules/string-width/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/yargs/node_modules/string-width/package.json b/node_modules/yargs/node_modules/string-width/package.json new file mode 100644 index 0000000000000..328f386cdc922 --- /dev/null +++ b/node_modules/yargs/node_modules/string-width/package.json @@ -0,0 +1,88 @@ +{ + "_from": "string-width@^3.0.0", + "_id": "string-width@3.1.0", + "_inBundle": false, + "_integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "_location": "/yargs/string-width", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "string-width@^3.0.0", + "name": "string-width", + "escapedName": "string-width", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "_shasum": "22767be21b62af1081574306f69ac51b62203961", + "_spec": "string-width@^3.0.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/string-width/issues" + }, + "bundleDependencies": false, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "deprecated": false, + "description": "Get the visual width of a string - the number of columns required to display it", + "devDependencies": { + "ava": "^1.0.1", + "xo": "^0.23.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/string-width#readme", + "keywords": [ + "string", + "str", + "character", + "char", + "unicode", + "width", + "visual", + "column", + "columns", + "fullwidth", + "full-width", + "full", + "ansi", + "escape", + "codes", + "cli", + "command-line", + "terminal", + "console", + "cjk", + "chinese", + "japanese", + "korean", + "fixed-width" + ], + "license": "MIT", + "name": "string-width", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/string-width.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.1.0" +} diff --git a/node_modules/yargs/node_modules/string-width/readme.md b/node_modules/yargs/node_modules/string-width/readme.md new file mode 100644 index 0000000000000..d39d95f56cf3f --- /dev/null +++ b/node_modules/yargs/node_modules/string-width/readme.md @@ -0,0 +1,45 @@ +# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) + +> Get the visual width of a string - the number of columns required to display it + +Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + +Useful to be able to measure the actual width of command-line output. + + +## Install + +``` +$ npm install string-width +``` + + +## Usage + +```js +const stringWidth = require('string-width'); + +stringWidth('叀'); +//=> 2 + +stringWidth('\u001b[1m叀\u001b[22m'); +//=> 2 + +stringWidth('a'); +//=> 1 + +stringWidth('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +// => 5 +``` + + +## Related + +- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module +- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string +- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string + + +## License + +MIT Β© [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/yargs/node_modules/strip-ansi/index.d.ts b/node_modules/yargs/node_modules/strip-ansi/index.d.ts new file mode 100644 index 0000000000000..44e954d0c724d --- /dev/null +++ b/node_modules/yargs/node_modules/strip-ansi/index.d.ts @@ -0,0 +1,15 @@ +/** +Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. + +@example +``` +import stripAnsi from 'strip-ansi'; + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` +*/ +export default function stripAnsi(string: string): string; diff --git a/node_modules/yargs/node_modules/strip-ansi/index.js b/node_modules/yargs/node_modules/strip-ansi/index.js new file mode 100644 index 0000000000000..9788c96dfa3b0 --- /dev/null +++ b/node_modules/yargs/node_modules/strip-ansi/index.js @@ -0,0 +1,7 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; + +module.exports = stripAnsi; +module.exports.default = stripAnsi; diff --git a/node_modules/yargs/node_modules/strip-ansi/license b/node_modules/yargs/node_modules/strip-ansi/license new file mode 100644 index 0000000000000..e7af2f77107d7 --- /dev/null +++ b/node_modules/yargs/node_modules/strip-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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/yargs/node_modules/strip-ansi/package.json b/node_modules/yargs/node_modules/strip-ansi/package.json new file mode 100644 index 0000000000000..127cf08941ca8 --- /dev/null +++ b/node_modules/yargs/node_modules/strip-ansi/package.json @@ -0,0 +1,86 @@ +{ + "_from": "strip-ansi@^5.1.0", + "_id": "strip-ansi@5.2.0", + "_inBundle": false, + "_integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "_location": "/yargs/strip-ansi", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "strip-ansi@^5.1.0", + "name": "strip-ansi", + "escapedName": "strip-ansi", + "rawSpec": "^5.1.0", + "saveSpec": null, + "fetchSpec": "^5.1.0" + }, + "_requiredBy": [ + "/yargs/string-width" + ], + "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "_shasum": "8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae", + "_spec": "strip-ansi@^5.1.0", + "_where": "/Users/claudiahdz/npm/cli/node_modules/yargs/node_modules/string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/strip-ansi/issues" + }, + "bundleDependencies": false, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "deprecated": false, + "description": "Strip ANSI escape codes from a string", + "devDependencies": { + "ava": "^1.3.1", + "tsd-check": "^0.5.0", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/chalk/strip-ansi#readme", + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "name": "strip-ansi", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/strip-ansi.git" + }, + "scripts": { + "test": "xo && ava && tsd-check" + }, + "version": "5.2.0" +} diff --git a/node_modules/yargs/node_modules/strip-ansi/readme.md b/node_modules/yargs/node_modules/strip-ansi/readme.md new file mode 100644 index 0000000000000..8681fe8af4424 --- /dev/null +++ b/node_modules/yargs/node_modules/strip-ansi/readme.md @@ -0,0 +1,61 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string + +--- + +<div align="center"> + <b> + <a href="https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=readme">Get professional support for 'strip-ansi' with a Tidelift subscription</a> + </b> + <br> + <sub> + Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. + </sub> +</div> + +--- + +## Install + +``` +$ npm install strip-ansi +``` + + +## Usage + +```js +const stripAnsi = require('strip-ansi'); + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` + + +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/yargs/node_modules/y18n/LICENSE b/node_modules/yargs/node_modules/y18n/LICENSE deleted file mode 100644 index 3c157f0b9d9be..0000000000000 --- a/node_modules/yargs/node_modules/y18n/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2015, Contributors - -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/yargs/node_modules/y18n/README.md b/node_modules/yargs/node_modules/y18n/README.md deleted file mode 100644 index 9859458f20b85..0000000000000 --- a/node_modules/yargs/node_modules/y18n/README.md +++ /dev/null @@ -1,91 +0,0 @@ -# y18n - -[![Build Status][travis-image]][travis-url] -[![Coverage Status][coveralls-image]][coveralls-url] -[![NPM version][npm-image]][npm-url] -[![js-standard-style][standard-image]][standard-url] - -The bare-bones internationalization library used by yargs. - -Inspired by [i18n](https://www.npmjs.com/package/i18n). - -## Examples - -_simple string translation:_ - -```js -var __ = require('y18n').__ - -console.log(__('my awesome string %s', 'foo')) -``` - -output: - -`my awesome string foo` - -_pluralization support:_ - -```js -var __n = require('y18n').__n - -console.log(__n('one fish %s', '%d fishes %s', 2, 'foo')) -``` - -output: - -`2 fishes foo` - -## JSON Language Files - -The JSON language files should be stored in a `./locales` folder. -File names correspond to locales, e.g., `en.json`, `pirate.json`. - -When strings are observed for the first time they will be -added to the JSON file corresponding to the current locale. - -## Methods - -### require('y18n')(config) - -Create an instance of y18n with the config provided, options include: - -* `directory`: the locale directory, default `./locales`. -* `updateFiles`: should newly observed strings be updated in file, default `true`. -* `locale`: what locale should be used. -* `fallbackToLanguage`: should fallback to a language-only file (e.g. `en.json`) - be allowed if a file matching the locale does not exist (e.g. `en_US.json`), - default `true`. - -### y18n.\_\_(str, arg, arg, arg) - -Print a localized string, `%s` will be replaced with `arg`s. - -### y18n.\_\_n(singularString, pluralString, count, arg, arg, arg) - -Print a localized string with appropriate pluralization. If `%d` is provided -in the string, the `count` will replace this placeholder. - -### y18n.setLocale(str) - -Set the current locale being used. - -### y18n.getLocale() - -What locale is currently being used? - -### y18n.updateLocale(obj) - -Update the current locale with the key value pairs in `obj`. - -## License - -ISC - -[travis-url]: https://travis-ci.org/yargs/y18n -[travis-image]: https://img.shields.io/travis/yargs/y18n.svg -[coveralls-url]: https://coveralls.io/github/yargs/y18n -[coveralls-image]: https://img.shields.io/coveralls/yargs/y18n.svg -[npm-url]: https://npmjs.org/package/y18n -[npm-image]: https://img.shields.io/npm/v/y18n.svg -[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg -[standard-url]: https://github.com/feross/standard diff --git a/node_modules/yargs/node_modules/y18n/index.js b/node_modules/yargs/node_modules/y18n/index.js deleted file mode 100644 index 91b159e34298a..0000000000000 --- a/node_modules/yargs/node_modules/y18n/index.js +++ /dev/null @@ -1,172 +0,0 @@ -var fs = require('fs') -var path = require('path') -var util = require('util') - -function Y18N (opts) { - // configurable options. - opts = opts || {} - this.directory = opts.directory || './locales' - this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true - this.locale = opts.locale || 'en' - this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true - - // internal stuff. - this.cache = {} - this.writeQueue = [] -} - -Y18N.prototype.__ = function () { - var args = Array.prototype.slice.call(arguments) - var str = args.shift() - var cb = function () {} // start with noop. - - if (typeof args[args.length - 1] === 'function') cb = args.pop() - cb = cb || function () {} // noop. - - if (!this.cache[this.locale]) this._readLocaleFile() - - // we've observed a new string, update the language file. - if (!this.cache[this.locale][str] && this.updateFiles) { - this.cache[this.locale][str] = str - - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite([this.directory, this.locale, cb]) - } else { - cb() - } - - return util.format.apply(util, [this.cache[this.locale][str] || str].concat(args)) -} - -Y18N.prototype._enqueueWrite = function (work) { - this.writeQueue.push(work) - if (this.writeQueue.length === 1) this._processWriteQueue() -} - -Y18N.prototype._processWriteQueue = function () { - var _this = this - var work = this.writeQueue[0] - - // destructure the enqueued work. - var directory = work[0] - var locale = work[1] - var cb = work[2] - - var languageFile = this._resolveLocaleFile(directory, locale) - var serializedLocale = JSON.stringify(this.cache[locale], null, 2) - - fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) { - _this.writeQueue.shift() - if (_this.writeQueue.length > 0) _this._processWriteQueue() - cb(err) - }) -} - -Y18N.prototype._readLocaleFile = function () { - var localeLookup = {} - var languageFile = this._resolveLocaleFile(this.directory, this.locale) - - try { - localeLookup = JSON.parse(fs.readFileSync(languageFile, 'utf-8')) - } catch (err) { - if (err instanceof SyntaxError) { - err.message = 'syntax error in ' + languageFile - } - - if (err.code === 'ENOENT') localeLookup = {} - else throw err - } - - this.cache[this.locale] = localeLookup -} - -Y18N.prototype._resolveLocaleFile = function (directory, locale) { - var file = path.resolve(directory, './', locale + '.json') - if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) { - // attempt fallback to language only - var languageFile = path.resolve(directory, './', locale.split('_')[0] + '.json') - if (this._fileExistsSync(languageFile)) file = languageFile - } - return file -} - -// this only exists because fs.existsSync() "will be deprecated" -// see https://nodejs.org/api/fs.html#fs_fs_existssync_path -Y18N.prototype._fileExistsSync = function (file) { - try { - return fs.statSync(file).isFile() - } catch (err) { - return false - } -} - -Y18N.prototype.__n = function () { - var args = Array.prototype.slice.call(arguments) - var singular = args.shift() - var plural = args.shift() - var quantity = args.shift() - - var cb = function () {} // start with noop. - if (typeof args[args.length - 1] === 'function') cb = args.pop() - - if (!this.cache[this.locale]) this._readLocaleFile() - - var str = quantity === 1 ? singular : plural - if (this.cache[this.locale][singular]) { - str = this.cache[this.locale][singular][quantity === 1 ? 'one' : 'other'] - } - - // we've observed a new string, update the language file. - if (!this.cache[this.locale][singular] && this.updateFiles) { - this.cache[this.locale][singular] = { - one: singular, - other: plural - } - - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite([this.directory, this.locale, cb]) - } else { - cb() - } - - // if a %d placeholder is provided, add quantity - // to the arguments expanded by util.format. - var values = [str] - if (~str.indexOf('%d')) values.push(quantity) - - return util.format.apply(util, values.concat(args)) -} - -Y18N.prototype.setLocale = function (locale) { - this.locale = locale -} - -Y18N.prototype.getLocale = function () { - return this.locale -} - -Y18N.prototype.updateLocale = function (obj) { - if (!this.cache[this.locale]) this._readLocaleFile() - - for (var key in obj) { - this.cache[this.locale][key] = obj[key] - } -} - -module.exports = function (opts) { - var y18n = new Y18N(opts) - - // bind all functions to y18n, so that - // they can be used in isolation. - for (var key in y18n) { - if (typeof y18n[key] === 'function') { - y18n[key] = y18n[key].bind(y18n) - } - } - - return y18n -} diff --git a/node_modules/yargs/node_modules/y18n/package.json b/node_modules/yargs/node_modules/y18n/package.json deleted file mode 100644 index 89e1b7c57fbab..0000000000000 --- a/node_modules/yargs/node_modules/y18n/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "y18n@^3.2.1", - "_id": "y18n@3.2.1", - "_inBundle": false, - "_integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "_location": "/yargs/y18n", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "y18n@^3.2.1", - "name": "y18n", - "escapedName": "y18n", - "rawSpec": "^3.2.1", - "saveSpec": null, - "fetchSpec": "^3.2.1" - }, - "_requiredBy": [ - "/yargs" - ], - "_resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "_shasum": "6d15fba884c08679c0d77e88e7759e811e07fa41", - "_spec": "y18n@^3.2.1", - "_where": "/Users/rebecca/code/npm/node_modules/yargs", - "author": { - "name": "Ben Coe", - "email": "ben@npmjs.com" - }, - "bugs": { - "url": "https://github.com/yargs/y18n/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "the bare-bones internationalization library used by yargs", - "devDependencies": { - "chai": "^3.4.1", - "coveralls": "^2.11.6", - "mocha": "^2.3.4", - "nyc": "^6.1.1", - "rimraf": "^2.5.0", - "standard": "^5.4.1" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/yargs/y18n", - "keywords": [ - "i18n", - "internationalization", - "yargs" - ], - "license": "ISC", - "main": "index.js", - "name": "y18n", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/yargs/y18n.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "pretest": "standard", - "test": "nyc mocha" - }, - "version": "3.2.1" -} diff --git a/node_modules/yargs/package.json b/node_modules/yargs/package.json index fd0a1265c23dd..3facc8afe3446 100644 --- a/node_modules/yargs/package.json +++ b/node_modules/yargs/package.json @@ -1,65 +1,73 @@ { - "_from": "yargs@^11.0.0", - "_id": "yargs@11.1.1", + "_from": "yargs@^14.2.3", + "_id": "yargs@14.2.3", "_inBundle": false, - "_integrity": "sha512-PRU7gJrJaXv3q3yQZ/+/X6KBswZiaQ+zOmdprZcouPYtQgvNU35i+68M4b1ZHLZtYFT5QObFLV+ZkmJYcwKdiw==", + "_integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", "_location": "/yargs", - "_phantomChildren": {}, + "_phantomChildren": { + "emoji-regex": "7.0.3", + "path-exists": "3.0.0" + }, "_requested": { "type": "range", "registry": true, - "raw": "yargs@^11.0.0", + "raw": "yargs@^14.2.3", "name": "yargs", "escapedName": "yargs", - "rawSpec": "^11.0.0", + "rawSpec": "^14.2.3", "saveSpec": null, - "fetchSpec": "^11.0.0" + "fetchSpec": "^14.2.3" }, "_requiredBy": [ "/libnpx" ], - "_resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.1.tgz", - "_shasum": "5052efe3446a4df5ed669c995886cc0f13702766", - "_spec": "yargs@^11.0.0", - "_where": "/Users/mperrotte/npminc/cli/node_modules/libnpx", + "_resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", + "_shasum": "1a1c3edced1afb2a2fea33604bc6d1d8d688a414", + "_spec": "yargs@^14.2.3", + "_where": "/Users/claudiahdz/npm/cli/node_modules/libnpx", "bugs": { "url": "https://github.com/yargs/yargs/issues" }, "bundleDependencies": false, + "contributors": [ + { + "name": "Yargs Contributors", + "url": "https://github.com/yargs/yargs/graphs/contributors" + } + ], "dependencies": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.1.0", + "cliui": "^5.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^2.0.0", + "string-width": "^3.0.0", "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" + "y18n": "^4.0.0", + "yargs-parser": "^15.0.1" }, "deprecated": false, "description": "yargs the modern, pirate-themed, successor to optimist.", "devDependencies": { - "chai": "^4.1.2", - "chalk": "^1.1.3", - "coveralls": "^2.11.11", - "cpr": "^2.0.0", + "chai": "^4.2.0", + "chalk": "^2.4.2", + "coveralls": "^3.0.3", + "cpr": "^3.0.1", "cross-spawn": "^6.0.4", - "es6-promise": "^4.0.2", + "es6-promise": "^4.2.5", "hashish": "0.0.4", - "mocha": "^3.0.1", - "nyc": "^11.2.1", - "rimraf": "^2.5.0", - "standard": "^8.6.0", - "standard-version": "^4.2.0", - "which": "^1.2.9", + "mocha": "^5.2.0", + "nyc": "^14.1.0", + "rimraf": "^2.6.3", + "standard": "^12.0.1", + "standard-version": "^7.0.0", + "which": "^1.3.1", "yargs-test-extends": "^1.0.1" }, "engine": { - "node": ">=4" + "node": ">=6" }, "files": [ "index.js", @@ -67,9 +75,10 @@ "lib", "locales", "completion.sh.hbs", + "completion.zsh.hbs", "LICENSE" ], - "homepage": "http://yargs.js.org/", + "homepage": "https://yargs.js.org/", "keywords": [ "argument", "args", @@ -84,18 +93,18 @@ "name": "yargs", "repository": { "type": "git", - "url": "git+ssh://git@github.com/yargs/yargs.git" + "url": "git+https://github.com/yargs/yargs.git" }, "scripts": { "coverage": "nyc report --reporter=text-lcov | coveralls", - "posttest": "standard", + "pretest": "standard", "release": "standard-version", - "test": "nyc --cache mocha --require ./test/before.js --timeout=8000 --check-leaks" + "test": "nyc --cache mocha --require ./test/before.js --timeout=12000 --check-leaks" }, "standard": { "ignore": [ "**/example/**" ] }, - "version": "11.1.1" + "version": "14.2.3" } diff --git a/node_modules/yargs/yargs.js b/node_modules/yargs/yargs.js index 38f1b2ea6e67f..fdc8a095a97dc 100644 --- a/node_modules/yargs/yargs.js +++ b/node_modules/yargs/yargs.js @@ -11,6 +11,7 @@ const Y18n = require('y18n') const objFilter = require('./lib/obj-filter') const setBlocking = require('set-blocking') const applyExtends = require('./lib/apply-extends') +const { globalMiddlewareFactory } = require('./lib/middleware') const YError = require('./lib/yerror') exports = module.exports = Yargs @@ -21,6 +22,7 @@ function Yargs (processArgs, cwd, parentRequire) { let command = null let completion = null let groups = {} + let globalMiddleware = [] let output = '' let preservedGroups = {} let usage = null @@ -31,14 +33,26 @@ function Yargs (processArgs, cwd, parentRequire) { updateFiles: false }) + self.middleware = globalMiddlewareFactory(globalMiddleware, self) + if (!cwd) cwd = process.cwd() - self.$0 = process.argv - .slice(0, 2) + self.scriptName = function (scriptName) { + self.customScriptName = true + self.$0 = scriptName + return self + } + + // ignore the node bin, specify this in your + // bin file with #!/usr/bin/env node + if (/\b(node|iojs|electron)(\.exe)?$/.test(process.argv[0])) { + self.$0 = process.argv.slice(1, 2) + } else { + self.$0 = process.argv.slice(0, 1) + } + + self.$0 = self.$0 .map((x, i) => { - // ignore the node bin, specify this in your - // bin file with #!/usr/bin/env node - if (i === 0 && /\b(node|iojs)(\.exe)?$/.test(x)) return const b = rebase(cwd, x) return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x }) @@ -80,20 +94,24 @@ function Yargs (processArgs, cwd, parentRequire) { }) }) - // preserve all groups not set to local. - preservedGroups = Object.keys(groups).reduce((acc, groupName) => { - const keys = groups[groupName].filter(key => !(key in localLookup)) - if (keys.length > 0) { - acc[groupName] = keys - } - return acc - }, {}) + // add all groups not set to local to preserved groups + Object.assign( + preservedGroups, + Object.keys(groups).reduce((acc, groupName) => { + const keys = groups[groupName].filter(key => !(key in localLookup)) + if (keys.length > 0) { + acc[groupName] = keys + } + return acc + }, {}) + ) // groups can now be reset groups = {} const arrayOptions = [ 'array', 'boolean', 'string', 'skipValidation', - 'count', 'normalize', 'number' + 'count', 'normalize', 'number', + 'hiddenOptions' ] const objectOptions = [ @@ -116,7 +134,7 @@ function Yargs (processArgs, cwd, parentRequire) { // instances of all our helpers -- otherwise just reset. usage = usage ? usage.reset(localLookup) : Usage(self, y18n) validation = validation ? validation.reset(localLookup) : Validation(self, usage, y18n) - command = command ? command.reset() : Command(self, usage, validation) + command = command ? command.reset() : Command(self, usage, validation, globalMiddleware) if (!completion) completion = Completion(self, usage, command) completionCommand = null @@ -130,9 +148,10 @@ function Yargs (processArgs, cwd, parentRequire) { self.resetOptions() // temporary hack: allow "freezing" of reset-able state for parse(msg, cb) - let frozen + let frozens = [] function freeze () { - frozen = {} + let frozen = {} + frozens.push(frozen) frozen.options = options frozen.configObjects = options.configObjects.slice(0) frozen.exitProcess = exitProcess @@ -146,8 +165,11 @@ function Yargs (processArgs, cwd, parentRequire) { frozen.exitError = exitError frozen.hasOutput = hasOutput frozen.parsed = self.parsed + frozen.parseFn = parseFn + frozen.parseContext = parseContext } function unfreeze () { + let frozen = frozens.pop() options = frozen.options options.configObjects = frozen.configObjects exitProcess = frozen.exitProcess @@ -161,9 +183,8 @@ function Yargs (processArgs, cwd, parentRequire) { command.unfreeze() strict = frozen.strict completionCommand = frozen.completionCommand - parseFn = null - parseContext = null - frozen = undefined + parseFn = frozen.parseFn + parseContext = frozen.parseContext } self.boolean = function (keys) { @@ -217,6 +238,7 @@ function Yargs (processArgs, cwd, parentRequire) { function populateParserHintArray (type, keys, value) { keys = [].concat(keys) keys.forEach((key) => { + key = sanitizeKey(key) options[type].push(key) }) } @@ -272,8 +294,8 @@ function Yargs (processArgs, cwd, parentRequire) { function populateParserHintObject (builder, isArray, type, key, value) { if (Array.isArray(key)) { + const temp = Object.create(null) // an array of keys with one value ['x', 'y', 'z'], function parse () {} - const temp = {} key.forEach((k) => { temp[k] = value }) @@ -284,6 +306,7 @@ function Yargs (processArgs, cwd, parentRequire) { builder(k, key[k]) }) } else { + key = sanitizeKey(key) // a single key value pair 'x', parse() {} if (isArray) { options[type][key] = (options[type][key] || []).concat(value) @@ -293,6 +316,13 @@ function Yargs (processArgs, cwd, parentRequire) { } } + // TODO(bcoe): in future major versions move more objects towards + // Object.create(null): + function sanitizeKey (key) { + if (key === '__proto__') return '___proto___' + return key + } + function deleteFromParserHintObject (optionKey) { // delete from all parsing hints: // boolean, array, key, alias, etc. @@ -312,7 +342,7 @@ function Yargs (processArgs, cwd, parentRequire) { argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length) // allow a config object to be provided directly. if (typeof key === 'object') { - key = applyExtends(key, cwd) + key = applyExtends(key, cwd, self.getParserConfiguration()['deep-merge-config']) options.configObjects = (options.configObjects || []).concat(key) return self } @@ -486,7 +516,7 @@ function Yargs (processArgs, cwd, parentRequire) { // If an object exists in the key, add it to options.configObjects if (obj[key] && typeof obj[key] === 'object') { - conf = applyExtends(obj[key], rootPath || cwd) + conf = applyExtends(obj[key], rootPath || cwd, self.getParserConfiguration()['deep-merge-config']) options.configObjects = (options.configObjects || []).concat(conf) } @@ -524,7 +554,15 @@ function Yargs (processArgs, cwd, parentRequire) { let parseContext = null self.parse = function parse (args, shortCircuit, _parseFn) { argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length) - if (typeof args === 'undefined') args = processArgs + freeze() + if (typeof args === 'undefined') { + const argv = self._parseArgs(processArgs) + const tmpParsed = self.parsed + unfreeze() + // TODO: remove this compatibility hack when we release yargs@15.x: + self.parsed = tmpParsed + return argv + } // a context object can optionally be provided, this allows // additional information to be passed to a command handler. @@ -544,7 +582,6 @@ function Yargs (processArgs, cwd, parentRequire) { // skipping validation, etc. if (!shortCircuit) processArgs = args - freeze() if (parseFn) exitProcess = false const parsed = self._parseArgs(args, shortCircuit) @@ -657,8 +694,9 @@ function Yargs (processArgs, cwd, parentRequire) { } const desc = opt.describe || opt.description || opt.desc - if (!opt.hidden) { - self.describe(key, desc) + self.describe(key, desc) + if (opt.hidden) { + self.hide(key) } if (opt.requiresArg) { @@ -677,8 +715,8 @@ function Yargs (processArgs, cwd, parentRequire) { } // .positional() only supports a subset of the configuration - // options availble to .option(). - const supportedOpts = ['default', 'implies', 'normalize', + // options available to .option(). + const supportedOpts = ['default', 'defaultDescription', 'implies', 'normalize', 'choices', 'conflicts', 'coerce', 'type', 'describe', 'desc', 'description', 'alias'] opts = objFilter(opts, (k, v) => { @@ -748,6 +786,14 @@ function Yargs (processArgs, cwd, parentRequire) { } self.getStrict = () => strict + let parserConfig = {} + self.parserConfiguration = function parserConfiguration (config) { + argsert('<object>', [config], arguments.length) + parserConfig = config + return self + } + self.getParserConfiguration = () => parserConfig + self.showHelp = function (level) { argsert('[string|function]', [level], arguments.length) if (!self.parsed) self._parseArgs(processArgs) // run parser, if it has not already been executed. @@ -824,6 +870,28 @@ function Yargs (processArgs, cwd, parentRequire) { return self } + const defaultShowHiddenOpt = 'show-hidden' + options.showHiddenOpt = defaultShowHiddenOpt + self.addShowHiddenOpt = self.showHidden = function addShowHiddenOpt (opt, msg) { + argsert('[string|boolean] [string]', [opt, msg], arguments.length) + + if (arguments.length === 1) { + if (opt === false) return self + } + + const showHiddenOpt = typeof opt === 'string' ? opt : defaultShowHiddenOpt + self.boolean(showHiddenOpt) + self.describe(showHiddenOpt, msg || usage.deferY18nLookup('Show hidden options')) + options.showHiddenOpt = showHiddenOpt + return self + } + + self.hide = function hide (key) { + argsert('<string|object>', [key], arguments.length) + options.hiddenOptions.push(key) + return self + } + self.showHelpOnFail = function showHelpOnFail (enabled, message) { argsert('[boolean|string] [string]', [enabled, message], arguments.length) usage.showHelpOnFail(enabled, message) @@ -854,9 +922,9 @@ function Yargs (processArgs, cwd, parentRequire) { } // register the completion command. - completionCommand = cmd || 'completion' + completionCommand = cmd || completionCommand || 'completion' if (!desc && desc !== false) { - desc = 'generate bash completion script' + desc = 'generate completion script' } self.command(completionCommand, desc) @@ -866,10 +934,10 @@ function Yargs (processArgs, cwd, parentRequire) { return self } - self.showCompletionScript = function ($0) { - argsert('[string]', [$0], arguments.length) + self.showCompletionScript = function ($0, cmd) { + argsert('[string] [string]', [$0, cmd], arguments.length) $0 = $0 || self.$0 - _logger.log(completion.generateCompletionScript($0, completionCommand)) + _logger.log(completion.generateCompletionScript($0, cmd || completionCommand || 'completion')) return self } @@ -966,14 +1034,27 @@ function Yargs (processArgs, cwd, parentRequire) { enumerable: true }) - self._parseArgs = function parseArgs (args, shortCircuit, _skipValidation, commandIndex) { - let skipValidation = !!_skipValidation + self._parseArgs = function parseArgs (args, shortCircuit, _calledFromCommand, commandIndex) { + let skipValidation = !!_calledFromCommand args = args || processArgs options.__ = y18n.__ - options.configuration = pkgUp()['yargs'] || {} + options.configuration = self.getParserConfiguration() + // Deprecated + let pkgConfig = pkgUp()['yargs'] + if (pkgConfig) { + console.warn('Configuring yargs through package.json is deprecated and will be removed in a future major release, please use the JS API instead.') + options.configuration = Object.assign({}, pkgConfig, options.configuration) + } + + const populateDoubleDash = !!options.configuration['populate--'] + const config = Object.assign({}, options.configuration, { + 'populate--': true + }) + const parsed = Parser.detailed(args, Object.assign({}, options, { + configuration: config + })) - const parsed = Parser.detailed(args, options) let argv = parsed.argv if (parseContext) argv = Object.assign({}, argv, parseContext) const aliases = parsed.aliases @@ -988,7 +1069,7 @@ function Yargs (processArgs, cwd, parentRequire) { // are two passes through the parser. If completion // is being performed short-circuit on the first pass. if (shortCircuit) { - return argv + return (populateDoubleDash || _calledFromCommand) ? argv : self._copyDoubleDash(argv) } // if there's a handler associated with a @@ -1006,8 +1087,11 @@ function Yargs (processArgs, cwd, parentRequire) { argv[helpOpt] = true } } + const handlerKeys = command.getCommands() - const skipDefaultCommand = argv[helpOpt] && (handlerKeys.length > 1 || handlerKeys[0] !== '$0') + const requestCompletions = completion.completionKey in argv + const skipRecommendation = argv[helpOpt] || requestCompletions + const skipDefaultCommand = skipRecommendation && (handlerKeys.length > 1 || handlerKeys[0] !== '$0') if (argv._.length) { if (handlerKeys.length) { @@ -1015,11 +1099,11 @@ function Yargs (processArgs, cwd, parentRequire) { for (let i = (commandIndex || 0), cmd; argv._[i] !== undefined; i++) { cmd = String(argv._[i]) if (~handlerKeys.indexOf(cmd) && cmd !== completionCommand) { - setPlaceholderKeys(argv) // commands are executed using a recursive algorithm that executes // the deepest command first; we keep track of the position in the // argv._ array that is currently being executed. - return command.runCommand(cmd, self, parsed, i + 1) + const innerArgv = command.runCommand(cmd, self, parsed, i + 1) + return populateDoubleDash ? innerArgv : self._copyDoubleDash(innerArgv) } else if (!firstUnknownCommand && cmd !== completionCommand) { firstUnknownCommand = cmd break @@ -1028,31 +1112,31 @@ function Yargs (processArgs, cwd, parentRequire) { // run the default command, if defined if (command.hasDefaultCommand() && !skipDefaultCommand) { - setPlaceholderKeys(argv) - return command.runCommand(null, self, parsed) + const innerArgv = command.runCommand(null, self, parsed) + return populateDoubleDash ? innerArgv : self._copyDoubleDash(innerArgv) } // recommend a command if recommendCommands() has // been enabled, and no commands were found to execute - if (recommendCommands && firstUnknownCommand && !argv[helpOpt]) { + if (recommendCommands && firstUnknownCommand && !skipRecommendation) { validation.recommendCommands(firstUnknownCommand, handlerKeys) } } // generate a completion script for adding to ~/.bashrc. - if (completionCommand && ~argv._.indexOf(completionCommand) && !argv[completion.completionKey]) { + if (completionCommand && ~argv._.indexOf(completionCommand) && !requestCompletions) { if (exitProcess) setBlocking(true) self.showCompletionScript() self.exit(0) } } else if (command.hasDefaultCommand() && !skipDefaultCommand) { - setPlaceholderKeys(argv) - return command.runCommand(null, self, parsed) + const innerArgv = command.runCommand(null, self, parsed) + return populateDoubleDash ? innerArgv : self._copyDoubleDash(innerArgv) } // we must run completions first, a user might // want to complete the --help or --version option. - if (completion.completionKey in argv) { + if (requestCompletions) { if (exitProcess) setBlocking(true) // we allow for asynchronous completions, @@ -1065,7 +1149,7 @@ function Yargs (processArgs, cwd, parentRequire) { self.exit(0) }) - return setPlaceholderKeys(argv) + return (populateDoubleDash || _calledFromCommand) ? argv : self._copyDoubleDash(argv) } // Handle 'help' and 'version' options @@ -1100,7 +1184,7 @@ function Yargs (processArgs, cwd, parentRequire) { // if we're executed via bash completion, don't // bother with validation. - if (!argv[completion.completionKey]) { + if (!requestCompletions) { self._runValidation(argv, aliases, {}, parsed.error) } } @@ -1109,11 +1193,27 @@ function Yargs (processArgs, cwd, parentRequire) { else throw err } - return setPlaceholderKeys(argv) + return (populateDoubleDash || _calledFromCommand) ? argv : self._copyDoubleDash(argv) + } + + // to simplify the parsing of positionals in commands, + // we temporarily populate '--' rather than _, with arguments + // after the '--' directive. After the parse, we copy these back. + self._copyDoubleDash = function (argv) { + if (!argv._ || !argv['--']) return argv + argv._.push.apply(argv._, argv['--']) + + // TODO(bcoe): refactor command parsing such that this delete is not + // necessary: https://github.com/yargs/yargs/issues/1482 + try { + delete argv['--'] + } catch (_err) {} + + return argv } self._runValidation = function runValidation (argv, aliases, positionalMap, parseErrors) { - if (parseErrors) throw new YError(parseErrors.message) + if (parseErrors) throw new YError(parseErrors.message || parseErrors) validation.nonOptionCount(argv) validation.requiredArguments(argv) if (strict) validation.unknownArguments(argv, aliases, positionalMap) @@ -1127,24 +1227,15 @@ function Yargs (processArgs, cwd, parentRequire) { if (!detectLocale) return try { - const osLocale = require('os-locale') - self.locale(osLocale.sync({ spawn: false })) + const { env } = process + const locale = env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE || 'en_US' + self.locale(locale.replace(/[.:].*/, '')) } catch (err) { // if we explode looking up locale just noop // we'll keep using the default language 'en'. } } - function setPlaceholderKeys (argv) { - Object.keys(options.key).forEach((key) => { - // don't set placeholder keys for dot - // notation options 'foo.bar'. - if (~key.indexOf('.')) return - if (typeof argv[key] === 'undefined') argv[key] = undefined - }) - return argv - } - // an app should almost always have --version and --help, // if you *really* want to disable this use .help(false)/.version(false). self.help() diff --git a/package-lock.json b/package-lock.json index 7261d0b2f13a1..75011acab33fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "npm", - "version": "6.14.5", + "version": "6.14.8", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -136,49 +136,6 @@ "integrity": "sha512-KyqT0kkdxgbGys9mvo/1Mgdt/LGvUFPCZIK9pWPIfOM2mYzMDd/eVYy4sMP1YqvVI129k0alxRyM53H2MAs/Nw==", "dev": true }, - "@types/caseless": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", - "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==", - "dev": true - }, - "@types/node": { - "version": "13.9.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.1.tgz", - "integrity": "sha512-E6M6N0blf/jiZx8Q3nb0vNaswQeEyn0XlupO+xN6DtJ6r6IT4nXrTry7zhIfYvFCl3/8Cu6WIysmUBKiqV0bqQ==", - "dev": true - }, - "@types/request": { - "version": "2.48.4", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.4.tgz", - "integrity": "sha512-W1t1MTKYR8PxICH+A4HgEIPuAC3sbljoEVfyZbeFJJDbr30guDspJri2XOaM2E+Un7ZjrihaDi7cf6fPa2tbgw==", - "dev": true, - "requires": { - "@types/caseless": "*", - "@types/node": "*", - "@types/tough-cookie": "*", - "form-data": "^2.5.0" - }, - "dependencies": { - "form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - } - } - }, - "@types/tough-cookie": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-2.3.6.tgz", - "integrity": "sha512-wHNBMnkoEBiRAd3s8KTKwIuO9biFtTf0LehITzBhSco+HQI0xkXZbLOD55SW3Aqw3oUkHstkm5SPv58yaAdFPQ==", - "dev": true - }, "JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", @@ -194,9 +151,9 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", "dev": true }, "acorn-jsx": { @@ -463,9 +420,9 @@ } }, "bin-links": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-1.1.7.tgz", - "integrity": "sha512-/eaLaTu7G7/o7PV04QPy1HRT65zf+1tFkPGv0sPTV0tRwufooYBQO3zrcyGgm+ja+ZtBf2GEuKjDRJ2pPG+yqA==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-1.1.8.tgz", + "integrity": "sha512-KgmVfx+QqggqP9dA3iIc5pA4T1qEEEL+hOhOhNPaUm77OTrJoOXE/C05SJLNJe6m/2wUK7F1tDSou7n5TfCDzQ==", "requires": { "bluebird": "^3.5.3", "cmd-shim": "^3.0.0", @@ -524,12 +481,6 @@ "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", "dev": true }, - "browser-request": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/browser-request/-/browser-request-0.3.3.tgz", - "integrity": "sha1-ns5bWsqJopkyJC4Yv5M975h2zBc=", - "dev": true - }, "buffer-from": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", @@ -735,26 +686,41 @@ "dev": true }, "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.1.0" } } } @@ -764,28 +730,6 @@ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" }, - "cloudant-follow": { - "version": "0.18.2", - "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.18.2.tgz", - "integrity": "sha512-qu/AmKxDqJds+UmT77+0NbM7Yab2K3w0qSeJRzsq5dRWJTEJdWeb+XpG4OpKuTE9RKOa/Awn2gR3TTnvNr3TeA==", - "dev": true, - "requires": { - "browser-request": "~0.3.0", - "debug": "^4.0.1", - "request": "^2.88.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, "cmd-shim": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-3.0.3.tgz", @@ -805,12 +749,6 @@ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, - "coffee-script": { - "version": "1.12.7", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz", - "integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==", - "dev": true - }, "color-convert": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", @@ -853,13 +791,6 @@ "delayed-stream": "~1.0.0" } }, - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true, - "optional": true - }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -916,11 +847,11 @@ } }, "configstore": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", - "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.5.tgz", + "integrity": "sha512-nlOhI4+fdzoK5xmJ+NY+1gZK56bwEaWZr8fYuXohZ9Vkc1o3a4T/R3M+yE/w7x/ZVJ1zF8c+oaOvF0dztdUgmA==", "requires": { - "dot-prop": "^4.1.0", + "dot-prop": "^4.2.1", "graceful-fs": "^4.1.2", "make-dir": "^1.0.0", "unique-string": "^1.0.0", @@ -928,35 +859,6 @@ "xdg-basedir": "^3.0.0" } }, - "connect": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", - "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", - "dev": true, - "requires": { - "debug": "2.6.9", - "finalhandler": "1.1.2", - "parseurl": "~1.3.3", - "utils-merge": "1.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", @@ -1016,21 +918,6 @@ "spdx-expression-validate": "^2.0.0" } }, - "couchapp": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/couchapp/-/couchapp-0.11.0.tgz", - "integrity": "sha1-8J3DFdYQ9vbnn9DK9eXWJLDMeD4=", - "dev": true, - "requires": { - "coffee-script": "*", - "connect": "*", - "http-proxy": "0.8.7", - "nano": "*", - "request": "*", - "url": "*", - "watch": "~0.8.0" - } - }, "coveralls": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.4.tgz", @@ -1046,9 +933,9 @@ }, "dependencies": { "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true } } @@ -1285,9 +1172,9 @@ "dev": true }, "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz", + "integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==", "requires": { "is-obj": "^1.0.0" } @@ -1352,23 +1239,10 @@ "resolved": "https://registry.npmjs.org/editor/-/editor-1.0.0.tgz", "integrity": "sha1-YMf4e9YrzGqJT6jM1q+3gjok90I=" }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" }, "encoding": { "version": "0.1.12", @@ -1413,12 +1287,6 @@ "is-arrayish": "^0.2.1" } }, - "errs": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/errs/-/errs-0.3.2.tgz", - "integrity": "sha1-eYCZstvTfKK8dJ5TinwTB9C1BJk=", - "dev": true - }, "es-abstract": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", @@ -1460,12 +1328,6 @@ "es6-promise": "^4.0.3" } }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -1836,38 +1698,6 @@ "object-assign": "^4.0.1" } }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, "find-cache-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", @@ -1964,6 +1794,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, "requires": { "locate-path": "^2.0.0" } @@ -2262,9 +2093,9 @@ "integrity": "sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==" }, "gentle-fs": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/gentle-fs/-/gentle-fs-2.3.0.tgz", - "integrity": "sha512-3k2CgAmPxuz7S6nKK+AqFE2AdM1QuwqKLPKzIET3VRwK++3q96MsNFobScDjlCrq97ZJ8y5R725MOlm6ffUCjg==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/gentle-fs/-/gentle-fs-2.3.1.tgz", + "integrity": "sha512-OlwBBwqCFPcjm33rF2BjW+Pr6/ll2741l+xooiwTCeaX2CA1ZuclavyMBe0/KlR21/XGsgY6hzEQZ15BdNa13Q==", "requires": { "aproba": "^1.1.2", "chownr": "^1.1.2", @@ -2292,9 +2123,9 @@ } }, "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-stdin": { "version": "6.0.0", @@ -2381,42 +2212,6 @@ "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, - "handlebars": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", - "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", - "dev": true, - "requires": { - "neo-async": "^2.6.0", - "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" - }, - "dependencies": { - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - } - } - }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -2494,30 +2289,17 @@ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==" }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, "http-cache-semantics": { "version": "3.8.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==" }, - "http-proxy": { - "version": "0.8.7", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-0.8.7.tgz", - "integrity": "sha1-p7xThhgJLNJu0ZHkYlkzuu9t6A4=", - "dev": true, - "requires": { - "colors": "0.x.x", - "optimist": "0.3.x", - "pkginfo": "0.2.x" - }, - "dependencies": { - "colors": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", - "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=", - "dev": true - } - } - }, "http-proxy-agent": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", @@ -2669,11 +2451,6 @@ } } }, - "invert-kv": { - "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", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -2944,12 +2721,12 @@ } }, "istanbul-reports": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", - "integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz", + "integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==", "dev": true, "requires": { - "handlebars": "^4.1.2" + "html-escaper": "^2.0.0" } }, "js-tokens": { @@ -2959,9 +2736,9 @@ "dev": true }, "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -2980,12 +2757,6 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, - "json": { - "version": "9.0.6", - "resolved": "https://registry.npmjs.org/json/-/json-9.0.6.tgz", - "integrity": "sha1-eXLCpaSKQmeNsnMMfCxO5uTiRYU=", - "dev": true - }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -3056,14 +2827,6 @@ "resolved": "https://registry.npmjs.org/lazy-property/-/lazy-property-1.0.0.tgz", "integrity": "sha1-hN3Es3Bnm6i9TNz6TAa0PVcREUc=" }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "requires": { - "invert-kv": "^2.0.0" - } - }, "lcov-parse": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", @@ -3081,9 +2844,9 @@ } }, "libcipm": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/libcipm/-/libcipm-4.0.7.tgz", - "integrity": "sha512-fTq33otU3PNXxxCTCYCYe7V96o59v/o7bvtspmbORXpgFk+wcWrGf5x6tBgui5gCed/45/wtPomBsZBYm5KbIw==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/libcipm/-/libcipm-4.0.8.tgz", + "integrity": "sha512-IN3hh2yDJQtZZ5paSV4fbvJg4aHxCCg5tcZID/dSVlTuUiWktsgaldVljJv6Z5OUlYspx6xQkbR0efNodnIrOA==", "requires": { "bin-links": "^1.1.2", "bluebird": "^3.5.1", @@ -3091,7 +2854,7 @@ "find-npm-prefix": "^1.0.2", "graceful-fs": "^4.1.11", "ini": "^1.3.5", - "lock-verify": "^2.0.2", + "lock-verify": "^2.1.0", "mkdirp": "^0.5.1", "npm-lifecycle": "^3.0.0", "npm-logical-tree": "^1.2.1", @@ -3250,9 +3013,9 @@ } }, "libnpx": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/libnpx/-/libnpx-10.2.2.tgz", - "integrity": "sha512-ujaYToga1SAX5r7FU5ShMFi88CWpY75meNZtr6RtEyv4l2ZK3+Wgvxq2IqlwWBiDZOqhumdeiocPS1aKrCMe3A==", + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/libnpx/-/libnpx-10.2.4.tgz", + "integrity": "sha512-BPc0D1cOjBeS8VIBKUu5F80s6njm0wbVt7CsGMrIcJ+SI7pi7V0uVPGpEMH9H5L8csOcclTxAXFE2VAsJXUhfA==", "requires": { "dotenv": "^5.0.1", "npm-package-arg": "^6.0.0", @@ -3261,7 +3024,7 @@ "update-notifier": "^2.3.0", "which": "^1.3.0", "y18n": "^4.0.0", - "yargs": "^11.0.0" + "yargs": "^14.2.3" } }, "licensee": { @@ -3319,6 +3082,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, "requires": { "p-locate": "^2.0.0", "path-exists": "^3.0.0" @@ -3342,9 +3106,9 @@ } }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", "dev": true }, "lodash._baseindexof": { @@ -3489,43 +3253,27 @@ "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" } }, "marked": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.6.3.tgz", - "integrity": "sha512-Fqa7eq+UaxfMriqzYLayfqAE40WN03jf+zHjT18/uXNuzjq3TY0XTbrAoPeqSJrAmPz11VuUA+kBPYOhHt9oOQ==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", + "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", "dev": true }, "marked-man": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/marked-man/-/marked-man-0.6.0.tgz", - "integrity": "sha512-lqzGe2uPo0KPO5J5yyfZ6PbEpZS6VIMHIzltXNzdwTNBysD0pNLtTaGrtT5R4aFT8UaVR3Fuz9rN3SEFYnea5Q==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/marked-man/-/marked-man-0.7.0.tgz", + "integrity": "sha512-zxK5E4jbuARALc+fIUAanM2njVGnrd9YvKrqoDHUg2XwNLJijo39EzMIg59LecHBHsIHNtPqepqnJp4SmL/EVg==", "dev": true }, "meant": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/meant/-/meant-1.0.1.tgz", - "integrity": "sha512-UakVLFjKkbbUwNWJ2frVLnnAtbb7D7DsloxRd3s/gDpI8rdv8W5Hp3NaDb+POBI1fQdeussER6NB8vpcRURvlg==" - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "requires": { - "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==" - } - } + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/meant/-/meant-1.0.2.tgz", + "integrity": "sha512-KN+1uowN/NK+sT/Lzx7WSGIj2u+3xe5n2LbwObfjOhPZiA+cCfCm6idVl0RkEfjThkw5XJ96CyRcanq6GmKtUg==" }, "merge-source-map": { "version": "1.1.0", @@ -3572,10 +3320,9 @@ } }, "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "minipass": { "version": "2.3.3", @@ -3676,42 +3423,12 @@ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" }, - "nano": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/nano/-/nano-8.2.2.tgz", - "integrity": "sha512-1/rAvpd1J0Os0SazgutWQBx2buAq3KwJpmdIylPDqOwy73iQeAhTSCq3uzbGzvcNNW16Vv/BLXkk+DYcdcH+aw==", - "dev": true, - "requires": { - "@types/request": "^2.48.4", - "cloudant-follow": "^0.18.2", - "debug": "^4.1.1", - "errs": "^0.3.2", - "request": "^2.88.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", - "dev": true - }, "nested-error-stacks": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz", @@ -3721,7 +3438,8 @@ "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true }, "node-fetch-npm": { "version": "2.0.2", @@ -3782,9 +3500,9 @@ } }, "npm-audit-report": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-1.3.2.tgz", - "integrity": "sha512-abeqS5ONyXNaZJPGAf6TOUMNdSe1Y6cpc9MLBRn+CuUoYbfdca6AxOyXVlfIv9OgKX+cacblbG5w7A6ccwoTPw==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/npm-audit-report/-/npm-audit-report-1.3.3.tgz", + "integrity": "sha512-8nH/JjsFfAWMvn474HB9mpmMjrnKb1Hx/oTAdjv4PT9iZBvBxiZ+wtDUapHCJwLqYGQVPaAfs+vL5+5k9QndXw==", "requires": { "cli-table3": "^0.5.0", "console-control-strings": "^1.1.0" @@ -3818,9 +3536,9 @@ "dev": true }, "npm-lifecycle": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-3.1.4.tgz", - "integrity": "sha512-tgs1PaucZwkxECGKhC/stbEgFyc3TGh2TJcg2CDr6jbvQRdteHNhmMeljRzpe4wgFAXQADoy1cSqqi7mtiAa5A==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-3.1.5.tgz", + "integrity": "sha512-lDLVkjfZmvmfvpvBzA4vzee9cn+Me4orq0QF8glbswJVEbIcSNWib7qGOffolysc3teCqbbPZZkzbr3GQZTL1g==", "requires": { "byline": "^5.0.0", "graceful-fs": "^4.1.15", @@ -3883,29 +3601,10 @@ "npm-registry-fetch": "^4.0.0" } }, - "npm-registry-couchapp": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/npm-registry-couchapp/-/npm-registry-couchapp-2.7.4.tgz", - "integrity": "sha512-8ZZ4zKvRqGhBw3qYGoLhFTltjz7V2ntO+qqrSwMBeYfSIoHt1w/xqqSMG76gM1jhEzv+/WWSJYvOpA8D2Qt7dw==", - "dev": true, - "requires": { - "couchapp": "~0.11.0", - "json": "~9.0.2", - "semver": "4" - }, - "dependencies": { - "semver": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", - "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", - "dev": true - } - } - }, "npm-registry-fetch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.4.tgz", - "integrity": "sha512-6jb34hX/iYNQebqWUHtU8YF6Cjb1H6ouTFPClYsyiW6lpFkljTpdeftm53rRojtja1rKAvKNIIiTS5Sjpw4wsA==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.7.tgz", + "integrity": "sha512-cny9v0+Mq6Tjz+e0erFAB+RYJ/AVGzkjnISiobqP8OWj9c9FLoZZu8/SPSKJWE17F1tk4018wfjV+ZbIbqC7fQ==", "requires": { "JSONStream": "^1.3.4", "bluebird": "^3.5.1", @@ -3917,9 +3616,9 @@ }, "dependencies": { "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" } } }, @@ -4234,9 +3933,9 @@ } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -4269,15 +3968,6 @@ "es-abstract": "^1.5.1" } }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4300,23 +3990,6 @@ "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", "integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==" }, - "optimist": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", - "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=", - "dev": true, - "requires": { - "wordwrap": "~0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - } - } - }, "optionator": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", @@ -4336,44 +4009,6 @@ "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, - "os-locale": { - "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": "^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": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -4406,7 +4041,8 @@ "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true }, "p-finally": { "version": "1.0.0", @@ -4416,12 +4052,14 @@ "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==" + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "dev": true }, "p-limit": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "dev": true, "requires": { "p-try": "^1.0.0" } @@ -4430,6 +4068,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, "requires": { "p-limit": "^1.1.0" } @@ -4437,7 +4076,8 @@ "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true }, "package-hash": { "version": "3.0.0", @@ -4553,12 +4193,6 @@ "error-ex": "^1.2.0" } }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true - }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -4701,12 +4335,6 @@ } } }, - "pkginfo": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.2.3.tgz", - "integrity": "sha1-cjnEKl72wwuPMoQ52bn/cQQkkPg=", - "dev": true - }, "pluralize": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", @@ -4857,12 +4485,6 @@ "strict-uri-encode": "^2.0.0" } }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, "qw": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/qw/-/qw-1.0.1.tgz", @@ -4877,13 +4499,6 @@ "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - } } }, "read": { @@ -5048,9 +4663,9 @@ } }, "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, "require-uncached": { "version": "1.0.3", @@ -5395,9 +5010,9 @@ } }, "spdx-license-ids": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", - "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==" + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==" }, "spdx-osi": { "version": "3.0.0", @@ -5492,19 +5107,13 @@ }, "dependencies": { "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true } } }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", - "dev": true - }, "stream-each": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", @@ -5730,19 +5339,6 @@ "brace-expansion": "^1.0.0" } }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, "once": { "version": "1.4.0", "bundled": true, @@ -6245,26 +5841,6 @@ "integrity": "sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==", "dev": true }, - "uglify-js": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", - "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", - "dev": true, - "optional": true, - "requires": { - "commander": "~2.20.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - } - } - }, "uid-number": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", @@ -6342,24 +5918,6 @@ "xdg-basedir": "^3.0.0" } }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, "url-parse-lax": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", @@ -6386,12 +5944,6 @@ "object.getownpropertydescriptors": "^2.0.3" } }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, "uuid": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", @@ -6424,12 +5976,6 @@ "extsprintf": "^1.2.0" } }, - "watch": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/watch/-/watch-0.8.0.tgz", - "integrity": "sha1-G7DupT3v5uYh6cjGPANYAH7L28w=", - "dev": true - }, "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -6494,22 +6040,41 @@ } }, "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" }, "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" } } } @@ -6565,37 +6130,105 @@ "dev": true }, "yargs": { - "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": "^3.1.0", + "version": "14.2.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", + "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", + "requires": { + "cliui": "^5.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^2.0.0", + "string-width": "^3.0.0", "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" + "y18n": "^4.0.0", + "yargs-parser": "^15.0.1" }, "dependencies": { - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } } } }, "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz", + "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==", "requires": { - "camelcase": "^4.1.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + } } }, "yn": { diff --git a/package.json b/package.json index bfbed9ea0bab4..c9df68e3314da 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "6.14.5", + "version": "6.14.8", "name": "npm", "description": "a package manager for JavaScript", "keywords": [ @@ -39,7 +39,7 @@ "ansistyles": "~0.1.3", "aproba": "^2.0.0", "archy": "~1.0.0", - "bin-links": "^1.1.7", + "bin-links": "^1.1.8", "bluebird": "^3.5.5", "byte-size": "^5.0.1", "cacache": "^12.0.3", @@ -59,7 +59,7 @@ "find-npm-prefix": "^1.0.2", "fs-vacuum": "~1.2.10", "fs-write-stream-atomic": "~1.0.10", - "gentle-fs": "^2.3.0", + "gentle-fs": "^2.3.1", "glob": "^7.1.6", "graceful-fs": "^4.2.4", "has-unicode": "~2.0.1", @@ -73,14 +73,14 @@ "is-cidr": "^3.0.0", "json-parse-better-errors": "^1.0.2", "lazy-property": "~1.0.0", - "libcipm": "^4.0.7", + "libcipm": "^4.0.8", "libnpm": "^3.0.1", "libnpmaccess": "^3.0.2", "libnpmhook": "^5.0.3", "libnpmorg": "^1.0.1", "libnpmsearch": "^2.0.2", "libnpmteam": "^1.0.2", - "libnpx": "^10.2.2", + "libnpx": "^10.2.4", "lock-verify": "^2.1.0", "lockfile": "^1.0.4", "lodash._baseuniq": "~4.6.0", @@ -89,22 +89,22 @@ "lodash.uniq": "~4.5.0", "lodash.without": "~4.4.0", "lru-cache": "^5.1.1", - "meant": "~1.0.1", + "meant": "^1.0.2", "mississippi": "^3.0.0", "mkdirp": "^0.5.5", "move-concurrently": "^1.0.1", "node-gyp": "^5.1.0", "nopt": "^4.0.3", "normalize-package-data": "^2.5.0", - "npm-audit-report": "^1.3.2", + "npm-audit-report": "^1.3.3", "npm-cache-filename": "~1.0.2", "npm-install-checks": "^3.0.2", - "npm-lifecycle": "^3.1.4", + "npm-lifecycle": "^3.1.5", "npm-package-arg": "^6.1.1", "npm-packlist": "^1.4.8", "npm-pick-manifest": "^3.0.2", "npm-profile": "^4.0.4", - "npm-registry-fetch": "^4.0.4", + "npm-registry-fetch": "^4.0.7", "npm-user-validate": "~1.0.0", "npmlog": "~4.1.2", "once": "~1.4.0", @@ -278,9 +278,8 @@ "deep-equal": "^1.0.1", "get-stream": "^4.1.0", "licensee": "^7.0.3", - "marked": "^0.6.3", - "marked-man": "^0.6.0", - "npm-registry-couchapp": "^2.7.4", + "marked": "^0.7.0", + "marked-man": "^0.7.0", "npm-registry-mock": "^1.3.1", "require-inject": "^1.4.4", "sprintf-js": "^1.1.2", diff --git a/test/common-tap.js b/test/common-tap.js index 9e38c7690fa71..4ba92973ccfb2 100644 --- a/test/common-tap.js +++ b/test/common-tap.js @@ -283,3 +283,8 @@ Environment.prototype.extend = function (env) { } return self } + +var reEscape = /[\\[\](){}*?+.^$|]/g +exports.escapeForRe = function (string) { + return string.replace(reEscape, '\\$&') +} diff --git a/test/tap/doctor-ping-registry-404.js b/test/tap/doctor-ping-registry-404.js new file mode 100644 index 0000000000000..00a772a7c0dac --- /dev/null +++ b/test/tap/doctor-ping-registry-404.js @@ -0,0 +1,108 @@ +'use strict' +/* eslint-disable camelcase */ +const common = require('../common-tap.js') +const http = require('http') +const mr = require('npm-registry-mock') +const npm = require('../../lib/npm.js') +const path = require('path') +const Tacks = require('tacks') +const t = require('tap') +const which = require('which') + +const Dir = Tacks.Dir +const File = Tacks.File + +const ROOT = common.pkg +const CACHE = common.cache +const TMP = path.join(ROOT, 'tmp') +const PREFIX = path.join(ROOT, 'global-prefix') +const PKG = path.join(ROOT, 'pkg') + +let server, nodeServer +let node_url + +t.teardown(() => { + if (server) { + server.close() + } + if (nodeServer) { + nodeServer.close() + } +}) + +t.test('setup', (t) => { + const port = common.port + 2 + nodeServer = http.createServer(function (q, s) { + s.end(JSON.stringify([{ lts: true, version: '0.0.0' }])) + }) + nodeServer.listen(port, () => { + node_url = 'http://localhost:' + port + mr({ port: common.port }, (err, s) => { + t.ifError(err, 'registry mocked successfully') + server = s + server.get('/-/ping?write=true').reply(404) + server.get('/npm').reply( + 200, + JSON.stringify({ + name: 'npm', + 'dist-tags': { latest: '0.0.0' }, + versions: { + '0.0.0': { + name: 'npm', + version: '0.0.0', + _shrinkwrap: null, + _hasShrinkwrap: false, + dist: { + shasum: 'deadbeef', + tarball: 'https://reg.eh/npm-0.0.0.tgz' + } + } + } + }) + ) + const fixture = new Tacks( + Dir({ + [path.basename(PKG)]: Dir({ + 'package.json': File({ name: 'npm', version: '0.0.0' }) + }), + [path.basename(PREFIX)]: Dir({}) + }) + ) + fixture.create(ROOT) + npm.load( + { + registry: common.registry, + loglevel: 'silent', + cache: CACHE, + tmp: TMP, + prefix: PREFIX + }, + (err) => { + t.ifError(err, 'npm loaded successfully') + t.pass('all set up') + t.done() + } + ) + }) + }) +}) + +t.test('npm doctor ping returns 404 (or any other error)', function (t) { + npm.commands.doctor({ 'node-url': node_url }, true, function (e, list) { + t.ifError(e, 'npm loaded successfully') + t.same(list.length, 9, 'list should have 9 prop') + t.same(list[0][1], 'failed', 'npm ping') + t.same(list[1][1], 'v' + npm.version, 'npm -v') + t.same(list[2][1], process.version, 'node -v') + t.same(list[3][1], common.registry + '/', 'npm config get registry') + t.same(list[5][1], 'ok', 'Perms check on cached files') + t.same(list[6][1], 'ok', 'Perms check on global node_modules') + t.same(list[7][1], 'ok', 'Perms check on local node_modules') + t.match(list[8][1], /^verified \d+ tarballs?$/, 'Cache verified') + which('git', function (e, resolvedPath) { + t.ifError(e, 'git command is installed') + t.same(list[4][1], resolvedPath, 'which git') + t.done() + }) + }) +}) diff --git a/test/tap/install-lifecycle.js b/test/tap/install-lifecycle.js new file mode 100644 index 0000000000000..c5b0fd35a020e --- /dev/null +++ b/test/tap/install-lifecycle.js @@ -0,0 +1,35 @@ +var fs = require('graceful-fs') +var path = require('path') +var test = require('tap').test +var common = require('../common-tap.js') +var pkg = common.pkg + +test('npm install execution order', function (t) { + const packageJson = { + name: 'life-test', + version: '0.0.1', + description: 'Test for npm install execution order', + scripts: { + install: 'true', + preinstall: 'true', + preshrinkwrap: 'true', + postinstall: 'true', + postshrinkwrap: 'true', + shrinkwrap: 'true' + } + } + fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify(packageJson), 'utf8') + common.npm(['install', '--loglevel=error'], { cwd: pkg }, function (err, code, stdout, stderr) { + if (err) throw err + + t.comment(stdout) + t.comment(stderr) + + const steps = ['preinstall', 'install', 'postinstall', 'preshrinkwrap', 'shrinkwrap', 'postshrinkwrap'] + const expectedLines = steps.map(function (step) { + return '> ' + packageJson.name + '@' + packageJson.version + ' ' + step + }) + t.match(stdout, new RegExp(expectedLines.map(common.escapeForRe).join('(.|\n)*'))) + t.end() + }) +}) diff --git a/test/tap/lockfile-empty-dep-value.js b/test/tap/lockfile-empty-dep-value.js new file mode 100644 index 0000000000000..1e30889fcb522 --- /dev/null +++ b/test/tap/lockfile-empty-dep-value.js @@ -0,0 +1,68 @@ +'use strict' + +const common = require('../common-tap.js') +const path = require('path') +const test = require('tap').test + +const Tacks = require('tacks') +const File = Tacks.File +const Dir = Tacks.Dir + +const basedir = common.pkg +const testdir = path.join(basedir, 'testdir') + +const fixture = new Tacks(Dir({ + cache: Dir(), + global: Dir(), + tmp: Dir(), + testdir: Dir({ + 'package-lock.json': File({ + name: 'http-locks', + version: '1.0.0', + lockfileVersion: 1, + requires: true, + dependencies: { + minimist: {} + } + }), + 'package.json': File({ + name: 'http-locks', + version: '1.0.0', + dependencies: { + minimist: common.registry + '/minimist/-/minimist-0.0.5.tgz' + } + }) + }) +})) + +function setup () { + cleanup() + fixture.create(basedir) +} + +function cleanup () { + fixture.remove(basedir) +} + +test('setup', function (t) { + setup() + t.done() +}) + +test('raises error to regenerate the lock file', function (t) { + common.npm(['install'], {cwd: testdir}, function (err, code, stdout, stderr) { + if (err) throw err + t.match( + stderr, + 'npm ERR! Something went wrong. Regenerate the package-lock.json with "npm install".', + 'returns message to regenerate package-lock' + ) + + t.done() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.done() +}) diff --git a/test/tap/ls.js b/test/tap/ls.js index b3bdbc613cbc8..9dd3779b3d170 100644 --- a/test/tap/ls.js +++ b/test/tap/ls.js @@ -169,6 +169,40 @@ test('cleanup', function (t) { t.done() }) +test('ls parseable long', function (t) { + var fixture = new Tacks( + Dir({ + 'npm-test-ls': Dir({ + 'package.json': File({ + name: 'npm-test-ls', + version: '1.0.0', + dependencies: { + 'dep': 'file:../dep' + } + }) + }), + 'dep': Dir({ + 'package.json': File({ + name: 'dep', + version: '1.0.0' + }) + }) + }) + ) + withFixture(t, fixture, function (done) { + common.npm([ + 'ls', '--parseable', '--long' + ], { + cwd: pkgpath + }, function (err, code, stdout, stderr) { + t.ifErr(err, 'ls succeeded') + t.equal(0, code, 'exit 0 on ls') + t.notMatch(stdout, /undefined/, 'must not output undefined for non-symlinked items') + done() + }) + }) +}) + function withFixture (t, fixture, tester) { fixture.create(fixturepath) common.npm(['install'], { diff --git a/test/tap/publish-invalid-semver-tag.js b/test/tap/publish-invalid-semver-tag.js index b5d499f377248..9c2f40813b06e 100644 --- a/test/tap/publish-invalid-semver-tag.js +++ b/test/tap/publish-invalid-semver-tag.js @@ -28,7 +28,7 @@ function resetPackage (options) { chownSync(CACHE_DIR, sudoUID, sudoGID) } - fs.writeFileSync(path.resolve(PKG_DIR, 'package.json'), DEFAULT_PKG) + fs.writeFileSync(path.resolve(PKG_DIR, 'package.json'), JSON.stringify(DEFAULT_PKG)) } test('setup', function (t) { diff --git a/test/tap/referer.js b/test/tap/referer.js index 8c3dbed72c319..6df676db62e27 100644 --- a/test/tap/referer.js +++ b/test/tap/referer.js @@ -21,3 +21,63 @@ test('should send referer http header', function (t) { }) }) }) + +test('should redact user secret from hook add command', function (t) { + http.createServer(function (q, s) { + t.equal(q.headers.referer, 'hook add ~zkat [REDACTED] [REDACTED]') + s.statusCode = 204 + s.end() + this.close() + }).listen(common.port, function () { + var reg = `http://localhost:${common.port}` + var args = [ 'hook', 'add', '~zkat', 'https://example.com', 'sekrit', '--registry', reg ] + common.npm(args, {}, function (er, code) { + if (er) { + throw er + } + // should not have ended nicely, since we returned an error + t.ok(code) + t.end() + }) + }) +}) + +test('should redact user secret from hook up command', function (t) { + http.createServer(function (q, s) { + t.equal(q.headers.referer, 'hook up ~zkat [REDACTED] [REDACTED]') + s.statusCode = 204 + s.end() + this.close() + }).listen(common.port, function () { + var reg = `http://localhost:${common.port}` + var args = [ 'hook', 'up', '~zkat', 'https://example.com', 'sekrit', '--registry', reg ] + common.npm(args, {}, function (er, code) { + if (er) { + throw er + } + // should not have ended nicely, since we returned an error + t.ok(code) + t.end() + }) + }) +}) + +test('should redact user secret from hook update command', function (t) { + http.createServer(function (q, s) { + t.equal(q.headers.referer, 'hook update ~zkat [REDACTED] [REDACTED]') + s.statusCode = 204 + s.end() + this.close() + }).listen(common.port, function () { + var reg = `http://localhost:${common.port}` + var args = [ 'hook', 'update', '~zkat', 'https://example.com', 'sekrit', '--registry', reg ] + common.npm(args, {}, function (er, code) { + if (er) { + throw er + } + // should not have ended nicely, since we returned an error + t.ok(code) + t.end() + }) + }) +}) diff --git a/test/tap/semver-doc.js b/test/tap/semver-doc.js index 1cc978201c7a4..fe2077660c1dd 100644 --- a/test/tap/semver-doc.js +++ b/test/tap/semver-doc.js @@ -5,8 +5,10 @@ test('semver doc is up to date', function (t) { var moddoc = path.join(__dirname, '../../node_modules/semver/README.md') var mydoc = path.join(__dirname, '../../docs/content/using-npm/semver.md') var fs = require('fs') - var mod = fs.readFileSync(moddoc, 'utf8').replace(/semver\(1\)/, 'semver(7)') + var mod = fs.readFileSync(moddoc, 'utf8') + mod = mod.substr(mod.match(/^## Install$/m).index) var my = fs.readFileSync(mydoc, 'utf8') + my = my.substr(my.match(/^## Install$/m).index) t.equal(my, mod) t.end() }) diff --git a/test/tap/shrinkwrap-empty-dep-value.js b/test/tap/shrinkwrap-empty-dep-value.js new file mode 100644 index 0000000000000..3a264f5a10054 --- /dev/null +++ b/test/tap/shrinkwrap-empty-dep-value.js @@ -0,0 +1,66 @@ +'use strict' + +const common = require('../common-tap.js') +const path = require('path') +const test = require('tap').test + +const Tacks = require('tacks') +const File = Tacks.File +const Dir = Tacks.Dir + +const basedir = common.pkg +const testdir = path.join(basedir, 'testdir') + +const fixture = new Tacks(Dir({ + cache: Dir(), + global: Dir(), + tmp: Dir(), + testdir: Dir({ + 'npm-shrinkwrap.json': File({ + name: 'http-locks', + version: '0.0.0', + dependencies: { + minimist: {} + } + }), + 'package.json': File({ + name: 'http-locks', + version: '1.0.0', + dependencies: { + minimist: common.registry + '/minimist/-/minimist-0.0.5.tgz' + } + }) + }) +})) + +function setup () { + cleanup() + fixture.create(basedir) +} + +function cleanup () { + fixture.remove(basedir) +} + +test('setup', function (t) { + setup() + t.done() +}) + +test('raises error to regenerate the shrinkwrap', function (t) { + common.npm(['install'], {cwd: testdir}, function (err, code, stdout, stderr) { + if (err) throw err + t.match( + stderr, + 'npm ERR! If using a shrinkwrap, regenerate with "npm shrinkwrap".', + 'returns message to regenerate shrinkwrap' + ) + + t.done() + }) +}) + +test('cleanup', function (t) { + cleanup() + t.done() +}) diff --git a/test/tap/whoami.js b/test/tap/whoami.js index 9f4bf4266b74c..aabf5b282160f 100644 --- a/test/tap/whoami.js +++ b/test/tap/whoami.js @@ -36,7 +36,7 @@ test('npm whoami with basic auth', function (t) { ) }) -test('npm whoami with bearer auth', { timeout: 6000 }, function (t) { +test('npm whoami with bearer auth', { timeout: 8000 }, function (t) { var s = '//localhost:' + common.port + '/:_authToken = wombat-developers-union\n' fs.writeFileSync(FIXTURE_PATH, s, 'ascii')