From 2c93e33c444cde38bc4b12bcfcfa3986921eac76 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Sun, 25 Aug 2019 07:27:10 +0200 Subject: [PATCH 1/4] Handle namespaces that reexport themselves (#3077) * Create test * Separate namespace initialisation from creation to prevent an infinite recursion * Throw for unexpected warnings in form tests This should also reduce test noise a lot * Update dependencies and fix vulnerability * Add test that guesses variable names to improve coverage again * Test that warnings can be cast to string * Retrigger CI --- package-lock.json | 1016 ++++++++++------- package.json | 16 +- rollup.config.js | 6 +- src/Module.ts | 8 +- src/ast/variables/NamespaceVariable.ts | 11 +- test/form/index.js | 13 +- .../object-expression/_config.js | 3 +- .../compact-multiple-imports/_config.js | 4 + test/form/samples/compact/_config.js | 6 +- .../samples/conflicting-imports/_config.js | 8 +- .../custom-module-context-function/_config.js | 1 + .../samples/custom-module-context/_config.js | 1 + .../_config.js | 1 + .../dedupes-external-imports/_config.js | 1 + .../prune-pure-unused-import-array/_config.js | 9 +- .../_config.js | 10 +- .../prune-pure-unused-import/_config.js | 5 +- .../_config.js | 1 + .../transform-bundle-plugin/_config.js | 3 +- .../export-all-before-named/_config.js | 5 +- .../samples/export-default-import/_config.js | 5 +- .../samples/external-deshadowing/_config.js | 1 + .../external-deshadowing/_expected/iife.js | 2 +- .../external-deshadowing/_expected/umd.js | 2 +- .../external-export-tracing/_config.js | 1 + .../external-import-alias-shadow/_config.js | 5 +- test/form/samples/external-imports/_config.js | 11 +- .../external-namespace-and-named/_config.js | 5 +- .../external-namespace-reexport/_config.js | 1 + .../samples/guessed-global-names/_config.js | 15 + .../guessed-global-names/_expected/amd.js | 7 + .../guessed-global-names/_expected/cjs.js | 11 + .../guessed-global-names/_expected/es.js | 7 + .../guessed-global-names/_expected/iife.js | 8 + .../guessed-global-names/_expected/system.js | 22 + .../guessed-global-names/_expected/umd.js | 11 + .../form/samples/guessed-global-names/main.js | 7 + .../_config.js | 1 + .../form/samples/import-expression/_config.js | 5 +- .../_config.js | 5 +- .../_config.js | 1 + test/form/samples/import-namespace/_config.js | 6 +- .../import-specifier-deshadowing/_config.js | 5 +- .../_config.js | 3 +- .../samples/interop-false-reexport/_config.js | 6 +- test/form/samples/interop-false/_config.js | 7 +- test/form/samples/intro-and-outro/_config.js | 1 + .../namespace-import-reexport/_config.js | 1 + .../samples/namespace-self-import/_config.js | 1 + .../samples/namespace-tostringtag/_config.js | 1 + .../_config.js | 4 + .../no-external-live-bindings/_config.js | 4 + test/form/samples/paths-function/_config.js | 5 +- test/form/samples/paths-relative/_config.js | 5 +- test/form/samples/paths/_config.js | 5 +- test/form/samples/prefer-const/_config.js | 6 +- .../samples/proper-this-context/_config.js | 3 +- .../samples/re-export-aliasing/_config.js | 5 +- .../_config.js | 6 +- .../re-export-default-external/_config.js | 5 +- test/form/samples/reexport-self/_config.js | 4 + test/form/samples/reexport-self/_expected.js | 3 + test/form/samples/reexport-self/main.js | 3 + test/form/samples/reexport-self/other.js | 5 + .../reexports-from-external/_config.js | 5 +- .../reexports-name-from-external/_config.js | 5 +- .../removes-unused-babel-helpers/_config.js | 3 +- .../render-chunk-plugin-sourcemaps/_config.js | 3 +- .../_config.js | 5 +- .../samples/self-calling-function/_config.js | 3 +- .../side-effect-es5-classes/_config.js | 3 +- test/form/samples/side-effect-l/_config.js | 3 +- test/form/samples/side-effect-m/_config.js | 3 +- test/form/samples/side-effect-q/_config.js | 3 +- test/form/samples/side-effect-r/_config.js | 3 +- test/form/samples/side-effect-s/_config.js | 3 +- .../_config.js | 4 +- .../tree-shake-curried-functions/_config.js | 7 +- .../samples/undefined-properties/_config.js | 3 +- test/form/samples/unused-import/_config.js | 5 +- test/form/samples/url-external/_config.js | 5 +- test/function/index.js | 1 - .../samples/warnings-to-string/_config.js | 19 + .../samples/warnings-to-string/main.js | 1 + 84 files changed, 975 insertions(+), 467 deletions(-) create mode 100644 test/form/samples/guessed-global-names/_config.js create mode 100644 test/form/samples/guessed-global-names/_expected/amd.js create mode 100644 test/form/samples/guessed-global-names/_expected/cjs.js create mode 100644 test/form/samples/guessed-global-names/_expected/es.js create mode 100644 test/form/samples/guessed-global-names/_expected/iife.js create mode 100644 test/form/samples/guessed-global-names/_expected/system.js create mode 100644 test/form/samples/guessed-global-names/_expected/umd.js create mode 100644 test/form/samples/guessed-global-names/main.js create mode 100644 test/form/samples/reexport-self/_config.js create mode 100644 test/form/samples/reexport-self/_expected.js create mode 100644 test/form/samples/reexport-self/main.js create mode 100644 test/form/samples/reexport-self/other.js create mode 100644 test/function/samples/warnings-to-string/_config.js create mode 100644 test/function/samples/warnings-to-string/main.js diff --git a/package-lock.json b/package-lock.json index 2d4ed90320b..c8a01f7c2d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -274,13 +274,6 @@ "@types/node": "*" } }, - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", - "dev": true, - "optional": true - }, "acorn": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.0.0.tgz", @@ -299,9 +292,9 @@ "dev": true }, "acorn-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", - "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.2.tgz", + "integrity": "sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw==", "dev": true }, "acorn-walk": { @@ -415,30 +408,12 @@ "default-require-extensions": "^2.0.0" } }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true, - "optional": true - }, "archy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", "dev": true }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -768,9 +743,9 @@ "dev": true }, "chokidar": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.6.tgz", - "integrity": "sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g==", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", "dev": true, "requires": { "anymatch": "^2.0.0", @@ -787,13 +762,6 @@ "upath": "^1.1.1" } }, - "chownr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", - "dev": true, - "optional": true - }, "ci-info": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", @@ -1014,9 +982,9 @@ "dev": true }, "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", "dev": true }, "concat-map": { @@ -1025,13 +993,6 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true, - "optional": true - }, "console-group": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/console-group/-/console-group-0.3.3.tgz", @@ -1282,20 +1243,6 @@ } } }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", - "dev": true, - "optional": true - }, "diff": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", @@ -1435,9 +1382,9 @@ "dev": true }, "eslint": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.1.0.tgz", - "integrity": "sha512-QhrbdRD7ofuV09IuE2ySWBz0FyXCq0rriLTZXZqaWSI79CVtHVRdkFuFTViiqzZhkCgfOh9USpriuGN2gIpZDQ==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.2.1.tgz", + "integrity": "sha512-ES7BzEzr0Q6m5TK9i+/iTpKjclXitOdDK4vT07OqbkBT2/VcN/gO9EL1C4HlK3TAOXYv2ItcmbVR9jO1MR0fJg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -1447,9 +1394,9 @@ "debug": "^4.0.1", "doctrine": "^3.0.0", "eslint-scope": "^5.0.0", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^6.0.0", + "eslint-utils": "^1.4.2", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.0", "esquery": "^1.0.1", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", @@ -1501,17 +1448,6 @@ "dev": true, "requires": { "is-glob": "^4.0.1" - }, - "dependencies": { - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - } } }, "ms": { @@ -1614,37 +1550,29 @@ } }, "eslint-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.0.tgz", - "integrity": "sha512-7ehnzPaP5IIEh1r1tkjuIrxqhNkzUJa9z3R92tLJdZIVdWaczEhr3EbhGtsMrVxi1KeR8qA7Off6SWc5WNQqyQ==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz", + "integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==", "dev": true, "requires": { "eslint-visitor-keys": "^1.0.0" } }, "eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", "dev": true }, "espree": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.0.0.tgz", - "integrity": "sha512-lJvCS6YbCn3ImT3yKkPe0+tJ+mH6ljhGNjHQH9mRtiO6gjhVAOhVXW1yjnwqGwTkK3bGbye+hb00nFNmu0l/1Q==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.0.tgz", + "integrity": "sha512-boA7CHRLlVWUSg3iL5Kmlt/xT3Q+sXnKoRYYzj1YeM10A76TEJBbotV5pKbnK42hEUIr121zTv+QLRM5LsCPXQ==", "dev": true, "requires": { - "acorn": "^6.0.7", + "acorn": "^7.0.0", "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" - }, - "dependencies": { - "acorn": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", - "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", - "dev": true - } + "eslint-visitor-keys": "^1.1.0" } }, "esprima": { @@ -1672,9 +1600,9 @@ } }, "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, "estree-walker": { @@ -1883,15 +1811,6 @@ "requires": { "is-glob": "^4.0.1" } - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } } } }, @@ -2137,16 +2056,6 @@ "universalify": "^0.1.0" } }, - "fs-minipass": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -2164,15 +2073,97 @@ "node-pre-gyp": "^0.12.0" }, "dependencies": { + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true, + "optional": true + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true, + "optional": true }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "optional": true, "requires": { "ms": "^2.1.1" } @@ -2180,82 +2171,423 @@ "deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true, + "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", + "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", + "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true, + "optional": true }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "needle": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.0.tgz", + "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==", + "dev": true, + "optional": true, "requires": { - "ansi-regex": "^2.0.0" + "debug": "^4.1.0", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" } - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + }, + "node-pre-gyp": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz", + "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==", + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", + "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", "dev": true, "optional": true }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "npm-packlist": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", + "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", "dev": true, "optional": true, "requires": { - "number-is-nan": "^1.0.0" + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" } }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true, + "optional": true + }, + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true, + "optional": true + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -2268,6 +2600,16 @@ "strip-ansi": "^3.0.0" } }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -2277,9 +2619,75 @@ "requires": { "ansi-regex": "^2.0.0" } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", + "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "dev": true, + "optional": true } } }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -2446,13 +2854,6 @@ "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", "dev": true }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true, - "optional": true - }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -2785,9 +3186,9 @@ "dev": true }, "inquirer": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.0.tgz", - "integrity": "sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", "dev": true, "requires": { "ansi-escapes": "^3.2.0", @@ -2971,9 +3372,9 @@ "dev": true }, "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -3341,9 +3742,9 @@ "dev": true }, "linkify-it": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.1.0.tgz", - "integrity": "sha512-4REs8/062kV2DSHxNfq5183zrqXMl7WP0WzABH9IeJI+NLm429FgE1PDecltYfnOoFDFlZGh2T8PfZn0r+GTRg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", "dev": true, "requires": { "uc.micro": "^1.0.1" @@ -3612,14 +4013,6 @@ "requires": { "pseudomap": "^1.0.2", "yallist": "^2.1.2" - }, - "dependencies": { - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } } }, "magic-string": { @@ -3674,9 +4067,9 @@ } }, "markdown-it": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", - "integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-9.0.1.tgz", + "integrity": "sha512-XC9dMBHg28Xi7y5dPuLjM61upIGPJG8AiHNHYqIaXER2KNnn7eKnM5/sF0ImNnyoV224Ogn9b1Pck8VH4k0bxw==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -3687,18 +4080,18 @@ } }, "markdownlint": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.15.0.tgz", - "integrity": "sha512-sNcrSrUgpNbTQX6rPIMd+RI9rAryGTEbDI9VFpcFyijlC5g8gpkma49k5p98yFLdNbdcB3VW69UJ0smxvTVw6g==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.16.0.tgz", + "integrity": "sha512-Zo+iPezP3eM6lLhKepkUw+X98H44lipIdx4d6faaugfB0+7VuDB3R0hXmx7z9F1N3/ypn46oOFgAD9iF++Ie6A==", "dev": true, "requires": { - "markdown-it": "8.4.2" + "markdown-it": "9.0.1" } }, "markdownlint-cli": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.17.0.tgz", - "integrity": "sha512-/MInVAuNUDGj5lWeAweL2s4Wk0BY2UqOUcOuOMhY62LXmQZU9qZiFJ5XgHrAZVMggFH/vPupCiUiAMFgGIOqHg==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.18.0.tgz", + "integrity": "sha512-mQ2zvjMLoy0P2kb9Y03SqC24WPH4fTRN0/CyCorB122c4Chg9vWJKgUKBz3KR7swpzqmlI0SYq/7Blbqe4kb2g==", "dev": true, "requires": { "commander": "~2.9.0", @@ -3708,7 +4101,7 @@ "js-yaml": "^3.13.1", "lodash.differencewith": "~4.5.0", "lodash.flatten": "~4.4.0", - "markdownlint": "~0.15.0", + "markdownlint": "~0.16.0", "minimatch": "~3.0.4", "rc": "~1.2.7" }, @@ -3858,27 +4251,6 @@ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, - "minipass": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", - "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", - "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, "mixin-deep": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", @@ -4045,9 +4417,9 @@ "dev": true }, "nan": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", - "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", "dev": true, "optional": true }, @@ -4076,37 +4448,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "needle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.0.tgz", - "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==", - "dev": true, - "optional": true, - "requires": { - "debug": "^4.1.0", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true, - "optional": true - } - } - }, "neo-async": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", @@ -4149,36 +4490,6 @@ "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", "dev": true }, - "node-pre-gyp": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz", - "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==", - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -4208,24 +4519,6 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, - "npm-bundled": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", - "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", - "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, "npm-run-path": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz", @@ -4243,23 +4536,11 @@ } } }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true }, "nyc": { "version": "14.1.1", @@ -4575,17 +4856,6 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", @@ -5093,28 +5363,20 @@ } }, "rollup": { - "version": "1.19.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.19.4.tgz", - "integrity": "sha512-G24w409GNj7i/Yam2cQla6qV2k6Nug8bD2DZg9v63QX/cH/dEdbNJg8H4lUm5M1bRpPKRUC465Rm9H51JTKOfQ==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.20.1.tgz", + "integrity": "sha512-8DV8eWLq84fbJFRqkjWg8BWX4NTTdHpx9bxjmTl/83z54o6Ygo1OgUDjJGFq/xe5i0kDspnbjzw2V+ZPXD/BrQ==", "dev": true, "requires": { "@types/estree": "0.0.39", - "@types/node": "^12.6.9", - "acorn": "^6.2.1" - }, - "dependencies": { - "acorn": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", - "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", - "dev": true - } + "@types/node": "^12.7.2", + "acorn": "^7.0.0" } }, "rollup-plugin-alias": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-alias/-/rollup-plugin-alias-1.5.2.tgz", - "integrity": "sha512-ODeZXhTxpD48sfcYLAFc1BGrsXKDj7o1CSNH3uYbdK3o0NxyMmaQPTNgW+ko+am92DLC8QSTe4kyxTuEkI5S5w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-alias/-/rollup-plugin-alias-2.0.0.tgz", + "integrity": "sha512-JVwxV9nwzjc0q7JmrV9jvZlJ8FykNd5r7RmYps8i/7v+vcmmVpeMvXrljhCboYErf4VZ2z9FEj+fP7eJlEGfug==", "dev": true, "requires": { "slash": "^3.0.0" @@ -5347,13 +5609,6 @@ "rimraf": "^2.5.2" } }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true, - "optional": true - }, "semver": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", @@ -5788,9 +6043,9 @@ "dev": true }, "table": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.5.tgz", - "integrity": "sha512-oGa2Hl7CQjfoaogtrOHEJroOcYILTx7BZWLGsJIlzoWmB2zmguhNfPJZsWPKYek/MgCxfco54gEi31d1uN2hFA==", + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", "dev": true, "requires": { "ajv": "^6.10.2", @@ -5827,22 +6082,6 @@ } } }, - "tar": { - "version": "4.4.8", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", - "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, "teeny-request": { "version": "3.11.3", "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-3.11.3.tgz", @@ -5855,9 +6094,9 @@ } }, "terser": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.1.4.tgz", - "integrity": "sha512-+ZwXJvdSwbd60jG0Illav0F06GDJF0R4ydZ21Q3wGAFKoBGyJGo34F63vzJHgvYxc1ukOtIjvwEvl9MkjzM6Pg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.2.0.tgz", + "integrity": "sha512-6lPt7lZdZ/13icQJp8XasFOwZjFJkxFFIb/N1fhYEQNoNI3Ilo3KABZ9OocZvZoB39r6SiIk/0+v/bt8nZoSeA==", "dev": true, "requires": { "commander": "^2.20.0", @@ -6068,9 +6307,9 @@ "dev": true }, "tslint": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.18.0.tgz", - "integrity": "sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.19.0.tgz", + "integrity": "sha512-1LwwtBxfRJZnUvoS9c0uj8XQtAnyhWr9KlNvDIdB+oXyT+VpsOAaEhEgKi1HrZ8rq0ki/AAnbGSv4KM6/AfVZw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -6291,9 +6530,9 @@ "dev": true }, "v8-compile-cache": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz", - "integrity": "sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", "dev": true }, "validate-npm-package-license": { @@ -6379,11 +6618,10 @@ "dev": true }, "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true, - "optional": true + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true }, "yargs": { "version": "13.2.2", diff --git a/package.json b/package.json index a3e691f8ef3..27547e2c3dc 100644 --- a/package.json +++ b/package.json @@ -66,17 +66,17 @@ "@types/micromatch": "^3.1.0", "@types/minimist": "^1.2.0", "acorn-import-meta": "^1.0.0", - "acorn-jsx": "^5.0.1", + "acorn-jsx": "^5.0.2", "acorn-walk": "^7.0.0", "buble": "^0.19.8", - "chokidar": "^2.1.6", + "chokidar": "^2.1.8", "codecov": "^3.5.0", "console-group": "^0.3.3", "core-js": "^3.2.1", "date-time": "^3.1.0", "es5-shim": "^4.5.13", "es6-shim": "^0.35.5", - "eslint": "^6.1.0", + "eslint": "^6.2.1", "eslint-plugin-import": "^2.18.2", "execa": "^2.0.4", "fixturify": "^1.2.0", @@ -87,7 +87,7 @@ "lint-staged": "^9.2.3", "locate-character": "^2.0.5", "magic-string": "^0.25.3", - "markdownlint-cli": "^0.17.0", + "markdownlint-cli": "^0.18.0", "micromatch": "^4.0.2", "minimist": "^1.2.0", "mocha": "^6.2.0", @@ -97,8 +97,8 @@ "pretty-ms": "^5.0.0", "require-relative": "^0.8.7", "requirejs": "^2.3.6", - "rollup": "^1.19.4", - "rollup-plugin-alias": "^1.5.2", + "rollup": "^1.20.1", + "rollup-plugin-alias": "^2.0.0", "rollup-plugin-buble": "^0.19.8", "rollup-plugin-commonjs": "^10.0.2", "rollup-plugin-json": "^4.0.0", @@ -116,9 +116,9 @@ "source-map-support": "^0.5.13", "sourcemap-codec": "^1.4.6", "systemjs": "^5.0.0", - "terser": "^4.1.4", + "terser": "^4.2.0", "tslib": "^1.10.0", - "tslint": "^5.18.0", + "tslint": "^5.19.0", "turbocolor": "^2.6.1", "typescript": "^3.5.3", "url-parse": "^1.4.7" diff --git a/rollup.config.js b/rollup.config.js index 6370894eb72..99769e5aa1b 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -135,8 +135,10 @@ function fixAcornEsmImport() { const moduleAliases = { resolve: ['.js', '.json', '.md'], - 'help.md': path.resolve('cli/help.md'), - 'package.json': path.resolve('package.json') + entries: [ + { find: 'help.md', replacement: path.resolve('cli/help.md') }, + { find: 'package.json', replacement: path.resolve('package.json') } + ] }; const treeshake = { diff --git a/src/Module.ts b/src/Module.ts index 4b2bdb9f7d4..ea045ffffc4 100644 --- a/src/Module.ts +++ b/src/Module.ts @@ -342,9 +342,11 @@ export default class Module { } getOrCreateNamespace(): NamespaceVariable { - return ( - this.namespaceVariable || (this.namespaceVariable = new NamespaceVariable(this.astContext)) - ); + if (!this.namespaceVariable) { + this.namespaceVariable = new NamespaceVariable(this.astContext); + this.namespaceVariable.initialise(); + } + return this.namespaceVariable; } getReexports(): string[] { diff --git a/src/ast/variables/NamespaceVariable.ts b/src/ast/variables/NamespaceVariable.ts index 7260cd14d3a..3dfb2a4d5ad 100644 --- a/src/ast/variables/NamespaceVariable.ts +++ b/src/ast/variables/NamespaceVariable.ts @@ -19,10 +19,6 @@ export default class NamespaceVariable extends Variable { super(context.getModuleName()); this.context = context; this.module = context.module; - for (const name of this.context.getExports().concat(this.context.getReexports())) { - if (name[0] === '*' && name.length > 1) this.containsExternalNamespace = true; - this.memberVariables[name] = this.context.traceExport(name); - } } addReference(identifier: Identifier) { @@ -69,6 +65,13 @@ export default class NamespaceVariable extends Variable { } } + initialise() { + for (const name of this.context.getExports().concat(this.context.getReexports())) { + if (name[0] === '*' && name.length > 1) this.containsExternalNamespace = true; + this.memberVariables[name] = this.context.traceExport(name); + } + } + renderBlock(options: RenderOptions) { const _ = options.compact ? '' : ' '; const n = options.compact ? '' : '\n'; diff --git a/test/form/index.js b/test/form/index.js index ba71c048cc1..56eac6ecfe6 100644 --- a/test/form/index.js +++ b/test/form/index.js @@ -21,10 +21,15 @@ runTestSuiteWithSamples('form', path.resolve(__dirname, 'samples'), (dir, config extend( { input: dir + '/main.js', - onwarn: msg => { - if (/No name was provided for/.test(msg)) return; - if (/as external dependency/.test(msg)) return; - console.error(msg); + onwarn: warning => { + if ( + !(config.expectedWarnings && config.expectedWarnings.indexOf(warning.code) >= 0) + ) { + throw new Error( + `Unexpected warnings (${warning.code}): ${warning.message}\n` + + 'If you expect warnings, list their codes in config.expectedWarnings' + ); + } }, strictDeprecations: true }, diff --git a/test/form/samples/builtin-prototypes/object-expression/_config.js b/test/form/samples/builtin-prototypes/object-expression/_config.js index 810fb8d88f9..dae66a24375 100644 --- a/test/form/samples/builtin-prototypes/object-expression/_config.js +++ b/test/form/samples/builtin-prototypes/object-expression/_config.js @@ -1,3 +1,4 @@ module.exports = { - description: 'Tree-shake known object prototype functions' + description: 'Tree-shake known object prototype functions', + expectedWarnings: ['EMPTY_BUNDLE'] }; diff --git a/test/form/samples/compact-multiple-imports/_config.js b/test/form/samples/compact-multiple-imports/_config.js index 16fa2fd903e..83042b1631c 100644 --- a/test/form/samples/compact-multiple-imports/_config.js +++ b/test/form/samples/compact-multiple-imports/_config.js @@ -5,6 +5,10 @@ module.exports = { return id.startsWith('external'); }, output: { + globals: { + 'external-3': 'external3', + 'external-4': 'external4' + }, compact: true } } diff --git a/test/form/samples/compact/_config.js b/test/form/samples/compact/_config.js index c4b7e180e18..2deef7d8ac0 100644 --- a/test/form/samples/compact/_config.js +++ b/test/form/samples/compact/_config.js @@ -1,11 +1,15 @@ module.exports = { description: 'compact output with compact: true', + expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { external: ['external'], output: { name: 'foo', compact: true, - namespaceToStringTag: true + namespaceToStringTag: true, + globals: { + external: 'x' + } } } }; diff --git a/test/form/samples/conflicting-imports/_config.js b/test/form/samples/conflicting-imports/_config.js index 4dd7b5ad6e8..3c157f5752f 100644 --- a/test/form/samples/conflicting-imports/_config.js +++ b/test/form/samples/conflicting-imports/_config.js @@ -1,6 +1,12 @@ module.exports = { description: 'ensures bundle imports are deconflicted (#659)', options: { - external: ['foo', 'bar'] + external: ['foo', 'bar'], + output: { + globals: { + bar: 'bar', + foo: 'foo' + } + } } }; diff --git a/test/form/samples/custom-module-context-function/_config.js b/test/form/samples/custom-module-context-function/_config.js index 4d05dfabe5b..e42a80b2638 100644 --- a/test/form/samples/custom-module-context-function/_config.js +++ b/test/form/samples/custom-module-context-function/_config.js @@ -1,5 +1,6 @@ module.exports = { description: 'allows custom module-specific context with a function option', + expectedWarnings: ['THIS_IS_UNDEFINED'], options: { moduleContext(id) { return /main\.js$/.test(id) ? 'lolwut' : 'undefined'; diff --git a/test/form/samples/custom-module-context/_config.js b/test/form/samples/custom-module-context/_config.js index f5d68d2f66d..8b5dd23cbfb 100644 --- a/test/form/samples/custom-module-context/_config.js +++ b/test/form/samples/custom-module-context/_config.js @@ -1,5 +1,6 @@ module.exports = { description: 'allows custom module-specific context', + expectedWarnings: ['THIS_IS_UNDEFINED'], options: { moduleContext: { 'main.js': 'lolwut' diff --git a/test/form/samples/deconflict-format-specific-globals/_config.js b/test/form/samples/deconflict-format-specific-globals/_config.js index 12a61c9393c..5dc0b5bb2bb 100644 --- a/test/form/samples/deconflict-format-specific-globals/_config.js +++ b/test/form/samples/deconflict-format-specific-globals/_config.js @@ -3,6 +3,7 @@ module.exports = { options: { external: 'external', output: { + globals: { external: 'external' }, name: 'bundle' } } diff --git a/test/form/samples/dedupes-external-imports/_config.js b/test/form/samples/dedupes-external-imports/_config.js index 75748d10ad9..937ee5ed574 100644 --- a/test/form/samples/dedupes-external-imports/_config.js +++ b/test/form/samples/dedupes-external-imports/_config.js @@ -3,6 +3,7 @@ module.exports = { options: { external: ['external'], output: { + globals: { external: 'external' }, name: 'myBundle' } } diff --git a/test/form/samples/deprecated/prune-pure-unused-import-array/_config.js b/test/form/samples/deprecated/prune-pure-unused-import-array/_config.js index e778e231567..a7450452ab4 100644 --- a/test/form/samples/deprecated/prune-pure-unused-import-array/_config.js +++ b/test/form/samples/deprecated/prune-pure-unused-import-array/_config.js @@ -1,8 +1,11 @@ module.exports = { + description: 'prunes pure unused external imports ([#1352])', options: { strictDeprecations: false, external: ['external', 'other'], - treeshake: { pureExternalModules: ['external'] } - }, - description: 'prunes pure unused external imports ([#1352])' + treeshake: { pureExternalModules: ['external'] }, + output: { + globals: { other: 'other' } + } + } }; diff --git a/test/form/samples/deprecated/prune-pure-unused-import-function/_config.js b/test/form/samples/deprecated/prune-pure-unused-import-function/_config.js index d7ecf268730..e480fbdff5f 100644 --- a/test/form/samples/deprecated/prune-pure-unused-import-function/_config.js +++ b/test/form/samples/deprecated/prune-pure-unused-import-function/_config.js @@ -1,8 +1,12 @@ module.exports = { + description: 'prunes pure unused external imports ([#1352])', + expectedWarnings: ['EMPTY_BUNDLE'], options: { strictDeprecations: false, external: ['external', 'other'], - treeshake: { pureExternalModules: id => id === 'external' } - }, - description: 'prunes pure unused external imports ([#1352])' + treeshake: { pureExternalModules: id => id === 'external' }, + output: { + globals: { other: 'other' } + } + } }; diff --git a/test/form/samples/deprecated/prune-pure-unused-import/_config.js b/test/form/samples/deprecated/prune-pure-unused-import/_config.js index 501870e6d02..4a5e9c38281 100644 --- a/test/form/samples/deprecated/prune-pure-unused-import/_config.js +++ b/test/form/samples/deprecated/prune-pure-unused-import/_config.js @@ -1,8 +1,9 @@ module.exports = { + description: 'prunes pure unused external imports ([#1352])', + expectedWarnings: ['EMPTY_BUNDLE'], options: { strictDeprecations: false, external: ['external', 'other'], treeshake: { pureExternalModules: true } - }, - description: 'prunes pure unused external imports ([#1352])' + } }; diff --git a/test/form/samples/deprecated/transform-bundle-plugin-options/_config.js b/test/form/samples/deprecated/transform-bundle-plugin-options/_config.js index 6316ec12f92..f9c01aa37ba 100644 --- a/test/form/samples/deprecated/transform-bundle-plugin-options/_config.js +++ b/test/form/samples/deprecated/transform-bundle-plugin-options/_config.js @@ -2,6 +2,7 @@ const assert = require('assert'); module.exports = { description: 'plugin .transformBundle gets passed options', + expectedWarnings: ['DEPRECATED_FEATURE'], options: { strictDeprecations: false, plugins: [ diff --git a/test/form/samples/deprecated/transform-bundle-plugin/_config.js b/test/form/samples/deprecated/transform-bundle-plugin/_config.js index 87d31bd5f1c..f5987a924d0 100644 --- a/test/form/samples/deprecated/transform-bundle-plugin/_config.js +++ b/test/form/samples/deprecated/transform-bundle-plugin/_config.js @@ -1,10 +1,11 @@ module.exports = { description: 'allows plugins to transform bundle', + expectedWarnings: ['DEPRECATED_FEATURE'], options: { strictDeprecations: false, plugins: [ { - transformBundle(code) { + transformBundle() { return '/* first plugin */'; } }, diff --git a/test/form/samples/export-all-before-named/_config.js b/test/form/samples/export-all-before-named/_config.js index b738dc58cd2..b84d76b6669 100644 --- a/test/form/samples/export-all-before-named/_config.js +++ b/test/form/samples/export-all-before-named/_config.js @@ -1,7 +1,10 @@ module.exports = { description: 'external `export *` must not interfere with internal exports', options: { - output: { name: 'exposedInternals' }, + output: { + globals: { external: 'external' }, + name: 'exposedInternals' + }, external: ['external'] } }; diff --git a/test/form/samples/export-default-import/_config.js b/test/form/samples/export-default-import/_config.js index 86bc7b9c007..2feb1b34171 100644 --- a/test/form/samples/export-default-import/_config.js +++ b/test/form/samples/export-default-import/_config.js @@ -2,6 +2,9 @@ module.exports = { description: 'correctly exports a default import, even in ES mode (#513)', options: { external: ['x'], - output: { name: 'myBundle' } + output: { + globals: { x: 'x' }, + name: 'myBundle' + } } }; diff --git a/test/form/samples/external-deshadowing/_config.js b/test/form/samples/external-deshadowing/_config.js index dc40b0c0f27..d46d28e9e6c 100644 --- a/test/form/samples/external-deshadowing/_config.js +++ b/test/form/samples/external-deshadowing/_config.js @@ -3,6 +3,7 @@ module.exports = { options: { external: ['a', 'b'], output: { + globals: { a: 'a', b: 'b' }, name: 'myBundle' } } diff --git a/test/form/samples/external-deshadowing/_expected/iife.js b/test/form/samples/external-deshadowing/_expected/iife.js index 2a6e6f66ee7..a316d064806 100644 --- a/test/form/samples/external-deshadowing/_expected/iife.js +++ b/test/form/samples/external-deshadowing/_expected/iife.js @@ -16,4 +16,4 @@ var myBundle = (function (exports, a, Test$1) { return exports; -}({}, a, Test$1)); +}({}, a, b)); diff --git a/test/form/samples/external-deshadowing/_expected/umd.js b/test/form/samples/external-deshadowing/_expected/umd.js index 853b3144677..1641561f958 100644 --- a/test/form/samples/external-deshadowing/_expected/umd.js +++ b/test/form/samples/external-deshadowing/_expected/umd.js @@ -1,7 +1,7 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('a'), require('b')) : typeof define === 'function' && define.amd ? define(['exports', 'a', 'b'], factory) : - (global = global || self, factory(global.myBundle = {}, global.a, global.Test$1)); + (global = global || self, factory(global.myBundle = {}, global.a, global.b)); }(this, function (exports, a, Test$1) { 'use strict'; Test$1 = Test$1 && Test$1.hasOwnProperty('default') ? Test$1['default'] : Test$1; diff --git a/test/form/samples/external-export-tracing/_config.js b/test/form/samples/external-export-tracing/_config.js index 7f4f4230a9b..f4140c4ed86 100644 --- a/test/form/samples/external-export-tracing/_config.js +++ b/test/form/samples/external-export-tracing/_config.js @@ -3,6 +3,7 @@ module.exports = { options: { external: ['external'], output: { + globals: { external: 'external' }, name: 'myBundle' } } diff --git a/test/form/samples/external-import-alias-shadow/_config.js b/test/form/samples/external-import-alias-shadow/_config.js index 620399b1ef5..acc8ed78eb7 100644 --- a/test/form/samples/external-import-alias-shadow/_config.js +++ b/test/form/samples/external-import-alias-shadow/_config.js @@ -1,6 +1,9 @@ module.exports = { description: 'handles external aliased named imports that shadow another name', options: { - external: ['acorn'] + external: ['acorn'], + output: { + globals: { acorn: 'acorn' } + } } }; diff --git a/test/form/samples/external-imports/_config.js b/test/form/samples/external-imports/_config.js index d60783570d1..46cde903266 100644 --- a/test/form/samples/external-imports/_config.js +++ b/test/form/samples/external-imports/_config.js @@ -1,6 +1,15 @@ module.exports = { description: 'prefixes global names with `global.` when creating UMD bundle (#57)', + expectedWarnings: ['UNUSED_EXTERNAL_IMPORT'], options: { - external: ['factory', 'baz', 'shipping-port', 'alphabet'] + external: ['factory', 'baz', 'shipping-port', 'alphabet'], + output: { + globals: { + alphabet: 'alphabet', + baz: 'baz', + factory: 'factory', + 'shipping-port': 'containers' + } + } } }; diff --git a/test/form/samples/external-namespace-and-named/_config.js b/test/form/samples/external-namespace-and-named/_config.js index 4d98af0b52b..836a753798a 100644 --- a/test/form/samples/external-namespace-and-named/_config.js +++ b/test/form/samples/external-namespace-and-named/_config.js @@ -1,6 +1,9 @@ module.exports = { description: 'Correctly handles external namespace tracing with both namespace and named exports', options: { - external: ['foo'] + external: ['foo'], + output: { + globals: { foo: 'foo' } + } } }; diff --git a/test/form/samples/external-namespace-reexport/_config.js b/test/form/samples/external-namespace-reexport/_config.js index d660c4d93ba..7e15b263f44 100644 --- a/test/form/samples/external-namespace-reexport/_config.js +++ b/test/form/samples/external-namespace-reexport/_config.js @@ -3,6 +3,7 @@ module.exports = { options: { external: ['highcharts'], output: { + globals: { highcharts: 'highcharts' }, name: 'myBundle' } } diff --git a/test/form/samples/guessed-global-names/_config.js b/test/form/samples/guessed-global-names/_config.js new file mode 100644 index 00000000000..eb564fe7be1 --- /dev/null +++ b/test/form/samples/guessed-global-names/_config.js @@ -0,0 +1,15 @@ +const { resolve } = require('path'); + +module.exports = { + description: 'guesses global names if necessary', + expectedWarnings: ['MISSING_GLOBAL_NAME'], + options: { + external: [ + 'unchanged', + 'changed', + 'special-character', + 'with/slash', + resolve(__dirname, 'relative.js') + ] + } +}; diff --git a/test/form/samples/guessed-global-names/_expected/amd.js b/test/form/samples/guessed-global-names/_expected/amd.js new file mode 100644 index 00000000000..9d13ee97532 --- /dev/null +++ b/test/form/samples/guessed-global-names/_expected/amd.js @@ -0,0 +1,7 @@ +define(['unchanged', 'changed', 'special-character', 'with/slash', './relative'], function (unchanged, changedName, specialCharacter, slash, relative_js) { 'use strict'; + + changedName = changedName && changedName.hasOwnProperty('default') ? changedName['default'] : changedName; + + console.log(unchanged.foo, changedName, specialCharacter.bar, slash.baz, relative_js.quux); + +}); diff --git a/test/form/samples/guessed-global-names/_expected/cjs.js b/test/form/samples/guessed-global-names/_expected/cjs.js new file mode 100644 index 00000000000..ac8e6808f85 --- /dev/null +++ b/test/form/samples/guessed-global-names/_expected/cjs.js @@ -0,0 +1,11 @@ +'use strict'; + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var unchanged = require('unchanged'); +var changedName = _interopDefault(require('changed')); +var specialCharacter = require('special-character'); +var slash = require('with/slash'); +var relative_js = require('./relative.js'); + +console.log(unchanged.foo, changedName, specialCharacter.bar, slash.baz, relative_js.quux); diff --git a/test/form/samples/guessed-global-names/_expected/es.js b/test/form/samples/guessed-global-names/_expected/es.js new file mode 100644 index 00000000000..608e64cd38c --- /dev/null +++ b/test/form/samples/guessed-global-names/_expected/es.js @@ -0,0 +1,7 @@ +import { foo } from 'unchanged'; +import changedName from 'changed'; +import { bar } from 'special-character'; +import { baz } from 'with/slash'; +import { quux } from './relative.js'; + +console.log(foo, changedName, bar, baz, quux); diff --git a/test/form/samples/guessed-global-names/_expected/iife.js b/test/form/samples/guessed-global-names/_expected/iife.js new file mode 100644 index 00000000000..4ecb13ccfde --- /dev/null +++ b/test/form/samples/guessed-global-names/_expected/iife.js @@ -0,0 +1,8 @@ +(function (unchanged, changedName, specialCharacter, slash, relative_js) { + 'use strict'; + + changedName = changedName && changedName.hasOwnProperty('default') ? changedName['default'] : changedName; + + console.log(unchanged.foo, changedName, specialCharacter.bar, slash.baz, relative_js.quux); + +}(unchanged, changedName, specialCharacter, slash, relative_js)); diff --git a/test/form/samples/guessed-global-names/_expected/system.js b/test/form/samples/guessed-global-names/_expected/system.js new file mode 100644 index 00000000000..ee1dadc5362 --- /dev/null +++ b/test/form/samples/guessed-global-names/_expected/system.js @@ -0,0 +1,22 @@ +System.register(['unchanged', 'changed', 'special-character', 'with/slash', './relative.js'], function () { + 'use strict'; + var foo, changedName, bar, baz, quux; + return { + setters: [function (module) { + foo = module.foo; + }, function (module) { + changedName = module.default; + }, function (module) { + bar = module.bar; + }, function (module) { + baz = module.baz; + }, function (module) { + quux = module.quux; + }], + execute: function () { + + console.log(foo, changedName, bar, baz, quux); + + } + }; +}); diff --git a/test/form/samples/guessed-global-names/_expected/umd.js b/test/form/samples/guessed-global-names/_expected/umd.js new file mode 100644 index 00000000000..52e3f51b10a --- /dev/null +++ b/test/form/samples/guessed-global-names/_expected/umd.js @@ -0,0 +1,11 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('unchanged'), require('changed'), require('special-character'), require('with/slash'), require('./relative.js')) : + typeof define === 'function' && define.amd ? define(['unchanged', 'changed', 'special-character', 'with/slash', './relative.js'], factory) : + (global = global || self, factory(global.unchanged, global.changedName, global.specialCharacter, global.slash, global.relative_js)); +}(this, function (unchanged, changedName, specialCharacter, slash, relative_js) { 'use strict'; + + changedName = changedName && changedName.hasOwnProperty('default') ? changedName['default'] : changedName; + + console.log(unchanged.foo, changedName, specialCharacter.bar, slash.baz, relative_js.quux); + +})); diff --git a/test/form/samples/guessed-global-names/main.js b/test/form/samples/guessed-global-names/main.js new file mode 100644 index 00000000000..608e64cd38c --- /dev/null +++ b/test/form/samples/guessed-global-names/main.js @@ -0,0 +1,7 @@ +import { foo } from 'unchanged'; +import changedName from 'changed'; +import { bar } from 'special-character'; +import { baz } from 'with/slash'; +import { quux } from './relative.js'; + +console.log(foo, changedName, bar, baz, quux); diff --git a/test/form/samples/ignore-property-access-side-effects/_config.js b/test/form/samples/ignore-property-access-side-effects/_config.js index 7d814b1b123..2db50db018f 100644 --- a/test/form/samples/ignore-property-access-side-effects/_config.js +++ b/test/form/samples/ignore-property-access-side-effects/_config.js @@ -1,6 +1,7 @@ module.exports = { description: 'ignore side-effects when accessing properties if treeshake.propertyReadSideEffects is false', + expectedWarnings: ['EMPTY_BUNDLE'], options: { treeshake: { propertyReadSideEffects: false diff --git a/test/form/samples/import-expression/_config.js b/test/form/samples/import-expression/_config.js index ebc32938bbb..b8e2cfab5eb 100644 --- a/test/form/samples/import-expression/_config.js +++ b/test/form/samples/import-expression/_config.js @@ -1,6 +1,9 @@ module.exports = { description: 'correctly transforms variables in imported expressions', options: { - external: 'external' + external: 'external', + output: { + globals: { external: 'external' } + } } }; diff --git a/test/form/samples/import-external-namespace-and-default/_config.js b/test/form/samples/import-external-namespace-and-default/_config.js index 8e6eaf55816..b6823ebd061 100644 --- a/test/form/samples/import-external-namespace-and-default/_config.js +++ b/test/form/samples/import-external-namespace-and-default/_config.js @@ -1,6 +1,9 @@ module.exports = { description: 'disinguishes between external default and namespace (#637)', options: { - external: ['foo'] + external: ['foo'], + output: { + globals: { foo: 'foo' } + } } }; diff --git a/test/form/samples/import-named-exported-global-with-alias/_config.js b/test/form/samples/import-named-exported-global-with-alias/_config.js index f900235de0c..3ed95b58d27 100644 --- a/test/form/samples/import-named-exported-global-with-alias/_config.js +++ b/test/form/samples/import-named-exported-global-with-alias/_config.js @@ -3,5 +3,6 @@ module.exports = { description: 'allow globals to be exported and imported', + expectedWarnings: ['EMPTY_BUNDLE'], options: { output: { name: 'doc' } } }; diff --git a/test/form/samples/import-namespace/_config.js b/test/form/samples/import-namespace/_config.js index 808d9497d54..2cd57f110ff 100644 --- a/test/form/samples/import-namespace/_config.js +++ b/test/form/samples/import-namespace/_config.js @@ -1,5 +1,9 @@ module.exports = { + description: 'imports external namespaces', options: { - external: ['foo', 'bar'] + external: ['foo', 'bar'], + output: { + globals: { foo: 'foo', bar: 'bar' } + } } }; diff --git a/test/form/samples/import-specifier-deshadowing/_config.js b/test/form/samples/import-specifier-deshadowing/_config.js index 7141288646f..26457a50db3 100644 --- a/test/form/samples/import-specifier-deshadowing/_config.js +++ b/test/form/samples/import-specifier-deshadowing/_config.js @@ -2,6 +2,9 @@ module.exports = { description: 'deshadows aliased import bindings', options: { external: ['react-sticky'], - output: { name: 'Sticky' } + output: { + globals: { 'react-sticky': 'reactSticky' }, + name: 'Sticky' + } } }; diff --git a/test/form/samples/includes-all-namespace-declarations/_config.js b/test/form/samples/includes-all-namespace-declarations/_config.js index a97236d3054..afd3cf26746 100644 --- a/test/form/samples/includes-all-namespace-declarations/_config.js +++ b/test/form/samples/includes-all-namespace-declarations/_config.js @@ -1,3 +1,4 @@ module.exports = { - description: 'includes all declarations referenced by reified namespaces' + description: 'includes all declarations referenced by reified namespaces', + expectedWarnings: ['EMPTY_BUNDLE'] }; diff --git a/test/form/samples/interop-false-reexport/_config.js b/test/form/samples/interop-false-reexport/_config.js index 94fd78a4945..1f6b7f4f555 100644 --- a/test/form/samples/interop-false-reexport/_config.js +++ b/test/form/samples/interop-false-reexport/_config.js @@ -2,6 +2,10 @@ module.exports = { description: 'reexports with interop: false', options: { external: ['external'], - output: { name: 'foo', interop: false } + output: { + globals: { external: 'external' }, + name: 'foo', + interop: false + } } }; diff --git a/test/form/samples/interop-false/_config.js b/test/form/samples/interop-false/_config.js index 5c528384814..f5cc7f8d998 100644 --- a/test/form/samples/interop-false/_config.js +++ b/test/form/samples/interop-false/_config.js @@ -1,7 +1,12 @@ module.exports = { description: 'getInterop with interop: false', + expectedWarnings: ['UNUSED_EXTERNAL_IMPORT'], options: { external: ['core/view'], - output: { name: 'foo', interop: false } + output: { + globals: { 'core/view': 'View' }, + name: 'foo', + interop: false + } } }; diff --git a/test/form/samples/intro-and-outro/_config.js b/test/form/samples/intro-and-outro/_config.js index bff310d1b62..6b525adedb8 100644 --- a/test/form/samples/intro-and-outro/_config.js +++ b/test/form/samples/intro-and-outro/_config.js @@ -2,6 +2,7 @@ module.exports = { description: 'adds an intro/outro', options: { output: { + globals: { external: 'a' }, intro: '/* this is an intro */', outro: '/* this is an outro */', name: 'foo' diff --git a/test/form/samples/namespace-import-reexport/_config.js b/test/form/samples/namespace-import-reexport/_config.js index d8a7ecc4119..3530557b978 100644 --- a/test/form/samples/namespace-import-reexport/_config.js +++ b/test/form/samples/namespace-import-reexport/_config.js @@ -3,6 +3,7 @@ module.exports = { options: { external: ['external-package'], output: { + globals: { 'external-package': 'externalPackage' }, name: 'iife' } } diff --git a/test/form/samples/namespace-self-import/_config.js b/test/form/samples/namespace-self-import/_config.js index 5945e3c0858..cd21e5703f8 100644 --- a/test/form/samples/namespace-self-import/_config.js +++ b/test/form/samples/namespace-self-import/_config.js @@ -1,5 +1,6 @@ module.exports = { description: 'namespace early import hoisting', + expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { output: { name: 'iife' diff --git a/test/form/samples/namespace-tostringtag/_config.js b/test/form/samples/namespace-tostringtag/_config.js index 29874152c5a..9c5b2cd117a 100644 --- a/test/form/samples/namespace-tostringtag/_config.js +++ b/test/form/samples/namespace-tostringtag/_config.js @@ -1,5 +1,6 @@ module.exports = { description: 'namespace toStringTag support', + expectedWarnings: ['CIRCULAR_DEPENDENCY'], options: { output: { name: 'iife', diff --git a/test/form/samples/no-external-live-bindings-compact/_config.js b/test/form/samples/no-external-live-bindings-compact/_config.js index cfd914b43a6..875b61c29c6 100644 --- a/test/form/samples/no-external-live-bindings-compact/_config.js +++ b/test/form/samples/no-external-live-bindings-compact/_config.js @@ -3,6 +3,10 @@ module.exports = { options: { external: () => true, output: { + globals: { + external1: 'external1', + external2: 'external2' + }, compact: true, externalLiveBindings: false, name: 'bundle' diff --git a/test/form/samples/no-external-live-bindings/_config.js b/test/form/samples/no-external-live-bindings/_config.js index efd97f37756..55b97a19b34 100644 --- a/test/form/samples/no-external-live-bindings/_config.js +++ b/test/form/samples/no-external-live-bindings/_config.js @@ -3,6 +3,10 @@ module.exports = { options: { external: () => true, output: { + globals: { + external1: 'external1', + external2: 'external2' + }, externalLiveBindings: false, name: 'bundle' } diff --git a/test/form/samples/paths-function/_config.js b/test/form/samples/paths-function/_config.js index c8ee0cdaac7..726db0d85e4 100644 --- a/test/form/samples/paths-function/_config.js +++ b/test/form/samples/paths-function/_config.js @@ -2,6 +2,9 @@ module.exports = { description: 'external paths (#754)', options: { external: ['foo'], - output: { paths: id => `https://unpkg.com/${id}` } + output: { + globals: { foo: 'foo' }, + paths: id => `https://unpkg.com/${id}` + } } }; diff --git a/test/form/samples/paths-relative/_config.js b/test/form/samples/paths-relative/_config.js index 9806ed43179..90bc71c1f45 100644 --- a/test/form/samples/paths-relative/_config.js +++ b/test/form/samples/paths-relative/_config.js @@ -6,6 +6,9 @@ module.exports = { description: 'external paths (#754)', options: { external: [resolved], - output: { paths: { [resolved]: '../foo' } } + output: { + globals: { [resolved]: 'foo' }, + paths: { [resolved]: '../foo' } + } } }; diff --git a/test/form/samples/paths/_config.js b/test/form/samples/paths/_config.js index 88119860563..ef23638a0ef 100644 --- a/test/form/samples/paths/_config.js +++ b/test/form/samples/paths/_config.js @@ -2,6 +2,9 @@ module.exports = { description: 'external paths (#754)', options: { external: ['foo'], - output: { paths: { foo: 'https://unpkg.com/foo' } } + output: { + globals: { foo: 'foo' }, + paths: { foo: 'https://unpkg.com/foo' } + } } }; diff --git a/test/form/samples/prefer-const/_config.js b/test/form/samples/prefer-const/_config.js index 74ca361f988..779baf78e63 100644 --- a/test/form/samples/prefer-const/_config.js +++ b/test/form/samples/prefer-const/_config.js @@ -2,6 +2,10 @@ module.exports = { description: 'uses const instead of var if specified (#653)', options: { external: ['other'], - output: { name: 'myBundle', preferConst: true } + output: { + globals: { other: 'other' }, + name: 'myBundle', + preferConst: true + } } }; diff --git a/test/form/samples/proper-this-context/_config.js b/test/form/samples/proper-this-context/_config.js index 261658effc3..65fe62b2171 100644 --- a/test/form/samples/proper-this-context/_config.js +++ b/test/form/samples/proper-this-context/_config.js @@ -1,3 +1,4 @@ module.exports = { - description: 'make sure "this" respects the context for arrow functions' + description: 'make sure "this" respects the context for arrow functions', + expectedWarnings: ['THIS_IS_UNDEFINED'] }; diff --git a/test/form/samples/re-export-aliasing/_config.js b/test/form/samples/re-export-aliasing/_config.js index 933e7305c2d..ae834c41d3e 100644 --- a/test/form/samples/re-export-aliasing/_config.js +++ b/test/form/samples/re-export-aliasing/_config.js @@ -1,7 +1,10 @@ module.exports = { description: 'external re-exports aliasing', options: { - output: { name: 'reexportsAliasingExternal' }, + output: { + globals: { d: 'd' }, + name: 'reexportsAliasingExternal' + }, external: ['d'] } }; diff --git a/test/form/samples/re-export-default-external-as-default/_config.js b/test/form/samples/re-export-default-external-as-default/_config.js index d7ee1a9e9d9..c4ec766d6b2 100644 --- a/test/form/samples/re-export-default-external-as-default/_config.js +++ b/test/form/samples/re-export-default-external-as-default/_config.js @@ -1,7 +1,11 @@ module.exports = { description: 're-exports a default external import as default export (when using named exports)', options: { - output: { name: 'reexportsDefaultExternalAsDefault', exports: 'named' }, + output: { + globals: { external: 'external' }, + name: 'reexportsDefaultExternalAsDefault', + exports: 'named' + }, external: ['external'] } }; diff --git a/test/form/samples/re-export-default-external/_config.js b/test/form/samples/re-export-default-external/_config.js index 3d2477714aa..1a259e389ca 100644 --- a/test/form/samples/re-export-default-external/_config.js +++ b/test/form/samples/re-export-default-external/_config.js @@ -1,7 +1,10 @@ module.exports = { description: 're-exports a default import', options: { - output: { name: 'reexportsDefaultExternal' }, + output: { + globals: { external: 'external' }, + name: 'reexportsDefaultExternal' + }, external: ['external'] } }; diff --git a/test/form/samples/reexport-self/_config.js b/test/form/samples/reexport-self/_config.js new file mode 100644 index 00000000000..f979e6e90b0 --- /dev/null +++ b/test/form/samples/reexport-self/_config.js @@ -0,0 +1,4 @@ +module.exports = { + description: 'handles recursions when a module reexports its own namespace', + expectedWarnings: ['CIRCULAR_DEPENDENCY'] +}; diff --git a/test/form/samples/reexport-self/_expected.js b/test/form/samples/reexport-self/_expected.js new file mode 100644 index 00000000000..a9cecdb0e59 --- /dev/null +++ b/test/form/samples/reexport-self/_expected.js @@ -0,0 +1,3 @@ +const foo = 1; + +console.log(foo); diff --git a/test/form/samples/reexport-self/main.js b/test/form/samples/reexport-self/main.js new file mode 100644 index 00000000000..a2dda212a4e --- /dev/null +++ b/test/form/samples/reexport-self/main.js @@ -0,0 +1,3 @@ +import { other } from './other'; + +console.log(other.foo); diff --git a/test/form/samples/reexport-self/other.js b/test/form/samples/reexport-self/other.js new file mode 100644 index 00000000000..38ad8c6c12d --- /dev/null +++ b/test/form/samples/reexport-self/other.js @@ -0,0 +1,5 @@ +export const foo = 1; +export const bar = 2; + +import * as other from './other'; +export { other }; diff --git a/test/form/samples/reexports-from-external/_config.js b/test/form/samples/reexports-from-external/_config.js index 7b45b13daa4..5fb03551aa5 100644 --- a/test/form/samples/reexports-from-external/_config.js +++ b/test/form/samples/reexports-from-external/_config.js @@ -2,6 +2,9 @@ module.exports = { description: 're-exports * from external module (#791)', options: { external: ['external'], - output: { name: 'myBundle' } + output: { + globals: { external: 'external' }, + name: 'myBundle' + } } }; diff --git a/test/form/samples/reexports-name-from-external/_config.js b/test/form/samples/reexports-name-from-external/_config.js index 2f7e13a9e31..002f1649b1c 100644 --- a/test/form/samples/reexports-name-from-external/_config.js +++ b/test/form/samples/reexports-name-from-external/_config.js @@ -2,6 +2,9 @@ module.exports = { description: 're-exports name from external module', options: { external: ['external'], - output: { name: 'myBundle' } + output: { + globals: { external: 'external' }, + name: 'myBundle' + } } }; diff --git a/test/form/samples/removes-unused-babel-helpers/_config.js b/test/form/samples/removes-unused-babel-helpers/_config.js index d6308ad4630..c81966dc963 100644 --- a/test/form/samples/removes-unused-babel-helpers/_config.js +++ b/test/form/samples/removes-unused-babel-helpers/_config.js @@ -1,3 +1,4 @@ module.exports = { - description: 'Removes unused babel helpers from the build (#1595)' + description: 'Removes unused babel helpers from the build (#1595)', + expectedWarnings: ['EMPTY_BUNDLE'] }; diff --git a/test/form/samples/render-chunk-plugin-sourcemaps/_config.js b/test/form/samples/render-chunk-plugin-sourcemaps/_config.js index 884fb78a94b..bcfbc1fc56a 100644 --- a/test/form/samples/render-chunk-plugin-sourcemaps/_config.js +++ b/test/form/samples/render-chunk-plugin-sourcemaps/_config.js @@ -1,13 +1,14 @@ module.exports = { description: 'supports returning undefined source maps from render chunk hooks, when source maps are enabled', + expectedWarnings: ['SOURCEMAP_BROKEN'], options: { output: { sourcemap: true }, plugins: [ { - renderChunk(code) { + renderChunk() { return '/* first plugin */'; } }, diff --git a/test/form/samples/resolve-external-dynamic-imports/_config.js b/test/form/samples/resolve-external-dynamic-imports/_config.js index 3349408669e..abc5a1fa758 100644 --- a/test/form/samples/resolve-external-dynamic-imports/_config.js +++ b/test/form/samples/resolve-external-dynamic-imports/_config.js @@ -1,7 +1,10 @@ module.exports = { description: 'does not resolve external dynamic imports via plugins (#2481)', options: { - output: { name: 'bundle' }, + output: { + globals: { external: 'myExternal' }, + name: 'bundle' + }, external(id) { return id.endsWith('external'); }, diff --git a/test/form/samples/self-calling-function/_config.js b/test/form/samples/self-calling-function/_config.js index 3acb040a873..7629c502687 100644 --- a/test/form/samples/self-calling-function/_config.js +++ b/test/form/samples/self-calling-function/_config.js @@ -1,3 +1,4 @@ module.exports = { - description: 'discards a self-calling function without side-effects' + description: 'discards a self-calling function without side-effects', + expectedWarnings: ['EMPTY_BUNDLE'] }; diff --git a/test/form/samples/side-effect-es5-classes/_config.js b/test/form/samples/side-effect-es5-classes/_config.js index 380a44e796c..1be04e395eb 100644 --- a/test/form/samples/side-effect-es5-classes/_config.js +++ b/test/form/samples/side-effect-es5-classes/_config.js @@ -1,3 +1,4 @@ module.exports = { - description: 'omits ES5 classes which are pure (e.g. they only assign to `this`)' + description: 'omits ES5 classes which are pure (e.g. they only assign to `this`)', + expectedWarnings: ['THIS_IS_UNDEFINED'] }; diff --git a/test/form/samples/side-effect-l/_config.js b/test/form/samples/side-effect-l/_config.js index 51f192c249d..ec762ed9126 100644 --- a/test/form/samples/side-effect-l/_config.js +++ b/test/form/samples/side-effect-l/_config.js @@ -1,3 +1,4 @@ module.exports = { - description: 'discards function with no side-effects in imported module' + description: 'discards function with no side-effects in imported module', + expectedWarnings: ['EMPTY_BUNDLE'] }; diff --git a/test/form/samples/side-effect-m/_config.js b/test/form/samples/side-effect-m/_config.js index 1c3ca4efa25..52626e76e50 100644 --- a/test/form/samples/side-effect-m/_config.js +++ b/test/form/samples/side-effect-m/_config.js @@ -1,3 +1,4 @@ module.exports = { - description: 'detects side-effects with cyclical dependencies' + description: 'detects side-effects with cyclical dependencies', + expectedWarnings: ['CIRCULAR_DEPENDENCY'] }; diff --git a/test/form/samples/side-effect-q/_config.js b/test/form/samples/side-effect-q/_config.js index 944a58aa309..542135c0d96 100644 --- a/test/form/samples/side-effect-q/_config.js +++ b/test/form/samples/side-effect-q/_config.js @@ -1,3 +1,4 @@ module.exports = { - description: 'discards effects in conditional expressions with known test values' + description: 'discards effects in conditional expressions with known test values', + expectedWarnings: ['EMPTY_BUNDLE'] }; diff --git a/test/form/samples/side-effect-r/_config.js b/test/form/samples/side-effect-r/_config.js index 63458812712..160946bb6a1 100644 --- a/test/form/samples/side-effect-r/_config.js +++ b/test/form/samples/side-effect-r/_config.js @@ -1,4 +1,5 @@ module.exports = { description: - 'discards unused function expression assigned to a variable that calls itself and a global' + 'discards unused function expression assigned to a variable that calls itself and a global', + expectedWarnings: ['EMPTY_BUNDLE'] }; diff --git a/test/form/samples/side-effect-s/_config.js b/test/form/samples/side-effect-s/_config.js index c043c083f80..83665339a11 100644 --- a/test/form/samples/side-effect-s/_config.js +++ b/test/form/samples/side-effect-s/_config.js @@ -1,4 +1,5 @@ module.exports = { description: - 'discards unused function expression assigned to a variable that calls itself and has side effects' + 'discards unused function expression assigned to a variable that calls itself and has side effects', + expectedWarnings: ['EMPTY_BUNDLE'] }; diff --git a/test/form/samples/side-effect-with-plusplus-expression/_config.js b/test/form/samples/side-effect-with-plusplus-expression/_config.js index 5e942f61abf..a1d93a75228 100644 --- a/test/form/samples/side-effect-with-plusplus-expression/_config.js +++ b/test/form/samples/side-effect-with-plusplus-expression/_config.js @@ -1,3 +1,5 @@ module.exports = { - description: 'correctly drop side-effect free statements in presence of update expression (#1564)' + description: + 'correctly drop side-effect free statements in presence of update expression (#1564)', + expectedWarnings: ['EMPTY_BUNDLE'] }; diff --git a/test/form/samples/tree-shake-curried-functions/_config.js b/test/form/samples/tree-shake-curried-functions/_config.js index e7e0c648cf3..f022678d476 100644 --- a/test/form/samples/tree-shake-curried-functions/_config.js +++ b/test/form/samples/tree-shake-curried-functions/_config.js @@ -1,9 +1,4 @@ module.exports = { description: 'Remove side-effect-free curried functions (#1263)', - warnings: [ - { - code: 'EMPTY_BUNDLE', - message: `Generated an empty bundle` - } - ] + expectedWarnings: ['EMPTY_BUNDLE'] }; diff --git a/test/form/samples/undefined-properties/_config.js b/test/form/samples/undefined-properties/_config.js index 29b3cc673cb..a89e4af5ef0 100644 --- a/test/form/samples/undefined-properties/_config.js +++ b/test/form/samples/undefined-properties/_config.js @@ -1,3 +1,4 @@ module.exports = { - description: 'detects undefined properties' + description: 'detects undefined properties', + expectedWarnings: ['EMPTY_BUNDLE'] }; diff --git a/test/form/samples/unused-import/_config.js b/test/form/samples/unused-import/_config.js index 9de4055aa24..aa797dca171 100644 --- a/test/form/samples/unused-import/_config.js +++ b/test/form/samples/unused-import/_config.js @@ -1,6 +1,9 @@ module.exports = { description: 'excludes unused imports ([#595])', options: { - external: ['external'] + external: ['external'], + output: { + globals: { external: 'external' } + } } }; diff --git a/test/form/samples/url-external/_config.js b/test/form/samples/url-external/_config.js index dcceaef3f56..1a4fb129c72 100644 --- a/test/form/samples/url-external/_config.js +++ b/test/form/samples/url-external/_config.js @@ -1,6 +1,9 @@ module.exports = { description: 'supports URL externals', options: { - external: ['https://external.com/external.js'] + external: ['https://external.com/external.js'], + output: { + globals: { 'https://external.com/external.js': 'external' } + } } }; diff --git a/test/function/index.js b/test/function/index.js index 9e9222addae..93899abba20 100644 --- a/test/function/index.js +++ b/test/function/index.js @@ -52,7 +52,6 @@ runTestSuiteWithSamples('function', path.resolve(__dirname, 'samples'), (dir, co () => { if (config.show) console.group(path.basename(dir)); if (config.before) config.before(); - process.chdir(dir); const warnings = []; diff --git a/test/function/samples/warnings-to-string/_config.js b/test/function/samples/warnings-to-string/_config.js new file mode 100644 index 00000000000..9b339bb7ff0 --- /dev/null +++ b/test/function/samples/warnings-to-string/_config.js @@ -0,0 +1,19 @@ +const assert = require('assert'); + +module.exports = { + description: 'provides a string conversion for warnings', + options: { + plugins: { + name: 'test-plugin', + transform(code) { + this.warn('This might be removed', code.indexOf('removed')); + } + } + }, + warnings(warnings) { + assert.deepStrictEqual(warnings.map(String), [ + '(test-plugin plugin) main.js (1:6) This might be removed', + 'Generated an empty bundle' + ]); + } +}; diff --git a/test/function/samples/warnings-to-string/main.js b/test/function/samples/warnings-to-string/main.js new file mode 100644 index 00000000000..fc3cf46bfd0 --- /dev/null +++ b/test/function/samples/warnings-to-string/main.js @@ -0,0 +1 @@ +const removed = 1; From 9374704d9698bb66551d6fbad8dc76abb7e5db04 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Sun, 25 Aug 2019 07:29:21 +0200 Subject: [PATCH 2/4] Update changelog --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2bb4c9b1f7..bb59d457dd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # rollup changelog +## 1.20.2 +*2019-08-25* + +### Bug Fixes +* Avoid an issue where circular namespace reexports would crash Rollup (#3074) + +### Pull Requests +* [#3077](https://github.com/rollup/rollup/pull/3077): Handle namespaces that reexport themselves (@lukastaegert) + ## 1.20.1 *2019-08-22* From b1747e49d9659799a8c128d3052e5e5703362c37 Mon Sep 17 00:00:00 2001 From: Lukas Taegert-Atkinson Date: Sun, 25 Aug 2019 07:29:27 +0200 Subject: [PATCH 3/4] 1.20.2 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index c8a01f7c2d5..7037461dc63 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "rollup", - "version": "1.20.1", + "version": "1.20.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 27547e2c3dc..cb0e6b4cf78 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rollup", - "version": "1.20.1", + "version": "1.20.2", "description": "Next-generation ES module bundler", "main": "dist/rollup.js", "module": "dist/rollup.es.js", From cc5fd63d9a612d61499c3b7e8ee97957422856a8 Mon Sep 17 00:00:00 2001 From: Andrew Powell Date: Mon, 26 Aug 2019 09:16:00 -0400 Subject: [PATCH 4/4] chore: add github actions workflow config for windows (#3078) * chore: add github actions workflow config * fix: use npm ci, npm run test * chore: wee * chore: this might be custom appveyor syntax * chore: split funky commands into steps * Try to fix line-break issue in Windows * chore: skip test:leak on windows * chore: remove appveyor.yml * Align a little closer with Node example See if this improves output * Try to fix step description * Remove obsolete workflow name * Add workflow name again * chore: tweak descriptions, rename workflow file, add node 6 comment --- .github/workflows/node-windows.yml | 32 ++++++++++++++++++++++++++++++ appveyor.yml | 32 ------------------------------ package-lock.json | 22 ++++++++++++-------- package.json | 9 ++++++++- 4 files changed, 54 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/node-windows.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/node-windows.yml b/.github/workflows/node-windows.yml new file mode 100644 index 00000000000..934baa0cfb3 --- /dev/null +++ b/.github/workflows/node-windows.yml @@ -0,0 +1,32 @@ +name: Node + +on: [push] + +jobs: + build: + + runs-on: windows-2019 + + strategy: + matrix: + node: [ '10', '6' ] + + name: ${{ matrix.node }} (Windows) + steps: + - name: Configure git line-breaks + run: git config --global core.autocrlf false + - name: Checkout Commit + uses: actions/checkout@v1 + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + - name: Check npm version + # This is only necessary until we dump Node 6 + run: IF ${{ matrix.node }} LSS 8 npm i npm@5 -g + - name: Install dependencies + run: npm ci --ignore-scripts + - name: Run tests + run: npm test + env: + CI: true diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 96d7adb4ca4..00000000000 --- a/appveyor.yml +++ /dev/null @@ -1,32 +0,0 @@ -# http://www.appveyor.com/docs/appveyor-yml - -version: "{build}" - -clone_depth: 10 - -init: - - git config --global core.autocrlf false - -environment: - matrix: - # node.js - - nodejs_version: 6 - - nodejs_version: 10 - -install: - - ps: Install-Product node $env:nodejs_version - - IF %nodejs_version% LSS 8 npm -g install npm@5 - - npm ci --ignore-scripts - -build: off - -test_script: - - node --version && npm --version - - npm test - -matrix: - fast_finish: false - -# cache: -# - C:\Users\appveyor\AppData\Roaming\npm-cache -> package.json # npm cache -# - node_modules -> package.json # local npm modules diff --git a/package-lock.json b/package-lock.json index 7037461dc63..d247f2b96e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -240,7 +240,7 @@ }, "@types/minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=", "dev": true }, @@ -1093,6 +1093,12 @@ } } }, + "cross-os": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/cross-os/-/cross-os-1.3.0.tgz", + "integrity": "sha512-9kViqCcAwlPLTeSDPlyC2FdMQ5UVPtGZUnGV8vYDcBA3olJ/hDR7H6IfrNJft2DlKONleHf8CMhD+7Uv2tBnEw==", + "dev": true + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -3408,7 +3414,7 @@ }, "is-obj": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", "dev": true }, @@ -4274,7 +4280,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -4960,7 +4966,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -5137,7 +5143,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -5585,7 +5591,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -5970,7 +5976,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { @@ -6005,7 +6011,7 @@ }, "strip-eof": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, diff --git a/package.json b/package.json index cb0e6b4cf78..87604081782 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,13 @@ "test": "npm run test:all", "test:all": "npm run test:only && npm run test:typescript && npm run test:leak", "test:coverage": "nyc --reporter html mocha", - "test:leak": "npm i --silent --no-save weak@1 && node --expose-gc test/leak/index.js", + "test:leak": "cross-os test:leak:os", + "test:leak:os": { + "darwin": "npm run test:leak:nix", + "linux": "npm run test:leak:nix", + "win32": "echo 'Skipping test:leak on Windows'" + }, + "test:leak:nix": "npm i --silent --no-save weak@1 && node --expose-gc test/leak/index.js", "test:only": "mocha", "test:quick": "mocha -b", "test:typescript": "tsc --noEmit -p test/typescript && tsc --noEmit", @@ -73,6 +79,7 @@ "codecov": "^3.5.0", "console-group": "^0.3.3", "core-js": "^3.2.1", + "cross-os": "^1.3.0", "date-time": "^3.1.0", "es5-shim": "^4.5.13", "es6-shim": "^0.35.5",