diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 8f3aeb0..70ed360 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -56,7 +56,7 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] node-version: [10.x, 12.x, 14.x] - webpack-version: [4, latest] + webpack-version: [latest] runs-on: ${{ matrix.os }} diff --git a/README.md b/README.md index 862d561..a72e3fb 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,6 @@ And run `webpack` via your preferred method. | **[`minRatio`](#minratio)** | `{Number}` | `0.8` | Only assets that compress better than this ratio are processed (`minRatio = Compressed Size / Original Size`) | | **[`filename`](#filename)** | `{String\|Function}` | `[path][base].gz` | The target asset filename | | **[`deleteOriginalAssets`](#deleteoriginalassets)** | `{Boolean\|'keep-source-map'}` | `false` | Whether to delete the original assets or not | -| **[`cache`](#cache)** | `{Boolean}` | `true` | Enable file caching | ### `test` @@ -319,48 +318,6 @@ module.exports = { }; ``` -### `cache` - -> ⚠ Ignored in webpack 5! Please use https://webpack.js.org/configuration/other-options/#cache. - -Type: `Boolean|String` -Default: `true` - -Enable file caching. -The default path to cache directory: `node_modules/.cache/compression-webpack-plugin`. - -#### `Boolean` - -Enable/disable file caching. - -**webpack.config.js** - -```js -module.exports = { - plugins: [ - new CompressionPlugin({ - cache: true, - }), - ], -}; -``` - -#### `String` - -Enable file caching and set path to cache directory. - -**webpack.config.js** - -```js -module.exports = { - plugins: [ - new CompressionPlugin({ - cache: "path/to/cache", - }), - ], -}; -``` - ## Examples ### Using Zopfli diff --git a/jest.config.js b/jest.config.js index eafaef1..5da099d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,4 +1,3 @@ module.exports = { testEnvironment: "node", - snapshotResolver: "./test/helpers/snapshotResolver.js", }; diff --git a/package-lock.json b/package-lock.json index a6e868f..e2d8ed6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,12 +5,12 @@ "requires": true, "dependencies": { "@babel/cli": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.12.1.tgz", - "integrity": "sha512-eRJREyrfAJ2r42Iaxe8h3v6yyj1wu9OyosaUHW6UImjGf9ahGL9nsFNh7OCopvtcPL8WnEo7tp78wrZaZ6vG9g==", + "version": "7.12.8", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.12.8.tgz", + "integrity": "sha512-/6nQj11oaGhLmZiuRUfxsujiPDc9BBReemiXgIbxc+M5W+MIiFKYwvNDJvBfnGKNsJTKbUfEheKc9cwoPHAVQA==", "dev": true, "requires": { - "@nicolo-ribaudo/chokidar-2": "^2.1.8", + "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents", "chokidar": "^3.4.0", "commander": "^4.0.1", "convert-source-map": "^1.1.0", @@ -20,30 +20,6 @@ "make-dir": "^2.1.0", "slash": "^2.0.0", "source-map": "^0.5.0" - }, - "dependencies": { - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } } }, "@babel/code-frame": { @@ -56,25 +32,25 @@ } }, "@babel/compat-data": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.12.5.tgz", - "integrity": "sha512-DTsS7cxrsH3by8nqQSpFSyjSfSYl57D6Cf4q8dW3LK83tBKBDCkfcay1nYkXq1nIHXnpX8WMMb/O25HOy3h1zg==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.12.7.tgz", + "integrity": "sha512-YaxPMGs/XIWtYqrdEOZOCPsVWfEoriXopnsz3/i7apYPXQ3698UFhS6dVT1KN5qOsWmVgw/FOrmQgpRaZayGsw==", "dev": true }, "@babel/core": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", - "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", + "version": "7.12.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", + "integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", + "@babel/generator": "^7.12.5", "@babel/helper-module-transforms": "^7.12.1", - "@babel/helpers": "^7.12.1", - "@babel/parser": "^7.12.3", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.9", + "@babel/types": "^7.12.7", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", @@ -86,9 +62,9 @@ }, "dependencies": { "debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -99,18 +75,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true } } }, @@ -123,14 +87,6 @@ "@babel/types": "^7.12.5", "jsesc": "^2.5.1", "source-map": "^0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } } }, "@babel/helper-annotate-as-pure": { @@ -162,14 +118,6 @@ "@babel/helper-validator-option": "^7.12.1", "browserslist": "^4.14.5", "semver": "^5.5.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } } }, "@babel/helper-create-class-features-plugin": { @@ -186,13 +134,12 @@ } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.1.tgz", - "integrity": "sha512-rsZ4LGvFTZnzdNZR5HZdmJVuXK8834R5QkF3WvcnBhrlVtF0HSIUC6zbreL9MgjTywhKokn8RIYRiq99+DLAxA==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.7.tgz", + "integrity": "sha512-idnutvQPdpbduutvi3JVfEgcVIHooQnhvhx0Nk9isOINOIGYkZea1Pk2JlJRiUnMefrlvr0vkByATBY/mB4vjQ==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.10.4", - "@babel/helper-regex": "^7.10.4", "regexpu-core": "^4.7.1" } }, @@ -246,12 +193,12 @@ } }, "@babel/helper-member-expression-to-functions": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz", - "integrity": "sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz", + "integrity": "sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw==", "dev": true, "requires": { - "@babel/types": "^7.12.1" + "@babel/types": "^7.12.7" } }, "@babel/helper-module-imports": { @@ -281,12 +228,12 @@ } }, "@babel/helper-optimise-call-expression": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", - "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.7.tgz", + "integrity": "sha512-I5xc9oSJ2h59OwyUqjv95HRyzxj53DAubUERgQMrpcCEYQyToeHA+NEcUEsVWB4j53RDeskeBJ0SgRAYHDBckw==", "dev": true, "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.7" } }, "@babel/helper-plugin-utils": { @@ -295,15 +242,6 @@ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true }, - "@babel/helper-regex": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.5.tgz", - "integrity": "sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg==", - "dev": true, - "requires": { - "lodash": "^4.17.19" - } - }, "@babel/helper-remap-async-to-generator": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz", @@ -401,9 +339,9 @@ } }, "@babel/parser": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz", - "integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz", + "integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { @@ -478,9 +416,9 @@ } }, "@babel/plugin-proposal-numeric-separator": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.5.tgz", - "integrity": "sha512-UiAnkKuOrCyjZ3sYNHlRlfuZJbBHknMQ9VMwVeX97Ofwx7RpD6gS2HfqTCh8KNUQgcOm8IKt103oR4KIjh7Q8g==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.7.tgz", + "integrity": "sha512-8c+uy0qmnRTeukiGsjLGy6uVs/TFjJchGXUeBqlG4VWYOdJWkhhVPdQ3uHwbmalfJwv2JsV0qffXP4asRfL2SQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", @@ -509,9 +447,9 @@ } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.1.tgz", - "integrity": "sha512-c2uRpY6WzaVDzynVY9liyykS+kVU+WRZPMPYpkelXH8KBt1oXoI89kPbZKKG/jDT5UK92FTW2fZkZaJhdiBabw==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.7.tgz", + "integrity": "sha512-4ovylXZ0PWmwoOvhU2vhnzVNnm88/Sm9nx7V8BPgMvAzn5zDou3/Awy0EjglyubVHasJj+XCEkr/r1X3P5elCA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4", @@ -933,13 +871,12 @@ } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.1.tgz", - "integrity": "sha512-CiUgKQ3AGVk7kveIaPEET1jNDhZZEl1RPMWdTBE1799bdz++SwqDHStmxfCtDfBhQgCl38YRiSnrMuUMZIWSUQ==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.7.tgz", + "integrity": "sha512-VEiqZL5N/QvDbdjfYQBhruN0HYjSPjC4XkeqW4ny/jNtH9gcbgaqBIXYEZCNnESMAGs0/K/R7oFGMhOyu/eIxg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-regex": "^7.10.4" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-template-literals": { @@ -980,14 +917,14 @@ } }, "@babel/preset-env": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.1.tgz", - "integrity": "sha512-H8kxXmtPaAGT7TyBvSSkoSTUK6RHh61So05SyEbpmr0MCZrsNYn7mGMzzeYoOUCdHzww61k8XBft2TaES+xPLg==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.7.tgz", + "integrity": "sha512-OnNdfAr1FUQg7ksb7bmbKoby4qFOHw6DKWWUNB9KqnnCldxhxJlP+21dpyaWFmf2h0rTbOkXJtAGevY3XW1eew==", "dev": true, "requires": { - "@babel/compat-data": "^7.12.1", - "@babel/helper-compilation-targets": "^7.12.1", - "@babel/helper-module-imports": "^7.12.1", + "@babel/compat-data": "^7.12.7", + "@babel/helper-compilation-targets": "^7.12.5", + "@babel/helper-module-imports": "^7.12.5", "@babel/helper-plugin-utils": "^7.10.4", "@babel/helper-validator-option": "^7.12.1", "@babel/plugin-proposal-async-generator-functions": "^7.12.1", @@ -997,10 +934,10 @@ "@babel/plugin-proposal-json-strings": "^7.12.1", "@babel/plugin-proposal-logical-assignment-operators": "^7.12.1", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", - "@babel/plugin-proposal-numeric-separator": "^7.12.1", + "@babel/plugin-proposal-numeric-separator": "^7.12.7", "@babel/plugin-proposal-object-rest-spread": "^7.12.1", "@babel/plugin-proposal-optional-catch-binding": "^7.12.1", - "@babel/plugin-proposal-optional-chaining": "^7.12.1", + "@babel/plugin-proposal-optional-chaining": "^7.12.7", "@babel/plugin-proposal-private-methods": "^7.12.1", "@babel/plugin-proposal-unicode-property-regex": "^7.12.1", "@babel/plugin-syntax-async-generators": "^7.8.0", @@ -1042,23 +979,15 @@ "@babel/plugin-transform-reserved-words": "^7.12.1", "@babel/plugin-transform-shorthand-properties": "^7.12.1", "@babel/plugin-transform-spread": "^7.12.1", - "@babel/plugin-transform-sticky-regex": "^7.12.1", + "@babel/plugin-transform-sticky-regex": "^7.12.7", "@babel/plugin-transform-template-literals": "^7.12.1", "@babel/plugin-transform-typeof-symbol": "^7.12.1", "@babel/plugin-transform-unicode-escapes": "^7.12.1", "@babel/plugin-transform-unicode-regex": "^7.12.1", "@babel/preset-modules": "^0.1.3", - "@babel/types": "^7.12.1", - "core-js-compat": "^3.6.2", + "@babel/types": "^7.12.7", + "core-js-compat": "^3.7.0", "semver": "^5.5.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } } }, "@babel/preset-modules": { @@ -1084,37 +1013,37 @@ } }, "@babel/template": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", - "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz", + "integrity": "sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/parser": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/parser": "^7.12.7", + "@babel/types": "^7.12.7" } }, "@babel/traverse": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz", - "integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==", + "version": "7.12.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.9.tgz", + "integrity": "sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/generator": "^7.12.5", "@babel/helper-function-name": "^7.10.4", "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.12.5", - "@babel/types": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/types": "^7.12.7", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.19" }, "dependencies": { "debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -1129,9 +1058,9 @@ } }, "@babel/types": { - "version": "7.12.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", - "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz", + "integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", @@ -1494,12 +1423,12 @@ } }, "p-limit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz", - "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" } }, "p-locate": { @@ -1538,9 +1467,9 @@ }, "dependencies": { "debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -1978,6 +1907,12 @@ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -1998,6 +1933,14 @@ "callsites": "^3.0.0", "graceful-fs": "^4.2.4", "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "@jest/test-result": { @@ -2128,6 +2071,12 @@ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2213,36 +2162,23 @@ } }, "@nicolo-ribaudo/chokidar-2": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8.tgz", - "integrity": "sha512-FohwULwAebCUKi/akMFyGi7jfc7JXTeMHzKxuP3umRd9mK/2Y7/SMBSI2jX+YLopPXi+PF9l307NmpfxTdCegA==", + "version": "2.1.8-no-fsevents", + "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.tgz", + "integrity": "sha512-+nb9vWloHNNMFHjGofEam3wopE3m1yuambrrd/fnPc+lFOMB9ROTqQlche9ByFWNkdNqfSgR/kkQtQ8DzEWt2w==", "dev": true, "optional": true, "requires": { - "chokidar": "2.1.8" - }, - "dependencies": { - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", - "dev": true, - "optional": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - } + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" } }, "@nodelib/fs.scandir": { @@ -2271,18 +2207,10 @@ "fastq": "^1.6.0" } }, - "@npmcli/move-file": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.0.1.tgz", - "integrity": "sha512-Uv6h1sT+0DrblvIrolFtbvM1FgWm+/sy4B3pvLp67Zys+thcukzS5ekn7HsZFGpWP4Q3fYJCljbWQE/XivMRLw==", - "requires": { - "mkdirp": "^1.0.4" - } - }, "@rollup/plugin-babel": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.2.1.tgz", - "integrity": "sha512-Jd7oqFR2dzZJ3NWANDyBjwTtX/lYbZpVcmkHrfQcpvawHs9E4c0nYk5U2mfZ6I/DZcIvy506KZJi54XK/jxH7A==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.2.2.tgz", + "integrity": "sha512-MjmH7GvFT4TW8xFdIeFS3wqIX646y5tACdxkTO+khbHvS3ZcVJL6vkAHLw2wqPmkhwCfWHoNsp15VYNwW6JEJA==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.10.4", @@ -2383,9 +2311,9 @@ } }, "@types/babel__template": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.0.3.tgz", - "integrity": "sha512-uCoznIPDmnickEi6D0v11SBpW0OuVqHJCa7syXqQHy5uktSCreIlt0iglsCnmvz8yCb38hGcWeseA8cWJSwv5Q==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.0.tgz", + "integrity": "sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -2393,18 +2321,18 @@ } }, "@types/babel__traverse": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.15.tgz", - "integrity": "sha512-Pzh9O3sTK8V6I1olsXpCfj2k/ygO2q1X0vhhnDrEQyYLHZesWz+zMZMVcwXLCYf0U36EtmyYaFGPfXlTtDHe3A==", + "version": "7.0.16", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.16.tgz", + "integrity": "sha512-S63Dt4CZOkuTmpLGGWtT/mQdVORJOpx6SZWGVaP56dda/0Nx5nEe82K7/LAm8zYr6SfMq+1N2OreIOrHAx656w==", "dev": true, "requires": { "@babel/types": "^7.3.0" } }, "@types/eslint": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.2.4.tgz", - "integrity": "sha512-YCY4kzHMsHoyKspQH+nwSe+70Kep7Vjt2X+dZe5Vs2vkRudqtoFoUIv1RlJmZB8Hbp7McneupoZij4PadxsK5Q==", + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.2.6.tgz", + "integrity": "sha512-I+1sYH+NPQ3/tVqCeUSBwTE/0heyvtXqpIopUUArlBm0Kpocb8FbMa3AZ/ASKIFpN3rnEx932TTXDbt9OXsNDw==", "dev": true, "requires": { "@types/estree": "*", @@ -2488,15 +2416,15 @@ "dev": true }, "@types/minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz", + "integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==", "dev": true }, "@types/node": { - "version": "14.14.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.6.tgz", - "integrity": "sha512-6QlRuqsQ/Ox/aJEQWBEJG7A9+u7oSYl3mem/K8IzxXG/kAGbV1YPD9Bg9Zw3vyxC/YP+zONKwy8hGkSt1jxFMw==", + "version": "14.14.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.10.tgz", + "integrity": "sha512-J32dgx2hw8vXrSbu4ZlVhn1Nm3GbeCFNw2FWL8S5QKucHGY0cyNwjdQdO+KMBZ4wpmC7KhLCiNsdk1RFRIYUQQ==", "dev": true }, "@types/normalize-package-data": { @@ -2533,9 +2461,9 @@ "dev": true }, "@types/yargs": { - "version": "15.0.9", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.9.tgz", - "integrity": "sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g==", + "version": "15.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.10.tgz", + "integrity": "sha512-z8PNtlhrj7eJNLmrAivM7rjBESG6JwC5xP3RVk12i/8HVP7Xnx/sEmERnRImyEuUaJfO942X0qMOYsoupaJbZQ==", "dev": true, "requires": { "@types/yargs-parser": "*" @@ -2822,6 +2750,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, "requires": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -2948,13 +2877,15 @@ "dev": true }, "array-includes": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", - "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.2.tgz", + "integrity": "sha512-w2GspexNQpx+PutG3QpT437/BenZBj0M/MZGn5mzv/MofYqo0xmRHzn4lFsoDlWJ+THYsGJmFlW68WlDFx7VRw==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0", + "es-abstract": "^1.18.0-next.1", + "get-intrinsic": "^1.0.1", "is-string": "^1.0.5" } }, @@ -2971,13 +2902,14 @@ "dev": true }, "array.prototype.flat": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", - "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", + "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" + "es-abstract": "^1.18.0-next.1" } }, "arrify": { @@ -3249,7 +3181,8 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true }, "base": { "version": "0.11.2", @@ -3307,9 +3240,9 @@ } }, "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true }, "bcrypt-pbkdf": { @@ -3334,20 +3267,11 @@ "dev": true, "optional": true }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dev": true, - "optional": true, - "requires": { - "file-uri-to-path": "1.0.0" - } - }, "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, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3389,15 +3313,16 @@ "dev": true }, "browserslist": { - "version": "4.14.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.6.tgz", - "integrity": "sha512-zeFYcUo85ENhc/zxHbiIp0LGzzTrE2Pv2JhxvS7kpUb9Q9D38kUX6Bie7pGutJ/5iF5rOxE7CepAuWD56xJ33A==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.15.0.tgz", + "integrity": "sha512-IJ1iysdMkGmjjYeRlDU8PQejVwxvVO5QOfXH7ylW31GO6LwNRSmm/SgRXtNsEXqMLl2e+2H5eEJ7sfynF8TCaQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001154", - "electron-to-chromium": "^1.3.585", + "caniuse-lite": "^1.0.30001164", + "colorette": "^1.2.1", + "electron-to-chromium": "^1.3.612", "escalade": "^3.1.1", - "node-releases": "^1.1.65" + "node-releases": "^1.1.67" } }, "bser": { @@ -3421,30 +3346,6 @@ "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", "dev": true }, - "cacache": { - "version": "15.0.5", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.0.5.tgz", - "integrity": "sha512-lloiL22n7sOjEEXdL8NAjTgv9a1u43xICE9/203qonkZUCj5X1UEWIdf2/Y0d6QcCtMzbKQyhrcDbdvlZTs/+A==", - "requires": { - "@npmcli/move-file": "^1.0.1", - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "infer-owner": "^1.0.4", - "lru-cache": "^6.0.0", - "minipass": "^3.1.1", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^1.0.3", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^8.0.0", - "tar": "^6.0.2", - "unique-filename": "^1.1.1" - } - }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -3496,9 +3397,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001157", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001157.tgz", - "integrity": "sha512-gOerH9Wz2IRZ2ZPdMfBvyOi3cjaz4O4dgNwPGzx8EhqAs4+2IL/O+fJsbt+znSigujoZG8bVcIAUM/I/E5K3MA==", + "version": "1.0.30001164", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001164.tgz", + "integrity": "sha512-G+A/tkf4bu0dSp9+duNiXc7bGds35DioCyC6vgK2m/rjA4Krpy5WeZgZyfH2f0wj2kI6yAWWucyap6oOwmY1mg==", "dev": true }, "capture-exit": { @@ -3588,13 +3489,6 @@ "to-regex-range": "^5.0.1" } }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true - }, "glob-parent": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", @@ -3644,11 +3538,6 @@ } } }, - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" - }, "chrome-trace-event": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", @@ -3696,7 +3585,8 @@ "clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true }, "cli-cursor": { "version": "3.1.0", @@ -3808,6 +3698,12 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "colorette": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", + "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==", + "dev": true + }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -3838,11 +3734,6 @@ "integrity": "sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw==", "dev": true }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" - }, "compare-func": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", @@ -3868,7 +3759,8 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "concat-stream": { "version": "2.0.0", @@ -4235,12 +4127,6 @@ "strip-indent": "^2.0.0" } }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, "strip-indent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", @@ -4323,6 +4209,14 @@ "semver": "^6.0.0", "split": "^1.0.0", "through2": "^4.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "conventional-commits-filter": { @@ -4779,12 +4673,6 @@ "strip-indent": "^2.0.0" } }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, "strip-indent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", @@ -4857,18 +4745,18 @@ "dev": true }, "core-js": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.7.0.tgz", - "integrity": "sha512-NwS7fI5M5B85EwpWuIwJN4i/fbisQUwLwiSNUWeXlkAZ0sbBjLEvLvFLf1uzAUV66PcEPt4xCGCmOZSxVf3xzA==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.0.tgz", + "integrity": "sha512-W2VYNB0nwQQE7tKS7HzXd7r2y/y2SVJl4ga6oH/dnaLFzM0o2lB2P3zCkWj5Wc/zyMYjtgd5Hmhk0ObkQFZOIA==", "dev": true }, "core-js-compat": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.7.0.tgz", - "integrity": "sha512-V8yBI3+ZLDVomoWICO6kq/CD28Y4r1M7CWeO4AGpMdMfseu8bkSubBmUPySMGKRTS+su4XQ07zUkAsiu9FCWTg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.8.0.tgz", + "integrity": "sha512-o9QKelQSxQMYWHXc/Gc4L8bx/4F7TTraE5rhuN8I7mKBt5dBIUpXpIR3omv70ebr8ST5R3PqbDQr+ZI3+Tt1FQ==", "dev": true, "requires": { - "browserslist": "^4.14.6", + "browserslist": "^4.14.7", "semver": "7.0.0" }, "dependencies": { @@ -4900,9 +4788,9 @@ } }, "cross-env": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.2.tgz", - "integrity": "sha512-KZP/bMEOJEDCkDQAyRhu3RL2ZO/SUVrxQVI0G3YEQ+OLbRA3c6zgixe8Mq8a/z7+HKlNEjo8oiLUs8iRijY2Rw==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", "dev": true, "requires": { "cross-spawn": "^7.0.1" @@ -4962,14 +4850,6 @@ "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } } }, "crypto-random-string": { @@ -5273,12 +5153,6 @@ "aggregate-error": "^3.0.0" } }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -5455,12 +5329,6 @@ "yallist": "^2.1.2" } }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", @@ -5476,9 +5344,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.591", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.591.tgz", - "integrity": "sha512-ol/0WzjL4NS4Kqy9VD6xXQON91xIihDT36sYCew/G/bnd1v0/4D+kahp26JauQhgFUjrdva3kRSo7URcUmQ+qw==", + "version": "1.3.613", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.613.tgz", + "integrity": "sha512-c3gkahddiUalk7HLhTC7PsKzPZmovYFtgh+g3rZJ+dGokk4n4dzEoOBnoV8VU8ptvnGJMhrjM/lyXKSltqf2hQ==", "dev": true }, "emittery": { @@ -5509,9 +5377,9 @@ } }, "enhanced-resolve": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.3.1.tgz", - "integrity": "sha512-G1XD3MRGrGfNcf6Hg0LVZG7GIKcYkbfHa5QMxt1HDUTdYoXH0JR1xXyg+MaKLF73E9A27uWNVxvFivNRYeUB6w==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.3.2.tgz", + "integrity": "sha512-G28GCrglCAH6+EqMN2D+Q2wCUS1O1vVQJBn8ME2I/Api41YBe4vLWWRBOUbwDH7vwzSZdljxwTRVqnf+sm6XqQ==", "dev": true, "requires": { "graceful-fs": "^4.2.4", @@ -5537,9 +5405,9 @@ } }, "es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", - "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", @@ -5547,6 +5415,7 @@ "has": "^1.0.3", "has-symbols": "^1.0.1", "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", "is-regex": "^1.1.1", "object-inspect": "^1.8.0", "object-keys": "^1.1.1", @@ -5627,6 +5496,13 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -5639,9 +5515,9 @@ } }, "eslint": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.13.0.tgz", - "integrity": "sha512-uCORMuOO8tUzJmsdRtrvcGq5qposf7Rw0LwkTJkoDbOycVQtQjmnhZSuLQnozLE4TmAzlMVV45eCHmQ1OpDKUQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.14.0.tgz", + "integrity": "sha512-5YubdnPXrlrYAFCKybPuHIAH++PINe1pmKNc5wQRB9HSbqIK1ywAnntE3Wwua4giKu0bjligf1gLF6qxMGOYRA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -5729,9 +5605,9 @@ } }, "debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -5780,10 +5656,13 @@ "dev": true }, "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } }, "shebang-command": { "version": "2.0.0", @@ -5867,66 +5746,6 @@ "requires": { "debug": "^2.6.9", "pkg-dir": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - } } }, "eslint-plugin-import": { @@ -6062,12 +5881,6 @@ "find-up": "^2.0.0", "read-pkg": "^2.0.0" } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true } } }, @@ -6530,13 +6343,6 @@ } } }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true, - "optional": true - }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -6560,20 +6366,11 @@ } } }, - "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, "requires": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -6675,14 +6472,6 @@ "universalify": "^1.0.0" } }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "requires": { - "minipass": "^3.0.0" - } - }, "fs-monkey": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.1.tgz", @@ -6698,18 +6487,15 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", - "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - } + "optional": true }, "function-bind": { "version": "1.1.1", @@ -6933,12 +6719,6 @@ "strip-indent": "^1.0.1" } }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, "strip-bom": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", @@ -7066,6 +6846,14 @@ "requires": { "meow": "^8.0.0", "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "git-username": { @@ -7091,6 +6879,7 @@ "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -7190,6 +6979,14 @@ "source-map": "^0.6.1", "uglify-js": "^3.1.4", "wordwrap": "^1.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "har-schema": { @@ -7392,6 +7189,15 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -7450,27 +7256,36 @@ "requires": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" + }, + "dependencies": { + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + } } }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true }, "indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" - }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -7479,7 +7294,8 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "ini": { "version": "1.3.5", @@ -7557,9 +7373,9 @@ } }, "is-core-module": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.1.0.tgz", - "integrity": "sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", "dev": true, "requires": { "has": "^1.0.3" @@ -7840,6 +7656,14 @@ "@istanbuljs/schema": "^0.1.2", "istanbul-lib-coverage": "^3.0.0", "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "istanbul-lib-report": { @@ -7859,6 +7683,21 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -7882,9 +7721,9 @@ }, "dependencies": { "debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -7895,6 +7734,12 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -8427,13 +8272,6 @@ "to-regex-range": "^5.0.1" } }, - "fsevents": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.2.1.tgz", - "integrity": "sha512-bTLYHSeC0UH/EFXS9KqWnXuOl/wHK5Z/d+ghd5AsFMYN7wIGkUCOJyzy88+wJKkZPGON8u4Z9f6U4FdgURE9qA==", - "dev": true, - "optional": true - }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -9086,10 +8924,13 @@ "dev": true }, "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } }, "supports-color": { "version": "7.2.0", @@ -9569,9 +9410,9 @@ "dev": true }, "lint-staged": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.5.1.tgz", - "integrity": "sha512-fTkTGFtwFIJJzn/PbUO3RXyEBHIhbfYBE7+rJyLcOXabViaO/h6OslgeK6zpeUtzkDrzkgyAYDTLAwx6JzDTHw==", + "version": "10.5.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.5.2.tgz", + "integrity": "sha512-e8AYR1TDlzwB8VVd38Xu2lXDZf6BcshVqKVuBQThDJRaJLobqKnpbm4dkwJ2puypQNbLr9KF/9mfA649mAGvjA==", "dev": true, "requires": { "chalk": "^4.1.0", @@ -9652,9 +9493,9 @@ } }, "debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -9795,9 +9636,9 @@ "dev": true }, "listr2": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.2.2.tgz", - "integrity": "sha512-AajqcZEUikF2ioph6PfH3dIuxJclhr3i3kHgTOP0xeXdWQohrvJAAmqVcV43/GI987HFY/vzT73jYXoa4esDHg==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.2.3.tgz", + "integrity": "sha512-vUb80S2dSUi8YxXahO8/I/s29GqnOL8ozgHVLjfWQXa03BNEeS1TpBLjh2ruaqq5ufx46BRGvfymdBSuoXET5w==", "dev": true, "requires": { "chalk": "^4.1.0", @@ -9922,6 +9763,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, "requires": { "p-locate": "^4.1.0" } @@ -10098,6 +9940,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, "requires": { "yallist": "^4.0.0" } @@ -10112,11 +9955,13 @@ } }, "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, "requires": { - "semver": "^6.0.0" + "pify": "^4.0.1", + "semver": "^5.6.0" } }, "makeerror": { @@ -10247,6 +10092,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -10268,47 +10114,6 @@ "kind-of": "^6.0.3" } }, - "minipass": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", - "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", - "requires": { - "yallist": "^4.0.0" - } - }, - "minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass-pipeline": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", - "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", - "requires": { - "minipass": "^3.0.0" - } - }, - "minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "requires": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - } - }, "mixin-deep": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", @@ -10331,9 +10136,13 @@ } }, "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } }, "modify-values": { "version": "1.0.1", @@ -10421,12 +10230,6 @@ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -10441,13 +10244,6 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, - "nan": { - "version": "2.14.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", - "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", - "dev": true, - "optional": true - }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -10513,11 +10309,14 @@ }, "dependencies": { "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", "dev": true, - "optional": true + "optional": true, + "requires": { + "lru-cache": "^6.0.0" + } }, "which": { "version": "2.0.2", @@ -10532,9 +10331,9 @@ } }, "node-releases": { - "version": "1.1.66", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.66.tgz", - "integrity": "sha512-JHEQ1iWPGK+38VLB2H9ef2otU4l8s3yAMt9Xf934r6+ojCYDMHPMqvCc9TnzfeFSP1QEOeU6YZEd3+De0LTCgg==", + "version": "1.1.67", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.67.tgz", + "integrity": "sha512-V5QF9noGFl3EymEwUYzO+3NTDpGfQB4ve6Qfnzf3UNydMhjQRVPR1DZTuvWiLzaFJYw2fmDwAfnRNEVb64hSIg==", "dev": true }, "normalize-package-data": { @@ -10550,10 +10349,13 @@ }, "dependencies": { "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } } } }, @@ -10645,12 +10447,6 @@ "normalize-package-data": "^2.3.2", "path-type": "^3.0.0" } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true } } }, @@ -10725,9 +10521,9 @@ } }, "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", "dev": true }, "object-keys": { @@ -10767,14 +10563,14 @@ } }, "object.values": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", - "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.2.tgz", + "integrity": "sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", + "es-abstract": "^1.18.0-next.1", "has": "^1.0.3" } }, @@ -10782,6 +10578,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "requires": { "wrappy": "1" } @@ -10816,9 +10613,9 @@ } }, "p-each-series": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.1.0.tgz", - "integrity": "sha512-ZuRs1miPT4HrjFa+9fRfOFXxGJfORgelKV9f9nNOWw2gl6gVsRaVDOQP0+MI0G0wGKns1Yacsu0GjOFbTK0JFQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", "dev": true }, "p-finally": { @@ -10831,6 +10628,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, "requires": { "p-try": "^2.0.0" } @@ -10839,6 +10637,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, "requires": { "p-limit": "^2.2.0" } @@ -10847,6 +10646,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, "requires": { "aggregate-error": "^3.0.0" } @@ -10854,7 +10654,8 @@ "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true }, "parent-module": { "version": "1.0.1", @@ -10940,12 +10741,14 @@ "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true }, "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=" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "path-key": { "version": "2.0.1", @@ -11014,11 +10817,63 @@ } }, "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, "requires": { - "find-up": "^4.0.0" + "find-up": "^2.1.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } } }, "please-upgrade-node": { @@ -11043,9 +10898,9 @@ "dev": true }, "prettier": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.2.tgz", - "integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", "dev": true }, "pretty-bytes": { @@ -11104,11 +10959,6 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" - }, "prompts": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.0.tgz", @@ -11237,12 +11087,6 @@ "validate-npm-package-license": "^3.0.1" } }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, "type-fest": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", @@ -11543,12 +11387,12 @@ "dev": true }, "resolve": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", - "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", "dev": true, "requires": { - "is-core-module": "^2.0.0", + "is-core-module": "^2.1.0", "path-parse": "^1.0.6" } }, @@ -11608,26 +11452,18 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, "requires": { "glob": "^7.1.3" } }, "rollup": { - "version": "2.33.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.33.1.tgz", - "integrity": "sha512-uY4O/IoL9oNW8MMcbA5hcOaz6tZTMIh7qJHx/tzIJm+n1wLoY38BLn6fuy7DhR57oNFLMbDQtDeJoFURt5933w==", + "version": "2.34.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.34.0.tgz", + "integrity": "sha512-dW5iLvttZzdVehjEuNJ1bWvuMEJjOWGmnuFS82WeKHTGXDkRHQeq/ExdifkSyJv9dLcR86ysKRmrIDyR6O0X8g==", "dev": true, "requires": { "fsevents": "~2.1.2" - }, - "dependencies": { - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true - } } }, "rollup-plugin-terser": { @@ -11731,9 +11567,10 @@ } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true }, "semver-compare": { "version": "1.0.0", @@ -11908,12 +11745,6 @@ "requires": { "is-extendable": "^0.1.0" } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true } } }, @@ -11991,12 +11822,14 @@ "source-list-map": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", - "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==" + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", + "dev": true }, "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true }, "source-map-resolve": { "version": "0.5.3", @@ -12019,6 +11852,14 @@ "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "source-map-url": { @@ -12060,9 +11901,9 @@ } }, "spdx-license-ids": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz", - "integrity": "sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", "dev": true }, "split": { @@ -12133,18 +11974,10 @@ "tweetnacl": "~0.14.0" } }, - "ssri": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.0.tgz", - "integrity": "sha512-aq/pz989nxVYwn16Tsbj1TqFpD5LLrQxHf5zaHuieFV+R0Bbr4y8qUsOA45hXT/N4/9UNXTarBjnjVmjSOVaAA==", - "requires": { - "minipass": "^3.1.1" - } - }, "stack-utils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.2.tgz", - "integrity": "sha512-0H7QK2ECz3fyZMzQ8rH0j2ykpfbnd20BFtfg/SqVC2+sCTtcw0aDTGB7dk+de4U4uUeuz6nOtJcrkFFLG1B0Rg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw==", "dev": true, "requires": { "escape-string-regexp": "^2.0.0" @@ -12199,10 +12032,13 @@ "dev": true }, "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } } } }, @@ -12261,77 +12097,34 @@ } }, "string.prototype.padend": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz", - "integrity": "sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.1.tgz", + "integrity": "sha512-eCzTASPnoCr5Ht+Vn1YXgm8SB015hHKgEIMu9Nr9bQmLhRBxKRfmzSj/IQsxDFc8JInJDDFA0qXwK+xxI7wDkg==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" + "es-abstract": "^1.18.0-next.1" } }, "string.prototype.trimend": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.2.tgz", - "integrity": "sha512-8oAG/hi14Z4nOVP0z6mdiVZ/wqjDtWSLygMigTzAb+7aPEDTleeFf+WrF+alzecxIRkckkJVn+dTlwzJXORATw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", + "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" } }, "string.prototype.trimstart": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.2.tgz", - "integrity": "sha512-7F6CdBTl5zyu30BJFdzSTlSlLPwODC23Od+iLoVH8X6+3fvDPPuBVVj9iaB1GOsSTSIgVfsfm27R2FGrAPznWg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", + "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" } }, "string_decoder": { @@ -12524,19 +12317,6 @@ "integrity": "sha512-Wib1S8m2wdpLbmQz0RBEVosIyvb/ykfKXf3ZIDqvWoMg/zTNm6G/tDSuUM61J1kNCDXWJrLHGSFeMhAG+gAGpQ==", "dev": true }, - "tar": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.0.5.tgz", - "integrity": "sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg==", - "requires": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - } - }, "temp-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", @@ -12580,9 +12360,9 @@ } }, "terser": { - "version": "5.3.8", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.3.8.tgz", - "integrity": "sha512-zVotuHoIfnYjtlurOouTazciEfL7V38QMAOhGqpXDEg6yT13cF4+fEP9b0rrCEQTn+tT46uxgFsTZzhygk+CzQ==", + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.5.1.tgz", + "integrity": "sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ==", "dev": true, "requires": { "commander": "^2.20.0", @@ -12619,13 +12399,19 @@ }, "dependencies": { "p-limit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz", - "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -12832,9 +12618,9 @@ "dev": true }, "type-fest": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.0.tgz", - "integrity": "sha512-fbDukFPnJBdn2eZ3RR+5mK2slHLFd6gYHY7jna1KWWy4Yr4XysHuCdXRzy+RiG/HwG4WJat00vdC2UHky5eKiQ==", + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", "dev": true }, "typedarray": { @@ -12853,9 +12639,9 @@ } }, "uglify-js": { - "version": "3.11.5", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.11.5.tgz", - "integrity": "sha512-btvv/baMqe7HxP7zJSF7Uc16h1mSfuuSplT0/qdjxseesDU+yYzH33eHBH+eMdeRXwujXspaCTooWHQVVBh09w==", + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.1.tgz", + "integrity": "sha512-o8lHP20KjIiQe5b/67Rh68xEGRrc2SRsCuuoYclXXoC74AfSRGblU1HKzJWH3HxPZ+Ort85fWHpSX7KwBUC9CQ==", "dev": true, "optional": true }, @@ -12899,22 +12685,6 @@ "set-value": "^2.0.1" } }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", - "requires": { - "imurmurhash": "^0.1.4" - } - }, "unique-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", @@ -13108,9 +12878,9 @@ "dev": true }, "webpack": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.4.0.tgz", - "integrity": "sha512-udpYTyqz8toTTdaOsL2QKPLeZLt2IEm9qY7yTXuFEQhKu5bk0yQD9BtAdVQksmz4jFbbWOiWmm3NHarO0zr/ng==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.9.0.tgz", + "integrity": "sha512-YnnqIV/uAS5ZrNpctSv378qV7HmbJ74DL+XfvMxzbX1bV9e7eeT6eEWU4wuUw33CNr/HspBh7R/xQlVjTEyAeA==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.0", @@ -13133,7 +12903,7 @@ "neo-async": "^2.6.2", "pkg-dir": "^4.2.0", "schema-utils": "^3.0.0", - "tapable": "^2.0.0", + "tapable": "^2.1.1", "terser-webpack-plugin": "^5.0.3", "watchpack": "^2.0.0", "webpack-sources": "^2.1.1" @@ -13145,14 +12915,13 @@ "integrity": "sha512-XNP0PqF1XD19ZlLKvB7cMmnZswW4C/03pRHgirB30uSJTaS3A3V1/P4sS3HPvFmjoriPCJQs+JDSbm4bL1TxGQ==", "dev": true }, - "webpack-sources": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.2.0.tgz", - "integrity": "sha512-bQsA24JLwcnWGArOKUxYKhX3Mz/nK1Xf6hxullKERyktjNMC4x8koOeaDNTA2fEJ09BdWLbM/iTW0ithREUP0w==", + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "requires": { - "source-list-map": "^2.0.1", - "source-map": "^0.6.1" + "find-up": "^4.0.0" } } } @@ -13167,12 +12936,21 @@ } }, "webpack-sources": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", - "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.2.0.tgz", + "integrity": "sha512-bQsA24JLwcnWGArOKUxYKhX3Mz/nK1Xf6hxullKERyktjNMC4x8koOeaDNTA2fEJ09BdWLbM/iTW0ithREUP0w==", + "dev": true, "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" + "source-list-map": "^2.0.1", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "whatwg-encoding": { @@ -13235,27 +13013,27 @@ "dev": true }, "workbox-background-sync": { - "version": "6.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-6.0.0-alpha.3.tgz", - "integrity": "sha512-5Svbl2Hj0T8Az34JdOoMLqqsm5BB+BRiRkOeBkpj8+NW8S0JdnjqdBIxUPrY+c/vSgaMcSlhyFX5b2hOXQMWmg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-6.0.0.tgz", + "integrity": "sha512-14upPIS47CFuBMQ6Shc+tIRRcyplv93+iirYTlWLgLoEw5sMS9vEGyOaOG3+eek5+mD0+J8Rsov8+04+p+lvZg==", "dev": true, "requires": { - "workbox-core": "^6.0.0-alpha.3" + "workbox-core": "^6.0.0" } }, "workbox-broadcast-update": { - "version": "6.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-6.0.0-alpha.3.tgz", - "integrity": "sha512-2A7iNGPWShAtxQgqatQmMLROqX8keNU62vC7UhTvOsZBWcNwbX7C39e2EWW97eJm6qH1M0eZG+Yp7N22YHYC+g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-6.0.0.tgz", + "integrity": "sha512-3jltFbBP8SqYG0JcxhxkAnFR75LqujduAH0igaGpplquHoIGBe7LwtPpEZb7prdafawrUH+4/z7eb+0hBJqwsw==", "dev": true, "requires": { - "workbox-core": "^6.0.0-alpha.3" + "workbox-core": "^6.0.0" } }, "workbox-build": { - "version": "6.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/workbox-build/-/workbox-build-6.0.0-alpha.3.tgz", - "integrity": "sha512-Kq1mbjaom/QkSyDIvBc7b8dAmR6bvITwXndUXXK5oJnkIW1I5+vHJdaWzt0yfIUzuLaGlb6xlrD9kz/U3Kj/2g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-build/-/workbox-build-6.0.0.tgz", + "integrity": "sha512-oERn5gJGeREQAvrvqEiGI/z46rthr0MIQYyaDuDWRtlmcBeYh7oJFC9hM4iTBofqNlPc2aZD5WHH3XLW6SDn2A==", "dev": true, "requires": { "@babel/core": "^7.11.1", @@ -13280,20 +13058,21 @@ "strip-comments": "^2.0.1", "tempy": "^0.6.0", "upath": "^1.2.0", - "workbox-background-sync": "^6.0.0-alpha.3", - "workbox-broadcast-update": "^6.0.0-alpha.3", - "workbox-cacheable-response": "^6.0.0-alpha.3", - "workbox-core": "^6.0.0-alpha.3", - "workbox-expiration": "^6.0.0-alpha.3", - "workbox-google-analytics": "^6.0.0-alpha.3", - "workbox-navigation-preload": "^6.0.0-alpha.3", - "workbox-precaching": "^6.0.0-alpha.3", - "workbox-range-requests": "^6.0.0-alpha.3", - "workbox-routing": "^6.0.0-alpha.3", - "workbox-strategies": "^6.0.0-alpha.3", - "workbox-streams": "^6.0.0-alpha.3", - "workbox-sw": "^6.0.0-alpha.3", - "workbox-window": "^6.0.0-alpha.3" + "workbox-background-sync": "^6.0.0", + "workbox-broadcast-update": "^6.0.0", + "workbox-cacheable-response": "^6.0.0", + "workbox-core": "^6.0.0", + "workbox-expiration": "^6.0.0", + "workbox-google-analytics": "^6.0.0", + "workbox-navigation-preload": "^6.0.0", + "workbox-precaching": "^6.0.0", + "workbox-range-requests": "^6.0.0", + "workbox-recipes": "^6.0.0", + "workbox-routing": "^6.0.0", + "workbox-strategies": "^6.0.0", + "workbox-streams": "^6.0.0", + "workbox-sw": "^6.0.0", + "workbox-window": "^6.0.0" }, "dependencies": { "source-map": { @@ -13305,108 +13084,122 @@ } }, "workbox-cacheable-response": { - "version": "6.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-6.0.0-alpha.3.tgz", - "integrity": "sha512-//+oWrct/6om7t/EHzdKtwKLUlJanmXIvP/voFscf8Gd5wdpk8NN2bY8dLHE1PKmjylz/9Wd4L7354v2NVZPoQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-6.0.0.tgz", + "integrity": "sha512-CwRRPmC6cGHNNYKFAY5T6+JubVTHeSOgdYPLdwqnIdB5N/vakwzYARf3Tz45OPtOJJv+ICOTk3QpiRyEdo07LQ==", "dev": true, "requires": { - "workbox-core": "^6.0.0-alpha.3" + "workbox-core": "^6.0.0" } }, "workbox-core": { - "version": "6.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-6.0.0-alpha.3.tgz", - "integrity": "sha512-UPSDEAvxTQtZR2CS4XpZOjpND2HHCpxS1QEHqqYd6m6hpi5qo5sAoJ7cWR05uPSwlY+1+TrQXr3PMqMwlPacqA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-6.0.0.tgz", + "integrity": "sha512-M0un8W+iqPCG8FbMhPXh5y3SmMXy9M54iDX1ygUuJwJEEB6TvPYDt7+uGEN4BrVY7G621zzmfGb32WmrMHYcOg==", "dev": true }, "workbox-expiration": { - "version": "6.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-6.0.0-alpha.3.tgz", - "integrity": "sha512-MIVvZnDal9FBNd98yPD6Z3+T4ZfwsgvV4ET4HrSi7oZo8staieu2MEgdjSmZGUoqF0T95LN03+gpcfuoF3UsRQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-6.0.0.tgz", + "integrity": "sha512-NEHmy7QCWPiVYnbHWF5KZQe9fWB88YDT89+e1J39Q2A4x5tGE5tn2Oy4PNsS3TJt48LXC4fusuKgNBhtCu/qkw==", "dev": true, "requires": { - "workbox-core": "^6.0.0-alpha.3" + "workbox-core": "^6.0.0" } }, "workbox-google-analytics": { - "version": "6.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-6.0.0-alpha.3.tgz", - "integrity": "sha512-6b9Ss+5VnfNMXEQ/xL2JOB6CvOOsusxAsfyKH2XiNupMqzSPazlAC/Rhkqz2S6Q8uZkOgxo5S1P8zqFMHrZTPw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-6.0.0.tgz", + "integrity": "sha512-yVbW1g1eUe8c5GkDalku+z3gJyZkc5iUq6KGGAbgQt9G2qWSthRwUWXQwcm8qgzaBsngtV6oKYUaWIMkD4CN1g==", "dev": true, "requires": { - "workbox-background-sync": "^6.0.0-alpha.3", - "workbox-core": "^6.0.0-alpha.3", - "workbox-routing": "^6.0.0-alpha.3", - "workbox-strategies": "^6.0.0-alpha.3" + "workbox-background-sync": "^6.0.0", + "workbox-core": "^6.0.0", + "workbox-routing": "^6.0.0", + "workbox-strategies": "^6.0.0" } }, "workbox-navigation-preload": { - "version": "6.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-6.0.0-alpha.3.tgz", - "integrity": "sha512-mN5Qen9UF4QJr/Dhjr1K/GFJjDzOlWGOhzAT3v2vFJJW4dLL2UNo0ykU/8528uuojD4wxCUXBKoGw22tLNnxUg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-6.0.0.tgz", + "integrity": "sha512-Ob8dbCGkmSdaZmmbgR+6ycmlukytCzcfwah0oPZj2BsFLkRMNtmiIwi5CTkhJOm+ImcBKS6k7hVXxspJ2n81dg==", "dev": true, "requires": { - "workbox-core": "^6.0.0-alpha.3" + "workbox-core": "^6.0.0" } }, "workbox-precaching": { - "version": "6.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-6.0.0-alpha.3.tgz", - "integrity": "sha512-DL3eHvgqT9gbBviFYqf0Sg3IxANQCfs1iHFaIBJwybzaLlIMqooB9GsEwMuHYqq07+cMHks8ZvBq7FfVdTYMSA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-6.0.0.tgz", + "integrity": "sha512-/w6cu5mGTM/jCwMpJ+19f4o2FEARqxRS9wCR9vvWoUarVcPerq+j7oT6gMi8lKxcLrWyiPKGmgXacXXHvwi4eA==", "dev": true, "requires": { - "workbox-core": "^6.0.0-alpha.3", - "workbox-routing": "^6.0.0-alpha.3", - "workbox-strategies": "^6.0.0-alpha.3" + "workbox-core": "^6.0.0", + "workbox-routing": "^6.0.0", + "workbox-strategies": "^6.0.0" } }, "workbox-range-requests": { - "version": "6.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-6.0.0-alpha.3.tgz", - "integrity": "sha512-5UtF3Fp7sxgUHQRPPRv40SnSq1P+1XBa5/KKCBIYykcag/Q2kfphWdpKuNVFkKbLLYYsjDdNGLUIjFyJjy10cw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-6.0.0.tgz", + "integrity": "sha512-EFbr5KI1Xk1JTx6rJLtWwAqYs0L9RHt4abpb6JgK/7EROZxoA0N4WbhQhp0QZz0Nhq9Qu0KzbOezRyoSVhbfZg==", "dev": true, "requires": { - "workbox-core": "^6.0.0-alpha.3" + "workbox-core": "^6.0.0" + } + }, + "workbox-recipes": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-recipes/-/workbox-recipes-6.0.0.tgz", + "integrity": "sha512-3IgizsUOdpVqsDFF0zSNWbr1ze+4lDg2SsIubmuk2gyTfYjN97WqQmH/dz7YgF/n54uyxkE9r8JFgSURY9fQ3w==", + "dev": true, + "requires": { + "workbox-cacheable-response": "^6.0.0", + "workbox-core": "^6.0.0", + "workbox-expiration": "^6.0.0", + "workbox-precaching": "^6.0.0", + "workbox-routing": "^6.0.0", + "workbox-strategies": "^6.0.0" } }, "workbox-routing": { - "version": "6.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-6.0.0-alpha.3.tgz", - "integrity": "sha512-TvaHZHlHzstxqIDSuSRf2zMOaNhV43YFOy+7+8WqggHXYtPEiwvViVIptOr6AiKFCEVjMQDZ+sgul5kKOihYww==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-6.0.0.tgz", + "integrity": "sha512-pySy11CRaVg/X3pgnapFk8w8X3ZodmG9vlqbtJClG9P5PUQ7gPwt3HryMr1/lvERLfgIyxGqn+jMjob8wKXWDQ==", "dev": true, "requires": { - "workbox-core": "^6.0.0-alpha.3" + "workbox-core": "^6.0.0" } }, "workbox-strategies": { - "version": "6.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-6.0.0-alpha.3.tgz", - "integrity": "sha512-+euOralX8KnJewFY+ZFCdgvugCkCc9F91aEdRkAS+wvHL8I2IZDVyyYLlA6o+kzcI8G9jscBqIFCI3Wmt9ndeg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-6.0.0.tgz", + "integrity": "sha512-nMF/Ctck+jjLs7fO++bQUYvJkxgt3A8b7jZfhPN/Kep3560plG0xCH0daJ4q6eiMtrLsy31Jy98NkEaYXeHNag==", "dev": true, "requires": { - "workbox-core": "^6.0.0-alpha.3" + "workbox-core": "^6.0.0" } }, "workbox-streams": { - "version": "6.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/workbox-streams/-/workbox-streams-6.0.0-alpha.3.tgz", - "integrity": "sha512-k1s2eFidJZecDuA6pfwafPRZ6cj5boDfxJ3Ye2REzS1mUI4mwCQ7a2zr+iNjdLiqy4IFtALRXG7Us5yZkn+3mQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-streams/-/workbox-streams-6.0.0.tgz", + "integrity": "sha512-UEQOYxmGcUP0GMGcLKV6lLPbWzHJljyOs4CKD/4FBmHxfGQvU4UEayI/k9YYWWC7HZStMvIW2M9jmuE9Dniz8w==", "dev": true, "requires": { - "workbox-core": "^6.0.0-alpha.3", - "workbox-routing": "^6.0.0-alpha.3" + "workbox-core": "^6.0.0", + "workbox-routing": "^6.0.0" } }, "workbox-sw": { - "version": "6.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/workbox-sw/-/workbox-sw-6.0.0-alpha.3.tgz", - "integrity": "sha512-0Mv10Q7uZ4YFc84BLFoR7PZ5rlfPFIJvSFcgziTk2j0c6XHp4iPVi+AFFEwC8BcMS/75C7Ku1braULb121FF0Q==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-sw/-/workbox-sw-6.0.0.tgz", + "integrity": "sha512-wH6TGlNL+LEUXi7Ucg4hDGh1WR7i5uRtW8U4BlOx/CoczTtrNnRS0YN5RxizqZ+XcthdIpjQuElHcXVRP3Bd9Q==", "dev": true }, "workbox-webpack-plugin": { - "version": "6.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/workbox-webpack-plugin/-/workbox-webpack-plugin-6.0.0-alpha.3.tgz", - "integrity": "sha512-nOv0klQub1siUNEzeyRjnac/F6BrnGExXpX9I+GVetZLZgfU1gw7xampfcY0JWiVLuJ6G4smfadld//4NiL3iw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-webpack-plugin/-/workbox-webpack-plugin-6.0.0.tgz", + "integrity": "sha512-VSiRZhqgXejbIz/dP/bPFsS45QfnZzI0wftFSJrpb6sdMsqlvBTOZpJyUQdhJtt2UbNkoJchFkn2pGNI4KR9CQ==", "dev": true, "requires": { "fast-json-stable-stringify": "^2.1.0", @@ -13414,16 +13207,34 @@ "source-map-url": "^0.4.0", "upath": "^1.2.0", "webpack-sources": "^1.4.3", - "workbox-build": "^6.0.0-alpha.3" + "workbox-build": "^6.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + } } }, "workbox-window": { - "version": "6.0.0-alpha.3", - "resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-6.0.0-alpha.3.tgz", - "integrity": "sha512-NeMrxc8eDSVGvVjzi7OTCg7C1gYlEJoJ1C5K4p5uNSWC0GJ/74MrHnn0YvLjy5gN9F93uE7gsGF645GGhvgDPw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-6.0.0.tgz", + "integrity": "sha512-tGlbJQON8zaevUvI6Sq17YVPJQ2h3mRYl0Mo8yGBUtu+869H/aY3tFaRF5hdRfga2LdM99p77mjjxjZtraowqg==", "dev": true, "requires": { - "workbox-core": "^6.0.0-alpha.3" + "workbox-core": "^6.0.0" } }, "wrap-ansi": { @@ -13466,7 +13277,8 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "write": { "version": "1.0.3", @@ -13475,17 +13287,6 @@ "dev": true, "requires": { "mkdirp": "^0.5.1" - }, - "dependencies": { - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - } } }, "write-file-atomic": { @@ -13525,15 +13326,16 @@ "dev": true }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, "yaml": { "version": "1.10.0", @@ -13577,6 +13379,12 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } } diff --git a/package.json b/package.json index 3b68a99..9751592 100644 --- a/package.json +++ b/package.json @@ -38,14 +38,11 @@ "dist" ], "peerDependencies": { - "webpack": "^4.0.0 || ^5.0.0" + "webpack": "^5.1.0" }, "dependencies": { - "cacache": "^15.0.5", - "find-cache-dir": "^3.3.1", "schema-utils": "^3.0.0", - "serialize-javascript": "^5.0.1", - "webpack-sources": "^1.4.3" + "serialize-javascript": "^5.0.1" }, "devDependencies": { "@babel/cli": "^7.12.1", @@ -71,7 +68,7 @@ "npm-run-all": "^4.1.5", "prettier": "^2.1.2", "standard-version": "^9.0.0", - "webpack": "^5.4.0", + "webpack": "^5.9.0", "workbox-webpack-plugin": "^6.0.0-alpha.3" }, "keywords": [ diff --git a/src/Webpack4Cache.js b/src/Webpack4Cache.js deleted file mode 100644 index 0937eba..0000000 --- a/src/Webpack4Cache.js +++ /dev/null @@ -1,62 +0,0 @@ -import os from "os"; - -import cacache from "cacache"; -import findCacheDir from "find-cache-dir"; -import serialize from "serialize-javascript"; - -export default class Webpack4Cache { - constructor(compilation, options, weakCache) { - this.cache = - options.cache === true - ? Webpack4Cache.getCacheDirectory() - : options.cache; - this.weakCache = weakCache; - } - - static getCacheDirectory() { - return findCacheDir({ name: "compression-webpack-plugin" }) || os.tmpdir(); - } - - async get(cacheData, { RawSource }) { - if (!this.cache) { - // eslint-disable-next-line no-undefined - return undefined; - } - - const weakOutput = this.weakCache.get(cacheData.inputSource); - - if (weakOutput) { - return weakOutput; - } - - // eslint-disable-next-line no-param-reassign - cacheData.cacheIdent = - cacheData.cacheIdent || serialize(cacheData.cacheKeys); - - let cachedResult; - - try { - cachedResult = await cacache.get(this.cache, cacheData.cacheIdent); - } catch (ignoreError) { - // eslint-disable-next-line no-undefined - return undefined; - } - - return new RawSource(Buffer.from(JSON.parse(cachedResult.data).data)); - } - - async store(cacheData) { - if (!this.cache) { - // eslint-disable-next-line no-undefined - return undefined; - } - - if (!this.weakCache.has(cacheData.inputSource)) { - this.weakCache.set(cacheData.inputSource, cacheData.output); - } - - const { cacheIdent, output } = cacheData; - - return cacache.put(this.cache, cacheIdent, JSON.stringify(output.source())); - } -} diff --git a/src/Webpack5Cache.js b/src/Webpack5Cache.js deleted file mode 100644 index ac6e321..0000000 --- a/src/Webpack5Cache.js +++ /dev/null @@ -1,21 +0,0 @@ -export default class Cache { - constructor(compilation) { - this.cache = compilation.getCache("CompressionWebpackPlugin"); - } - - async get(cacheData) { - // eslint-disable-next-line no-param-reassign - cacheData.eTag = - cacheData.eTag || this.cache.getLazyHashedEtag(cacheData.inputSource); - - return this.cache.getPromise(cacheData.name, cacheData.eTag); - } - - async store(cacheData) { - return this.cache.storePromise( - cacheData.name, - cacheData.eTag, - cacheData.output - ); - } -} diff --git a/src/index.js b/src/index.js index cccccd4..54d6297 100644 --- a/src/index.js +++ b/src/index.js @@ -3,22 +3,13 @@ Author Tobias Koppers @sokra */ -import crypto from "crypto"; import path from "path"; -import webpack, { - ModuleFilenameHelpers, - version as webpackVersion, -} from "webpack"; import { validate } from "schema-utils"; import serialize from "serialize-javascript"; import schema from "./options.json"; -const { RawSource } = - // eslint-disable-next-line global-require - webpack.sources || require("webpack-sources"); - class CompressionPlugin { constructor(options = {}) { validate(schema, options, { @@ -30,7 +21,6 @@ class CompressionPlugin { test, include, exclude, - cache = true, algorithm = "gzip", compressionOptions = {}, filename = "[path][base].gz", @@ -43,7 +33,6 @@ class CompressionPlugin { test, include, exclude, - cache, algorithm, compressionOptions, filename, @@ -92,48 +81,6 @@ class CompressionPlugin { } } - // eslint-disable-next-line consistent-return - static getAsset(compilation, name) { - // New API - if (compilation.getAsset) { - return compilation.getAsset(name); - } - - if (compilation.assets[name]) { - return { name, source: compilation.assets[name], info: {} }; - } - } - - static emitAsset(compilation, name, source, assetInfo) { - // New API - if (compilation.emitAsset) { - compilation.emitAsset(name, source, assetInfo); - } - - // eslint-disable-next-line no-param-reassign - compilation.assets[name] = source; - } - - static updateAsset(compilation, name, newSource, assetInfo) { - // New API - if (compilation.updateAsset) { - compilation.updateAsset(name, newSource, assetInfo); - } - - // eslint-disable-next-line no-param-reassign - compilation.assets[name] = newSource; - } - - static deleteAsset(compilation, name) { - // New API - if (compilation.deleteAsset) { - compilation.deleteAsset(name); - } - - // eslint-disable-next-line no-param-reassign - delete compilation.assets[name]; - } - runCompressionAlgorithm(input) { return new Promise((resolve, reject) => { this.algorithm( @@ -155,34 +102,64 @@ class CompressionPlugin { }); } - async compress(compilation, assets, CacheEngine, weakCache) { - const assetNames = Object.keys( - typeof assets === "undefined" ? compilation.assets : assets - ).filter((assetName) => - // eslint-disable-next-line no-undefined - ModuleFilenameHelpers.matchObject.bind(undefined, this.options)(assetName) - ); + async compress(compiler, compilation, assets) { + const cache = compilation.getCache("CompressionWebpackPlugin"); + const assetsForMinify = await Promise.all( + Object.keys(assets) + .filter((name) => { + const { info } = compilation.getAsset(name); - if (assetNames.length === 0) { - return Promise.resolve(); - } + // Skip double minimize assets from child compilation + if (info.compressed) { + return false; + } - const scheduledTasks = []; - const cache = new CacheEngine( - compilation, - { cache: this.options.cache }, - weakCache + if ( + !compiler.webpack.ModuleFilenameHelpers.matchObject.bind( + // eslint-disable-next-line no-undefined + undefined, + this.options + )(name) + ) { + return false; + } + + return true; + }) + .map(async (name) => { + const { info, source } = compilation.getAsset(name); + + const eTag = cache.getLazyHashedEtag(source); + const cacheItem = cache.getItemCache( + serialize({ + name, + algorithm: this.options.algorithm, + compressionOptions: this.options.compressionOptions, + }), + eTag + ); + const output = await cacheItem.getPromise(); + + return { name, info, inputSource: source, output, cacheItem }; + }) ); - for (const name of assetNames) { + const { RawSource } = compiler.webpack.sources; + const scheduledTasks = []; + + for (const asset of assetsForMinify) { scheduledTasks.push( (async () => { - const { source: inputSource, info } = CompressionPlugin.getAsset( - compilation, - name - ); + const { name, inputSource, cacheItem, info } = asset; + let { output } = asset; - if (info.compressed) { + let input = inputSource.source(); + + if (!Buffer.isBuffer(input)) { + input = Buffer.from(input); + } + + if (input.length < this.options.threshold) { return; } @@ -208,39 +185,6 @@ class CompressionPlugin { return; } - let input = inputSource.source(); - - if (!Buffer.isBuffer(input)) { - input = Buffer.from(input); - } - - if (input.length < this.options.threshold) { - return; - } - - const cacheData = { inputSource }; - - if (CompressionPlugin.isWebpack4()) { - cacheData.cacheKeys = { - nodeVersion: process.version, - // eslint-disable-next-line global-require - "compression-webpack-plugin": require("../package.json").version, - algorithm: this.algorithm, - originalAlgorithm: this.options.algorithm, - compressionOptions: this.options.compressionOptions, - name, - contentHash: crypto.createHash("md4").update(input).digest("hex"), - }; - } else { - cacheData.name = serialize({ - name, - algorithm: this.options.algorithm, - compressionOptions: this.options.compressionOptions, - }); - } - - let output = await cache.get(cacheData, { RawSource }); - if (!output) { try { output = new RawSource(await this.runCompressionAlgorithm(input)); @@ -250,9 +194,7 @@ class CompressionPlugin { return; } - cacheData.output = output; - - await cache.store(cacheData); + await cacheItem.storePromise(output); } if (output.source().length / input.length > this.options.minRatio) { @@ -302,37 +244,23 @@ class CompressionPlugin { if (this.options.deleteOriginalAssets) { if (this.options.deleteOriginalAssets === "keep-source-map") { - // TODO `...` required only for webpack@4 const updatedAssetInfo = { - ...info, related: { ...info.related, sourceMap: null }, }; - CompressionPlugin.updateAsset( - compilation, - name, - inputSource, - updatedAssetInfo - ); + compilation.updateAsset(name, inputSource, updatedAssetInfo); } - CompressionPlugin.deleteAsset(compilation, name); + compilation.deleteAsset(name); } else { - // TODO `...` required only for webpack@4 const newOriginalInfo = { - ...info, related: { [relatedName]: newName, ...info.related }, }; - CompressionPlugin.updateAsset( - compilation, - name, - inputSource, - newOriginalInfo - ); + compilation.updateAsset(name, inputSource, newOriginalInfo); } - CompressionPlugin.emitAsset(compilation, newName, output, newInfo); + compilation.emitAsset(newName, output, newInfo); })() ); } @@ -340,50 +268,30 @@ class CompressionPlugin { return Promise.all(scheduledTasks); } - static isWebpack4() { - return webpackVersion[0] === "4"; - } - apply(compiler) { const pluginName = this.constructor.name; - if (CompressionPlugin.isWebpack4()) { - // eslint-disable-next-line global-require - const CacheEngine = require("./Webpack4Cache").default; - const weakCache = new WeakMap(); - - compiler.hooks.emit.tapPromise({ name: pluginName }, (compilation) => - // eslint-disable-next-line no-undefined - this.compress(compilation, undefined, CacheEngine, weakCache) + compiler.hooks.compilation.tap(pluginName, (compilation) => { + compilation.hooks.processAssets.tapPromise( + { + name: pluginName, + stage: + compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER, + }, + (assets) => this.compress(compiler, compilation, assets) ); - } else { - // eslint-disable-next-line global-require - const CacheEngine = require("./Webpack5Cache").default; - - compiler.hooks.thisCompilation.tap(pluginName, (compilation) => { - // eslint-disable-next-line global-require - const Compilation = require("webpack/lib/Compilation"); - compilation.hooks.processAssets.tapPromise( - { - name: pluginName, - stage: Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER, - }, - (assets) => this.compress(compilation, assets, CacheEngine) - ); - - compilation.hooks.statsPrinter.tap(pluginName, (stats) => { - stats.hooks.print - .for("asset.info.compressed") - .tap( - "compression-webpack-plugin", - (compressed, { green, formatFlag }) => - // eslint-disable-next-line no-undefined - compressed ? green(formatFlag("compressed")) : undefined - ); - }); + compilation.hooks.statsPrinter.tap(pluginName, (stats) => { + stats.hooks.print + .for("asset.info.compressed") + .tap( + "compression-webpack-plugin", + (compressed, { green, formatFlag }) => + // eslint-disable-next-line no-undefined + compressed ? green(formatFlag("compressed")) : undefined + ); }); - } + }); } } diff --git a/src/options.json b/src/options.json index 02d80a4..2496b32 100644 --- a/src/options.json +++ b/src/options.json @@ -104,17 +104,6 @@ "instanceof": "Function" } ] - }, - "cache": { - "description": "Enable file caching. Ignored in webpack 5, for webpack 5 please use https://webpack.js.org/configuration/other-options/#cache.", - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "string" - } - ] } }, "type": "object" diff --git a/test/CompressionPlugin.test.js b/test/CompressionPlugin.test.js index 5d58a01..1e2b331 100644 --- a/test/CompressionPlugin.test.js +++ b/test/CompressionPlugin.test.js @@ -1,12 +1,6 @@ import zlib from "zlib"; import path from "path"; -import webpack from "webpack"; -import findCacheDir from "find-cache-dir"; -import cacache from "cacache"; -import WorkboxPlugin from "workbox-webpack-plugin"; - -import Webpack4Cache from "../src/Webpack4Cache"; import CompressionPlugin from "../src/index"; import { @@ -17,25 +11,9 @@ import { getCompiler, getErrors, getWarnings, - removeCache, } from "./helpers/index"; -const cacheDir1 = findCacheDir({ name: "compression-webpack-plugin-cache-1" }); -const cacheDir2 = findCacheDir({ name: "compression-webpack-plugin-cache-2" }); -const cacheDir3 = findCacheDir({ name: "compression-webpack-plugin-cache-3" }); -const cacheDir4 = findCacheDir({ name: "compression-webpack-plugin-cache-4" }); - describe("CompressionPlugin", () => { - beforeAll(() => { - return Promise.all([ - removeCache(), - cacache.rm.all(cacheDir1), - cacache.rm.all(cacheDir2), - cacache.rm.all(cacheDir3), - cacache.rm.all(cacheDir4), - ]); - }); - it("should work", async () => { const compiler = getCompiler( "./entry.js", @@ -229,27 +207,13 @@ describe("CompressionPlugin", () => { }); it('should work and use memory cache without options in the "development" mode', async () => { - const getCacheDirectorySpy = jest - .spyOn(Webpack4Cache, "getCacheDirectory") - .mockImplementation(() => { - return cacheDir1; - }); - const compiler = getCompiler("./entry.js", {}, { mode: "development" }); new CompressionPlugin().apply(compiler); const stats = await compile(compiler); - if (webpack.version[0] === "4") { - expect( - Object.keys(stats.compilation.assets).filter( - (assetName) => stats.compilation.assets[assetName].emitted - ).length - ).toBe(7); - } else { - expect(stats.compilation.emittedAssets.size).toBe(7); - } + expect(stats.compilation.emittedAssets.size).toBe(7); expect(getAssetsNameAndSize(stats, compiler)).toMatchSnapshot("assets"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); @@ -258,15 +222,7 @@ describe("CompressionPlugin", () => { await new Promise(async (resolve) => { const newStats = await compile(compiler); - if (webpack.version[0] === "4") { - expect( - Object.keys(newStats.compilation.assets).filter( - (assetName) => newStats.compilation.assets[assetName].emitted - ).length - ).toBe(0); - } else { - expect(newStats.compilation.emittedAssets.size).toBe(0); - } + expect(newStats.compilation.emittedAssets.size).toBe(0); expect(getAssetsNameAndSize(newStats, compiler)).toMatchSnapshot( "assets" @@ -274,19 +230,11 @@ describe("CompressionPlugin", () => { expect(getWarnings(newStats)).toMatchSnapshot("errors"); expect(getErrors(newStats)).toMatchSnapshot("warnings"); - getCacheDirectorySpy.mockRestore(); - resolve(); }); }); it('should work and use memory cache when the "cache" option is "true"', async () => { - const getCacheDirectorySpy = jest - .spyOn(Webpack4Cache, "getCacheDirectory") - .mockImplementation(() => { - return cacheDir2; - }); - const compiler = getCompiler( "./entry.js", {}, @@ -304,15 +252,7 @@ describe("CompressionPlugin", () => { const stats = await compile(compiler); - if (webpack.version[0] === "4") { - expect( - Object.keys(stats.compilation.assets).filter( - (assetName) => stats.compilation.assets[assetName].emitted - ).length - ).toBe(7); - } else { - expect(stats.compilation.emittedAssets.size).toBe(7); - } + expect(stats.compilation.emittedAssets.size).toBe(7); expect(getAssetsNameAndSize(stats, compiler)).toMatchSnapshot("assets"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); @@ -321,15 +261,7 @@ describe("CompressionPlugin", () => { await new Promise(async (resolve) => { const newStats = await compile(compiler); - if (webpack.version[0] === "4") { - expect( - Object.keys(newStats.compilation.assets).filter( - (assetName) => newStats.compilation.assets[assetName].emitted - ).length - ).toBe(0); - } else { - expect(newStats.compilation.emittedAssets.size).toBe(0); - } + expect(newStats.compilation.emittedAssets.size).toBe(0); expect(getAssetsNameAndSize(newStats, compiler)).toMatchSnapshot( "assets" @@ -337,19 +269,11 @@ describe("CompressionPlugin", () => { expect(getWarnings(newStats)).toMatchSnapshot("errors"); expect(getErrors(newStats)).toMatchSnapshot("warnings"); - getCacheDirectorySpy.mockRestore(); - resolve(); }); }); it('should work and use memory cache when the "cache" option is "true" and the asset has been changed', async () => { - const getCacheDirectorySpy = jest - .spyOn(Webpack4Cache, "getCacheDirectory") - .mockImplementation(() => { - return cacheDir3; - }); - const compiler = getCompiler( "./entry.js", {}, @@ -367,15 +291,7 @@ describe("CompressionPlugin", () => { const stats = await compile(compiler); - if (webpack.version[0] === "4") { - expect( - Object.keys(stats.compilation.assets).filter( - (assetName) => stats.compilation.assets[assetName].emitted - ).length - ).toBe(7); - } else { - expect(stats.compilation.emittedAssets.size).toBe(7); - } + expect(stats.compilation.emittedAssets.size).toBe(7); expect(getAssetsNameAndSize(stats, compiler)).toMatchSnapshot("assets"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); @@ -386,15 +302,7 @@ describe("CompressionPlugin", () => { await new Promise(async (resolve) => { const newStats = await compile(compiler); - if (webpack.version[0] === "4") { - expect( - Object.keys(newStats.compilation.assets).filter( - (assetName) => newStats.compilation.assets[assetName].emitted - ).length - ).toBe(2); - } else { - expect(newStats.compilation.emittedAssets.size).toBe(2); - } + expect(newStats.compilation.emittedAssets.size).toBe(2); expect(getAssetsNameAndSize(newStats, compiler)).toMatchSnapshot( "assets" @@ -402,19 +310,11 @@ describe("CompressionPlugin", () => { expect(getWarnings(newStats)).toMatchSnapshot("errors"); expect(getErrors(newStats)).toMatchSnapshot("warnings"); - getCacheDirectorySpy.mockRestore(); - resolve(); }); }); it('should work and use memory cache when the "cache" option is "true" with multiple plugins', async () => { - const getCacheDirectorySpy = jest - .spyOn(Webpack4Cache, "getCacheDirectory") - .mockImplementation(() => { - return cacheDir4; - }); - const compiler = getCompiler( "./entry.js", {}, @@ -446,15 +346,7 @@ describe("CompressionPlugin", () => { const stats = await compile(compiler); - if (webpack.version[0] === "4") { - expect( - Object.keys(stats.compilation.assets).filter( - (assetName) => stats.compilation.assets[assetName].emitted - ).length - ).toBe(14); - } else { - expect(stats.compilation.emittedAssets.size).toBe(14); - } + expect(stats.compilation.emittedAssets.size).toBe(14); expect(getAssetsNameAndSize(stats, compiler)).toMatchSnapshot("assets"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); @@ -463,15 +355,7 @@ describe("CompressionPlugin", () => { await new Promise(async (resolve) => { const newStats = await compile(compiler); - if (webpack.version[0] === "4") { - expect( - Object.keys(newStats.compilation.assets).filter( - (assetName) => newStats.compilation.assets[assetName].emitted - ).length - ).toBe(0); - } else { - expect(newStats.compilation.emittedAssets.size).toBe(0); - } + expect(newStats.compilation.emittedAssets.size).toBe(0); expect(getAssetsNameAndSize(newStats, compiler)).toMatchSnapshot( "assets" @@ -479,8 +363,6 @@ describe("CompressionPlugin", () => { expect(getWarnings(newStats)).toMatchSnapshot("errors"); expect(getErrors(newStats)).toMatchSnapshot("warnings"); - getCacheDirectorySpy.mockRestore(); - resolve(); }); }); @@ -501,21 +383,11 @@ describe("CompressionPlugin", () => { } ); - new CompressionPlugin( - webpack.version[0] === "4" ? { cache: false } : {} - ).apply(compiler); + new CompressionPlugin().apply(compiler); const stats = await compile(compiler); - if (webpack.version[0] === "4") { - expect( - Object.keys(stats.compilation.assets).filter( - (assetName) => stats.compilation.assets[assetName].emitted - ).length - ).toBe(7); - } else { - expect(stats.compilation.emittedAssets.size).toBe(7); - } + expect(stats.compilation.emittedAssets.size).toBe(7); expect(getAssetsNameAndSize(stats, compiler)).toMatchSnapshot("assets"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); @@ -524,15 +396,7 @@ describe("CompressionPlugin", () => { await new Promise(async (resolve) => { const newStats = await compile(compiler); - if (webpack.version[0] === "4") { - expect( - Object.keys(newStats.compilation.assets).filter( - (assetName) => newStats.compilation.assets[assetName].emitted - ).length - ).toBe(7); - } else { - expect(newStats.compilation.emittedAssets.size).toBe(7); - } + expect(newStats.compilation.emittedAssets.size).toBe(7); expect(getAssetsNameAndSize(newStats, compiler)).toMatchSnapshot( "assets" @@ -543,54 +407,4 @@ describe("CompressionPlugin", () => { resolve(); }); }); - - // TODO https://github.com/webpack-contrib/compression-webpack-plugin/issues/218 - it.skip('should work with "workbox-webpack-plugin" plugin ("GenerateSW")', async () => { - const compiler = getCompiler( - "./entry.js", - {}, - { - output: { - filename: "[name].js", - chunkFilename: "[id].[name].js", - }, - } - ); - - new WorkboxPlugin.GenerateSW().apply(compiler); - new CompressionPlugin().apply(compiler); - - const stats = await compile(compiler); - - expect(getAssetsNameAndSize(stats, compiler)).toMatchSnapshot("assets"); - expect(getWarnings(stats)).toMatchSnapshot("warnings"); - expect(getErrors(stats)).toMatchSnapshot("errors"); - }); - - // TODO https://github.com/webpack-contrib/compression-webpack-plugin/issues/218 - it.skip('should work with "workbox-webpack-plugin" plugin ("InjectManifest")', async () => { - const compiler = getCompiler( - "./entry.js", - {}, - { - output: { - filename: "[name].js", - chunkFilename: "[id].[name].js", - }, - } - ); - - new WorkboxPlugin.InjectManifest({ - swSrc: path.resolve(__dirname, "./fixtures/sw.js"), - swDest: "sw.js", - exclude: [/\.(gz|br)$/], - }).apply(compiler); - new CompressionPlugin().apply(compiler); - - const stats = await compile(compiler); - - expect(getAssetsNameAndSize(stats, compiler)).toMatchSnapshot("assets"); - expect(getWarnings(stats)).toMatchSnapshot("warnings"); - expect(getErrors(stats)).toMatchSnapshot("errors"); - }); }); diff --git a/test/__snapshots__/CompressionPlugin.test.js.snap.webpack5 b/test/__snapshots__/CompressionPlugin.test.js.snap similarity index 92% rename from test/__snapshots__/CompressionPlugin.test.js.snap.webpack5 rename to test/__snapshots__/CompressionPlugin.test.js.snap index e1c585b..05cec40 100644 --- a/test/__snapshots__/CompressionPlugin.test.js.snap.webpack5 +++ b/test/__snapshots__/CompressionPlugin.test.js.snap @@ -50,21 +50,21 @@ Array [ ], Array [ "main.js", - 16408, + 16933, Object { "javascriptModule": false, "related": Object { "gzipped": "main.js.gz", }, - "size": 16408, + "size": 16933, }, ], Array [ "main.js.gz", - 3846, + 3991, Object { "compressed": true, - "size": 3846, + "size": 3991, }, ], ] @@ -120,21 +120,21 @@ Array [ ], Array [ "main.js", - 16408, + 16933, Object { "javascriptModule": false, "related": Object { "gzipped": "main.js.gz", }, - "size": 16408, + "size": 16933, }, ], Array [ "main.js.gz", - 3846, + 3991, Object { "compressed": true, - "size": 3846, + "size": 3991, }, ], ] @@ -203,25 +203,25 @@ Array [ }, ], Array [ - "main.f7eb83969c330f73f483.js", - 16495, + "main.3901817e3ed5284b5443.js", + 17020, Object { - "contenthash": "f7eb83969c330f73f483", + "contenthash": "3901817e3ed5284b5443", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "main.f7eb83969c330f73f483.js.gz", + "gzipped": "main.3901817e3ed5284b5443.js.gz", }, - "size": 16495, + "size": 17020, }, ], Array [ - "main.f7eb83969c330f73f483.js.gz", - 3932, + "main.3901817e3ed5284b5443.js.gz", + 4077, Object { "compressed": true, "immutable": true, - "size": 3932, + "size": 4077, }, ], ] @@ -284,21 +284,21 @@ Array [ ], Array [ "main.js", - 16464, + 16989, Object { "javascriptModule": false, "related": Object { "gzipped": "main.js.gz", }, - "size": 16464, + "size": 16989, }, ], Array [ "main.js.gz", - 3911, + 4054, Object { "compressed": true, - "size": 3911, + "size": 4054, }, ], ] @@ -361,21 +361,21 @@ Array [ ], Array [ "main.js", - 16448, + 16973, Object { "javascriptModule": false, "related": Object { "gzipped": "main.js.gz", }, - "size": 16448, + "size": 16973, }, ], Array [ "main.js.gz", - 3907, + 4051, Object { "compressed": true, - "size": 3907, + "size": 4051, }, ], ] @@ -434,21 +434,21 @@ Array [ ], Array [ "main.js", - 16470, + 16995, Object { "javascriptModule": false, "related": Object { "gzipped": "main.js.gz", }, - "size": 16470, + "size": 16995, }, ], Array [ "main.js.gz", - 3919, + 4062, Object { "compressed": true, - "size": 3919, + "size": 4062, }, ], ] @@ -565,7 +565,7 @@ Array [ ], Array [ "main.js", - 16448, + 16973, Object { "javascriptModule": false, "related": Object { @@ -573,31 +573,31 @@ Array [ "customed": "main.js.custom", "gzipped": "main.js.gz", }, - "size": 16448, + "size": 16973, }, ], Array [ "main.js.br", - 3401, + 3534, Object { "compressed": true, - "size": 3401, + "size": 3534, }, ], Array [ "main.js.custom", - 16448, + 16973, Object { "compressed": true, - "size": 16448, + "size": 16973, }, ], Array [ "main.js.gz", - 3907, + 4051, Object { "compressed": true, - "size": 3907, + "size": 4051, }, ], ] @@ -706,7 +706,7 @@ Array [ ], Array [ "main.js", - 16448, + 16973, Object { "javascriptModule": false, "related": Object { @@ -714,31 +714,31 @@ Array [ "customed": "main.js.custom", "gzipped": "main.js.gz", }, - "size": 16448, + "size": 16973, }, ], Array [ "main.js.br", - 3401, + 3534, Object { "compressed": true, - "size": 3401, + "size": 3534, }, ], Array [ "main.js.custom", - 16448, + 16973, Object { "compressed": true, - "size": 16448, + "size": 16973, }, ], Array [ "main.js.gz", - 3907, + 4051, Object { "compressed": true, - "size": 3907, + "size": 4051, }, ], ] @@ -805,21 +805,21 @@ Array [ ], Array [ "main.js", - 16448, + 16973, Object { "javascriptModule": false, "related": Object { "gzipped": "main.js.gz", }, - "size": 16448, + "size": 16973, }, ], Array [ "main.js.gz", - 3907, + 4051, Object { "compressed": true, - "size": 3907, + "size": 4051, }, ], ] @@ -878,21 +878,21 @@ Array [ ], Array [ "main.js", - 16448, + 16973, Object { "javascriptModule": false, "related": Object { "gzipped": "main.js.gz", }, - "size": 16448, + "size": 16973, }, ], Array [ "main.js.gz", - 3907, + 4051, Object { "compressed": true, - "size": 3907, + "size": 4051, }, ], ] @@ -961,25 +961,25 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", + "gzipped": "main.a6299e4b54bcb458b330.js.gz", }, - "size": 16495, + "size": 17020, }, ], Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, + "main.a6299e4b54bcb458b330.js.gz", + 4077, Object { "compressed": true, "immutable": true, - "size": 3934, + "size": 4077, }, ], ] @@ -1040,25 +1040,25 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", + "gzipped": "main.a6299e4b54bcb458b330.js.gz", }, - "size": 16495, + "size": 17020, }, ], Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, + "main.a6299e4b54bcb458b330.js.gz", + 4077, Object { "compressed": true, "immutable": true, - "size": 3934, + "size": 4077, }, ], ] @@ -1114,10 +1114,10 @@ Array [ }, ], Array [ - "async.async.js?ver=1bd91a991e7113ab51ef", + "async.async.js?ver=868541dbc182fcaf842e", 265, Object { - "fullhash": "1bd91a991e7113ab51ef", + "fullhash": "868541dbc182fcaf842e", "immutable": true, "javascriptModule": false, "related": Object { @@ -1147,24 +1147,24 @@ Array [ ], Array [ "main.js.gz", - 3953, + 4098, Object { "compressed": true, "immutable": true, - "size": 3953, + "size": 4098, }, ], Array [ - "main.js?var=1bd91a991e7113ab51ef", - 16651, + "main.js?var=868541dbc182fcaf842e", + 17176, Object { - "fullhash": "1bd91a991e7113ab51ef", + "fullhash": "868541dbc182fcaf842e", "immutable": true, "javascriptModule": false, "related": Object { "gzipped": "main.js.gz", }, - "size": 16651, + "size": 17176, }, ], ] @@ -1216,10 +1216,10 @@ Array [ }, ], Array [ - "async.async.js?ver=6c385e59eb34d690245b", + "async.async.js?ver=f964739ef2971762249c", 265, Object { - "fullhash": "6c385e59eb34d690245b", + "fullhash": "f964739ef2971762249c", "immutable": true, "javascriptModule": false, "related": Object { @@ -1249,44 +1249,44 @@ Array [ ], Array [ "main.js.gz", - 3990, + 4135, Object { "compressed": true, "immutable": true, - "size": 3990, + "size": 4135, }, ], Array [ "main.js.map.gz", - 3962, + 4115, Object { "compressed": true, - "size": 3962, + "size": 4115, }, ], Array [ - "main.js.map?var=6c385e59eb34d690245b", - 12453, + "main.js.map?var=f964739ef2971762249c", + 12966, Object { "development": true, "related": Object { "gzipped": "main.js.map.gz", }, - "size": 12453, + "size": 12966, }, ], Array [ - "main.js?var=6c385e59eb34d690245b", - 16712, + "main.js?var=f964739ef2971762249c", + 17237, Object { - "fullhash": "6c385e59eb34d690245b", + "fullhash": "f964739ef2971762249c", "immutable": true, "javascriptModule": false, "related": Object { "gzipped": "main.js.gz", - "sourceMap": "main.js.map?var=6c385e59eb34d690245b", + "sourceMap": "main.js.map?var=f964739ef2971762249c", }, - "size": 16712, + "size": 17237, }, ], ] @@ -1417,10 +1417,10 @@ Array [ }, ], Array [ - "async.async.js?ver=332db2bcb6b6f299224f", + "async.async.js?ver=8b644dc8a959875e39cf", 265, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "related": Object { @@ -1434,45 +1434,45 @@ Array [ ], Array [ "main.js.br", - 3446, + 3584, Object { "compressed": true, "immutable": true, - "size": 3446, + "size": 3584, }, ], Array [ "main.js.compress", - 16654, + 17179, Object { "compressed": true, "immutable": true, - "size": 16654, + "size": 17179, }, ], Array [ "main.js.custom?foo=bar#hash", - 16654, + 17179, Object { "compressed": true, "immutable": true, - "size": 16654, + "size": 17179, }, ], Array [ "main.js.gz", - 3959, + 4102, Object { "compressed": true, "immutable": true, - "size": 3959, + "size": 4102, }, ], Array [ - "main.js?var=332db2bcb6b6f299224f", - 16654, + "main.js?var=8b644dc8a959875e39cf", + 17179, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "related": Object { @@ -1481,7 +1481,7 @@ Array [ "customed": "main.js.custom?foo=bar#hash", "gzipped": "main.js.gz", }, - "size": 16654, + "size": 17179, }, ], ] @@ -1533,10 +1533,10 @@ Array [ }, ], Array [ - "async.async.js?ver=332db2bcb6b6f299224f", + "async.async.js?ver=8b644dc8a959875e39cf", 265, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "related": Object { @@ -1547,24 +1547,24 @@ Array [ ], Array [ "main.js.gz", - 3959, + 4102, Object { "compressed": true, "immutable": true, - "size": 3959, + "size": 4102, }, ], Array [ - "main.js?var=332db2bcb6b6f299224f", - 16654, + "main.js?var=8b644dc8a959875e39cf", + 17179, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "related": Object { "gzipped": "main.js.gz", }, - "size": 16654, + "size": 17179, }, ], ] diff --git a/test/__snapshots__/CompressionPlugin.test.js.snap.webpack4 b/test/__snapshots__/CompressionPlugin.test.js.snap.webpack4 deleted file mode 100644 index 0982294..0000000 --- a/test/__snapshots__/CompressionPlugin.test.js.snap.webpack4 +++ /dev/null @@ -1,1392 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`CompressionPlugin should work and do not use memory cache when the "cache" option is "false": assets 1`] = ` -Array [ - Array [ - "async.async.js", - 249, - Object { - "related": Object { - "gzipped": "async.async.js.gz", - }, - }, - ], - Array [ - "async.async.js.gz", - 171, - Object { - "compressed": true, - }, - ], - Array [ - "icon.png", - 78117, - Object { - "sourceFilename": "icon.png", - }, - ], - Array [ - "icon.svg", - 672, - Object { - "related": Object { - "gzipped": "icon.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "icon.svg.gz", - 393, - Object { - "compressed": true, - }, - ], - Array [ - "main.js", - 11539, - Object { - "related": Object { - "gzipped": "main.js.gz", - }, - }, - ], - Array [ - "main.js.gz", - 2910, - Object { - "compressed": true, - }, - ], -] -`; - -exports[`CompressionPlugin should work and do not use memory cache when the "cache" option is "false": assets 2`] = ` -Array [ - Array [ - "async.async.js", - 249, - Object { - "related": Object { - "gzipped": "async.async.js.gz", - }, - }, - ], - Array [ - "async.async.js.gz", - 171, - Object { - "compressed": true, - }, - ], - Array [ - "icon.png", - 78117, - Object { - "sourceFilename": "icon.png", - }, - ], - Array [ - "icon.svg", - 672, - Object { - "related": Object { - "gzipped": "icon.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "icon.svg.gz", - 393, - Object { - "compressed": true, - }, - ], - Array [ - "main.js", - 11539, - Object { - "related": Object { - "gzipped": "main.js.gz", - }, - }, - ], - Array [ - "main.js.gz", - 2910, - Object { - "compressed": true, - }, - ], -] -`; - -exports[`CompressionPlugin should work and do not use memory cache when the "cache" option is "false": errors 1`] = `Array []`; - -exports[`CompressionPlugin should work and do not use memory cache when the "cache" option is "false": errors 2`] = `Array []`; - -exports[`CompressionPlugin should work and do not use memory cache when the "cache" option is "false": warnings 1`] = `Array []`; - -exports[`CompressionPlugin should work and do not use memory cache when the "cache" option is "false": warnings 2`] = `Array []`; - -exports[`CompressionPlugin should work and keep assets info: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.e6542b36f32f25090488.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.e6542b36f32f25090488.js.gz", - }, - }, - ], - Array [ - "async.async.e6542b36f32f25090488.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.7d96b947e2f0d38f7c7d.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.7d96b947e2f0d38f7c7d.js.gz", - }, - }, - ], - Array [ - "main.7d96b947e2f0d38f7c7d.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`CompressionPlugin should work and keep assets info: errors 1`] = `Array []`; - -exports[`CompressionPlugin should work and keep assets info: warnings 1`] = `Array []`; - -exports[`CompressionPlugin should work and show compress assets in stats: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js", - 249, - Object { - "related": Object { - "gzipped": "async.async.js.gz", - }, - }, - ], - Array [ - "async.async.js.gz", - 171, - Object { - "compressed": true, - }, - ], - Array [ - "main.js", - 11595, - Object { - "related": Object { - "gzipped": "main.js.gz", - }, - }, - ], - Array [ - "main.js.gz", - 2974, - Object { - "compressed": true, - }, - ], -] -`; - -exports[`CompressionPlugin should work and show compress assets in stats: errors 1`] = `Array []`; - -exports[`CompressionPlugin should work and show compress assets in stats: warnings 1`] = `Array []`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true" and the asset has been changed: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.js", - 249, - Object { - "related": Object { - "gzipped": "async.js.gz", - }, - }, - ], - Array [ - "async.js.gz", - 171, - Object { - "compressed": true, - }, - ], - Array [ - "main.js", - 11549, - Object { - "related": Object { - "gzipped": "main.js.gz", - }, - }, - ], - Array [ - "main.js.gz", - 2953, - Object { - "compressed": true, - }, - ], -] -`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true" and the asset has been changed: assets 2`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.js", - 249, - Object { - "related": Object { - "gzipped": "async.js.gz", - }, - }, - ], - Array [ - "async.js.gz", - 171, - Object { - "compressed": true, - }, - ], - Array [ - "main.js", - 11571, - Object { - "related": Object { - "gzipped": "main.js.gz", - }, - }, - ], - Array [ - "main.js.gz", - 2961, - Object { - "compressed": true, - }, - ], -] -`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true" and the asset has been changed: errors 1`] = `Array []`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true" and the asset has been changed: errors 2`] = `Array []`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true" and the asset has been changed: warnings 1`] = `Array []`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true" and the asset has been changed: warnings 2`] = `Array []`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true" with multiple plugins: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "customed": "09a1a1112c577c2794359715edfcb5ac.png.custom", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.custom", - 78117, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "brotliCompressed": "23fc1d3ac606d117e05a140e0de79806.svg.br", - "customed": "23fc1d3ac606d117e05a140e0de79806.svg.custom", - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.br", - 363, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.custom", - 672, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.js", - 249, - Object { - "related": Object { - "brotliCompressed": "async.js.br", - "customed": "async.js.custom", - "gzipped": "async.js.gz", - }, - }, - ], - Array [ - "async.js.br", - 141, - Object { - "compressed": true, - }, - ], - Array [ - "async.js.custom", - 249, - Object { - "compressed": true, - }, - ], - Array [ - "async.js.gz", - 171, - Object { - "compressed": true, - }, - ], - Array [ - "main.js", - 11549, - Object { - "related": Object { - "brotliCompressed": "main.js.br", - "customed": "main.js.custom", - "gzipped": "main.js.gz", - }, - }, - ], - Array [ - "main.js.br", - 2546, - Object { - "compressed": true, - }, - ], - Array [ - "main.js.custom", - 11549, - Object { - "compressed": true, - }, - ], - Array [ - "main.js.gz", - 2953, - Object { - "compressed": true, - }, - ], -] -`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true" with multiple plugins: assets 2`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "customed": "09a1a1112c577c2794359715edfcb5ac.png.custom", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.custom", - 78117, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "brotliCompressed": "23fc1d3ac606d117e05a140e0de79806.svg.br", - "customed": "23fc1d3ac606d117e05a140e0de79806.svg.custom", - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.br", - 363, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.custom", - 672, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.js", - 249, - Object { - "related": Object { - "brotliCompressed": "async.js.br", - "customed": "async.js.custom", - "gzipped": "async.js.gz", - }, - }, - ], - Array [ - "async.js.br", - 141, - Object { - "compressed": true, - }, - ], - Array [ - "async.js.custom", - 249, - Object { - "compressed": true, - }, - ], - Array [ - "async.js.gz", - 171, - Object { - "compressed": true, - }, - ], - Array [ - "main.js", - 11549, - Object { - "related": Object { - "brotliCompressed": "main.js.br", - "customed": "main.js.custom", - "gzipped": "main.js.gz", - }, - }, - ], - Array [ - "main.js.br", - 2546, - Object { - "compressed": true, - }, - ], - Array [ - "main.js.custom", - 11549, - Object { - "compressed": true, - }, - ], - Array [ - "main.js.gz", - 2953, - Object { - "compressed": true, - }, - ], -] -`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true" with multiple plugins: errors 1`] = `Array []`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true" with multiple plugins: errors 2`] = `Array []`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true" with multiple plugins: warnings 1`] = `Array []`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true" with multiple plugins: warnings 2`] = `Array []`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true": assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.js", - 249, - Object { - "related": Object { - "gzipped": "async.js.gz", - }, - }, - ], - Array [ - "async.js.gz", - 171, - Object { - "compressed": true, - }, - ], - Array [ - "main.js", - 11549, - Object { - "related": Object { - "gzipped": "main.js.gz", - }, - }, - ], - Array [ - "main.js.gz", - 2953, - Object { - "compressed": true, - }, - ], -] -`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true": assets 2`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.js", - 249, - Object { - "related": Object { - "gzipped": "async.js.gz", - }, - }, - ], - Array [ - "async.js.gz", - 171, - Object { - "compressed": true, - }, - ], - Array [ - "main.js", - 11549, - Object { - "related": Object { - "gzipped": "main.js.gz", - }, - }, - ], - Array [ - "main.js.gz", - 2953, - Object { - "compressed": true, - }, - ], -] -`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true": errors 1`] = `Array []`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true": errors 2`] = `Array []`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true": warnings 1`] = `Array []`; - -exports[`CompressionPlugin should work and use memory cache when the "cache" option is "true": warnings 2`] = `Array []`; - -exports[`CompressionPlugin should work and use memory cache without options in the "development" mode: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`CompressionPlugin should work and use memory cache without options in the "development" mode: assets 2`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`CompressionPlugin should work and use memory cache without options in the "development" mode: errors 1`] = `Array []`; - -exports[`CompressionPlugin should work and use memory cache without options in the "development" mode: errors 2`] = `Array []`; - -exports[`CompressionPlugin should work and use memory cache without options in the "development" mode: warnings 1`] = `Array []`; - -exports[`CompressionPlugin should work and use memory cache without options in the "development" mode: warnings 2`] = `Array []`; - -exports[`CompressionPlugin should work child compilations: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js?ver=810493800e70254b803c", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.js.gz", - }, - }, - ], - Array [ - "copied.js", - 400, - Object { - "copied": true, - "related": Object { - "gzipped": "copied.js.gz", - }, - }, - ], - Array [ - "copied.js.gz", - 29, - Object { - "compressed": true, - }, - ], - Array [ - "main.js.gz", - 3001, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.js?var=810493800e70254b803c", - 11627, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.js.gz", - }, - }, - ], -] -`; - -exports[`CompressionPlugin should work child compilations: errors 1`] = `Array []`; - -exports[`CompressionPlugin should work child compilations: warnings 1`] = `Array []`; - -exports[`CompressionPlugin should work with assets info: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js.gz", - 220, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js.map?ver=dc74724f7b13a2de5a20", - 136, - Object { - "development": true, - }, - ], - Array [ - "async.async.js?ver=dc74724f7b13a2de5a20", - 314, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.js.gz", - }, - }, - ], - Array [ - "copied.js", - 400, - Object { - "copied": true, - "related": Object { - "gzipped": "copied.js.gz", - }, - }, - ], - Array [ - "copied.js.gz", - 29, - Object { - "compressed": true, - }, - ], - Array [ - "main.js.gz", - 3035, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.js.map.gz", - 3134, - Object { - "compressed": true, - }, - ], - Array [ - "main.js.map?var=dc74724f7b13a2de5a20", - 10264, - Object { - "development": true, - "related": Object { - "gzipped": "main.js.map.gz", - }, - }, - ], - Array [ - "main.js?var=dc74724f7b13a2de5a20", - 11688, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.js.gz", - }, - }, - ], -] -`; - -exports[`CompressionPlugin should work with assets info: errors 1`] = `Array []`; - -exports[`CompressionPlugin should work with assets info: warnings 1`] = `Array []`; - -exports[`CompressionPlugin should work with multiple plugins: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "compressed": "09a1a1112c577c2794359715edfcb5ac.png.compress", - "customed": "09a1a1112c577c2794359715edfcb5ac.png.custom?foo=bar#hash", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.compress", - 78117, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.custom?foo=bar#hash", - 78117, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "brotliCompressed": "23fc1d3ac606d117e05a140e0de79806.svg.br", - "compressed": "23fc1d3ac606d117e05a140e0de79806.svg.compress", - "customed": "23fc1d3ac606d117e05a140e0de79806.svg.custom?foo=bar#hash", - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.br", - 363, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.compress", - 672, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.custom?foo=bar#hash", - 672, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js.br", - 141, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js.compress", - 249, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js.custom?foo=bar#hash", - 249, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js?ver=dc74724f7b13a2de5a20", - 249, - Object { - "immutable": true, - "related": Object { - "brotliCompressed": "async.async.js.br", - "compressed": "async.async.js.compress", - "customed": "async.async.js.custom?foo=bar#hash", - "gzipped": "async.async.js.gz", - }, - }, - ], - Array [ - "main.js.br", - 2588, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.js.compress", - 11630, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.js.custom?foo=bar#hash", - 11630, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.js.gz", - 3002, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.js?var=dc74724f7b13a2de5a20", - 11630, - Object { - "immutable": true, - "related": Object { - "brotliCompressed": "main.js.br", - "compressed": "main.js.compress", - "customed": "main.js.custom?foo=bar#hash", - "gzipped": "main.js.gz", - }, - }, - ], -] -`; - -exports[`CompressionPlugin should work with multiple plugins: errors 1`] = `Array []`; - -exports[`CompressionPlugin should work with multiple plugins: warnings 1`] = `Array []`; - -exports[`CompressionPlugin should work: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js?ver=dc74724f7b13a2de5a20", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.js.gz", - }, - }, - ], - Array [ - "main.js.gz", - 3002, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.js?var=dc74724f7b13a2de5a20", - 11630, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.js.gz", - }, - }, - ], -] -`; - -exports[`CompressionPlugin should work: errors 1`] = `Array []`; - -exports[`CompressionPlugin should work: warnings 1`] = `Array []`; diff --git a/test/__snapshots__/algorithm.test.js.snap.webpack5 b/test/__snapshots__/algorithm.test.js.snap similarity index 91% rename from test/__snapshots__/algorithm.test.js.snap.webpack5 rename to test/__snapshots__/algorithm.test.js.snap index 1450003..4f4482f 100644 --- a/test/__snapshots__/algorithm.test.js.snap.webpack5 +++ b/test/__snapshots__/algorithm.test.js.snap @@ -67,25 +67,25 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", + "gzipped": "main.a6299e4b54bcb458b330.js.gz", }, - "size": 16495, + "size": 17020, }, ], Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, + "main.a6299e4b54bcb458b330.js.gz", + 4077, Object { "compressed": true, "immutable": true, - "size": 3934, + "size": 4077, }, ], ] @@ -164,25 +164,25 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, "related": Object { - "gzed": "main.c9c6c970f01f9eb6d301.js.gz", + "gzed": "main.a6299e4b54bcb458b330.js.gz", }, - "size": 16495, + "size": 17020, }, ], Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 16495, + "main.a6299e4b54bcb458b330.js.gz", + 17020, Object { "compressed": true, "immutable": true, - "size": 16495, + "size": 17020, }, ], ] @@ -231,13 +231,13 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, - "size": 16495, + "size": 17020, }, ], ] diff --git a/test/__snapshots__/algorithm.test.js.snap.webpack4 b/test/__snapshots__/algorithm.test.js.snap.webpack4 deleted file mode 100644 index 288e762..0000000 --- a/test/__snapshots__/algorithm.test.js.snap.webpack4 +++ /dev/null @@ -1,231 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`"algorithm" option matches snapshot for \`gzip\` value ({String}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"algorithm" option matches snapshot for \`gzip\` value ({String}): errors 1`] = `Array []`; - -exports[`"algorithm" option matches snapshot for \`gzip\` value ({String}): warnings 1`] = `Array []`; - -exports[`"algorithm" option matches snapshot for \`unknown\` value ({String}) 1`] = `"Algorithm \\"unknown\\" is not found in \\"zlib\\""`; - -exports[`"algorithm" option matches snapshot for custom function ({Function}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzed": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 78117, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzed": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 672, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzed": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 249, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzed": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 11645, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"algorithm" option matches snapshot for custom function ({Function}): compressionOptions 1`] = `Object {}`; - -exports[`"algorithm" option matches snapshot for custom function ({Function}): compressionOptions 2`] = `Object {}`; - -exports[`"algorithm" option matches snapshot for custom function ({Function}): compressionOptions 3`] = `Object {}`; - -exports[`"algorithm" option matches snapshot for custom function ({Function}): compressionOptions 4`] = `Object {}`; - -exports[`"algorithm" option matches snapshot for custom function ({Function}): errors 1`] = `Array []`; - -exports[`"algorithm" option matches snapshot for custom function ({Function}): warnings 1`] = `Array []`; - -exports[`"algorithm" option matches snapshot for custom function with error ({Function}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - }, - ], -] -`; - -exports[`"algorithm" option matches snapshot for custom function with error ({Function}): compressionOptions 1`] = `Object {}`; - -exports[`"algorithm" option matches snapshot for custom function with error ({Function}): compressionOptions 2`] = `Object {}`; - -exports[`"algorithm" option matches snapshot for custom function with error ({Function}): compressionOptions 3`] = `Object {}`; - -exports[`"algorithm" option matches snapshot for custom function with error ({Function}): compressionOptions 4`] = `Object {}`; - -exports[`"algorithm" option matches snapshot for custom function with error ({Function}): errors 1`] = ` -Array [ - "Error", - "Error", - "Error", - "Error", -] -`; - -exports[`"algorithm" option matches snapshot for custom function with error ({Function}): warnings 1`] = `Array []`; diff --git a/test/__snapshots__/cache-option.test.js.snap.webpack4 b/test/__snapshots__/cache-option.test.js.snap.webpack4 deleted file mode 100644 index f74de8c..0000000 --- a/test/__snapshots__/cache-option.test.js.snap.webpack4 +++ /dev/null @@ -1,666 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`"cache" option matches snapshot for \`false\` value ({Boolean}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"cache" option matches snapshot for \`false\` value ({Boolean}): errors 1`] = `Array []`; - -exports[`"cache" option matches snapshot for \`false\` value ({Boolean}): warnings 1`] = `Array []`; - -exports[`"cache" option matches snapshot for \`other-cache-directory\` value ({String}): 09a1a1112c577c2794359715edfcb5ac.png 1`] = ` -Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - "09a1a1112c577c2794359715edfcb5ac", -] -`; - -exports[`"cache" option matches snapshot for \`other-cache-directory\` value ({String}): 23fc1d3ac606d117e05a140e0de79806.svg 1`] = ` -Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - "23fc1d3ac606d117e05a140e0de79806", -] -`; - -exports[`"cache" option matches snapshot for \`other-cache-directory\` value ({String}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"cache" option matches snapshot for \`other-cache-directory\` value ({String}): assets 2`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"cache" option matches snapshot for \`other-cache-directory\` value ({String}): async.async.dcbdb1dd40763448b635.js 1`] = ` -Array [ - "async.async.dcbdb1dd40763448b635.js", - "0fb94f644e2d45a0d17031ab77459a35", -] -`; - -exports[`"cache" option matches snapshot for \`other-cache-directory\` value ({String}): errors 1`] = `Array []`; - -exports[`"cache" option matches snapshot for \`other-cache-directory\` value ({String}): errors 2`] = `Array []`; - -exports[`"cache" option matches snapshot for \`other-cache-directory\` value ({String}): main.82c6786e32f9c77b44ef.js 1`] = ` -Array [ - "main.82c6786e32f9c77b44ef.js", - "ef0eb5cabc4295a2bbcd320c66aecd89", -] -`; - -exports[`"cache" option matches snapshot for \`other-cache-directory\` value ({String}): warnings 1`] = `Array []`; - -exports[`"cache" option matches snapshot for \`other-cache-directory\` value ({String}): warnings 2`] = `Array []`; - -exports[`"cache" option matches snapshot for \`other-other-cache-directory\` value ({String}) with the "algorithm" option: 09a1a1112c577c2794359715edfcb5ac.png 1`] = ` -Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - "09a1a1112c577c2794359715edfcb5ac", -] -`; - -exports[`"cache" option matches snapshot for \`other-other-cache-directory\` value ({String}) with the "algorithm" option: 23fc1d3ac606d117e05a140e0de79806.svg 1`] = ` -Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - "23fc1d3ac606d117e05a140e0de79806", -] -`; - -exports[`"cache" option matches snapshot for \`other-other-cache-directory\` value ({String}) with the "algorithm" option: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzed": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzed": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzed": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzed": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"cache" option matches snapshot for \`other-other-cache-directory\` value ({String}) with the "algorithm" option: assets 2`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzed": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzed": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzed": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzed": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"cache" option matches snapshot for \`other-other-cache-directory\` value ({String}) with the "algorithm" option: async.async.dcbdb1dd40763448b635.js 1`] = ` -Array [ - "async.async.dcbdb1dd40763448b635.js", - "0fb94f644e2d45a0d17031ab77459a35", -] -`; - -exports[`"cache" option matches snapshot for \`other-other-cache-directory\` value ({String}) with the "algorithm" option: errors 1`] = `Array []`; - -exports[`"cache" option matches snapshot for \`other-other-cache-directory\` value ({String}) with the "algorithm" option: errors 2`] = `Array []`; - -exports[`"cache" option matches snapshot for \`other-other-cache-directory\` value ({String}) with the "algorithm" option: main.82c6786e32f9c77b44ef.js 1`] = ` -Array [ - "main.82c6786e32f9c77b44ef.js", - "ef0eb5cabc4295a2bbcd320c66aecd89", -] -`; - -exports[`"cache" option matches snapshot for \`other-other-cache-directory\` value ({String}) with the "algorithm" option: warnings 1`] = `Array []`; - -exports[`"cache" option matches snapshot for \`other-other-cache-directory\` value ({String}) with the "algorithm" option: warnings 2`] = `Array []`; - -exports[`"cache" option matches snapshot for \`true\` value ({Boolean}): 09a1a1112c577c2794359715edfcb5ac.png 1`] = ` -Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - "09a1a1112c577c2794359715edfcb5ac", -] -`; - -exports[`"cache" option matches snapshot for \`true\` value ({Boolean}): 23fc1d3ac606d117e05a140e0de79806.svg 1`] = ` -Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - "23fc1d3ac606d117e05a140e0de79806", -] -`; - -exports[`"cache" option matches snapshot for \`true\` value ({Boolean}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"cache" option matches snapshot for \`true\` value ({Boolean}): assets 2`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"cache" option matches snapshot for \`true\` value ({Boolean}): async.async.dcbdb1dd40763448b635.js 1`] = ` -Array [ - "async.async.dcbdb1dd40763448b635.js", - "0fb94f644e2d45a0d17031ab77459a35", -] -`; - -exports[`"cache" option matches snapshot for \`true\` value ({Boolean}): errors 1`] = `Array []`; - -exports[`"cache" option matches snapshot for \`true\` value ({Boolean}): errors 2`] = `Array []`; - -exports[`"cache" option matches snapshot for \`true\` value ({Boolean}): main.82c6786e32f9c77b44ef.js 1`] = ` -Array [ - "main.82c6786e32f9c77b44ef.js", - "ef0eb5cabc4295a2bbcd320c66aecd89", -] -`; - -exports[`"cache" option matches snapshot for \`true\` value ({Boolean}): warnings 1`] = `Array []`; - -exports[`"cache" option matches snapshot for \`true\` value ({Boolean}): warnings 2`] = `Array []`; diff --git a/test/__snapshots__/cache-option.test.js.snap.webpack5 b/test/__snapshots__/cache-option.test.js.snap.webpack5 deleted file mode 100644 index a719c26..0000000 --- a/test/__snapshots__/cache-option.test.js.snap.webpack5 +++ /dev/null @@ -1,665 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`"cache" option should work when \`cache\` is \`false\`: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "size": 78117, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "size": 672, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - "size": 393, - }, - ], - Array [ - "async.async.9325220d444b0d653c03.js", - 265, - Object { - "chunkhash": "9325220d444b0d653c03", - "immutable": true, - "javascriptModule": false, - "related": Object { - "gzipped": "async.async.9325220d444b0d653c03.js.gz", - }, - "size": 265, - }, - ], - Array [ - "async.async.9325220d444b0d653c03.js.gz", - 179, - Object { - "compressed": true, - "immutable": true, - "size": 179, - }, - ], - Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, - Object { - "chunkhash": "c9c6c970f01f9eb6d301", - "immutable": true, - "javascriptModule": false, - "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", - }, - "size": 16495, - }, - ], - Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, - Object { - "compressed": true, - "immutable": true, - "size": 3934, - }, - ], -] -`; - -exports[`"cache" option should work when \`cache\` is \`false\`: assets 2`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "size": 78117, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "size": 672, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - "size": 393, - }, - ], - Array [ - "async.async.9325220d444b0d653c03.js", - 265, - Object { - "chunkhash": "9325220d444b0d653c03", - "immutable": true, - "javascriptModule": false, - "related": Object { - "gzipped": "async.async.9325220d444b0d653c03.js.gz", - }, - "size": 265, - }, - ], - Array [ - "async.async.9325220d444b0d653c03.js.gz", - 179, - Object { - "compressed": true, - "immutable": true, - "size": 179, - }, - ], - Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, - Object { - "chunkhash": "c9c6c970f01f9eb6d301", - "immutable": true, - "javascriptModule": false, - "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", - }, - "size": 16495, - }, - ], - Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, - Object { - "compressed": true, - "immutable": true, - "size": 3934, - }, - ], -] -`; - -exports[`"cache" option should work when \`cache\` is \`false\`: errors 1`] = `Array []`; - -exports[`"cache" option should work when \`cache\` is \`false\`: errors 2`] = `Array []`; - -exports[`"cache" option should work when \`cache\` is \`false\`: warnings 1`] = `Array []`; - -exports[`"cache" option should work when \`cache\` is \`false\`: warnings 2`] = `Array []`; - -exports[`"cache" option should work with "filesystem" value for the "cache.type" option and with the "algorithm" option: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "size": 78117, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzed": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "size": 672, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - "size": 393, - }, - ], - Array [ - "async.async.9325220d444b0d653c03.js", - 265, - Object { - "chunkhash": "9325220d444b0d653c03", - "immutable": true, - "javascriptModule": false, - "related": Object { - "gzed": "async.async.9325220d444b0d653c03.js.gz", - }, - "size": 265, - }, - ], - Array [ - "async.async.9325220d444b0d653c03.js.gz", - 179, - Object { - "compressed": true, - "immutable": true, - "size": 179, - }, - ], - Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, - Object { - "chunkhash": "c9c6c970f01f9eb6d301", - "immutable": true, - "javascriptModule": false, - "related": Object { - "gzed": "main.c9c6c970f01f9eb6d301.js.gz", - }, - "size": 16495, - }, - ], - Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, - Object { - "compressed": true, - "immutable": true, - "size": 3934, - }, - ], -] -`; - -exports[`"cache" option should work with "filesystem" value for the "cache.type" option and with the "algorithm" option: assets 2`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "size": 78117, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzed": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "size": 672, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - "size": 393, - }, - ], - Array [ - "async.async.9325220d444b0d653c03.js", - 265, - Object { - "chunkhash": "9325220d444b0d653c03", - "immutable": true, - "javascriptModule": false, - "related": Object { - "gzed": "async.async.9325220d444b0d653c03.js.gz", - }, - "size": 265, - }, - ], - Array [ - "async.async.9325220d444b0d653c03.js.gz", - 179, - Object { - "compressed": true, - "immutable": true, - "size": 179, - }, - ], - Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, - Object { - "chunkhash": "c9c6c970f01f9eb6d301", - "immutable": true, - "javascriptModule": false, - "related": Object { - "gzed": "main.c9c6c970f01f9eb6d301.js.gz", - }, - "size": 16495, - }, - ], - Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, - Object { - "compressed": true, - "immutable": true, - "size": 3934, - }, - ], -] -`; - -exports[`"cache" option should work with "filesystem" value for the "cache.type" option and with the "algorithm" option: errors 1`] = `Array []`; - -exports[`"cache" option should work with "filesystem" value for the "cache.type" option and with the "algorithm" option: errors 2`] = `Array []`; - -exports[`"cache" option should work with "filesystem" value for the "cache.type" option and with the "algorithm" option: warnings 1`] = `Array []`; - -exports[`"cache" option should work with "filesystem" value for the "cache.type" option and with the "algorithm" option: warnings 2`] = `Array []`; - -exports[`"cache" option should work with "filesystem" value for the "cache.type" option: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "size": 78117, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "size": 672, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - "size": 393, - }, - ], - Array [ - "async.async.9325220d444b0d653c03.js", - 265, - Object { - "chunkhash": "9325220d444b0d653c03", - "immutable": true, - "javascriptModule": false, - "related": Object { - "gzipped": "async.async.9325220d444b0d653c03.js.gz", - }, - "size": 265, - }, - ], - Array [ - "async.async.9325220d444b0d653c03.js.gz", - 179, - Object { - "compressed": true, - "immutable": true, - "size": 179, - }, - ], - Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, - Object { - "chunkhash": "c9c6c970f01f9eb6d301", - "immutable": true, - "javascriptModule": false, - "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", - }, - "size": 16495, - }, - ], - Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, - Object { - "compressed": true, - "immutable": true, - "size": 3934, - }, - ], -] -`; - -exports[`"cache" option should work with "filesystem" value for the "cache.type" option: assets 2`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "size": 78117, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "size": 672, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - "size": 393, - }, - ], - Array [ - "async.async.9325220d444b0d653c03.js", - 265, - Object { - "chunkhash": "9325220d444b0d653c03", - "immutable": true, - "javascriptModule": false, - "related": Object { - "gzipped": "async.async.9325220d444b0d653c03.js.gz", - }, - "size": 265, - }, - ], - Array [ - "async.async.9325220d444b0d653c03.js.gz", - 179, - Object { - "compressed": true, - "immutable": true, - "size": 179, - }, - ], - Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, - Object { - "chunkhash": "c9c6c970f01f9eb6d301", - "immutable": true, - "javascriptModule": false, - "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", - }, - "size": 16495, - }, - ], - Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, - Object { - "compressed": true, - "immutable": true, - "size": 3934, - }, - ], -] -`; - -exports[`"cache" option should work with "filesystem" value for the "cache.type" option: errors 1`] = `Array []`; - -exports[`"cache" option should work with "filesystem" value for the "cache.type" option: errors 2`] = `Array []`; - -exports[`"cache" option should work with "filesystem" value for the "cache.type" option: warnings 1`] = `Array []`; - -exports[`"cache" option should work with "filesystem" value for the "cache.type" option: warnings 2`] = `Array []`; - -exports[`"cache" option should work with "memory" value for the "cache.type" option: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "size": 78117, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "size": 672, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - "size": 393, - }, - ], - Array [ - "async.async.9325220d444b0d653c03.js", - 265, - Object { - "chunkhash": "9325220d444b0d653c03", - "immutable": true, - "javascriptModule": false, - "related": Object { - "gzipped": "async.async.9325220d444b0d653c03.js.gz", - }, - "size": 265, - }, - ], - Array [ - "async.async.9325220d444b0d653c03.js.gz", - 179, - Object { - "compressed": true, - "immutable": true, - "size": 179, - }, - ], - Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, - Object { - "chunkhash": "c9c6c970f01f9eb6d301", - "immutable": true, - "javascriptModule": false, - "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", - }, - "size": 16495, - }, - ], - Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, - Object { - "compressed": true, - "immutable": true, - "size": 3934, - }, - ], -] -`; - -exports[`"cache" option should work with "memory" value for the "cache.type" option: assets 2`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "size": 78117, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "size": 672, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - "size": 393, - }, - ], - Array [ - "async.async.9325220d444b0d653c03.js", - 265, - Object { - "chunkhash": "9325220d444b0d653c03", - "immutable": true, - "javascriptModule": false, - "related": Object { - "gzipped": "async.async.9325220d444b0d653c03.js.gz", - }, - "size": 265, - }, - ], - Array [ - "async.async.9325220d444b0d653c03.js.gz", - 179, - Object { - "compressed": true, - "immutable": true, - "size": 179, - }, - ], - Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, - Object { - "chunkhash": "c9c6c970f01f9eb6d301", - "immutable": true, - "javascriptModule": false, - "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", - }, - "size": 16495, - }, - ], - Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, - Object { - "compressed": true, - "immutable": true, - "size": 3934, - }, - ], -] -`; - -exports[`"cache" option should work with "memory" value for the "cache.type" option: errors 1`] = `Array []`; - -exports[`"cache" option should work with "memory" value for the "cache.type" option: errors 2`] = `Array []`; - -exports[`"cache" option should work with "memory" value for the "cache.type" option: warnings 1`] = `Array []`; - -exports[`"cache" option should work with "memory" value for the "cache.type" option: warnings 2`] = `Array []`; diff --git a/test/__snapshots__/compressionOptions-option.test.js.snap.webpack5 b/test/__snapshots__/compressionOptions-option.test.js.snap similarity index 87% rename from test/__snapshots__/compressionOptions-option.test.js.snap.webpack5 rename to test/__snapshots__/compressionOptions-option.test.js.snap index d900ff1..1f4488e 100644 --- a/test/__snapshots__/compressionOptions-option.test.js.snap.webpack5 +++ b/test/__snapshots__/compressionOptions-option.test.js.snap @@ -67,25 +67,25 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", + "gzipped": "main.a6299e4b54bcb458b330.js.gz", }, - "size": 16495, + "size": 17020, }, ], Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, + "main.a6299e4b54bcb458b330.js.gz", + 4077, Object { "compressed": true, "immutable": true, - "size": 3934, + "size": 4077, }, ], ] @@ -162,25 +162,25 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", + "gzipped": "main.a6299e4b54bcb458b330.js.gz", }, - "size": 16495, + "size": 17020, }, ], Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, + "main.a6299e4b54bcb458b330.js.gz", + 4077, Object { "compressed": true, "immutable": true, - "size": 3934, + "size": 4077, }, ], ] @@ -245,25 +245,25 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, "related": Object { - "brotliCompressed": "main.c9c6c970f01f9eb6d301.js.gz", + "brotliCompressed": "main.a6299e4b54bcb458b330.js.gz", }, - "size": 16495, + "size": 17020, }, ], Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3422, + "main.a6299e4b54bcb458b330.js.gz", + 3574, Object { "compressed": true, "immutable": true, - "size": 3422, + "size": 3574, }, ], ] @@ -328,25 +328,25 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, "related": Object { - "deflateed": "main.c9c6c970f01f9eb6d301.js.gz", + "deflateed": "main.a6299e4b54bcb458b330.js.gz", }, - "size": 16495, + "size": 17020, }, ], Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3922, + "main.a6299e4b54bcb458b330.js.gz", + 4065, Object { "compressed": true, "immutable": true, - "size": 3922, + "size": 4065, }, ], ] @@ -411,25 +411,25 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, "related": Object { - "deflateRawed": "main.c9c6c970f01f9eb6d301.js.gz", + "deflateRawed": "main.a6299e4b54bcb458b330.js.gz", }, - "size": 16495, + "size": 17020, }, ], Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3916, + "main.a6299e4b54bcb458b330.js.gz", + 4059, Object { "compressed": true, "immutable": true, - "size": 3916, + "size": 4059, }, ], ] @@ -494,25 +494,25 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", + "gzipped": "main.a6299e4b54bcb458b330.js.gz", }, - "size": 16495, + "size": 17020, }, ], Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, + "main.a6299e4b54bcb458b330.js.gz", + 4077, Object { "compressed": true, "immutable": true, - "size": 3934, + "size": 4077, }, ], ] diff --git a/test/__snapshots__/compressionOptions-option.test.js.snap.webpack4 b/test/__snapshots__/compressionOptions-option.test.js.snap.webpack4 deleted file mode 100644 index 381c7be..0000000 --- a/test/__snapshots__/compressionOptions-option.test.js.snap.webpack4 +++ /dev/null @@ -1,455 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`"compressionOptions" option matches snapshot for custom options ({Object}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"compressionOptions" option matches snapshot for custom options ({Object}): errors 1`] = `Array []`; - -exports[`"compressionOptions" option matches snapshot for custom options ({Object}): warnings 1`] = `Array []`; - -exports[`"compressionOptions" option matches snapshot without values: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"compressionOptions" option matches snapshot without values: errors 1`] = `Array []`; - -exports[`"compressionOptions" option matches snapshot without values: warnings 1`] = `Array []`; - -exports[`"compressionOptions" option set default compression level to maximum for brotli: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "brotliCompressed": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 363, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "brotliCompressed": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 141, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "brotliCompressed": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 2587, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"compressionOptions" option set default compression level to maximum for brotli: errors 1`] = `Array []`; - -exports[`"compressionOptions" option set default compression level to maximum for brotli: warnings 1`] = `Array []`; - -exports[`"compressionOptions" option set default compression level to maximum for deflate: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "deflateed": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 381, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "deflateed": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 159, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "deflateed": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 2988, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"compressionOptions" option set default compression level to maximum for deflate: errors 1`] = `Array []`; - -exports[`"compressionOptions" option set default compression level to maximum for deflate: warnings 1`] = `Array []`; - -exports[`"compressionOptions" option set default compression level to maximum for deflateRaw: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "deflateRawed": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 375, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "deflateRawed": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 153, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "deflateRawed": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 2982, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"compressionOptions" option set default compression level to maximum for deflateRaw: errors 1`] = `Array []`; - -exports[`"compressionOptions" option set default compression level to maximum for deflateRaw: warnings 1`] = `Array []`; - -exports[`"compressionOptions" option set default compression level to maximum for gzip: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"compressionOptions" option set default compression level to maximum for gzip: errors 1`] = `Array []`; - -exports[`"compressionOptions" option set default compression level to maximum for gzip: warnings 1`] = `Array []`; diff --git a/test/__snapshots__/deleteOriginalAssets.test.js.snap.webpack5 b/test/__snapshots__/deleteOriginalAssets.test.js.snap similarity index 90% rename from test/__snapshots__/deleteOriginalAssets.test.js.snap.webpack5 rename to test/__snapshots__/deleteOriginalAssets.test.js.snap index 0744eb3..d301abb 100644 --- a/test/__snapshots__/deleteOriginalAssets.test.js.snap.webpack5 +++ b/test/__snapshots__/deleteOriginalAssets.test.js.snap @@ -30,20 +30,20 @@ Array [ }, ], Array [ - "main.6b42eac1865a72d65938.js", - 3976, + "main.91a583805a3f414213e7.js", + 4121, Object { "compressed": true, "immutable": true, - "size": 3976, + "size": 4121, }, ], Array [ - "main.6b42eac1865a72d65938.js.map", - 12336, + "main.91a583805a3f414213e7.js.map", + 12849, Object { "development": true, - "size": 12336, + "size": 12849, }, ], ] @@ -83,12 +83,12 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, + "main.a6299e4b54bcb458b330.js.gz", + 4077, Object { "compressed": true, "immutable": true, - "size": 3934, + "size": 4077, }, ], ] @@ -128,12 +128,12 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 3934, + "main.a6299e4b54bcb458b330.js", + 4077, Object { "compressed": true, "immutable": true, - "size": 3934, + "size": 4077, }, ], ] @@ -198,25 +198,25 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", + "gzipped": "main.a6299e4b54bcb458b330.js.gz", }, - "size": 16495, + "size": 17020, }, ], Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, + "main.a6299e4b54bcb458b330.js.gz", + 4077, Object { "compressed": true, "immutable": true, - "size": 3934, + "size": 4077, }, ], ] @@ -293,25 +293,25 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", + "gzipped": "main.a6299e4b54bcb458b330.js.gz", }, - "size": 16495, + "size": 17020, }, ], Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, + "main.a6299e4b54bcb458b330.js.gz", + 4077, Object { "compressed": true, "immutable": true, - "size": 3934, + "size": 4077, }, ], ] @@ -351,12 +351,12 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 3934, + "main.a6299e4b54bcb458b330.js", + 4077, Object { "compressed": true, "immutable": true, - "size": 3934, + "size": 4077, }, ], ] @@ -366,7 +366,7 @@ exports[`"deleteOriginalAssets" option should work and report errors on duplicat Array [ "Error: Conflict: Multiple assets emit different content to the same filename 23fc1d3ac606d117e05a140e0de79806.svg", "Error: Conflict: Multiple assets emit different content to the same filename async.async.9325220d444b0d653c03.js", - "Error: Conflict: Multiple assets emit different content to the same filename main.c9c6c970f01f9eb6d301.js", + "Error: Conflict: Multiple assets emit different content to the same filename main.a6299e4b54bcb458b330.js", ] `; diff --git a/test/__snapshots__/deleteOriginalAssets.test.js.snap.webpack4 b/test/__snapshots__/deleteOriginalAssets.test.js.snap.webpack4 deleted file mode 100644 index 8484776..0000000 --- a/test/__snapshots__/deleteOriginalAssets.test.js.snap.webpack4 +++ /dev/null @@ -1,340 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`"deleteOriginalAssets" option should delete original assets and keep source maps with option "keep-source-map": assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 220, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.map", - 132, - Object { - "development": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 3044, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.map", - 10291, - Object { - "development": true, - }, - ], -] -`; - -exports[`"deleteOriginalAssets" option should delete original assets and keep source maps with option "keep-source-map": errors 1`] = `Array []`; - -exports[`"deleteOriginalAssets" option should delete original assets and keep source maps with option "keep-source-map": warnings 1`] = `Array []`; - -exports[`"deleteOriginalAssets" option should work and delete original assets: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"deleteOriginalAssets" option should work and delete original assets: errors 1`] = `Array []`; - -exports[`"deleteOriginalAssets" option should work and delete original assets: warnings 1`] = `Array []`; - -exports[`"deleteOriginalAssets" option should work and do not report errors on duplicate assets when original assets were removed: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"deleteOriginalAssets" option should work and do not report errors on duplicate assets when original assets were removed: errors 1`] = `Array []`; - -exports[`"deleteOriginalAssets" option should work and do not report errors on duplicate assets when original assets were removed: warnings 1`] = `Array []`; - -exports[`"deleteOriginalAssets" option should work and keep original assets by default: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"deleteOriginalAssets" option should work and keep original assets by default: errors 1`] = `Array []`; - -exports[`"deleteOriginalAssets" option should work and keep original assets by default: warnings 1`] = `Array []`; - -exports[`"deleteOriginalAssets" option should work and keep original assets: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"deleteOriginalAssets" option should work and keep original assets: errors 1`] = `Array []`; - -exports[`"deleteOriginalAssets" option should work and keep original assets: warnings 1`] = `Array []`; - -exports[`"deleteOriginalAssets" option should work and report errors on duplicate assets: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"deleteOriginalAssets" option should work and report errors on duplicate assets: errors 1`] = `Array []`; - -exports[`"deleteOriginalAssets" option should work and report errors on duplicate assets: warnings 1`] = ` -Array [ - "Error: Conflict: Multiple assets emit different content to the same filename 23fc1d3ac606d117e05a140e0de79806.svg", - "Error: Conflict: Multiple assets emit different content to the same filename async.async.dcbdb1dd40763448b635.js", - "Error: Conflict: Multiple assets emit different content to the same filename main.82c6786e32f9c77b44ef.js", -] -`; diff --git a/test/__snapshots__/exclude-option.test.js.snap.webpack5 b/test/__snapshots__/exclude-option.test.js.snap similarity index 86% rename from test/__snapshots__/exclude-option.test.js.snap.webpack5 rename to test/__snapshots__/exclude-option.test.js.snap index 8bf34cd..a9e1aaf 100644 --- a/test/__snapshots__/exclude-option.test.js.snap.webpack5 +++ b/test/__snapshots__/exclude-option.test.js.snap @@ -42,10 +42,10 @@ Array [ }, ], Array [ - "async.async.js?ver=332db2bcb6b6f299224f", + "async.async.js?ver=8b644dc8a959875e39cf", 265, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "related": Object { @@ -56,24 +56,24 @@ Array [ ], Array [ "main.js.gz", - 3959, + 4102, Object { "compressed": true, "immutable": true, - "size": 3959, + "size": 4102, }, ], Array [ - "main.js?var=332db2bcb6b6f299224f", - 16654, + "main.js?var=8b644dc8a959875e39cf", + 17179, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "related": Object { "gzipped": "main.js.gz", }, - "size": 16654, + "size": 17179, }, ], ] @@ -113,10 +113,10 @@ Array [ }, ], Array [ - "async.async.js?ver=332db2bcb6b6f299224f", + "async.async.js?ver=8b644dc8a959875e39cf", 265, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "related": Object { @@ -127,24 +127,24 @@ Array [ ], Array [ "main.js.gz", - 3959, + 4102, Object { "compressed": true, "immutable": true, - "size": 3959, + "size": 4102, }, ], Array [ - "main.js?var=332db2bcb6b6f299224f", - 16654, + "main.js?var=8b644dc8a959875e39cf", + 17179, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "related": Object { "gzipped": "main.js.gz", }, - "size": 16654, + "size": 17179, }, ], ] diff --git a/test/__snapshots__/exclude-option.test.js.snap.webpack4 b/test/__snapshots__/exclude-option.test.js.snap.webpack4 deleted file mode 100644 index 095dc77..0000000 --- a/test/__snapshots__/exclude-option.test.js.snap.webpack4 +++ /dev/null @@ -1,134 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`"exclude" option matches snapshot for a single \`exclude\` value ({RegExp}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "async.async.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js?ver=dc74724f7b13a2de5a20", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.js.gz", - }, - }, - ], - Array [ - "main.js.gz", - 3002, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.js?var=dc74724f7b13a2de5a20", - 11630, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.js.gz", - }, - }, - ], -] -`; - -exports[`"exclude" option matches snapshot for a single \`exclude\` value ({RegExp}): errors 1`] = `Array []`; - -exports[`"exclude" option matches snapshot for a single \`exclude\` value ({RegExp}): warnings 1`] = `Array []`; - -exports[`"exclude" option matches snapshot for multiple \`exclude\` values ({Array}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "async.async.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js?ver=dc74724f7b13a2de5a20", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.js.gz", - }, - }, - ], - Array [ - "main.js.gz", - 3002, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.js?var=dc74724f7b13a2de5a20", - 11630, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.js.gz", - }, - }, - ], -] -`; - -exports[`"exclude" option matches snapshot for multiple \`exclude\` values ({Array}): errors 1`] = `Array []`; - -exports[`"exclude" option matches snapshot for multiple \`exclude\` values ({Array}): warnings 1`] = `Array []`; diff --git a/test/__snapshots__/filename-option.test.js.snap.webpack5 b/test/__snapshots__/filename-option.test.js.snap similarity index 80% rename from test/__snapshots__/filename-option.test.js.snap.webpack5 rename to test/__snapshots__/filename-option.test.js.snap index 4465b61..8097891 100644 --- a/test/__snapshots__/filename-option.test.js.snap.webpack5 +++ b/test/__snapshots__/filename-option.test.js.snap @@ -45,20 +45,20 @@ Array [ }, ], Array [ - "async.async.js?ver=332db2bcb6b6f299224f", + "async.async.js?ver=8b644dc8a959875e39cf", 265, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "async.async.super-compressed.js.gz?ver=332db2bcb6b6f299224f", + "gzipped": "async.async.super-compressed.js.gz?ver=8b644dc8a959875e39cf", }, "size": 265, }, ], Array [ - "async.async.super-compressed.js.gz?ver=332db2bcb6b6f299224f", + "async.async.super-compressed.js.gz?ver=8b644dc8a959875e39cf", 179, Object { "compressed": true, @@ -67,25 +67,25 @@ Array [ }, ], Array [ - "main.js?var=332db2bcb6b6f299224f", - 16654, + "main.js?var=8b644dc8a959875e39cf", + 17179, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "main.super-compressed.js.gz?var=332db2bcb6b6f299224f", + "gzipped": "main.super-compressed.js.gz?var=8b644dc8a959875e39cf", }, - "size": 16654, + "size": 17179, }, ], Array [ - "main.super-compressed.js.gz?var=332db2bcb6b6f299224f", - 3959, + "main.super-compressed.js.gz?var=8b644dc8a959875e39cf", + 4102, Object { "compressed": true, "immutable": true, - "size": 3959, + "size": 4102, }, ], ] @@ -140,7 +140,7 @@ Array [ }, ], Array [ - "assets/js/async.async.js.super-compressed.gz?ver=38881eaf41c9852a6e24#hash", + "assets/js/async.async.js.super-compressed.gz?ver=e78ff13f70b0573e4bc2#hash", 179, Object { "compressed": true, @@ -149,38 +149,38 @@ Array [ }, ], Array [ - "assets/js/async.async.js?ver=38881eaf41c9852a6e24#hash", + "assets/js/async.async.js?ver=e78ff13f70b0573e4bc2#hash", 265, Object { - "fullhash": "38881eaf41c9852a6e24", + "fullhash": "e78ff13f70b0573e4bc2", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "assets/js/async.async.js.super-compressed.gz?ver=38881eaf41c9852a6e24#hash", + "gzipped": "assets/js/async.async.js.super-compressed.gz?ver=e78ff13f70b0573e4bc2#hash", }, "size": 265, }, ], Array [ - "assets/js/main.js.super-compressed.gz?var=38881eaf41c9852a6e24#hash", - 3977, + "assets/js/main.js.super-compressed.gz?var=e78ff13f70b0573e4bc2#hash", + 4121, Object { "compressed": true, "immutable": true, - "size": 3977, + "size": 4121, }, ], Array [ - "assets/js/main.js?var=38881eaf41c9852a6e24#hash", - 16680, + "assets/js/main.js?var=e78ff13f70b0573e4bc2#hash", + 17205, Object { - "fullhash": "38881eaf41c9852a6e24", + "fullhash": "e78ff13f70b0573e4bc2", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "assets/js/main.js.super-compressed.gz?var=38881eaf41c9852a6e24#hash", + "gzipped": "assets/js/main.js.super-compressed.gz?var=e78ff13f70b0573e4bc2#hash", }, - "size": 16680, + "size": 17205, }, ], ] @@ -235,7 +235,7 @@ Array [ }, ], Array [ - "async.async.js.gz?ver=f5ffb51646e417dee948", + "async.async.js.gz?ver=7b8cd83eb7d4bc9a3a10", 179, Object { "compressed": true, @@ -244,38 +244,38 @@ Array [ }, ], Array [ - "async.async.js?ver=f5ffb51646e417dee948#hash", + "async.async.js?ver=7b8cd83eb7d4bc9a3a10#hash", 265, Object { - "fullhash": "f5ffb51646e417dee948", + "fullhash": "7b8cd83eb7d4bc9a3a10", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "async.async.js.gz?ver=f5ffb51646e417dee948", + "gzipped": "async.async.js.gz?ver=7b8cd83eb7d4bc9a3a10", }, "size": 265, }, ], Array [ - "main.js.gz?var=f5ffb51646e417dee948", - 3964, + "main.js.gz?var=7b8cd83eb7d4bc9a3a10", + 4108, Object { "compressed": true, "immutable": true, - "size": 3964, + "size": 4108, }, ], Array [ - "main.js?var=f5ffb51646e417dee948#hash", - 16659, + "main.js?var=7b8cd83eb7d4bc9a3a10#hash", + 17184, Object { - "fullhash": "f5ffb51646e417dee948", + "fullhash": "7b8cd83eb7d4bc9a3a10", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "main.js.gz?var=f5ffb51646e417dee948", + "gzipped": "main.js.gz?var=7b8cd83eb7d4bc9a3a10", }, - "size": 16659, + "size": 17184, }, ], ] @@ -339,10 +339,10 @@ Array [ }, ], Array [ - "assets/scripts/async.async.js?ver=126e16de36baed6320ff#hash", + "assets/scripts/async.async.js?ver=d48ab8c40534a6b8ab14#hash", 265, Object { - "fullhash": "126e16de36baed6320ff", + "fullhash": "d48ab8c40534a6b8ab14", "immutable": true, "javascriptModule": false, "related": Object { @@ -353,24 +353,24 @@ Array [ ], Array [ "assets/scripts/main.js.gz", - 3976, + 4121, Object { "compressed": true, "immutable": true, - "size": 3976, + "size": 4121, }, ], Array [ - "assets/scripts/main.js?var=126e16de36baed6320ff#hash", - 16685, + "assets/scripts/main.js?var=d48ab8c40534a6b8ab14#hash", + 17210, Object { - "fullhash": "126e16de36baed6320ff", + "fullhash": "d48ab8c40534a6b8ab14", "immutable": true, "javascriptModule": false, "related": Object { "gzipped": "assets/scripts/main.js.gz", }, - "size": 16685, + "size": 17210, }, ], ] diff --git a/test/__snapshots__/filename-option.test.js.snap.webpack4 b/test/__snapshots__/filename-option.test.js.snap.webpack4 deleted file mode 100644 index 9a7d4fc..0000000 --- a/test/__snapshots__/filename-option.test.js.snap.webpack4 +++ /dev/null @@ -1,333 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`"filename" option matches snapshot for \`[name][ext].super-compressed.gz[query]\` value ({String}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.super-compressed.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.super-compressed.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.super-compressed.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.super-compressed.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "async.async.js?ver=dc74724f7b13a2de5a20", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.super-compressed.js.gz?ver=dc74724f7b13a2de5a20", - }, - }, - ], - Array [ - "async.async.super-compressed.js.gz?ver=dc74724f7b13a2de5a20", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.js?var=dc74724f7b13a2de5a20", - 11630, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.super-compressed.js.gz?var=dc74724f7b13a2de5a20", - }, - }, - ], - Array [ - "main.super-compressed.js.gz?var=dc74724f7b13a2de5a20", - 3002, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"filename" option matches snapshot for \`[name][ext].super-compressed.gz[query]\` value ({String}): errors 1`] = `Array []`; - -exports[`"filename" option matches snapshot for \`[name][ext].super-compressed.gz[query]\` value ({String}): warnings 1`] = `Array []`; - -exports[`"filename" option matches snapshot for \`[path][base].super-compressed.gz[query][fragment]\` value ({String}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.super-compressed.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.super-compressed.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.super-compressed.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.super-compressed.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "assets/js/async.async.js.super-compressed.gz?ver=6532e4640290c0b395f3#hash", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "assets/js/async.async.js?ver=6532e4640290c0b395f3#hash", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "assets/js/async.async.js.super-compressed.gz?ver=6532e4640290c0b395f3#hash", - }, - }, - ], - Array [ - "assets/js/main.js.super-compressed.gz?var=6532e4640290c0b395f3#hash", - 3015, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "assets/js/main.js?var=6532e4640290c0b395f3#hash", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "assets/js/main.js.super-compressed.gz?var=6532e4640290c0b395f3#hash", - }, - }, - ], -] -`; - -exports[`"filename" option matches snapshot for \`[path][base].super-compressed.gz[query][fragment]\` value ({String}): errors 1`] = `Array []`; - -exports[`"filename" option matches snapshot for \`[path][base].super-compressed.gz[query][fragment]\` value ({String}): warnings 1`] = `Array []`; - -exports[`"filename" option matches snapshot for custom function ({Function}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js.gz?ver=56cecc99721c0a179d38", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js?ver=56cecc99721c0a179d38#hash", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.js.gz?ver=56cecc99721c0a179d38", - }, - }, - ], - Array [ - "main.js.gz?var=56cecc99721c0a179d38", - 3007, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.js?var=56cecc99721c0a179d38#hash", - 11635, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.js.gz?var=56cecc99721c0a179d38", - }, - }, - ], -] -`; - -exports[`"filename" option matches snapshot for custom function ({Function}): errors 1`] = `Array []`; - -exports[`"filename" option matches snapshot for custom function ({Function}): warnings 1`] = `Array []`; - -exports[`"filename" option show work: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "assets/scripts/async.async.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "assets/scripts/async.async.js?ver=f8840db1f464954a153b#hash", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "assets/scripts/async.async.js.gz", - }, - }, - ], - Array [ - "assets/scripts/main.js.gz", - 3016, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "assets/scripts/main.js?var=f8840db1f464954a153b#hash", - 11650, - Object { - "immutable": true, - "related": Object { - "gzipped": "assets/scripts/main.js.gz", - }, - }, - ], -] -`; - -exports[`"filename" option show work: errors 1`] = `Array []`; - -exports[`"filename" option show work: warnings 1`] = `Array []`; diff --git a/test/__snapshots__/include-option.test.js.snap.webpack5 b/test/__snapshots__/include-option.test.js.snap similarity index 86% rename from test/__snapshots__/include-option.test.js.snap.webpack5 rename to test/__snapshots__/include-option.test.js.snap index bcd8c68..c94ecce 100644 --- a/test/__snapshots__/include-option.test.js.snap.webpack5 +++ b/test/__snapshots__/include-option.test.js.snap @@ -30,10 +30,10 @@ Array [ }, ], Array [ - "async.async.js?ver=332db2bcb6b6f299224f", + "async.async.js?ver=8b644dc8a959875e39cf", 265, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "related": Object { @@ -44,24 +44,24 @@ Array [ ], Array [ "main.js.gz", - 3959, + 4102, Object { "compressed": true, "immutable": true, - "size": 3959, + "size": 4102, }, ], Array [ - "main.js?var=332db2bcb6b6f299224f", - 16654, + "main.js?var=8b644dc8a959875e39cf", + 17179, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "related": Object { "gzipped": "main.js.gz", }, - "size": 16654, + "size": 17179, }, ], ] @@ -113,10 +113,10 @@ Array [ }, ], Array [ - "async.async.js?ver=332db2bcb6b6f299224f", + "async.async.js?ver=8b644dc8a959875e39cf", 265, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "related": Object { @@ -127,24 +127,24 @@ Array [ ], Array [ "main.js.gz", - 3959, + 4102, Object { "compressed": true, "immutable": true, - "size": 3959, + "size": 4102, }, ], Array [ - "main.js?var=332db2bcb6b6f299224f", - 16654, + "main.js?var=8b644dc8a959875e39cf", + 17179, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "related": Object { "gzipped": "main.js.gz", }, - "size": 16654, + "size": 17179, }, ], ] diff --git a/test/__snapshots__/include-option.test.js.snap.webpack4 b/test/__snapshots__/include-option.test.js.snap.webpack4 deleted file mode 100644 index 179e9c1..0000000 --- a/test/__snapshots__/include-option.test.js.snap.webpack4 +++ /dev/null @@ -1,134 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`"include" option matches snapshot for a single \`include\` value ({RegExp}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "async.async.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js?ver=dc74724f7b13a2de5a20", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.js.gz", - }, - }, - ], - Array [ - "main.js.gz", - 3002, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.js?var=dc74724f7b13a2de5a20", - 11630, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.js.gz", - }, - }, - ], -] -`; - -exports[`"include" option matches snapshot for a single \`include\` value ({RegExp}): errors 1`] = `Array []`; - -exports[`"include" option matches snapshot for a single \`include\` value ({RegExp}): warnings 1`] = `Array []`; - -exports[`"include" option matches snapshot for multiple \`include\` values ({Array}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js?ver=dc74724f7b13a2de5a20", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.js.gz", - }, - }, - ], - Array [ - "main.js.gz", - 3002, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.js?var=dc74724f7b13a2de5a20", - 11630, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.js.gz", - }, - }, - ], -] -`; - -exports[`"include" option matches snapshot for multiple \`include\` values ({Array}): errors 1`] = `Array []`; - -exports[`"include" option matches snapshot for multiple \`include\` values ({Array}): warnings 1`] = `Array []`; diff --git a/test/__snapshots__/minRatio-option.test.js.snap.webpack5 b/test/__snapshots__/minRatio-option.test.js.snap similarity index 89% rename from test/__snapshots__/minRatio-option.test.js.snap.webpack5 rename to test/__snapshots__/minRatio-option.test.js.snap index f7efd9d..080efab 100644 --- a/test/__snapshots__/minRatio-option.test.js.snap.webpack5 +++ b/test/__snapshots__/minRatio-option.test.js.snap @@ -31,13 +31,13 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, - "size": 16495, + "size": 17020, }, ], ] @@ -114,25 +114,25 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", + "gzipped": "main.a6299e4b54bcb458b330.js.gz", }, - "size": 16495, + "size": 17020, }, ], Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, + "main.a6299e4b54bcb458b330.js.gz", + 4077, Object { "compressed": true, "immutable": true, - "size": 3934, + "size": 4077, }, ], ] diff --git a/test/__snapshots__/minRatio-option.test.js.snap.webpack4 b/test/__snapshots__/minRatio-option.test.js.snap.webpack4 deleted file mode 100644 index 5ad6c28..0000000 --- a/test/__snapshots__/minRatio-option.test.js.snap.webpack4 +++ /dev/null @@ -1,123 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`"minRatio" option matches snapshot for \`0\` value ({Number}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - }, - ], -] -`; - -exports[`"minRatio" option matches snapshot for \`0\` value ({Number}): errors 1`] = `Array []`; - -exports[`"minRatio" option matches snapshot for \`0\` value ({Number}): warnings 1`] = `Array []`; - -exports[`"minRatio" option matches snapshot for \`1\` value ({Number}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"minRatio" option matches snapshot for \`1\` value ({Number}): errors 1`] = `Array []`; - -exports[`"minRatio" option matches snapshot for \`1\` value ({Number}): warnings 1`] = `Array []`; diff --git a/test/__snapshots__/overwriteOriginalAssets.test.js.snap.webpack4 b/test/__snapshots__/overwriteOriginalAssets.test.js.snap.webpack4 deleted file mode 100644 index 54fa1af..0000000 --- a/test/__snapshots__/overwriteOriginalAssets.test.js.snap.webpack4 +++ /dev/null @@ -1,88 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`"overwriteOriginalAssets" option matches snapshot for \`false\` value ({Boolean}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - ], - Array [ - "async.js", - 249, - ], - Array [ - "main.js", - 11579, - ], -] -`; - -exports[`"overwriteOriginalAssets" option matches snapshot for \`false\` value ({Boolean}): errors 1`] = `Array []`; - -exports[`"overwriteOriginalAssets" option matches snapshot for \`false\` value ({Boolean}): warnings 1`] = ` -Array [ - "Error: Conflict: Multiple assets emit different content to the same filename 23fc1d3ac606d117e05a140e0de79806.svg", - "Error: Conflict: Multiple assets emit different content to the same filename async.js", - "Error: Conflict: Multiple assets emit different content to the same filename main.js", -] -`; - -exports[`"overwriteOriginalAssets" option matches snapshot for \`true\` value ({Boolean}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - ], - Array [ - "async.js", - 249, - ], - Array [ - "main.js", - 11579, - ], -] -`; - -exports[`"overwriteOriginalAssets" option matches snapshot for \`true\` value ({Boolean}): errors 1`] = `Array []`; - -exports[`"overwriteOriginalAssets" option matches snapshot for \`true\` value ({Boolean}): warnings 1`] = `Array []`; - -exports[`"overwriteOriginalAssets" option matches snapshot for not specify value: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - ], - Array [ - "async.js", - 249, - ], - Array [ - "main.js", - 11579, - ], -] -`; - -exports[`"overwriteOriginalAssets" option matches snapshot for not specify value: errors 1`] = `Array []`; - -exports[`"overwriteOriginalAssets" option matches snapshot for not specify value: warnings 1`] = ` -Array [ - "Error: Conflict: Multiple assets emit different content to the same filename 23fc1d3ac606d117e05a140e0de79806.svg", - "Error: Conflict: Multiple assets emit different content to the same filename async.js", - "Error: Conflict: Multiple assets emit different content to the same filename main.js", -] -`; diff --git a/test/__snapshots__/overwriteOriginalAssets.test.js.snap.webpack5 b/test/__snapshots__/overwriteOriginalAssets.test.js.snap.webpack5 deleted file mode 100644 index a5516ba..0000000 --- a/test/__snapshots__/overwriteOriginalAssets.test.js.snap.webpack5 +++ /dev/null @@ -1,76 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`"overwriteOriginalAssets" option matches snapshot for \`false\` value ({Boolean}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 393, - ], - Array [ - "async.js", - 179, - ], - Array [ - "main.js", - 3906, - ], -] -`; - -exports[`"overwriteOriginalAssets" option matches snapshot for \`false\` value ({Boolean}): errors 1`] = `Array []`; - -exports[`"overwriteOriginalAssets" option matches snapshot for \`false\` value ({Boolean}): warnings 1`] = `Array []`; - -exports[`"overwriteOriginalAssets" option matches snapshot for \`true\` value ({Boolean}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 393, - ], - Array [ - "async.js", - 179, - ], - Array [ - "main.js", - 3906, - ], -] -`; - -exports[`"overwriteOriginalAssets" option matches snapshot for \`true\` value ({Boolean}): errors 1`] = `Array []`; - -exports[`"overwriteOriginalAssets" option matches snapshot for \`true\` value ({Boolean}): warnings 1`] = `Array []`; - -exports[`"overwriteOriginalAssets" option matches snapshot for not specify value: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 393, - ], - Array [ - "async.js", - 179, - ], - Array [ - "main.js", - 3906, - ], -] -`; - -exports[`"overwriteOriginalAssets" option matches snapshot for not specify value: errors 1`] = `Array []`; - -exports[`"overwriteOriginalAssets" option matches snapshot for not specify value: warnings 1`] = `Array []`; diff --git a/test/__snapshots__/test-option.test.js.snap.webpack5 b/test/__snapshots__/test-option.test.js.snap similarity index 86% rename from test/__snapshots__/test-option.test.js.snap.webpack5 rename to test/__snapshots__/test-option.test.js.snap index adcb0d1..c5400a5 100644 --- a/test/__snapshots__/test-option.test.js.snap.webpack5 +++ b/test/__snapshots__/test-option.test.js.snap @@ -33,23 +33,23 @@ Array [ }, ], Array [ - "async.async.js?ver=332db2bcb6b6f299224f", + "async.async.js?ver=8b644dc8a959875e39cf", 265, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "size": 265, }, ], Array [ - "main.js?var=332db2bcb6b6f299224f", - 16654, + "main.js?var=8b644dc8a959875e39cf", + 17179, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, - "size": 16654, + "size": 17179, }, ], ] @@ -104,23 +104,23 @@ Array [ }, ], Array [ - "async.async.js?ver=332db2bcb6b6f299224f", + "async.async.js?ver=8b644dc8a959875e39cf", 265, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "size": 265, }, ], Array [ - "main.js?var=332db2bcb6b6f299224f", - 16654, + "main.js?var=8b644dc8a959875e39cf", + 17179, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, - "size": 16654, + "size": 17179, }, ], ] @@ -184,10 +184,10 @@ Array [ }, ], Array [ - "async.async.js?ver=332db2bcb6b6f299224f", + "async.async.js?ver=8b644dc8a959875e39cf", 265, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "related": Object { @@ -198,24 +198,24 @@ Array [ ], Array [ "main.js.gz", - 3959, + 4102, Object { "compressed": true, "immutable": true, - "size": 3959, + "size": 4102, }, ], Array [ - "main.js?var=332db2bcb6b6f299224f", - 16654, + "main.js?var=8b644dc8a959875e39cf", + 17179, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "related": Object { "gzipped": "main.js.gz", }, - "size": 16654, + "size": 17179, }, ], ] @@ -246,23 +246,23 @@ Array [ }, ], Array [ - "async.async.js?ver=332db2bcb6b6f299224f", + "async.async.js?ver=8b644dc8a959875e39cf", 265, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, "size": 265, }, ], Array [ - "main.js?var=332db2bcb6b6f299224f", - 16654, + "main.js?var=8b644dc8a959875e39cf", + 17179, Object { - "fullhash": "332db2bcb6b6f299224f", + "fullhash": "8b644dc8a959875e39cf", "immutable": true, "javascriptModule": false, - "size": 16654, + "size": 17179, }, ], ] diff --git a/test/__snapshots__/test-option.test.js.snap.webpack4 b/test/__snapshots__/test-option.test.js.snap.webpack4 deleted file mode 100644 index 2664b72..0000000 --- a/test/__snapshots__/test-option.test.js.snap.webpack4 +++ /dev/null @@ -1,234 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`"test" option matches snapshot for a single \`test\` value ({RegExp}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "async.async.js?ver=dc74724f7b13a2de5a20", - 249, - Object { - "immutable": true, - }, - ], - Array [ - "main.js?var=dc74724f7b13a2de5a20", - 11630, - Object { - "immutable": true, - }, - ], -] -`; - -exports[`"test" option matches snapshot for a single \`test\` value ({RegExp}): errors 1`] = `Array []`; - -exports[`"test" option matches snapshot for a single \`test\` value ({RegExp}): warnings 1`] = `Array []`; - -exports[`"test" option matches snapshot for multiple \`test\` values ({Array}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js?ver=dc74724f7b13a2de5a20", - 249, - Object { - "immutable": true, - }, - ], - Array [ - "main.js?var=dc74724f7b13a2de5a20", - 11630, - Object { - "immutable": true, - }, - ], -] -`; - -exports[`"test" option matches snapshot for multiple \`test\` values ({Array}): errors 1`] = `Array []`; - -exports[`"test" option matches snapshot for multiple \`test\` values ({Array}): warnings 1`] = `Array []`; - -exports[`"test" option matches snapshot with empty \`test\` value: assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.js?ver=dc74724f7b13a2de5a20", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.js.gz", - }, - }, - ], - Array [ - "main.js.gz", - 3002, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.js?var=dc74724f7b13a2de5a20", - 11630, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.js.gz", - }, - }, - ], -] -`; - -exports[`"test" option matches snapshot with empty \`test\` value: errors 1`] = `Array []`; - -exports[`"test" option matches snapshot with empty \`test\` value: warnings 1`] = `Array []`; - -exports[`"test" option should work when no asset to compress : assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "sourceFilename": "icon.png", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "async.async.js?ver=dc74724f7b13a2de5a20", - 249, - Object { - "immutable": true, - }, - ], - Array [ - "main.js?var=dc74724f7b13a2de5a20", - 11630, - Object { - "immutable": true, - }, - ], -] -`; - -exports[`"test" option should work when no asset to compress : errors 1`] = `Array []`; - -exports[`"test" option should work when no asset to compress : warnings 1`] = `Array []`; diff --git a/test/__snapshots__/threshold-option.test.js.snap.webpack5 b/test/__snapshots__/threshold-option.test.js.snap similarity index 84% rename from test/__snapshots__/threshold-option.test.js.snap.webpack5 rename to test/__snapshots__/threshold-option.test.js.snap index 73be7f6..e552890 100644 --- a/test/__snapshots__/threshold-option.test.js.snap.webpack5 +++ b/test/__snapshots__/threshold-option.test.js.snap @@ -67,25 +67,25 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", + "gzipped": "main.a6299e4b54bcb458b330.js.gz", }, - "size": 16495, + "size": 17020, }, ], Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, + "main.a6299e4b54bcb458b330.js.gz", + 4077, Object { "compressed": true, "immutable": true, - "size": 3934, + "size": 4077, }, ], ] @@ -138,25 +138,25 @@ Array [ }, ], Array [ - "main.c9c6c970f01f9eb6d301.js", - 16495, + "main.a6299e4b54bcb458b330.js", + 17020, Object { - "chunkhash": "c9c6c970f01f9eb6d301", + "chunkhash": "a6299e4b54bcb458b330", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "main.c9c6c970f01f9eb6d301.js.gz", + "gzipped": "main.a6299e4b54bcb458b330.js.gz", }, - "size": 16495, + "size": 17020, }, ], Array [ - "main.c9c6c970f01f9eb6d301.js.gz", - 3934, + "main.a6299e4b54bcb458b330.js.gz", + 4077, Object { "compressed": true, "immutable": true, - "size": 3934, + "size": 4077, }, ], ] @@ -178,25 +178,25 @@ Array [ }, ], Array [ - "main.a175a5dade10e10b9117.js", - 5897, + "main.27cbd0a71f6476e80306.js", + 5896, Object { - "chunkhash": "a175a5dade10e10b9117", + "chunkhash": "27cbd0a71f6476e80306", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "main.a175a5dade10e10b9117.js.gz", + "gzipped": "main.27cbd0a71f6476e80306.js.gz", }, - "size": 5897, + "size": 5896, }, ], Array [ - "main.a175a5dade10e10b9117.js.gz", - 1609, + "main.27cbd0a71f6476e80306.js.gz", + 1608, Object { "compressed": true, "immutable": true, - "size": 1609, + "size": 1608, }, ], ] @@ -230,25 +230,25 @@ Array [ }, ], Array [ - "main.a175a5dade10e10b9117.js", - 5897, + "main.27cbd0a71f6476e80306.js", + 5896, Object { - "chunkhash": "a175a5dade10e10b9117", + "chunkhash": "27cbd0a71f6476e80306", "immutable": true, "javascriptModule": false, "related": Object { - "gzipped": "main.a175a5dade10e10b9117.js.gz", + "gzipped": "main.27cbd0a71f6476e80306.js.gz", }, - "size": 5897, + "size": 5896, }, ], Array [ - "main.a175a5dade10e10b9117.js.gz", - 1609, + "main.27cbd0a71f6476e80306.js.gz", + 1608, Object { "compressed": true, "immutable": true, - "size": 1609, + "size": 1608, }, ], ] diff --git a/test/__snapshots__/threshold-option.test.js.snap.webpack4 b/test/__snapshots__/threshold-option.test.js.snap.webpack4 deleted file mode 100644 index 291e131..0000000 --- a/test/__snapshots__/threshold-option.test.js.snap.webpack4 +++ /dev/null @@ -1,226 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`"threshold" option matches snapshot for \`0\` value ({Number}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "related": Object { - "gzipped": "23fc1d3ac606d117e05a140e0de79806.svg.gz", - }, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg.gz", - 393, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - "related": Object { - "gzipped": "async.async.dcbdb1dd40763448b635.js.gz", - }, - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js.gz", - 171, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"threshold" option matches snapshot for \`0\` value ({Number}): errors 1`] = `Array []`; - -exports[`"threshold" option matches snapshot for \`0\` value ({Number}): warnings 1`] = `Array []`; - -exports[`"threshold" option matches snapshot for \`8192\` value ({Number}): assets 1`] = ` -Array [ - Array [ - "09a1a1112c577c2794359715edfcb5ac.png", - 78117, - Object { - "immutable": true, - "related": Object { - "gzipped": "09a1a1112c577c2794359715edfcb5ac.png.gz", - }, - "sourceFilename": "icon.png", - }, - ], - Array [ - "09a1a1112c577c2794359715edfcb5ac.png.gz", - 73160, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "23fc1d3ac606d117e05a140e0de79806.svg", - 672, - Object { - "immutable": true, - "sourceFilename": "icon.svg", - }, - ], - Array [ - "async.async.dcbdb1dd40763448b635.js", - 249, - Object { - "immutable": true, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js", - 11645, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.82c6786e32f9c77b44ef.js.gz", - }, - }, - ], - Array [ - "main.82c6786e32f9c77b44ef.js.gz", - 3000, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"threshold" option matches snapshot for \`8192\` value ({Number}): errors 1`] = `Array []`; - -exports[`"threshold" option matches snapshot for \`8192\` value ({Number}): warnings 1`] = `Array []`; - -exports[`"threshold" option should compress all assets excluding assets with "0" bytes original size: assets 1`] = ` -Array [ - Array [ - "31d6cfe0d16ae931b73c59d7e0c089c0.txt", - 0, - Object { - "immutable": true, - "sourceFilename": "empty.txt", - }, - ], - Array [ - "main.f8078965575fc1ebcc92.js", - 4692, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.f8078965575fc1ebcc92.js.gz", - }, - }, - ], - Array [ - "main.f8078965575fc1ebcc92.js.gz", - 1314, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"threshold" option should compress all assets excluding assets with "0" bytes original size: errors 1`] = `Array []`; - -exports[`"threshold" option should compress all assets excluding assets with "0" bytes original size: warnings 1`] = `Array []`; - -exports[`"threshold" option should compress all assets including assets with "0" bytes original size: assets 1`] = ` -Array [ - Array [ - "31d6cfe0d16ae931b73c59d7e0c089c0.txt", - 0, - Object { - "immutable": true, - "related": Object { - "gzipped": "31d6cfe0d16ae931b73c59d7e0c089c0.txt.gz", - }, - "sourceFilename": "empty.txt", - }, - ], - Array [ - "31d6cfe0d16ae931b73c59d7e0c089c0.txt.gz", - 20, - Object { - "compressed": true, - "immutable": true, - }, - ], - Array [ - "main.f8078965575fc1ebcc92.js", - 4692, - Object { - "immutable": true, - "related": Object { - "gzipped": "main.f8078965575fc1ebcc92.js.gz", - }, - }, - ], - Array [ - "main.f8078965575fc1ebcc92.js.gz", - 1314, - Object { - "compressed": true, - "immutable": true, - }, - ], -] -`; - -exports[`"threshold" option should compress all assets including assets with "0" bytes original size: errors 1`] = `Array []`; - -exports[`"threshold" option should compress all assets including assets with "0" bytes original size: warnings 1`] = `Array []`; diff --git a/test/__snapshots__/validate-options.test.js.snap.webpack5 b/test/__snapshots__/validate-options.test.js.snap similarity index 91% rename from test/__snapshots__/validate-options.test.js.snap.webpack5 rename to test/__snapshots__/validate-options.test.js.snap index 2a69803..3bcf58c 100644 --- a/test/__snapshots__/validate-options.test.js.snap.webpack5 +++ b/test/__snapshots__/validate-options.test.js.snap @@ -10,16 +10,6 @@ exports[`validate options should throw an error on the "algorithm" option with " * options.algorithm should be an instance of function." `; -exports[`validate options should throw an error on the "cache" option with "() => {}" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.cache should be one of these: - boolean | string - -> Enable file caching. Ignored in webpack 5, for webpack 5 please use https://webpack.js.org/configuration/other-options/#cache. - Details: - * options.cache should be a boolean. - * options.cache should be a string." -`; - exports[`validate options should throw an error on the "compressionOptions" option with "1024" value 1`] = ` "Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - options.compressionOptions should be an object: @@ -204,47 +194,47 @@ exports[`validate options should throw an error on the "threshold" option with " exports[`validate options should throw an error on the "unknown" option with "/test/" value 1`] = ` "Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - options has an unknown property 'unknown'. These properties are valid: - object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename?, cache? }" + object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename? }" `; exports[`validate options should throw an error on the "unknown" option with "[]" value 1`] = ` "Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - options has an unknown property 'unknown'. These properties are valid: - object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename?, cache? }" + object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename? }" `; exports[`validate options should throw an error on the "unknown" option with "{"foo":"bar"}" value 1`] = ` "Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - options has an unknown property 'unknown'. These properties are valid: - object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename?, cache? }" + object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename? }" `; exports[`validate options should throw an error on the "unknown" option with "{}" value 1`] = ` "Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - options has an unknown property 'unknown'. These properties are valid: - object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename?, cache? }" + object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename? }" `; exports[`validate options should throw an error on the "unknown" option with "1" value 1`] = ` "Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - options has an unknown property 'unknown'. These properties are valid: - object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename?, cache? }" + object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename? }" `; exports[`validate options should throw an error on the "unknown" option with "false" value 1`] = ` "Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - options has an unknown property 'unknown'. These properties are valid: - object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename?, cache? }" + object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename? }" `; exports[`validate options should throw an error on the "unknown" option with "test" value 1`] = ` "Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - options has an unknown property 'unknown'. These properties are valid: - object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename?, cache? }" + object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename? }" `; exports[`validate options should throw an error on the "unknown" option with "true" value 1`] = ` "Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - options has an unknown property 'unknown'. These properties are valid: - object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename?, cache? }" + object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename? }" `; diff --git a/test/__snapshots__/validate-options.test.js.snap.webpack4 b/test/__snapshots__/validate-options.test.js.snap.webpack4 deleted file mode 100644 index 2a69803..0000000 --- a/test/__snapshots__/validate-options.test.js.snap.webpack4 +++ /dev/null @@ -1,250 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`validate options should throw an error on the "algorithm" option with "true" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.algorithm should be one of these: - string | function - -> The compression algorithm/function. - Details: - * options.algorithm should be a string. - * options.algorithm should be an instance of function." -`; - -exports[`validate options should throw an error on the "cache" option with "() => {}" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.cache should be one of these: - boolean | string - -> Enable file caching. Ignored in webpack 5, for webpack 5 please use https://webpack.js.org/configuration/other-options/#cache. - Details: - * options.cache should be a boolean. - * options.cache should be a string." -`; - -exports[`validate options should throw an error on the "compressionOptions" option with "1024" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.compressionOptions should be an object: - object { … } - -> Compression options for \`algorithm\`." -`; - -exports[`validate options should throw an error on the "deleteOriginalAssets" option with "true" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.deleteOriginalAssets should be one of these: - boolean | \\"keep-source-map\\" - -> Whether to delete the original assets or not. - Details: - * options.deleteOriginalAssets should be a boolean. - * options.deleteOriginalAssets should be \\"keep-source-map\\"." -`; - -exports[`validate options should throw an error on the "deleteOriginalAssets" option with "unknown" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.deleteOriginalAssets should be one of these: - boolean | \\"keep-source-map\\" - -> Whether to delete the original assets or not. - Details: - * options.deleteOriginalAssets should be a boolean. - * options.deleteOriginalAssets should be \\"keep-source-map\\"." -`; - -exports[`validate options should throw an error on the "exclude" option with "[{},"foo",true]" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.exclude should be one of these: - [RegExp | non-empty string, ...] | RegExp | non-empty string - -> Filtering rules. - Details: - * options.exclude[2] should be one of these: - RegExp | non-empty string - -> Filtering rule as regex or string. - Details: - * options.exclude[2] should be an instance of RegExp. - * options.exclude[2] should be a non-empty string." -`; - -exports[`validate options should throw an error on the "exclude" option with "[true]" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.exclude should be one of these: - [RegExp | non-empty string, ...] | RegExp | non-empty string - -> Filtering rules. - Details: - * options.exclude[0] should be one of these: - RegExp | non-empty string - -> Filtering rule as regex or string. - Details: - * options.exclude[0] should be an instance of RegExp. - * options.exclude[0] should be a non-empty string." -`; - -exports[`validate options should throw an error on the "exclude" option with "true" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.exclude should be one of these: - [RegExp | non-empty string, ...] | RegExp | non-empty string - -> Filtering rules. - Details: - * options.exclude should be an array: - [RegExp | non-empty string, ...] - * options.exclude should be one of these: - RegExp | non-empty string - -> Filtering rule as regex or string. - Details: - * options.exclude should be an instance of RegExp. - * options.exclude should be a non-empty string." -`; - -exports[`validate options should throw an error on the "filename" option with "true" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.filename should be one of these: - string | function - -> The target asset filename. - Details: - * options.filename should be a string. - * options.filename should be an instance of function." -`; - -exports[`validate options should throw an error on the "include" option with "[{},"foo",true]" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.include should be one of these: - [RegExp | non-empty string, ...] | RegExp | non-empty string - -> Filtering rules. - Details: - * options.include[2] should be one of these: - RegExp | non-empty string - -> Filtering rule as regex or string. - Details: - * options.include[2] should be an instance of RegExp. - * options.include[2] should be a non-empty string." -`; - -exports[`validate options should throw an error on the "include" option with "[true]" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.include should be one of these: - [RegExp | non-empty string, ...] | RegExp | non-empty string - -> Filtering rules. - Details: - * options.include[0] should be one of these: - RegExp | non-empty string - -> Filtering rule as regex or string. - Details: - * options.include[0] should be an instance of RegExp. - * options.include[0] should be a non-empty string." -`; - -exports[`validate options should throw an error on the "include" option with "true" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.include should be one of these: - [RegExp | non-empty string, ...] | RegExp | non-empty string - -> Filtering rules. - Details: - * options.include should be an array: - [RegExp | non-empty string, ...] - * options.include should be one of these: - RegExp | non-empty string - -> Filtering rule as regex or string. - Details: - * options.include should be an instance of RegExp. - * options.include should be a non-empty string." -`; - -exports[`validate options should throw an error on the "minRatio" option with "0.8" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.minRatio should be a number. - -> Only assets that compress better than this ratio are processed (\`minRatio = Compressed Size / Original Size\`)." -`; - -exports[`validate options should throw an error on the "test" option with "[{},"foo",true]" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.test should be one of these: - [RegExp | non-empty string, ...] | RegExp | non-empty string - -> Filtering rules. - Details: - * options.test[2] should be one of these: - RegExp | non-empty string - -> Filtering rule as regex or string. - Details: - * options.test[2] should be an instance of RegExp. - * options.test[2] should be a non-empty string." -`; - -exports[`validate options should throw an error on the "test" option with "[true]" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.test should be one of these: - [RegExp | non-empty string, ...] | RegExp | non-empty string - -> Filtering rules. - Details: - * options.test[0] should be one of these: - RegExp | non-empty string - -> Filtering rule as regex or string. - Details: - * options.test[0] should be an instance of RegExp. - * options.test[0] should be a non-empty string." -`; - -exports[`validate options should throw an error on the "test" option with "true" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.test should be one of these: - [RegExp | non-empty string, ...] | RegExp | non-empty string - -> Filtering rules. - Details: - * options.test should be an array: - [RegExp | non-empty string, ...] - * options.test should be one of these: - RegExp | non-empty string - -> Filtering rule as regex or string. - Details: - * options.test should be an instance of RegExp. - * options.test should be a non-empty string." -`; - -exports[`validate options should throw an error on the "threshold" option with "1024" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options.threshold should be a number. - -> Only assets bigger than this size are processed. In bytes." -`; - -exports[`validate options should throw an error on the "unknown" option with "/test/" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options has an unknown property 'unknown'. These properties are valid: - object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename?, cache? }" -`; - -exports[`validate options should throw an error on the "unknown" option with "[]" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options has an unknown property 'unknown'. These properties are valid: - object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename?, cache? }" -`; - -exports[`validate options should throw an error on the "unknown" option with "{"foo":"bar"}" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options has an unknown property 'unknown'. These properties are valid: - object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename?, cache? }" -`; - -exports[`validate options should throw an error on the "unknown" option with "{}" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options has an unknown property 'unknown'. These properties are valid: - object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename?, cache? }" -`; - -exports[`validate options should throw an error on the "unknown" option with "1" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options has an unknown property 'unknown'. These properties are valid: - object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename?, cache? }" -`; - -exports[`validate options should throw an error on the "unknown" option with "false" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options has an unknown property 'unknown'. These properties are valid: - object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename?, cache? }" -`; - -exports[`validate options should throw an error on the "unknown" option with "test" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options has an unknown property 'unknown'. These properties are valid: - object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename?, cache? }" -`; - -exports[`validate options should throw an error on the "unknown" option with "true" value 1`] = ` -"Invalid options object. Compression Plugin has been initialized using an options object that does not match the API schema. - - options has an unknown property 'unknown'. These properties are valid: - object { test?, include?, exclude?, algorithm?, compressionOptions?, threshold?, minRatio?, deleteOriginalAssets?, filename?, cache? }" -`; diff --git a/test/algorithm.test.js b/test/algorithm.test.js index 8564cab..70e52b5 100644 --- a/test/algorithm.test.js +++ b/test/algorithm.test.js @@ -6,7 +6,6 @@ import { getCompiler, getErrors, getWarnings, - removeCache, } from "./helpers/index"; describe('"algorithm" option', () => { @@ -14,8 +13,6 @@ describe('"algorithm" option', () => { beforeEach(() => { compiler = getCompiler("./entry.js"); - - return removeCache(); }); it("matches snapshot for `unknown` value ({String})", () => { diff --git a/test/cache-option.test.js b/test/cache-option.test.js deleted file mode 100644 index 6b5bb08..0000000 --- a/test/cache-option.test.js +++ /dev/null @@ -1,560 +0,0 @@ -import path from "path"; -import zlib from "zlib"; - -import cacache from "cacache"; -import findCacheDir from "find-cache-dir"; -import del from "del"; - -import CompressionPlugin from "../src/index"; -import Webpack4Cache from "../src/Webpack4Cache"; - -import { - compile, - getAssetsNameAndSize, - getCompiler, - getErrors, - getWarnings, -} from "./helpers/index"; - -const falseCacheDirectory = findCacheDir({ name: "false-cache-directory" }); -const cacheDir = findCacheDir({ name: "compression-webpack-plugin" }); -const otherCacheDir = findCacheDir({ name: "other-cache-directory" }); -const otherOtherCacheDir = findCacheDir({ - name: "other-other-cache-directory", -}); -const uniqueCacheDirectory = findCacheDir({ name: "unique-cache-directory" }); - -if (getCompiler.isWebpack4()) { - describe('"cache" option', () => { - beforeAll(() => { - return Promise.all([ - cacache.rm.all(falseCacheDirectory), - cacache.rm.all(cacheDir), - cacache.rm.all(otherCacheDir), - cacache.rm.all(uniqueCacheDirectory), - cacache.rm.all(otherOtherCacheDir), - ]); - }); - - it("matches snapshot for `false` value ({Boolean})", async () => { - const compiler = getCompiler("./entry.js"); - - new CompressionPlugin({ cache: false, minRatio: 1 }).apply(compiler); - - cacache.get = jest.fn(cacache.get); - cacache.put = jest.fn(cacache.put); - - const getCacheDirectorySpy = jest - .spyOn(Webpack4Cache, "getCacheDirectory") - .mockImplementation(() => { - return falseCacheDirectory; - }); - - const stats = await compile(compiler); - - expect(getAssetsNameAndSize(stats, compiler)).toMatchSnapshot("assets"); - expect(getWarnings(stats)).toMatchSnapshot("warnings"); - expect(getErrors(stats)).toMatchSnapshot("errors"); - - // Cache disabled so we don't run `get` or `put` - expect(cacache.get.mock.calls.length).toBe(0); - expect(cacache.put.mock.calls.length).toBe(0); - - const cacheEntriesList = await cacache.ls(falseCacheDirectory); - const cacheKeys = Object.keys(cacheEntriesList); - - expect(cacheKeys.length).toBe(0); - - getCacheDirectorySpy.mockRestore(); - }); - - it("matches snapshot for `true` value ({Boolean})", async () => { - const beforeCacheCompiler = getCompiler("./entry.js"); - - new CompressionPlugin({ cache: true, minRatio: 1 }).apply( - beforeCacheCompiler - ); - - cacache.get = jest.fn(cacache.get); - cacache.put = jest.fn(cacache.put); - - const getCacheDirectorySpy = jest - .spyOn(Webpack4Cache, "getCacheDirectory") - .mockImplementation(() => { - return uniqueCacheDirectory; - }); - - const stats = await compile(beforeCacheCompiler); - - expect(getAssetsNameAndSize(stats, beforeCacheCompiler)).toMatchSnapshot( - "assets" - ); - expect(getWarnings(stats)).toMatchSnapshot("warnings"); - expect(getErrors(stats)).toMatchSnapshot("errors"); - - const countAssets = Object.keys(stats.compilation.assets).length; - - // Try to found cached files, but we don't have their in cache - expect(cacache.get.mock.calls.length).toBe(countAssets / 2); - // Put files in cache - expect(cacache.put.mock.calls.length).toBe(countAssets / 2); - - const cacheEntriesList = await cacache.ls(uniqueCacheDirectory); - - const cacheKeys = Object.keys(cacheEntriesList); - - // Make sure that we cached files - expect(cacheKeys.length).toBe(countAssets / 2); - - cacheKeys.forEach((cacheEntry) => { - // eslint-disable-next-line no-new-func - const cacheEntryOptions = new Function( - `'use strict'\nreturn ${cacheEntry}` - )(); - const basename = path.basename(cacheEntryOptions.name); - - expect([basename, cacheEntryOptions.contentHash]).toMatchSnapshot( - basename - ); - }); - - cacache.get.mockClear(); - cacache.put.mockClear(); - - const afterCacheCompiler = getCompiler("./entry.js"); - - new CompressionPlugin({ cache: true, minRatio: 1 }).apply( - afterCacheCompiler - ); - - const newStats = await compile(afterCacheCompiler); - - expect( - getAssetsNameAndSize(newStats, afterCacheCompiler) - ).toMatchSnapshot("assets"); - expect(getWarnings(newStats)).toMatchSnapshot("errors"); - expect(getErrors(newStats)).toMatchSnapshot("warnings"); - - const newCountAssets = Object.keys(newStats.compilation.assets).length; - - // Now we have cached files so we get their and don't put - expect(cacache.get.mock.calls.length).toBe(newCountAssets / 2); - expect(cacache.put.mock.calls.length).toBe(0); - - getCacheDirectorySpy.mockRestore(); - }); - - it("matches snapshot for `other-cache-directory` value ({String})", async () => { - const beforeCacheCompiler = getCompiler("./entry.js"); - - new CompressionPlugin({ cache: otherCacheDir, minRatio: 1 }).apply( - beforeCacheCompiler - ); - - cacache.get = jest.fn(cacache.get); - cacache.put = jest.fn(cacache.put); - - const stats = await compile(beforeCacheCompiler); - - expect(getAssetsNameAndSize(stats, beforeCacheCompiler)).toMatchSnapshot( - "assets" - ); - expect(getWarnings(stats)).toMatchSnapshot("warnings"); - expect(getErrors(stats)).toMatchSnapshot("errors"); - - const countAssets = Object.keys(stats.compilation.assets).length; - - // Try to found cached files, but we don't have their in cache - expect(cacache.get.mock.calls.length).toBe(countAssets / 2); - // Put files in cache - expect(cacache.put.mock.calls.length).toBe(countAssets / 2); - - const cacheEntriesList = await cacache.ls(otherCacheDir); - const cacheKeys = Object.keys(cacheEntriesList); - - // Make sure that we cached files - expect(cacheKeys.length).toBe(countAssets / 2); - - cacheKeys.forEach((cacheEntry) => { - // eslint-disable-next-line no-new-func - const cacheEntryOptions = new Function( - `'use strict'\nreturn ${cacheEntry}` - )(); - const basename = path.basename(cacheEntryOptions.name); - - expect([basename, cacheEntryOptions.contentHash]).toMatchSnapshot( - basename - ); - }); - - cacache.get.mockClear(); - cacache.put.mockClear(); - - const afterCacheCompiler = getCompiler("./entry.js"); - - new CompressionPlugin({ cache: otherCacheDir, minRatio: 1 }).apply( - afterCacheCompiler - ); - - const newStats = await compile(afterCacheCompiler); - - expect( - getAssetsNameAndSize(newStats, afterCacheCompiler) - ).toMatchSnapshot("assets"); - expect(getWarnings(newStats)).toMatchSnapshot("errors"); - expect(getErrors(newStats)).toMatchSnapshot("warnings"); - - const newCountAssets = Object.keys(newStats.compilation.assets).length; - - // Now we have cached files so we get their and don't put - expect(cacache.get.mock.calls.length).toBe(newCountAssets / 2); - expect(cacache.put.mock.calls.length).toBe(0); - }); - - it('matches snapshot for `other-other-cache-directory` value ({String}) with the "algorithm" option', async () => { - const beforeCacheCompiler = getCompiler("./entry.js"); - - new CompressionPlugin({ - cache: otherOtherCacheDir, - minRatio: 1, - algorithm: (input, compressionOptions, callback) => { - return zlib.gzip( - input, - { ...compressionOptions, ...{ level: 9 } }, - (error, buffer) => { - callback(error, Uint8Array.from(buffer)); - } - ); - }, - }).apply(beforeCacheCompiler); - - cacache.get = jest.fn(cacache.get); - cacache.put = jest.fn(cacache.put); - - const stats = await compile(beforeCacheCompiler); - - expect(getAssetsNameAndSize(stats, beforeCacheCompiler)).toMatchSnapshot( - "assets" - ); - expect(getWarnings(stats)).toMatchSnapshot("warnings"); - expect(getErrors(stats)).toMatchSnapshot("errors"); - - const countAssets = Object.keys(stats.compilation.assets).length; - - // Try to found cached files, but we don't have their in cache - expect(cacache.get.mock.calls.length).toBe(countAssets / 2); - // Put files in cache - expect(cacache.put.mock.calls.length).toBe(countAssets / 2); - - const cacheEntriesList = await cacache.ls(otherOtherCacheDir); - const cacheKeys = Object.keys(cacheEntriesList); - - // Make sure that we cached files - expect(cacheKeys.length).toBe(countAssets / 2); - - cacheKeys.forEach((cacheEntry) => { - // eslint-disable-next-line no-new-func - const cacheEntryOptions = new Function( - `'use strict'\nreturn ${cacheEntry}` - )(); - const basename = path.basename(cacheEntryOptions.name); - - expect([basename, cacheEntryOptions.contentHash]).toMatchSnapshot( - basename - ); - }); - - cacache.get.mockClear(); - cacache.put.mockClear(); - - const afterCacheCompiler = getCompiler("./entry.js"); - - new CompressionPlugin({ - cache: otherOtherCacheDir, - minRatio: 1, - algorithm: (input, compressionOptions, callback) => { - return zlib.gzip( - input, - { ...compressionOptions, ...{ level: 9 } }, - (error, buffer) => { - callback(error, Uint8Array.from(buffer)); - } - ); - }, - }).apply(afterCacheCompiler); - - const newStats = await compile(afterCacheCompiler); - - expect( - getAssetsNameAndSize(newStats, afterCacheCompiler) - ).toMatchSnapshot("assets"); - expect(getWarnings(newStats)).toMatchSnapshot("errors"); - expect(getErrors(newStats)).toMatchSnapshot("warnings"); - - const newCountAssets = Object.keys(newStats.compilation.assets).length; - - // Now we have cached files so we get their and don't put - expect(cacache.get.mock.calls.length).toBe(newCountAssets / 2); - expect(cacache.put.mock.calls.length).toBe(0); - }); - }); -} else { - describe('"cache" option', () => { - const fileSystemCacheDirectory = path.resolve( - __dirname, - "./outputs/type-filesystem" - ); - - beforeAll(() => { - return Promise.all([del(fileSystemCacheDirectory)]); - }); - - it("should work when `cache` is `false`", async () => { - const compiler = getCompiler("./entry.js", {}, { cache: false }); - - new CompressionPlugin().apply(compiler); - - let getCounter = 0; - - compiler.cache.hooks.get.tap( - { name: "TestCache", stage: -100 }, - (identifier) => { - if (identifier.indexOf("CompressionWebpackPlugin") !== -1) { - getCounter += 1; - } - } - ); - - let storeCounter = 0; - - compiler.cache.hooks.store.tap( - { name: "TestCache", stage: -100 }, - (identifier) => { - if (identifier.indexOf("CompressionWebpackPlugin") !== -1) { - storeCounter += 1; - } - } - ); - - const stats = await compile(compiler); - - // Without cache webpack always try to get - expect(getCounter).toBe(4); - // Without cache webpack always try to store - expect(storeCounter).toBe(4); - expect(getAssetsNameAndSize(stats, compiler)).toMatchSnapshot("assets"); - expect(getErrors(stats)).toMatchSnapshot("errors"); - expect(getWarnings(stats)).toMatchSnapshot("warnings"); - - getCounter = 0; - storeCounter = 0; - - const newStats = await compile(compiler); - - // Without cache webpack always try to get - expect(getCounter).toBe(4); - // Without cache webpack always try to store - expect(storeCounter).toBe(4); - expect(getAssetsNameAndSize(newStats, compiler)).toMatchSnapshot( - "assets" - ); - expect(getErrors(newStats)).toMatchSnapshot("errors"); - expect(getWarnings(newStats)).toMatchSnapshot("warnings"); - }); - - it('should work with "memory" value for the "cache.type" option', async () => { - const compiler = getCompiler( - "./entry.js", - {}, - { - cache: { - type: "memory", - }, - } - ); - - new CompressionPlugin().apply(compiler); - - let getCounter = 0; - - compiler.cache.hooks.get.tap( - { name: "TestCache", stage: -100 }, - (identifier) => { - if (identifier.indexOf("CompressionWebpackPlugin") !== -1) { - getCounter += 1; - } - } - ); - - let storeCounter = 0; - - compiler.cache.hooks.store.tap( - { name: "TestCache", stage: -100 }, - (identifier) => { - if (identifier.indexOf("CompressionWebpackPlugin") !== -1) { - storeCounter += 1; - } - } - ); - - const stats = await compile(compiler); - - // Get cache for assets - expect(getCounter).toBe(4); - // Store cached assets - expect(storeCounter).toBe(4); - expect(getAssetsNameAndSize(stats, compiler)).toMatchSnapshot("assets"); - expect(getErrors(stats)).toMatchSnapshot("errors"); - expect(getWarnings(stats)).toMatchSnapshot("warnings"); - - getCounter = 0; - storeCounter = 0; - - const newStats = await compile(compiler); - - // Get cache for assets - expect(getCounter).toBe(4); - // No need to store, we got cached assets - expect(storeCounter).toBe(0); - expect(getAssetsNameAndSize(newStats, compiler)).toMatchSnapshot( - "assets" - ); - expect(getErrors(newStats)).toMatchSnapshot("errors"); - expect(getWarnings(newStats)).toMatchSnapshot("warnings"); - }); - - it('should work with "filesystem" value for the "cache.type" option', async () => { - const compiler = getCompiler( - "./entry.js", - {}, - { - cache: { - type: "filesystem", - cacheDirectory: fileSystemCacheDirectory, - }, - } - ); - - new CompressionPlugin().apply(compiler); - - let getCounter = 0; - - compiler.cache.hooks.get.tap( - { name: "TestCache", stage: -100 }, - (identifier) => { - if (identifier.indexOf("CompressionWebpackPlugin") !== -1) { - getCounter += 1; - } - } - ); - - let storeCounter = 0; - - compiler.cache.hooks.store.tap( - { name: "TestCache", stage: -100 }, - (identifier) => { - if (identifier.indexOf("CompressionWebpackPlugin") !== -1) { - storeCounter += 1; - } - } - ); - - const stats = await compile(compiler); - - // Get cache for assets - expect(getCounter).toBe(4); - // Store cached assets - expect(storeCounter).toBe(4); - expect(getAssetsNameAndSize(stats, compiler)).toMatchSnapshot("assets"); - expect(getErrors(stats)).toMatchSnapshot("errors"); - expect(getWarnings(stats)).toMatchSnapshot("warnings"); - - getCounter = 0; - storeCounter = 0; - - const newStats = await compile(compiler); - - // Get cache for assets - expect(getCounter).toBe(4); - // No need to store, we got cached assets - expect(storeCounter).toBe(0); - expect(getAssetsNameAndSize(newStats, compiler)).toMatchSnapshot( - "assets" - ); - expect(getErrors(newStats)).toMatchSnapshot("errors"); - expect(getWarnings(newStats)).toMatchSnapshot("warnings"); - }); - - it('should work with "filesystem" value for the "cache.type" option and with the "algorithm" option', async () => { - const compiler = getCompiler( - "./entry.js", - {}, - { - cache: { - type: "filesystem", - cacheDirectory: fileSystemCacheDirectory, - }, - } - ); - - new CompressionPlugin({ - algorithm: (input, compressionOptions, callback) => { - return zlib.gzip( - input, - { ...compressionOptions, ...{ level: 9 } }, - (error, buffer) => { - callback(error, Uint8Array.from(buffer)); - } - ); - }, - }).apply(compiler); - - let getCounter = 0; - - compiler.cache.hooks.get.tap( - { name: "TestCache", stage: -100 }, - (identifier) => { - if (identifier.indexOf("CompressionWebpackPlugin") !== -1) { - getCounter += 1; - } - } - ); - - let storeCounter = 0; - - compiler.cache.hooks.store.tap( - { name: "TestCache", stage: -100 }, - (identifier) => { - if (identifier.indexOf("CompressionWebpackPlugin") !== -1) { - storeCounter += 1; - } - } - ); - - const stats = await compile(compiler); - - // Get cache for assets - expect(getCounter).toBe(4); - // Store cached assets - expect(storeCounter).toBe(4); - expect(getAssetsNameAndSize(stats, compiler)).toMatchSnapshot("assets"); - expect(getErrors(stats)).toMatchSnapshot("errors"); - expect(getWarnings(stats)).toMatchSnapshot("warnings"); - - getCounter = 0; - storeCounter = 0; - - const newStats = await compile(compiler); - - // Get cache for assets - expect(getCounter).toBe(4); - // No need to store, we got cached assets - expect(storeCounter).toBe(0); - expect(getAssetsNameAndSize(newStats, compiler)).toMatchSnapshot( - "assets" - ); - expect(getErrors(newStats)).toMatchSnapshot("errors"); - expect(getWarnings(newStats)).toMatchSnapshot("warnings"); - }); - }); -} diff --git a/test/compressionOptions-option.test.js b/test/compressionOptions-option.test.js index f255248..0e73c8e 100644 --- a/test/compressionOptions-option.test.js +++ b/test/compressionOptions-option.test.js @@ -6,7 +6,6 @@ import { getCompiler, getErrors, getWarnings, - removeCache, } from "./helpers/index"; describe('"compressionOptions" option', () => { @@ -14,8 +13,6 @@ describe('"compressionOptions" option', () => { beforeEach(() => { compiler = getCompiler("./entry.js"); - - return removeCache(); }); it("matches snapshot without values", async () => { diff --git a/test/deleteOriginalAssets.test.js b/test/deleteOriginalAssets.test.js index 6ce6a16..2b8ee07 100644 --- a/test/deleteOriginalAssets.test.js +++ b/test/deleteOriginalAssets.test.js @@ -6,7 +6,6 @@ import { getCompiler, getErrors, getWarnings, - removeCache, } from "./helpers/index"; describe('"deleteOriginalAssets" option', () => { @@ -14,8 +13,6 @@ describe('"deleteOriginalAssets" option', () => { beforeEach(() => { compiler = getCompiler("./entry.js"); - - return removeCache(); }); it("should work and keep original assets by default", async () => { diff --git a/test/exclude-option.test.js b/test/exclude-option.test.js index 5213105..524564a 100644 --- a/test/exclude-option.test.js +++ b/test/exclude-option.test.js @@ -6,7 +6,6 @@ import { getCompiler, getErrors, getWarnings, - removeCache, } from "./helpers/index"; describe('"exclude" option', () => { @@ -24,8 +23,6 @@ describe('"exclude" option', () => { }, } ); - - return removeCache(); }); it("matches snapshot for a single `exclude` value ({RegExp})", async () => { diff --git a/test/filename-option.test.js b/test/filename-option.test.js index 08c037e..466b3aa 100644 --- a/test/filename-option.test.js +++ b/test/filename-option.test.js @@ -8,16 +8,11 @@ import { getCompiler, getErrors, getWarnings, - removeCache, } from "./helpers/index"; describe('"filename" option', () => { let compiler; - beforeEach(() => { - return removeCache(); - }); - it("show work", async () => { compiler = getCompiler( "./entry.js", diff --git a/test/helpers/getCacheDirectory.js b/test/helpers/getCacheDirectory.js deleted file mode 100644 index 4f1b59b..0000000 --- a/test/helpers/getCacheDirectory.js +++ /dev/null @@ -1,9 +0,0 @@ -import os from "os"; - -import findCacheDir from "find-cache-dir"; - -function getCacheDirectory() { - return findCacheDir({ name: "compression-webpack-plugin" }) || os.tmpdir(); -} - -export default getCacheDirectory; diff --git a/test/helpers/index.js b/test/helpers/index.js index 643f334..20b18a1 100644 --- a/test/helpers/index.js +++ b/test/helpers/index.js @@ -9,7 +9,6 @@ import ModifyExistingAsset from "./ModifyExistingAsset"; import normalizeErrors from "./normalizeErrors"; import readAsset from "./readAsset"; import readsAssets from "./readAssets"; -import removeCache from "./removeCache"; export { compile, @@ -23,5 +22,4 @@ export { normalizeErrors, readAsset, readsAssets, - removeCache, }; diff --git a/test/helpers/removeCache.js b/test/helpers/removeCache.js deleted file mode 100644 index 001d04d..0000000 --- a/test/helpers/removeCache.js +++ /dev/null @@ -1,11 +0,0 @@ -import cacache from "cacache"; - -import getCacheDirectory from "./getCacheDirectory"; - -async function removeCache(cacheDirectory) { - const cacheDir = cacheDirectory || getCacheDirectory(); - - return cacache.rm.all(cacheDir); -} - -export default removeCache; diff --git a/test/helpers/snapshotResolver.js b/test/helpers/snapshotResolver.js deleted file mode 100644 index 4303e7e..0000000 --- a/test/helpers/snapshotResolver.js +++ /dev/null @@ -1,28 +0,0 @@ -const path = require("path"); - -const webpack = require("webpack"); - -// eslint-disable-next-line global-require -const [webpackVersion] = webpack.version; -const snapshotExtension = `.snap.webpack${webpackVersion}`; - -// eslint-disable-next-line no-console -console.log("Current webpack version:", webpackVersion); - -module.exports = { - resolveSnapshotPath: (testPath) => - path.join( - path.dirname(testPath), - "__snapshots__", - `${path.basename(testPath)}${snapshotExtension}` - ), - resolveTestPath: (snapshotPath) => - snapshotPath - .replace(`${path.sep}__snapshots__`, "") - .slice(0, -snapshotExtension.length), - testPathForConsistencyCheck: path.join( - "consistency_check", - "__tests__", - "example.test.js" - ), -}; diff --git a/test/include-option.test.js b/test/include-option.test.js index d0cfa52..852a986 100644 --- a/test/include-option.test.js +++ b/test/include-option.test.js @@ -6,7 +6,6 @@ import { getCompiler, getErrors, getWarnings, - removeCache, } from "./helpers/index"; describe('"include" option', () => { @@ -24,8 +23,6 @@ describe('"include" option', () => { }, } ); - - return removeCache(); }); it("matches snapshot for a single `include` value ({RegExp})", async () => { diff --git a/test/minRatio-option.test.js b/test/minRatio-option.test.js index 4c812c4..1410aa9 100644 --- a/test/minRatio-option.test.js +++ b/test/minRatio-option.test.js @@ -6,7 +6,6 @@ import { getCompiler, getErrors, getWarnings, - removeCache, } from "./helpers/index"; describe('"minRatio" option', () => { @@ -14,8 +13,6 @@ describe('"minRatio" option', () => { beforeEach(() => { compiler = getCompiler("./entry.js"); - - return removeCache(); }); it("matches snapshot for `0` value ({Number})", async () => { diff --git a/test/test-option.test.js b/test/test-option.test.js index 4107466..d5a8519 100644 --- a/test/test-option.test.js +++ b/test/test-option.test.js @@ -6,7 +6,6 @@ import { getCompiler, getErrors, getWarnings, - removeCache, } from "./helpers/index"; describe('"test" option', () => { @@ -24,8 +23,6 @@ describe('"test" option', () => { }, } ); - - return removeCache(); }); it("matches snapshot with empty `test` value", async () => { diff --git a/test/threshold-option.test.js b/test/threshold-option.test.js index 56a83a6..29d6f51 100644 --- a/test/threshold-option.test.js +++ b/test/threshold-option.test.js @@ -6,7 +6,6 @@ import { getCompiler, getErrors, getWarnings, - removeCache, } from "./helpers/index"; describe('"threshold" option', () => { @@ -14,8 +13,6 @@ describe('"threshold" option', () => { beforeEach(() => { compiler = getCompiler("./entry.js"); - - return removeCache(); }); it("matches snapshot for `0` value ({Number})", async () => { diff --git a/test/validate-options.test.js b/test/validate-options.test.js index 64f1303..174cdac 100644 --- a/test/validate-options.test.js +++ b/test/validate-options.test.js @@ -1,12 +1,6 @@ import CompressionPlugin from "../src"; -import { removeCache } from "./helpers"; - describe("validate options", () => { - beforeEach(() => { - return removeCache(); - }); - const tests = { test: { success: [ @@ -61,10 +55,6 @@ describe("validate options", () => { success: [0.8], failure: ["0.8"], }, - cache: { - success: [true, "/path/to/cache"], - failure: [() => {}], - }, deleteOriginalAssets: { success: [true, false, "keep-source-map"], failure: ["true", "unknown"],