@@ -46,15 +46,15 @@ module.exports = JSON.parse("{\"definitions\":{\"Rule\":{\"description\":\"Filte
4646/***/ (function(module) {
4747
4848"use strict";
49- module.exports = JSON.parse("{\"name\":\"terser\",\"description\":\"JavaScript parser, mangler/compressor and beautifier toolkit for ES6+\",\"homepage\":\"https://terser.org\",\"author\":\"Mihai Bazon <mihai.bazon@gmail.com> (http://lisperator.net/)\",\"license\":\"BSD-2-Clause\",\"version\":\"5.6.0\",\"engines\":{\"node\":\">=10\"},\"maintainers\":[\"Fábio Santos <fabiosantosart@gmail.com>\"],\"repository\":\"https://github.com/terser/terser\",\"main\":\"dist/bundle.min.js\",\"type\":\"module\",\"module\":\"./main.js\",\"exports\":{\".\":[{\"import\":\"./main.js\",\"require\":\"./dist/bundle.min.js\"},\"./dist/bundle.min.js\"],\"./package\":\"./package.json\",\"./package.json\":\"./package.json\"},\"types\":\"tools/terser.d.ts\",\"bin\":{\"terser\":\"bin/terser\"},\"files\":[\"bin\",\"dist\",\"lib\",\"tools\",\"LICENSE\",\"README.md\",\"CHANGELOG.md\",\"PATRONS.md\",\"main.js\"],\"dependencies\":{\"commander\":\"^2.20.0\",\"source-map\":\"~0.7.2\",\"source-map-support\":\"~0.5.19\"},\"devDependencies\":{\"@ls-lint/ls-lint\":\"^1.9.2\",\"acorn\":\"^8.0.5\",\"astring\":\"^1.6.2\",\"eslint\":\"^7.19.0\",\"eslump\":\"^2.0.0\",\"esm\":\"^3.2.25\",\"mocha\":\"^8.2.1\",\"pre-commit\":\"^1.2.2\",\"rimraf\":\"^3.0.2\",\"rollup\":\"2.38.4\",\"semver\":\"^7.3.4\"},\"scripts\":{\"test\":\"node test/compress.js && mocha test/mocha\",\"test:compress\":\"node test/compress.js\",\"test:mocha\":\"mocha test/mocha\",\"lint\":\"eslint lib\",\"lint-fix\":\"eslint --fix lib\",\"ls-lint\":\"ls-lint\",\"build\":\"rimraf dist/bundle* && rollup --config --silent\",\"prepare\":\"npm run build\",\"postversion\":\"echo 'Remember to update the changelog!'\"},\"keywords\":[\"uglify\",\"terser\",\"uglify-es\",\"uglify-js\",\"minify\",\"minifier\",\"javascript\",\"ecmascript\",\"es5\",\"es6\",\"es7\",\"es8\",\"es2015\",\"es2016\",\"es2017\",\"async\",\"await\"],\"eslintConfig\":{\"parserOptions\":{\"sourceType\":\"module\",\"ecmaVersion\":\"2020\"},\"env\":{\"node\":true,\"browser\":true,\"es2020\":true},\"globals\":{\"describe\":false,\"it\":false,\"require\":false,\"global\":false,\"process\":false},\"rules\":{\"brace-style\":[\"error\",\"1tbs\",{\"allowSingleLine\":true}],\"quotes\":[\"error\",\"double\",\"avoid-escape\"],\"no-debugger\":\"error\",\"no-undef\":\"error\",\"no-unused-vars\":[\"error\",{\"varsIgnorePattern\":\"^_$\"}],\"no-tabs\":\"error\",\"semi\":[\"error\",\"always\"],\"no-extra-semi\":\"error\",\"no-irregular-whitespace\":\"error\",\"space-before-blocks\":[\"error\",\"always\"]}},\"pre-commit\":[\"build\",\"lint-fix\",\"ls-lint\",\"test\"]}");
49+ module.exports = JSON.parse("{\"name\":\"terser\",\"description\":\"JavaScript parser, mangler/compressor and beautifier toolkit for ES6+\",\"homepage\":\"https://terser.org\",\"author\":\"Mihai Bazon <mihai.bazon@gmail.com> (http://lisperator.net/)\",\"license\":\"BSD-2-Clause\",\"version\":\"5.6.1\",\"engines\":{\"node\":\">=10\"},\"maintainers\":[\"Fábio Santos <fabiosantosart@gmail.com>\"],\"repository\":\"https://github.com/terser/terser\",\"main\":\"dist/bundle.min.js\",\"type\":\"module\",\"module\":\"./main.js\",\"exports\":{\".\":[{\"import\":\"./main.js\",\"require\":\"./dist/bundle.min.js\"},\"./dist/bundle.min.js\"],\"./package\":\"./package.json\",\"./package.json\":\"./package.json\"},\"types\":\"tools/terser.d.ts\",\"bin\":{\"terser\":\"bin/terser\"},\"files\":[\"bin\",\"dist\",\"lib\",\"tools\",\"LICENSE\",\"README.md\",\"CHANGELOG.md\",\"PATRONS.md\",\"main.js\"],\"dependencies\":{\"commander\":\"^2.20.0\",\"source-map\":\"~0.7.2\",\"source-map-support\":\"~0.5.19\"},\"devDependencies\":{\"@ls-lint/ls-lint\":\"^1.9.2\",\"acorn\":\"^8.0.5\",\"astring\":\"^1.6.2\",\"eslint\":\"^7.19.0\",\"eslump\":\"^2.0.0\",\"esm\":\"^3.2.25\",\"mocha\":\"^8.2.1\",\"pre-commit\":\"^1.2.2\",\"rimraf\":\"^3.0.2\",\"rollup\":\"2.38.4\",\"semver\":\"^7.3.4\"},\"scripts\":{\"test\":\"node test/compress.js && mocha test/mocha\",\"test:compress\":\"node test/compress.js\",\"test:mocha\":\"mocha test/mocha\",\"lint\":\"eslint lib\",\"lint-fix\":\"eslint --fix lib\",\"ls-lint\":\"ls-lint\",\"build\":\"rimraf dist/bundle* && rollup --config --silent\",\"prepare\":\"npm run build\",\"postversion\":\"echo 'Remember to update the changelog!'\"},\"keywords\":[\"uglify\",\"terser\",\"uglify-es\",\"uglify-js\",\"minify\",\"minifier\",\"javascript\",\"ecmascript\",\"es5\",\"es6\",\"es7\",\"es8\",\"es2015\",\"es2016\",\"es2017\",\"async\",\"await\"],\"eslintConfig\":{\"parserOptions\":{\"sourceType\":\"module\",\"ecmaVersion\":\"2020\"},\"env\":{\"node\":true,\"browser\":true,\"es2020\":true},\"globals\":{\"describe\":false,\"it\":false,\"require\":false,\"global\":false,\"process\":false},\"rules\":{\"brace-style\":[\"error\",\"1tbs\",{\"allowSingleLine\":true}],\"quotes\":[\"error\",\"double\",\"avoid-escape\"],\"no-debugger\":\"error\",\"no-undef\":\"error\",\"no-unused-vars\":[\"error\",{\"varsIgnorePattern\":\"^_$\"}],\"no-tabs\":\"error\",\"semi\":[\"error\",\"always\"],\"no-extra-semi\":\"error\",\"no-irregular-whitespace\":\"error\",\"space-before-blocks\":[\"error\",\"always\"]}},\"pre-commit\":[\"build\",\"lint-fix\",\"ls-lint\",\"test\"]}");
5050
5151/***/ }),
5252
5353/***/ 32607:
5454/***/ (function(module) {
5555
5656"use strict";
57- module.exports = {"i8":"5.26.2 "};
57+ module.exports = {"i8":"5.27.1 "};
5858
5959/***/ }),
6060
@@ -58682,7 +58682,18 @@ module.exports = class MultiCompiler {
5868258682 * @returns {SetupResult[]} result of setup
5868358683 */
5868458684 _runGraph(setup, run, callback) {
58685- /** @typedef {{ compiler: Compiler, result: Stats, state: "blocked" | "queued" | "running" | "done", children: Node[], parents: Node[] }} Node */
58685+ /** @typedef {{ compiler: Compiler, result: Stats, state: "pending" | "blocked" | "queued" | "running" | "running-outdated" | "done", children: Node[], parents: Node[] }} Node */
58686+
58687+ // State transitions for nodes:
58688+ // -> blocked (initial)
58689+ // blocked -> queued [add to queue] (when all parents done)
58690+ // queued -> running [running++] (when processing the queue)
58691+ // running -> done [running--] (when compilation is done)
58692+ // done -> pending (when invalidated from file change)
58693+ // pending -> blocked (when invalidated from aggregated changes)
58694+ // done -> blocked (when invalidated, from parent invalidation)
58695+ // running -> running-outdated (when invalidated, either from change or parent invalidation)
58696+ // running-outdated -> blocked [running--] (when compilation is done)
5868658697
5868758698 /** @type {Node[]} */
5868858699 const nodes = this.compilers.map(compiler => ({
@@ -58740,26 +58751,41 @@ module.exports = class MultiCompiler {
5874058751 running--;
5874158752 if (node.state === "running") {
5874258753 node.state = "done";
58743- }
58744- for (const child of node.children) {
58745- if (child.state !== "blocked") continue;
58746- if (child.parents.every(p => p.state === "done")) {
58747- child.state = "queued";
58748- queue.enqueue(child);
58754+ for (const child of node.children) {
58755+ checkUnblocked(child);
5874958756 }
58757+ } else if (node.state === "running-outdated") {
58758+ node.state = "blocked";
58759+ checkUnblocked(node);
5875058760 }
5875158761 process.nextTick(processQueue);
5875258762 };
5875358763 /**
5875458764 * @param {Node} node node
5875558765 * @returns {void}
5875658766 */
58757- const nodeInvalid = node => {
58758- if (node.state === "done" || node.state === "running" ) {
58767+ const nodeInvalidFromParent = node => {
58768+ if (node.state === "done") {
5875958769 node.state = "blocked";
58770+ } else if (node.state === "running") {
58771+ node.state = "running-outdated";
5876058772 }
5876158773 for (const child of node.children) {
58762- nodeInvalid(child);
58774+ nodeInvalidFromParent(child);
58775+ }
58776+ };
58777+ /**
58778+ * @param {Node} node node
58779+ * @returns {void}
58780+ */
58781+ const nodeInvalid = node => {
58782+ if (node.state === "done") {
58783+ node.state = "pending";
58784+ } else if (node.state === "running") {
58785+ node.state = "running-outdated";
58786+ }
58787+ for (const child of node.children) {
58788+ nodeInvalidFromParent(child);
5876358789 }
5876458790 };
5876558791 /**
@@ -58768,23 +58794,34 @@ module.exports = class MultiCompiler {
5876858794 */
5876958795 const nodeChange = node => {
5877058796 nodeInvalid(node);
58797+ if (node.state === "pending") {
58798+ node.state = "blocked";
58799+ }
58800+ checkUnblocked(node);
58801+ processQueue();
58802+ };
58803+ /**
58804+ * @param {Node} node node
58805+ * @returns {void}
58806+ */
58807+ const checkUnblocked = node => {
5877158808 if (
5877258809 node.state === "blocked" &&
5877358810 node.parents.every(p => p.state === "done")
5877458811 ) {
5877558812 node.state = "queued";
5877658813 queue.enqueue(node);
58777- processQueue();
5877858814 }
5877958815 };
58816+
5878058817 const setupResults = [];
5878158818 nodes.forEach((node, i) => {
5878258819 setupResults.push(
5878358820 setup(
5878458821 node.compiler,
5878558822 i,
5878658823 nodeDone.bind(null, node),
58787- () => node.state === "blocked" || node.state === "queued ",
58824+ () => node.state !== "done" && node.state !== "running ",
5878858825 () => nodeChange(node),
5878958826 () => nodeInvalid(node)
5879058827 )
@@ -58798,7 +58835,11 @@ module.exports = class MultiCompiler {
5879858835 node.state = "running";
5879958836 run(node.compiler, nodeDone.bind(null, node));
5880058837 }
58801- if (!errored && running === 0) {
58838+ if (
58839+ !errored &&
58840+ running === 0 &&
58841+ nodes.every(node => node.state === "done")
58842+ ) {
5880258843 const stats = [];
5880358844 for (const node of nodes) {
5880458845 const result = node.result;
@@ -59414,7 +59455,7 @@ const {
5941459455} = __webpack_require__(21699);
5941559456const createHash = __webpack_require__(34627);
5941659457const { join } = __webpack_require__(71593);
59417- const { contextify } = __webpack_require__(47779);
59458+ const { contextify, absolutify } = __webpack_require__(47779);
5941859459const makeSerializable = __webpack_require__(55575);
5941959460const memoize = __webpack_require__(18003);
5942059461
@@ -59818,6 +59859,30 @@ class NormalModule extends Module {
5981859859 }
5981959860 };
5982059861 };
59862+ const getAbsolutify = memoize(() =>
59863+ absolutify.bindCache(compilation.compiler.root)
59864+ );
59865+ const getAbsolutifyInContext = memoize(() =>
59866+ absolutify.bindContextCache(this.context, compilation.compiler.root)
59867+ );
59868+ const getContextify = memoize(() =>
59869+ contextify.bindCache(compilation.compiler.root)
59870+ );
59871+ const getContextifyInContext = memoize(() =>
59872+ contextify.bindContextCache(this.context, compilation.compiler.root)
59873+ );
59874+ const utils = {
59875+ absolutify: (context, request) => {
59876+ return context === this.context
59877+ ? getAbsolutifyInContext()(request)
59878+ : getAbsolutify()(context, request);
59879+ },
59880+ contextify: (context, request) => {
59881+ return context === this.context
59882+ ? getContextifyInContext()(request)
59883+ : getContextify()(context, request);
59884+ }
59885+ };
5982159886 const loaderContext = {
5982259887 version: 2,
5982359888 getOptions: schema => {
@@ -59930,6 +59995,7 @@ class NormalModule extends Module {
5993059995 }
5993159996 this.buildInfo.buildDependencies.add(dep);
5993259997 },
59998+ utils,
5993359999 rootContext: options.context,
5993460000 webpack: true,
5993560001 sourceMap: !!this.useSourceMap,
@@ -61227,7 +61293,7 @@ class NormalModuleFactory extends ModuleFactory {
6122761293 }
6122861294
6122961295 // resource without scheme and without path
61230- else if (/^($|\?|# )/.test(unresolvedResource)) {
61296+ else if (/^($|\?)/.test(unresolvedResource)) {
6123161297 resourceData = {
6123261298 resource: unresolvedResource,
6123361299 data: {},
@@ -62978,6 +63044,7 @@ class RecordIdsPlugin {
6297863044 }
6297963045 if (records.chunks.bySource) {
6298063046 for (const chunk of chunks) {
63047+ if (chunk.id !== null) continue;
6298163048 const sources = getChunkSources(chunk);
6298263049 for (const source of sources) {
6298363050 const id = records.chunks.bySource[source];
@@ -92719,7 +92786,10 @@ const { RuntimeGlobals } = __webpack_require__(16520);
9271992786const HotUpdateChunk = __webpack_require__(90972);
9272092787const Template = __webpack_require__(90751);
9272192788const { getCompilationHooks } = __webpack_require__(80867);
92722- const { generateEntryStartup } = __webpack_require__(9005);
92789+ const {
92790+ generateEntryStartup,
92791+ updateHashForEntryStartup
92792+ } = __webpack_require__(9005);
9272392793
9272492794/** @typedef {import("../Compiler")} Compiler */
9272592795
@@ -92849,6 +92919,10 @@ class ArrayPushCallbackChunkFormatPlugin {
9284992919 hash.update(`${runtimeTemplate.outputOptions.chunkLoadingGlobal}`);
9285092920 hash.update(`${runtimeTemplate.outputOptions.hotUpdateGlobal}`);
9285192921 hash.update(`${runtimeTemplate.outputOptions.globalObject}`);
92922+ const entries = Array.from(
92923+ chunkGraph.getChunkEntryModulesWithChunkGroupIterable(chunk)
92924+ );
92925+ updateHashForEntryStartup(hash, chunkGraph, entries, chunk);
9285292926 }
9285392927 );
9285492928 }
@@ -93364,7 +93438,10 @@ const {
9336493438 getChunkFilenameTemplate,
9336593439 getCompilationHooks
9336693440} = __webpack_require__(80867);
93367- const { generateEntryStartup } = __webpack_require__(9005);
93441+ const {
93442+ generateEntryStartup,
93443+ updateHashForEntryStartup
93444+ } = __webpack_require__(9005);
9336893445
9336993446/** @typedef {import("../Compiler")} Compiler */
9337093447
@@ -93508,6 +93585,10 @@ class CommonJsChunkFormatPlugin {
9350893585 if (chunk.hasRuntime()) return;
9350993586 hash.update("CommonJsChunkFormatPlugin");
9351093587 hash.update("1");
93588+ const entries = Array.from(
93589+ chunkGraph.getChunkEntryModulesWithChunkGroupIterable(chunk)
93590+ );
93591+ updateHashForEntryStartup(hash, chunkGraph, entries, chunk);
9351193592 }
9351293593 );
9351393594 }
@@ -98945,6 +99026,7 @@ const Template = __webpack_require__(90751);
9894599026const { isSubset } = __webpack_require__(86088);
9894699027const { chunkHasJs } = __webpack_require__(80867);
9894799028
99029+ /** @typedef {import("../util/Hash")} Hash */
9894899030/** @typedef {import("../Chunk")} Chunk */
9894999031/** @typedef {import("../Compilation")} Compilation */
9895099032/** @typedef {import("../ChunkGraph")} ChunkGraph */
@@ -99005,21 +99087,24 @@ exports.generateEntryStartup = (
9900599087 return `__webpack_exec__(${JSON.stringify(id)})`;
9900699088 };
9900799089 const outputCombination = (chunks, moduleIds, final) => {
99008- const old = final ? "undefined" : "0";
99009- const prefix = final ? EXPORT_PREFIX : "";
9901099090 if (chunks.size === 0) {
99011- runtime.push(`${prefix}(${moduleIds.map(runModule).join(", ")});`);
99091+ runtime.push(
99092+ `${final ? EXPORT_PREFIX : ""}(${moduleIds.map(runModule).join(", ")});`
99093+ );
9901299094 } else {
9901399095 const fn = runtimeTemplate.returningFunction(
9901499096 moduleIds.map(runModule).join(", ")
9901599097 );
9901699098 runtime.push(
99017- `${prefix }${
99099+ `${final && !passive ? EXPORT_PREFIX : "" }${
9901899100 passive
9901999101 ? RuntimeGlobals.onChunksLoaded
9902099102 : RuntimeGlobals.startupEntrypoint
99021- }(${old} , ${JSON.stringify(Array.from(chunks, c => c.id))}, ${fn});`
99103+ }(0 , ${JSON.stringify(Array.from(chunks, c => c.id))}, ${fn});`
9902299104 );
99105+ if (final && passive) {
99106+ runtime.push(`${EXPORT_PREFIX}${RuntimeGlobals.onChunksLoaded}();`);
99107+ }
9902399108 }
9902499109 };
9902599110
@@ -99053,6 +99138,23 @@ exports.generateEntryStartup = (
9905399138 return Template.asString(runtime);
9905499139};
9905599140
99141+ /**
99142+ * @param {Hash} hash the hash to update
99143+ * @param {ChunkGraph} chunkGraph chunkGraph
99144+ * @param {import("../ChunkGraph").EntryModuleWithChunkGroup[]} entries entries
99145+ * @param {Chunk} chunk chunk
99146+ * @returns {void}
99147+ */
99148+ exports.updateHashForEntryStartup = (hash, chunkGraph, entries, chunk) => {
99149+ for (const [module, entrypoint] of entries) {
99150+ const runtimeChunk = entrypoint.getRuntimeChunk();
99151+ const moduleId = chunkGraph.getModuleId(module);
99152+ hash.update(`${moduleId}`);
99153+ for (const c of getAllChunks(entrypoint, chunk, runtimeChunk))
99154+ hash.update(`${c.id}`);
99155+ }
99156+ };
99157+
9905699158/**
9905799159 * @param {Chunk} chunk the chunk
9905899160 * @param {ChunkGraph} chunkGraph the chunk graph
0 commit comments