mirror of https://github.com/webpack/webpack.git
Merge branch 'master' into johnnyreilly/master
This commit is contained in:
commit
87c0d1cd94
|
|
@ -21,7 +21,7 @@ jobs:
|
|||
- name: Use Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14.x
|
||||
node-version: 16.x
|
||||
- id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v1
|
||||
|
|
@ -43,7 +43,7 @@ jobs:
|
|||
- name: Use Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14.x
|
||||
node-version: 16.x
|
||||
- id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v1
|
||||
|
|
@ -66,7 +66,7 @@ jobs:
|
|||
- name: Use Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14.x
|
||||
node-version: 16.x
|
||||
- id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v1
|
||||
|
|
@ -93,10 +93,10 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
node-version: [10.x, 14.x]
|
||||
node-version: [10.x, 16.x]
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
node-version: 15.x
|
||||
node-version: 14.x
|
||||
- os: ubuntu-latest
|
||||
node-version: 12.x
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ jobs:
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "^14.0.0"
|
||||
versionSpec: "^16.0.0"
|
||||
displayName: "Install Node.js"
|
||||
- script: |
|
||||
curl -o- -L https://yarnpkg.com/install.sh | bash
|
||||
|
|
@ -111,8 +111,8 @@ jobs:
|
|||
node_version: ^10.13.0
|
||||
node-12:
|
||||
node_version: ^12.4.0
|
||||
node-14:
|
||||
node_version: ^14.0.0
|
||||
node-16:
|
||||
node_version: ^16.0.0
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
|
|
@ -161,8 +161,8 @@ jobs:
|
|||
node_version: ^12.4.0
|
||||
node-14:
|
||||
node_version: ^14.0.0
|
||||
node-15:
|
||||
node_version: ^15.0.0
|
||||
node-16:
|
||||
node_version: ^16.0.0
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
|
|
@ -212,8 +212,8 @@ jobs:
|
|||
matrix:
|
||||
node-12:
|
||||
node_version: ^12.4.0
|
||||
node-14:
|
||||
node_version: ^14.0.0
|
||||
node-16:
|
||||
node_version: ^16.0.0
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
|
|
|
|||
|
|
@ -373,6 +373,23 @@ declare module "browserslist" {
|
|||
export = browserslist;
|
||||
}
|
||||
|
||||
// TODO remove that when @types/estree is updated
|
||||
declare type PrivateIdentifierNode = {
|
||||
type: "PrivateIdentifier";
|
||||
name: string;
|
||||
loc?: import("estree").SourceLocation | null;
|
||||
range?: [number, number];
|
||||
};
|
||||
declare type PropertyDefinitionNode = {
|
||||
type: "PropertyDefinition";
|
||||
key: import("estree").Expression | PrivateIdentifierNode;
|
||||
value: import("estree").Expression | null;
|
||||
computed: boolean;
|
||||
static: boolean;
|
||||
loc?: import("estree").SourceLocation | null;
|
||||
range?: [number, number];
|
||||
};
|
||||
|
||||
type TODO = any;
|
||||
|
||||
type RecursiveArrayOrRecord<T> =
|
||||
|
|
|
|||
|
|
@ -969,6 +969,10 @@ export interface FileCacheOptions {
|
|||
* Name for the cache. Different names will lead to different coexisting caches.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Track and log detailed timing information for individual cache items.
|
||||
*/
|
||||
profile?: boolean;
|
||||
/**
|
||||
* When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ const Entrypoint = require("./Entrypoint");
|
|||
const ModuleGraphConnection = require("./ModuleGraphConnection");
|
||||
const { first } = require("./util/SetHelpers");
|
||||
const SortableSet = require("./util/SortableSet");
|
||||
const StringXor = require("./util/StringXor");
|
||||
const {
|
||||
compareModulesById,
|
||||
compareIterables,
|
||||
|
|
@ -40,6 +39,8 @@ const {
|
|||
/** @type {ReadonlySet<string>} */
|
||||
const EMPTY_SET = new Set();
|
||||
|
||||
const ZERO_BIG_INT = BigInt(0);
|
||||
|
||||
const compareModuleIterables = compareIterables(compareModulesByIdentifier);
|
||||
|
||||
/** @typedef {(c: Chunk, chunkGraph: ChunkGraph) => boolean} ChunkFilterPredicate */
|
||||
|
|
@ -1373,8 +1374,41 @@ Caller might not support runtime-dependent code generation (opt-out via optimiza
|
|||
return runtimeRequirements === undefined ? EMPTY_SET : runtimeRequirements;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Module} module the module
|
||||
* @param {RuntimeSpec} runtime the runtime
|
||||
* @param {boolean} withConnections include connections
|
||||
* @returns {string} hash
|
||||
*/
|
||||
getModuleGraphHash(module, runtime, withConnections = true) {
|
||||
const cgm = this._getChunkGraphModule(module);
|
||||
return withConnections
|
||||
? this._getModuleGraphHashWithConnections(cgm, module, runtime)
|
||||
: this._getModuleGraphHashBigInt(cgm, module, runtime).toString(16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Module} module the module
|
||||
* @param {RuntimeSpec} runtime the runtime
|
||||
* @param {boolean} withConnections include connections
|
||||
* @returns {bigint} hash
|
||||
*/
|
||||
getModuleGraphHashBigInt(module, runtime, withConnections = true) {
|
||||
const cgm = this._getChunkGraphModule(module);
|
||||
return withConnections
|
||||
? BigInt(
|
||||
`0x${this._getModuleGraphHashWithConnections(cgm, module, runtime)}`
|
||||
)
|
||||
: this._getModuleGraphHashBigInt(cgm, module, runtime);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ChunkGraphModule} cgm the ChunkGraphModule
|
||||
* @param {Module} module the module
|
||||
* @param {RuntimeSpec} runtime the runtime
|
||||
* @returns {bigint} hash as big int
|
||||
*/
|
||||
_getModuleGraphHashBigInt(cgm, module, runtime) {
|
||||
if (cgm.graphHashes === undefined) {
|
||||
cgm.graphHashes = new RuntimeSpecMap();
|
||||
}
|
||||
|
|
@ -1383,38 +1417,72 @@ Caller might not support runtime-dependent code generation (opt-out via optimiza
|
|||
hash.update(`${cgm.id}`);
|
||||
hash.update(`${this.moduleGraph.isAsync(module)}`);
|
||||
this.moduleGraph.getExportsInfo(module).updateHash(hash, runtime);
|
||||
return /** @type {string} */ (hash.digest("hex"));
|
||||
return BigInt(`0x${/** @type {string} */ (hash.digest("hex"))}`);
|
||||
});
|
||||
if (!withConnections) return graphHash;
|
||||
return graphHash;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ChunkGraphModule} cgm the ChunkGraphModule
|
||||
* @param {Module} module the module
|
||||
* @param {RuntimeSpec} runtime the runtime
|
||||
* @returns {string} hash
|
||||
*/
|
||||
_getModuleGraphHashWithConnections(cgm, module, runtime) {
|
||||
if (cgm.graphHashesWithConnections === undefined) {
|
||||
cgm.graphHashesWithConnections = new RuntimeSpecMap();
|
||||
}
|
||||
const activeStateToString = state => {
|
||||
if (state === false) return "false";
|
||||
if (state === true) return "true";
|
||||
if (state === ModuleGraphConnection.TRANSITIVE_ONLY) return "transitive";
|
||||
if (state === false) return "F";
|
||||
if (state === true) return "T";
|
||||
if (state === ModuleGraphConnection.TRANSITIVE_ONLY) return "O";
|
||||
throw new Error("Not implemented active state");
|
||||
};
|
||||
const strict = module.buildMeta && module.buildMeta.strictHarmonyModule;
|
||||
return cgm.graphHashesWithConnections.provide(runtime, () => {
|
||||
const graphHash = this._getModuleGraphHashBigInt(
|
||||
cgm,
|
||||
module,
|
||||
runtime
|
||||
).toString(16);
|
||||
const connections = this.moduleGraph.getOutgoingConnections(module);
|
||||
/** @type {Set<Module>} */
|
||||
const activeNamespaceModules = new Set();
|
||||
/** @type {Map<string, Module | Set<Module>>} */
|
||||
const connectedModules = new Map();
|
||||
for (const connection of connections) {
|
||||
let stateInfo;
|
||||
if (typeof runtime === "string") {
|
||||
const processConnection = (connection, stateInfo) => {
|
||||
const module = connection.module;
|
||||
stateInfo += module.getExportsType(this.moduleGraph, strict);
|
||||
// cspell:word Tnamespace
|
||||
if (stateInfo === "Tnamespace") activeNamespaceModules.add(module);
|
||||
else {
|
||||
const oldModule = connectedModules.get(stateInfo);
|
||||
if (oldModule === undefined) {
|
||||
connectedModules.set(stateInfo, module);
|
||||
} else if (oldModule instanceof Set) {
|
||||
oldModule.add(module);
|
||||
} else if (oldModule !== module) {
|
||||
connectedModules.set(stateInfo, new Set([oldModule, module]));
|
||||
}
|
||||
}
|
||||
};
|
||||
if (runtime === undefined || typeof runtime === "string") {
|
||||
for (const connection of connections) {
|
||||
const state = connection.getActiveState(runtime);
|
||||
if (state === false) continue;
|
||||
stateInfo = activeStateToString(state);
|
||||
} else {
|
||||
processConnection(connection, state === true ? "T" : "O");
|
||||
}
|
||||
} else {
|
||||
// cspell:word Tnamespace
|
||||
for (const connection of connections) {
|
||||
const states = new Set();
|
||||
stateInfo = "";
|
||||
let stateInfo = "";
|
||||
forEachRuntime(
|
||||
runtime,
|
||||
runtime => {
|
||||
const state = connection.getActiveState(runtime);
|
||||
states.add(state);
|
||||
stateInfo += runtime + activeStateToString(state);
|
||||
stateInfo += activeStateToString(state) + runtime;
|
||||
},
|
||||
true
|
||||
);
|
||||
|
|
@ -1423,34 +1491,49 @@ Caller might not support runtime-dependent code generation (opt-out via optimiza
|
|||
if (state === false) continue;
|
||||
stateInfo = activeStateToString(state);
|
||||
}
|
||||
}
|
||||
const module = connection.module;
|
||||
stateInfo += module.getExportsType(this.moduleGraph, strict);
|
||||
const oldModule = connectedModules.get(stateInfo);
|
||||
if (oldModule === undefined) {
|
||||
connectedModules.set(stateInfo, module);
|
||||
} else if (oldModule instanceof Set) {
|
||||
oldModule.add(module);
|
||||
} else if (oldModule !== module) {
|
||||
connectedModules.set(stateInfo, new Set([oldModule, module]));
|
||||
processConnection(connection, stateInfo);
|
||||
}
|
||||
}
|
||||
if (connectedModules.size === 0) return graphHash;
|
||||
// cspell:word Tnamespace
|
||||
if (activeNamespaceModules.size === 0 && connectedModules.size === 0)
|
||||
return graphHash;
|
||||
const connectedModulesInOrder =
|
||||
connectedModules.size > 1
|
||||
? Array.from(connectedModules).sort(([a], [b]) => (a < b ? -1 : 1))
|
||||
: connectedModules;
|
||||
const hash = createHash("md4");
|
||||
const addModuleToHash = module => {
|
||||
hash.update(
|
||||
this._getModuleGraphHashBigInt(
|
||||
this._getChunkGraphModule(module),
|
||||
module,
|
||||
runtime
|
||||
).toString(16)
|
||||
);
|
||||
};
|
||||
const addModulesToHash = modules => {
|
||||
let xor = ZERO_BIG_INT;
|
||||
for (const m of modules) {
|
||||
xor =
|
||||
xor ^
|
||||
this._getModuleGraphHashBigInt(
|
||||
this._getChunkGraphModule(m),
|
||||
m,
|
||||
runtime
|
||||
);
|
||||
}
|
||||
hash.update(xor.toString(16));
|
||||
};
|
||||
if (activeNamespaceModules.size === 1)
|
||||
addModuleToHash(activeNamespaceModules.values().next().value);
|
||||
else if (activeNamespaceModules.size > 1)
|
||||
addModulesToHash(activeNamespaceModules);
|
||||
for (const [stateInfo, modules] of connectedModulesInOrder) {
|
||||
hash.update(stateInfo);
|
||||
if (modules instanceof Set) {
|
||||
const xor = new StringXor();
|
||||
for (const m of modules) {
|
||||
xor.add(this.getModuleGraphHash(m, runtime, false));
|
||||
}
|
||||
xor.updateHash(hash);
|
||||
addModulesToHash(modules);
|
||||
} else {
|
||||
hash.update(this.getModuleGraphHash(modules, runtime, false));
|
||||
addModuleToHash(modules);
|
||||
}
|
||||
}
|
||||
hash.update(graphHash);
|
||||
|
|
|
|||
|
|
@ -1375,84 +1375,114 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|||
* @returns {void}
|
||||
*/
|
||||
_processModuleDependencies(module, callback) {
|
||||
const dependencies = new Map();
|
||||
|
||||
/**
|
||||
* @type {Array<{factory: ModuleFactory, dependencies: Dependency[], originModule: Module|null}>}
|
||||
*/
|
||||
const sortedDependencies = [];
|
||||
|
||||
let currentBlock = module;
|
||||
/** @type {DependenciesBlock} */
|
||||
let currentBlock;
|
||||
|
||||
/** @type {Map<ModuleFactory, Map<string, Dependency[]>>} */
|
||||
let dependencies;
|
||||
/** @type {DepConstructor} */
|
||||
let factoryCacheKey;
|
||||
/** @type {ModuleFactory} */
|
||||
let factoryCacheKey2;
|
||||
/** @type {Map<string, Dependency[]>} */
|
||||
let factoryCacheValue;
|
||||
let factoryCacheValue2;
|
||||
let listCacheKey;
|
||||
/** @type {string} */
|
||||
let listCacheKey1;
|
||||
/** @type {string} */
|
||||
let listCacheKey2;
|
||||
/** @type {Dependency[]} */
|
||||
let listCacheValue;
|
||||
|
||||
/**
|
||||
* @param {Dependency} dep dependency
|
||||
* @returns {void}
|
||||
*/
|
||||
const processDependency = dep => {
|
||||
this.moduleGraph.setParents(dep, currentBlock, module);
|
||||
const resourceIdent = dep.getResourceIdentifier();
|
||||
if (resourceIdent) {
|
||||
// Here webpack is using heuristic that assumes
|
||||
// mostly esm dependencies would be used
|
||||
// so we don't allocate extra string for them
|
||||
if (resourceIdent !== undefined && resourceIdent !== null) {
|
||||
const category = dep.category;
|
||||
const cacheKey =
|
||||
category === esmDependencyCategory
|
||||
? resourceIdent
|
||||
: `${category}${resourceIdent}`;
|
||||
const constructor = dep.constructor;
|
||||
let innerMap;
|
||||
let factory;
|
||||
const constructor = /** @type {DepConstructor} */ (dep.constructor);
|
||||
if (factoryCacheKey === constructor) {
|
||||
innerMap = factoryCacheValue;
|
||||
if (listCacheKey === cacheKey) {
|
||||
// Fast path 1: same constructor as prev item
|
||||
if (listCacheKey1 === category && listCacheKey2 === resourceIdent) {
|
||||
// Super fast path 1: also same resource
|
||||
listCacheValue.push(dep);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
factory = this.dependencyFactories.get(dep.constructor);
|
||||
const factory = this.dependencyFactories.get(constructor);
|
||||
if (factory === undefined) {
|
||||
throw new Error(
|
||||
`No module factory available for dependency type: ${dep.constructor.name}`
|
||||
`No module factory available for dependency type: ${constructor.name}`
|
||||
);
|
||||
}
|
||||
innerMap = dependencies.get(factory);
|
||||
if (innerMap === undefined) {
|
||||
dependencies.set(factory, (innerMap = new Map()));
|
||||
if (factoryCacheKey2 === factory) {
|
||||
// Fast path 2: same factory as prev item
|
||||
factoryCacheKey = constructor;
|
||||
if (listCacheKey1 === category && listCacheKey2 === resourceIdent) {
|
||||
// Super fast path 2: also same resource
|
||||
listCacheValue.push(dep);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// Slow path
|
||||
if (factoryCacheKey2 !== undefined) {
|
||||
// Archive last cache entry
|
||||
if (dependencies === undefined) dependencies = new Map();
|
||||
dependencies.set(factoryCacheKey2, factoryCacheValue);
|
||||
factoryCacheValue = dependencies.get(factory);
|
||||
if (factoryCacheValue === undefined) {
|
||||
factoryCacheValue = new Map();
|
||||
}
|
||||
} else {
|
||||
factoryCacheValue = new Map();
|
||||
}
|
||||
factoryCacheKey = constructor;
|
||||
factoryCacheKey2 = factory;
|
||||
}
|
||||
factoryCacheKey = constructor;
|
||||
factoryCacheValue = innerMap;
|
||||
factoryCacheValue2 = factory;
|
||||
}
|
||||
let list = innerMap.get(cacheKey);
|
||||
// Here webpack is using heuristic that assumes
|
||||
// mostly esm dependencies would be used
|
||||
// so we don't allocate extra string for them
|
||||
const cacheKey =
|
||||
category === esmDependencyCategory
|
||||
? resourceIdent
|
||||
: `${category}${resourceIdent}`;
|
||||
let list = factoryCacheValue.get(cacheKey);
|
||||
if (list === undefined) {
|
||||
innerMap.set(cacheKey, (list = []));
|
||||
factoryCacheValue.set(cacheKey, (list = []));
|
||||
sortedDependencies.push({
|
||||
factory: factoryCacheValue2,
|
||||
factory: factoryCacheKey2,
|
||||
dependencies: list,
|
||||
originModule: module
|
||||
});
|
||||
}
|
||||
list.push(dep);
|
||||
listCacheKey = cacheKey;
|
||||
listCacheKey1 = category;
|
||||
listCacheKey2 = resourceIdent;
|
||||
listCacheValue = list;
|
||||
}
|
||||
};
|
||||
|
||||
const processDependenciesBlock = block => {
|
||||
if (block.dependencies) {
|
||||
currentBlock = block;
|
||||
for (const dep of block.dependencies) processDependency(dep);
|
||||
}
|
||||
if (block.blocks) {
|
||||
for (const b of block.blocks) processDependenciesBlock(b);
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
processDependenciesBlock(module);
|
||||
/** @type {DependenciesBlock[]} */
|
||||
const queue = [module];
|
||||
do {
|
||||
const block = queue.pop();
|
||||
if (block.dependencies) {
|
||||
currentBlock = block;
|
||||
for (const dep of block.dependencies) processDependency(dep);
|
||||
}
|
||||
if (block.blocks) {
|
||||
for (const b of block.blocks) queue.push(b);
|
||||
}
|
||||
} while (queue.length !== 0);
|
||||
} catch (e) {
|
||||
return callback(e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -263,6 +263,8 @@ class Compiler {
|
|||
this._assetEmittingSourceCache = new WeakMap();
|
||||
/** @private @type {Map<string, number>} */
|
||||
this._assetEmittingWrittenFiles = new Map();
|
||||
/** @private @type {Set<string>} */
|
||||
this._assetEmittingPreviousFiles = new Set();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -556,6 +558,8 @@ class Compiler {
|
|||
compilation.assets = { ...compilation.assets };
|
||||
/** @type {Map<string, { path: string, source: Source, size: number, waiting: { cacheEntry: any, file: string }[] }>} */
|
||||
const caseInsensitiveMap = new Map();
|
||||
/** @type {Set<string>} */
|
||||
const allTargetPaths = new Set();
|
||||
asyncLib.forEachLimit(
|
||||
assets,
|
||||
15,
|
||||
|
|
@ -583,6 +587,7 @@ class Compiler {
|
|||
outputPath,
|
||||
targetFile
|
||||
);
|
||||
allTargetPaths.add(targetPath);
|
||||
|
||||
// check if the target file has already been written by this Compiler
|
||||
const targetFileGeneration = this._assetEmittingWrittenFiles.get(
|
||||
|
|
@ -775,18 +780,22 @@ ${other}`);
|
|||
// check if the Source has been written to this target file
|
||||
const writtenGeneration = cacheEntry.writtenTo.get(targetPath);
|
||||
if (writtenGeneration === targetFileGeneration) {
|
||||
// if yes, we skip writing the file
|
||||
// as it's already there
|
||||
// (we assume one doesn't remove files while the Compiler is running)
|
||||
// if yes, we may skip writing the file
|
||||
// if it's already there
|
||||
// (we assume one doesn't modify files while the Compiler is running, other then removing them)
|
||||
|
||||
compilation.updateAsset(file, cacheEntry.sizeOnlySource, {
|
||||
size: cacheEntry.sizeOnlySource.size()
|
||||
});
|
||||
if (this._assetEmittingPreviousFiles.has(targetPath)) {
|
||||
// We assume that assets from the last compilation say intact on disk (they are not removed)
|
||||
compilation.updateAsset(file, cacheEntry.sizeOnlySource, {
|
||||
size: cacheEntry.sizeOnlySource.size()
|
||||
});
|
||||
|
||||
return callback();
|
||||
}
|
||||
|
||||
if (!immutable) {
|
||||
return callback();
|
||||
} else {
|
||||
// Settings immutable will make it accept file content without comparing when file exist
|
||||
immutable = true;
|
||||
}
|
||||
} else if (!immutable) {
|
||||
if (checkSimilarFile()) return;
|
||||
// We wrote to this file before which has very likely a different content
|
||||
// skip comparing and assume content is different for performance
|
||||
|
|
@ -822,7 +831,12 @@ ${other}`);
|
|||
err => {
|
||||
// Clear map to free up memory
|
||||
caseInsensitiveMap.clear();
|
||||
if (err) return callback(err);
|
||||
if (err) {
|
||||
this._assetEmittingPreviousFiles.clear();
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
this._assetEmittingPreviousFiles = allTargetPaths;
|
||||
|
||||
this.hooks.afterEmit.callAsync(compilation, err => {
|
||||
if (err) return callback(err);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ const { AsyncSeriesWaterfallHook, SyncWaterfallHook } = require("tapable");
|
|||
const ContextModule = require("./ContextModule");
|
||||
const ModuleFactory = require("./ModuleFactory");
|
||||
const ContextElementDependency = require("./dependencies/ContextElementDependency");
|
||||
const LazySet = require("./util/LazySet");
|
||||
const { cachedSetProperty } = require("./util/cleverMerge");
|
||||
const { createFakeHook } = require("./util/deprecation");
|
||||
const { join } = require("./util/fs");
|
||||
|
|
@ -87,9 +88,9 @@ module.exports = class ContextModuleFactory extends ModuleFactory {
|
|||
const dependencies = data.dependencies;
|
||||
const resolveOptions = data.resolveOptions;
|
||||
const dependency = /** @type {ContextDependency} */ (dependencies[0]);
|
||||
const fileDependencies = new Set();
|
||||
const missingDependencies = new Set();
|
||||
const contextDependencies = new Set();
|
||||
const fileDependencies = new LazySet();
|
||||
const missingDependencies = new LazySet();
|
||||
const contextDependencies = new LazySet();
|
||||
this.hooks.beforeResolve.callAsync(
|
||||
{
|
||||
context: context,
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ const memoize = require("./util/memoize");
|
|||
|
||||
/** @typedef {import("webpack-sources").Source} Source */
|
||||
/** @typedef {import("./ChunkGraph")} ChunkGraph */
|
||||
/** @typedef {import("./DependenciesBlock")} DependenciesBlock */
|
||||
/** @typedef {import("./DependencyTemplates")} DependencyTemplates */
|
||||
/** @typedef {import("./Module")} Module */
|
||||
/** @typedef {import("./ModuleGraph")} ModuleGraph */
|
||||
|
|
@ -84,14 +85,23 @@ const getIgnoredModule = memoize(() => {
|
|||
|
||||
class Dependency {
|
||||
constructor() {
|
||||
/** @type {Module} */
|
||||
this._parentModule = undefined;
|
||||
/** @type {DependenciesBlock} */
|
||||
this._parentDependenciesBlock = undefined;
|
||||
// TODO check if this can be moved into ModuleDependency
|
||||
/** @type {boolean} */
|
||||
this.weak = false;
|
||||
// TODO check if this can be moved into ModuleDependency
|
||||
/** @type {boolean} */
|
||||
this.optional = false;
|
||||
/** @type {DependencyLocation} */
|
||||
this.loc = undefined;
|
||||
this._locSL = 0;
|
||||
this._locSC = 0;
|
||||
this._locEL = 0;
|
||||
this._locEC = 0;
|
||||
this._locI = undefined;
|
||||
this._locN = undefined;
|
||||
this._loc = undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -108,6 +118,56 @@ class Dependency {
|
|||
return "unknown";
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {DependencyLocation} location
|
||||
*/
|
||||
get loc() {
|
||||
if (this._loc !== undefined) return this._loc;
|
||||
/** @type {SyntheticDependencyLocation & RealDependencyLocation} */
|
||||
const loc = {};
|
||||
if (this._locSL > 0) {
|
||||
loc.start = { line: this._locSL, column: this._locSC };
|
||||
}
|
||||
if (this._locEL > 0) {
|
||||
loc.end = { line: this._locEL, column: this._locEC };
|
||||
}
|
||||
if (this._locN !== undefined) {
|
||||
loc.name = this._locN;
|
||||
}
|
||||
if (this._locI !== undefined) {
|
||||
loc.index = this._locI;
|
||||
}
|
||||
return (this._loc = loc);
|
||||
}
|
||||
|
||||
set loc(loc) {
|
||||
if ("start" in loc && typeof loc.start === "object") {
|
||||
this._locSL = loc.start.line || 0;
|
||||
this._locSC = loc.start.column || 0;
|
||||
} else {
|
||||
this._locSL = 0;
|
||||
this._locSC = 0;
|
||||
}
|
||||
if ("end" in loc && typeof loc.end === "object") {
|
||||
this._locEL = loc.end.line || 0;
|
||||
this._locEC = loc.end.column || 0;
|
||||
} else {
|
||||
this._locEL = 0;
|
||||
this._locEC = 0;
|
||||
}
|
||||
if ("index" in loc) {
|
||||
this._locI = loc.index;
|
||||
} else {
|
||||
this._locI = undefined;
|
||||
}
|
||||
if ("name" in loc) {
|
||||
this._locN = loc.name;
|
||||
} else {
|
||||
this._locN = undefined;
|
||||
}
|
||||
this._loc = loc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string | null} an identifier to merge equal requests
|
||||
*/
|
||||
|
|
@ -207,13 +267,23 @@ class Dependency {
|
|||
serialize({ write }) {
|
||||
write(this.weak);
|
||||
write(this.optional);
|
||||
write(this.loc);
|
||||
write(this._locSL);
|
||||
write(this._locSC);
|
||||
write(this._locEL);
|
||||
write(this._locEC);
|
||||
write(this._locI);
|
||||
write(this._locN);
|
||||
}
|
||||
|
||||
deserialize({ read }) {
|
||||
this.weak = read();
|
||||
this.optional = read();
|
||||
this.loc = read();
|
||||
this._locSL = read();
|
||||
this._locSC = read();
|
||||
this._locEL = read();
|
||||
this._locEC = read();
|
||||
this._locI = read();
|
||||
this._locN = read();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1472,7 +1472,7 @@ class FileSystemInfo {
|
|||
}
|
||||
} else if (supportsEsm && /\.m?js$/.test(path)) {
|
||||
if (!this._warnAboutExperimentalEsmTracking) {
|
||||
this.logger.info(
|
||||
this.logger.log(
|
||||
"Node.js doesn't offer a (nice) way to introspect the ESM dependency graph yet.\n" +
|
||||
"Until a full solution is available webpack uses an experimental ESM tracking based on parsing.\n" +
|
||||
"As best effort webpack parses the ESM files to guess dependencies. But this can lead to expensive and incorrect tracking."
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ class FlagDependencyExportsPlugin {
|
|||
"webpack.FlagDependencyExportsPlugin"
|
||||
);
|
||||
let statRestoredFromCache = 0;
|
||||
let statNoExports = 0;
|
||||
let statFlaggedUncached = 0;
|
||||
let statNotCached = 0;
|
||||
let statQueueItemsProcessed = 0;
|
||||
|
|
@ -47,6 +48,16 @@ class FlagDependencyExportsPlugin {
|
|||
asyncLib.each(
|
||||
modules,
|
||||
(module, callback) => {
|
||||
const exportsInfo = moduleGraph.getExportsInfo(module);
|
||||
if (!module.buildMeta || !module.buildMeta.exportsType) {
|
||||
if (exportsInfo.otherExportsInfo.provided !== null) {
|
||||
// It's a module without declared exports
|
||||
statNoExports++;
|
||||
exportsInfo.setHasProvideInfo();
|
||||
exportsInfo.setUnknownExportsProvided();
|
||||
return callback();
|
||||
}
|
||||
}
|
||||
if (
|
||||
module.buildInfo.cacheable !== true ||
|
||||
typeof module.buildInfo.hash !== "string"
|
||||
|
|
@ -54,7 +65,7 @@ class FlagDependencyExportsPlugin {
|
|||
statFlaggedUncached++;
|
||||
// Enqueue uncacheable module for determining the exports
|
||||
queue.enqueue(module);
|
||||
moduleGraph.getExportsInfo(module).setHasProvideInfo();
|
||||
exportsInfo.setHasProvideInfo();
|
||||
return callback();
|
||||
}
|
||||
cache.get(
|
||||
|
|
@ -72,7 +83,7 @@ class FlagDependencyExportsPlugin {
|
|||
statNotCached++;
|
||||
// Without cached info enqueue module for determining the exports
|
||||
queue.enqueue(module);
|
||||
moduleGraph.getExportsInfo(module).setHasProvideInfo();
|
||||
exportsInfo.setHasProvideInfo();
|
||||
}
|
||||
callback();
|
||||
}
|
||||
|
|
@ -300,49 +311,39 @@ class FlagDependencyExportsPlugin {
|
|||
statQueueItemsProcessed++;
|
||||
|
||||
exportsInfo = moduleGraph.getExportsInfo(module);
|
||||
if (!module.buildMeta || !module.buildMeta.exportsType) {
|
||||
if (exportsInfo.otherExportsInfo.provided !== null) {
|
||||
// It's a module without declared exports
|
||||
exportsInfo.setUnknownExportsProvided();
|
||||
modulesToStore.add(module);
|
||||
notifyDependencies();
|
||||
}
|
||||
} else {
|
||||
// It's a module with declared exports
|
||||
|
||||
cacheable = true;
|
||||
changed = false;
|
||||
cacheable = true;
|
||||
changed = false;
|
||||
|
||||
exportsSpecsFromDependencies.clear();
|
||||
moduleGraph.freeze();
|
||||
processDependenciesBlock(module);
|
||||
moduleGraph.unfreeze();
|
||||
for (const [
|
||||
dep,
|
||||
exportsSpec
|
||||
] of exportsSpecsFromDependencies) {
|
||||
processExportsSpec(dep, exportsSpec);
|
||||
}
|
||||
exportsSpecsFromDependencies.clear();
|
||||
moduleGraph.freeze();
|
||||
processDependenciesBlock(module);
|
||||
moduleGraph.unfreeze();
|
||||
for (const [
|
||||
dep,
|
||||
exportsSpec
|
||||
] of exportsSpecsFromDependencies) {
|
||||
processExportsSpec(dep, exportsSpec);
|
||||
}
|
||||
|
||||
if (cacheable) {
|
||||
modulesToStore.add(module);
|
||||
}
|
||||
if (cacheable) {
|
||||
modulesToStore.add(module);
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
notifyDependencies();
|
||||
}
|
||||
if (changed) {
|
||||
notifyDependencies();
|
||||
}
|
||||
}
|
||||
logger.timeEnd("figure out provided exports");
|
||||
|
||||
logger.log(
|
||||
`${Math.round(
|
||||
100 -
|
||||
(100 * statRestoredFromCache) /
|
||||
(statRestoredFromCache +
|
||||
statNotCached +
|
||||
statFlaggedUncached)
|
||||
)}% of exports of modules have been determined (${statNotCached} not cached, ${statFlaggedUncached} flagged uncacheable, ${statRestoredFromCache} from cache, ${
|
||||
(100 * (statFlaggedUncached + statNotCached)) /
|
||||
(statRestoredFromCache +
|
||||
statNotCached +
|
||||
statFlaggedUncached +
|
||||
statNoExports)
|
||||
)}% of exports of modules have been determined (${statNoExports} no declared exports, ${statNotCached} not cached, ${statFlaggedUncached} flagged uncacheable, ${statRestoredFromCache} from cache, ${
|
||||
statQueueItemsProcessed -
|
||||
statNotCached -
|
||||
statFlaggedUncached
|
||||
|
|
|
|||
|
|
@ -73,13 +73,25 @@ class InitFragment {
|
|||
// Deduplicate fragments. If a fragment has no key, it is always included.
|
||||
const keyedFragments = new Map();
|
||||
for (const [fragment] of sortedFragments) {
|
||||
if (typeof fragment.merge === "function") {
|
||||
if (typeof fragment.mergeAll === "function") {
|
||||
if (!fragment.key) {
|
||||
throw new Error(
|
||||
`InitFragment with mergeAll function must have a valid key: ${fragment.constructor.name}`
|
||||
);
|
||||
}
|
||||
const oldValue = keyedFragments.get(fragment.key);
|
||||
if (oldValue === undefined) {
|
||||
keyedFragments.set(fragment.key, fragment);
|
||||
} else if (Array.isArray(oldValue)) {
|
||||
oldValue.push(fragment);
|
||||
} else {
|
||||
keyedFragments.set(fragment.key, [oldValue, fragment]);
|
||||
}
|
||||
continue;
|
||||
} else if (typeof fragment.merge === "function") {
|
||||
const oldValue = keyedFragments.get(fragment.key);
|
||||
if (oldValue !== undefined) {
|
||||
keyedFragments.set(
|
||||
fragment.key || Symbol(),
|
||||
fragment.merge(oldValue)
|
||||
);
|
||||
keyedFragments.set(fragment.key, fragment.merge(oldValue));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
@ -88,7 +100,10 @@ class InitFragment {
|
|||
|
||||
const concatSource = new ConcatSource();
|
||||
const endContents = [];
|
||||
for (const fragment of keyedFragments.values()) {
|
||||
for (let fragment of keyedFragments.values()) {
|
||||
if (Array.isArray(fragment)) {
|
||||
fragment = fragment[0].mergeAll(fragment);
|
||||
}
|
||||
concatSource.add(fragment.getContent(generateContext));
|
||||
const endContent = fragment.getEndContent(generateContext);
|
||||
if (endContent) {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ const WeakTupleMap = require("./util/WeakTupleMap");
|
|||
* @returns {string}
|
||||
*/
|
||||
|
||||
const EMPTY_ARRAY = [];
|
||||
const EMPTY_SET = new Set();
|
||||
|
||||
/**
|
||||
* @param {SortableSet<ModuleGraphConnection>} set input
|
||||
|
|
@ -82,20 +82,9 @@ class ModuleGraphModule {
|
|||
}
|
||||
}
|
||||
|
||||
class ModuleGraphDependency {
|
||||
constructor() {
|
||||
/** @type {ModuleGraphConnection} */
|
||||
this.connection = undefined;
|
||||
/** @type {Module} */
|
||||
this.parentModule = undefined;
|
||||
/** @type {DependenciesBlock} */
|
||||
this.parentBlock = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
class ModuleGraph {
|
||||
constructor() {
|
||||
/** @type {Map<Dependency, ModuleGraphDependency>} */
|
||||
/** @type {Map<Dependency, ModuleGraphConnection>} */
|
||||
this._dependencyMap = new Map();
|
||||
/** @type {Map<Module, ModuleGraphModule>} */
|
||||
this._moduleMap = new Map();
|
||||
|
|
@ -137,23 +126,6 @@ class ModuleGraph {
|
|||
return mgm;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Dependency} dependency the dependency
|
||||
* @returns {ModuleGraphDependency} the internal dependency
|
||||
*/
|
||||
_getModuleGraphDependency(dependency) {
|
||||
if (this._cacheModuleGraphDependencyKey === dependency)
|
||||
return this._cacheModuleGraphDependencyValue;
|
||||
let mgd = this._dependencyMap.get(dependency);
|
||||
if (mgd === undefined) {
|
||||
mgd = new ModuleGraphDependency();
|
||||
this._dependencyMap.set(dependency, mgd);
|
||||
}
|
||||
this._cacheModuleGraphDependencyKey = dependency;
|
||||
this._cacheModuleGraphDependencyValue = mgd;
|
||||
return mgd;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Dependency} dependency the dependency
|
||||
* @param {DependenciesBlock} block parent block
|
||||
|
|
@ -161,9 +133,8 @@ class ModuleGraph {
|
|||
* @returns {void}
|
||||
*/
|
||||
setParents(dependency, block, module) {
|
||||
const mgd = this._getModuleGraphDependency(dependency);
|
||||
mgd.parentBlock = block;
|
||||
mgd.parentModule = module;
|
||||
dependency._parentDependenciesBlock = block;
|
||||
dependency._parentModule = module;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -171,8 +142,7 @@ class ModuleGraph {
|
|||
* @returns {Module} parent module
|
||||
*/
|
||||
getParentModule(dependency) {
|
||||
const mgd = this._getModuleGraphDependency(dependency);
|
||||
return mgd.parentModule;
|
||||
return dependency._parentModule;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -180,8 +150,7 @@ class ModuleGraph {
|
|||
* @returns {DependenciesBlock} parent block
|
||||
*/
|
||||
getParentBlock(dependency) {
|
||||
const mgd = this._getModuleGraphDependency(dependency);
|
||||
return mgd.parentBlock;
|
||||
return dependency._parentDependenciesBlock;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -199,8 +168,7 @@ class ModuleGraph {
|
|||
dependency.weak,
|
||||
dependency.getCondition(this)
|
||||
);
|
||||
const mgd = this._getModuleGraphDependency(dependency);
|
||||
mgd.connection = connection;
|
||||
this._dependencyMap.set(dependency, connection);
|
||||
const connections = this._getModuleGraphModule(module).incomingConnections;
|
||||
connections.add(connection);
|
||||
const mgm = this._getModuleGraphModule(originModule);
|
||||
|
|
@ -216,12 +184,11 @@ class ModuleGraph {
|
|||
* @returns {void}
|
||||
*/
|
||||
updateModule(dependency, module) {
|
||||
const mgd = this._getModuleGraphDependency(dependency);
|
||||
if (mgd.connection.module === module) return;
|
||||
const { connection } = mgd;
|
||||
const connection = this._dependencyMap.get(dependency);
|
||||
if (connection.module === module) return;
|
||||
const newConnection = connection.clone();
|
||||
newConnection.module = module;
|
||||
mgd.connection = newConnection;
|
||||
this._dependencyMap.set(dependency, newConnection);
|
||||
connection.setActive(false);
|
||||
const originMgm = this._getModuleGraphModule(connection.originModule);
|
||||
originMgm.outgoingConnections.add(newConnection);
|
||||
|
|
@ -234,13 +201,12 @@ class ModuleGraph {
|
|||
* @returns {void}
|
||||
*/
|
||||
removeConnection(dependency) {
|
||||
const mgd = this._getModuleGraphDependency(dependency);
|
||||
const { connection } = mgd;
|
||||
const connection = this._dependencyMap.get(dependency);
|
||||
const targetMgm = this._getModuleGraphModule(connection.module);
|
||||
targetMgm.incomingConnections.delete(connection);
|
||||
const originMgm = this._getModuleGraphModule(connection.originModule);
|
||||
originMgm.outgoingConnections.delete(connection);
|
||||
mgd.connection = undefined;
|
||||
this._dependencyMap.delete(dependency);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -249,7 +215,7 @@ class ModuleGraph {
|
|||
* @returns {void}
|
||||
*/
|
||||
addExplanation(dependency, explanation) {
|
||||
const { connection } = this._getModuleGraphDependency(dependency);
|
||||
const connection = this._dependencyMap.get(dependency);
|
||||
connection.addExplanation(explanation);
|
||||
}
|
||||
|
||||
|
|
@ -375,7 +341,7 @@ class ModuleGraph {
|
|||
* @returns {Module} the referenced module
|
||||
*/
|
||||
getResolvedModule(dependency) {
|
||||
const { connection } = this._getModuleGraphDependency(dependency);
|
||||
const connection = this._dependencyMap.get(dependency);
|
||||
return connection !== undefined ? connection.resolvedModule : null;
|
||||
}
|
||||
|
||||
|
|
@ -384,7 +350,7 @@ class ModuleGraph {
|
|||
* @returns {ModuleGraphConnection | undefined} the connection
|
||||
*/
|
||||
getConnection(dependency) {
|
||||
const { connection } = this._getModuleGraphDependency(dependency);
|
||||
const connection = this._dependencyMap.get(dependency);
|
||||
return connection;
|
||||
}
|
||||
|
||||
|
|
@ -393,7 +359,7 @@ class ModuleGraph {
|
|||
* @returns {Module} the referenced module
|
||||
*/
|
||||
getModule(dependency) {
|
||||
const { connection } = this._getModuleGraphDependency(dependency);
|
||||
const connection = this._dependencyMap.get(dependency);
|
||||
return connection !== undefined ? connection.module : null;
|
||||
}
|
||||
|
||||
|
|
@ -402,7 +368,7 @@ class ModuleGraph {
|
|||
* @returns {Module} the referencing module
|
||||
*/
|
||||
getOrigin(dependency) {
|
||||
const { connection } = this._getModuleGraphDependency(dependency);
|
||||
const connection = this._dependencyMap.get(dependency);
|
||||
return connection !== undefined ? connection.originModule : null;
|
||||
}
|
||||
|
||||
|
|
@ -411,7 +377,7 @@ class ModuleGraph {
|
|||
* @returns {Module} the original referencing module
|
||||
*/
|
||||
getResolvedOrigin(dependency) {
|
||||
const { connection } = this._getModuleGraphDependency(dependency);
|
||||
const connection = this._dependencyMap.get(dependency);
|
||||
return connection !== undefined ? connection.resolvedOriginModule : null;
|
||||
}
|
||||
|
||||
|
|
@ -430,7 +396,7 @@ class ModuleGraph {
|
|||
*/
|
||||
getOutgoingConnections(module) {
|
||||
const connections = this._getModuleGraphModule(module).outgoingConnections;
|
||||
return connections === undefined ? EMPTY_ARRAY : connections;
|
||||
return connections === undefined ? EMPTY_SET : connections;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -520,29 +520,33 @@ class NormalModuleFactory extends ModuleFactory {
|
|||
)
|
||||
);
|
||||
}
|
||||
Object.assign(data.createData, {
|
||||
layer:
|
||||
layer === undefined ? contextInfo.issuerLayer || null : layer,
|
||||
request: stringifyLoadersAndResource(
|
||||
allLoaders,
|
||||
resourceData.resource
|
||||
),
|
||||
userRequest,
|
||||
rawRequest: request,
|
||||
loaders: allLoaders,
|
||||
resource: resourceData.resource,
|
||||
matchResource: matchResourceData
|
||||
? matchResourceData.resource
|
||||
: undefined,
|
||||
resourceResolveData: resourceData.data,
|
||||
settings,
|
||||
type,
|
||||
parser: this.getParser(type, settings.parser),
|
||||
parserOptions: settings.parser,
|
||||
generator: this.getGenerator(type, settings.generator),
|
||||
generatorOptions: settings.generator,
|
||||
resolveOptions
|
||||
});
|
||||
try {
|
||||
Object.assign(data.createData, {
|
||||
layer:
|
||||
layer === undefined ? contextInfo.issuerLayer || null : layer,
|
||||
request: stringifyLoadersAndResource(
|
||||
allLoaders,
|
||||
resourceData.resource
|
||||
),
|
||||
userRequest,
|
||||
rawRequest: request,
|
||||
loaders: allLoaders,
|
||||
resource: resourceData.resource,
|
||||
matchResource: matchResourceData
|
||||
? matchResourceData.resource
|
||||
: undefined,
|
||||
resourceResolveData: resourceData.data,
|
||||
settings,
|
||||
type,
|
||||
parser: this.getParser(type, settings.parser),
|
||||
parserOptions: settings.parser,
|
||||
generator: this.getGenerator(type, settings.generator),
|
||||
generatorOptions: settings.generator,
|
||||
resolveOptions
|
||||
});
|
||||
} catch (e) {
|
||||
return callback(e);
|
||||
}
|
||||
callback();
|
||||
});
|
||||
this.resolveRequestArray(
|
||||
|
|
|
|||
|
|
@ -569,6 +569,7 @@ class WebpackOptionsApply extends OptionsApply {
|
|||
),
|
||||
snapshot: options.snapshot,
|
||||
maxAge: cacheOptions.maxAge,
|
||||
profile: cacheOptions.profile,
|
||||
allowCollectingMemory: cacheOptions.allowCollectingMemory
|
||||
}),
|
||||
cacheOptions.idleTimeout,
|
||||
|
|
|
|||
|
|
@ -997,10 +997,15 @@ const visitModules = (
|
|||
};
|
||||
|
||||
const processChunkGroupsForCombining = () => {
|
||||
loop: for (const info of chunkGroupsForCombining) {
|
||||
for (const info of chunkGroupsForCombining) {
|
||||
for (const source of info.availableSources) {
|
||||
if (!source.minAvailableModules) continue loop;
|
||||
if (!source.minAvailableModules) {
|
||||
chunkGroupsForCombining.delete(info);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const info of chunkGroupsForCombining) {
|
||||
const availableModules = /** @type {ModuleSetPlus} */ (new Set());
|
||||
availableModules.plus = EMPTY_SET;
|
||||
const mergeSet = set => {
|
||||
|
|
|
|||
|
|
@ -561,7 +561,40 @@ class PackContentItems {
|
|||
this.map = map;
|
||||
}
|
||||
|
||||
serialize({ write, snapshot, rollback, logger }) {
|
||||
serialize({ write, snapshot, rollback, logger, profile }) {
|
||||
if (profile) {
|
||||
write(false);
|
||||
for (const [key, value] of this.map) {
|
||||
const s = snapshot();
|
||||
try {
|
||||
write(key);
|
||||
const start = process.hrtime();
|
||||
write(value);
|
||||
const durationHr = process.hrtime(start);
|
||||
const duration = durationHr[0] * 1000 + durationHr[1] / 1e6;
|
||||
if (duration > 1) {
|
||||
if (duration > 500)
|
||||
logger.error(`Serialization of '${key}': ${duration} ms`);
|
||||
else if (duration > 50)
|
||||
logger.warn(`Serialization of '${key}': ${duration} ms`);
|
||||
else if (duration > 10)
|
||||
logger.info(`Serialization of '${key}': ${duration} ms`);
|
||||
else if (duration > 5)
|
||||
logger.log(`Serialization of '${key}': ${duration} ms`);
|
||||
else logger.debug(`Serialization of '${key}': ${duration} ms`);
|
||||
}
|
||||
} catch (e) {
|
||||
rollback(s);
|
||||
if (e === NOT_SERIALIZABLE) continue;
|
||||
logger.warn(
|
||||
`Skipped not serializable cache item '${key}': ${e.message}`
|
||||
);
|
||||
logger.debug(e.stack);
|
||||
}
|
||||
}
|
||||
write(null);
|
||||
return;
|
||||
}
|
||||
// Try to serialize all at once
|
||||
const s = snapshot();
|
||||
try {
|
||||
|
|
@ -590,9 +623,32 @@ class PackContentItems {
|
|||
}
|
||||
}
|
||||
|
||||
deserialize({ read }) {
|
||||
deserialize({ read, logger, profile }) {
|
||||
if (read()) {
|
||||
this.map = read();
|
||||
} else if (profile) {
|
||||
const map = new Map();
|
||||
let key = read();
|
||||
while (key !== null) {
|
||||
const start = process.hrtime();
|
||||
const value = read();
|
||||
const durationHr = process.hrtime(start);
|
||||
const duration = durationHr[0] * 1000 + durationHr[1] / 1e6;
|
||||
if (duration > 1) {
|
||||
if (duration > 100)
|
||||
logger.error(`Deserialization of '${key}': ${duration} ms`);
|
||||
else if (duration > 20)
|
||||
logger.warn(`Deserialization of '${key}': ${duration} ms`);
|
||||
else if (duration > 5)
|
||||
logger.info(`Deserialization of '${key}': ${duration} ms`);
|
||||
else if (duration > 2)
|
||||
logger.log(`Deserialization of '${key}': ${duration} ms`);
|
||||
else logger.debug(`Deserialization of '${key}': ${duration} ms`);
|
||||
}
|
||||
map.set(key, value);
|
||||
key = read();
|
||||
}
|
||||
this.map = map;
|
||||
} else {
|
||||
const map = new Map();
|
||||
let key = read();
|
||||
|
|
@ -787,6 +843,7 @@ class PackFileCacheStrategy {
|
|||
* @param {Logger} options.logger a logger
|
||||
* @param {SnapshotOptions} options.snapshot options regarding snapshotting
|
||||
* @param {number} options.maxAge max age of cache items
|
||||
* @param {boolean} options.profile track and log detailed timing information for individual cache items
|
||||
* @param {boolean} options.allowCollectingMemory allow to collect unused memory created during deserialization
|
||||
*/
|
||||
constructor({
|
||||
|
|
@ -798,6 +855,7 @@ class PackFileCacheStrategy {
|
|||
logger,
|
||||
snapshot,
|
||||
maxAge,
|
||||
profile,
|
||||
allowCollectingMemory
|
||||
}) {
|
||||
this.fileSerializer = createFileSerializer(fs);
|
||||
|
|
@ -812,6 +870,7 @@ class PackFileCacheStrategy {
|
|||
this.version = version;
|
||||
this.logger = logger;
|
||||
this.maxAge = maxAge;
|
||||
this.profile = profile;
|
||||
this.allowCollectingMemory = allowCollectingMemory;
|
||||
this.snapshot = snapshot;
|
||||
/** @type {Set<string>} */
|
||||
|
|
@ -840,7 +899,7 @@ class PackFileCacheStrategy {
|
|||
* @returns {Promise<Pack>} the pack
|
||||
*/
|
||||
_openPack() {
|
||||
const { logger, cacheLocation, version } = this;
|
||||
const { logger, profile, cacheLocation, version } = this;
|
||||
/** @type {Snapshot} */
|
||||
let buildSnapshot;
|
||||
/** @type {Set<string>} */
|
||||
|
|
@ -857,6 +916,7 @@ class PackFileCacheStrategy {
|
|||
filename: `${cacheLocation}/index.pack`,
|
||||
extension: ".pack",
|
||||
logger,
|
||||
profile,
|
||||
retainedBuffer: this.allowCollectingMemory
|
||||
? allowCollectingMemory
|
||||
: undefined
|
||||
|
|
@ -1172,7 +1232,8 @@ class PackFileCacheStrategy {
|
|||
.serialize(content, {
|
||||
filename: `${this.cacheLocation}/index.pack`,
|
||||
extension: ".pack",
|
||||
logger: this.logger
|
||||
logger: this.logger,
|
||||
profile: this.profile
|
||||
})
|
||||
.then(() => {
|
||||
for (const dep of newBuildDependencies) {
|
||||
|
|
|
|||
|
|
@ -293,6 +293,7 @@ const applyCacheDefaults = (cache, { name, mode, development }) => {
|
|||
);
|
||||
D(cache, "hashAlgorithm", "md4");
|
||||
D(cache, "store", "pack");
|
||||
D(cache, "profile", false);
|
||||
D(cache, "idleTimeout", 60000);
|
||||
D(cache, "idleTimeoutForInitialStore", 0);
|
||||
D(cache, "maxMemoryGenerations", development ? 5 : Infinity);
|
||||
|
|
@ -948,7 +949,7 @@ const applyOptimizationDefaults = (
|
|||
A(splitChunks, "defaultSizeTypes", () => ["javascript", "unknown"]);
|
||||
D(splitChunks, "hidePathInfo", production);
|
||||
D(splitChunks, "chunks", "async");
|
||||
D(splitChunks, "usedExports", true);
|
||||
D(splitChunks, "usedExports", optimization.usedExports === true);
|
||||
D(splitChunks, "minChunks", 1);
|
||||
F(splitChunks, "minSize", () => (production ? 20000 : 10000));
|
||||
F(splitChunks, "minRemainingSize", () => (development ? 0 : undefined));
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ const getNormalizedWebpackOptions = config => {
|
|||
type: "filesystem",
|
||||
maxMemoryGenerations: cache.maxMemoryGenerations,
|
||||
maxAge: cache.maxAge,
|
||||
profile: cache.profile,
|
||||
buildDependencies: cloneObject(cache.buildDependencies),
|
||||
cacheDirectory: cache.cacheDirectory,
|
||||
cacheLocation: cache.cacheLocation,
|
||||
|
|
|
|||
|
|
@ -48,6 +48,53 @@ class HarmonyExportInitFragment extends InitFragment {
|
|||
this.unusedExports = unusedExports;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {HarmonyExportInitFragment[]} fragments all fragments to merge
|
||||
* @returns {HarmonyExportInitFragment} merged fragment
|
||||
*/
|
||||
mergeAll(fragments) {
|
||||
let exportMap;
|
||||
let exportMapOwned = false;
|
||||
let unusedExports;
|
||||
let unusedExportsOwned = false;
|
||||
|
||||
for (const fragment of fragments) {
|
||||
if (fragment.exportMap.size !== 0) {
|
||||
if (exportMap === undefined) {
|
||||
exportMap = fragment.exportMap;
|
||||
exportMapOwned = false;
|
||||
} else {
|
||||
if (!exportMapOwned) {
|
||||
exportMap = new Map(exportMap);
|
||||
exportMapOwned = true;
|
||||
}
|
||||
for (const [key, value] of fragment.exportMap) {
|
||||
if (!exportMap.has(key)) exportMap.set(key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fragment.unusedExports.size !== 0) {
|
||||
if (unusedExports === undefined) {
|
||||
unusedExports = fragment.unusedExports;
|
||||
unusedExportsOwned = false;
|
||||
} else {
|
||||
if (!unusedExportsOwned) {
|
||||
unusedExports = new Set(unusedExports);
|
||||
unusedExportsOwned = true;
|
||||
}
|
||||
for (const value of fragment.unusedExports) {
|
||||
unusedExports.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return new HarmonyExportInitFragment(
|
||||
this.exportsArgument,
|
||||
exportMap,
|
||||
unusedExports
|
||||
);
|
||||
}
|
||||
|
||||
merge(other) {
|
||||
let exportMap;
|
||||
if (this.exportMap.size === 0) {
|
||||
|
|
|
|||
|
|
@ -19,14 +19,6 @@ class NullDependency extends Dependency {
|
|||
get type() {
|
||||
return "null";
|
||||
}
|
||||
|
||||
serialize({ write }) {
|
||||
write(this.loc);
|
||||
}
|
||||
|
||||
deserialize({ read }) {
|
||||
this.loc = read();
|
||||
}
|
||||
}
|
||||
|
||||
NullDependency.Template = class NullDependencyTemplate extends (
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ const { pathToFileURL } = require("url");
|
|||
const AsyncDependenciesBlock = require("../AsyncDependenciesBlock");
|
||||
const CommentCompilationWarning = require("../CommentCompilationWarning");
|
||||
const UnsupportedFeatureWarning = require("../UnsupportedFeatureWarning");
|
||||
const formatLocation = require("../formatLocation");
|
||||
const EnableChunkLoadingPlugin = require("../javascript/EnableChunkLoadingPlugin");
|
||||
const { equals } = require("../util/ArrayHelpers");
|
||||
const createHash = require("../util/createHash");
|
||||
const { contextify } = require("../util/identifier");
|
||||
const EnableWasmLoadingPlugin = require("../wasm/EnableWasmLoadingPlugin");
|
||||
const ConstDependency = require("./ConstDependency");
|
||||
|
|
@ -27,6 +27,7 @@ const WorkerDependency = require("./WorkerDependency");
|
|||
/** @typedef {import("estree").SpreadElement} SpreadElement */
|
||||
/** @typedef {import("../Compiler")} Compiler */
|
||||
/** @typedef {import("../Entrypoint").EntryOptions} EntryOptions */
|
||||
/** @typedef {import("../Parser").ParserState} ParserState */
|
||||
/** @typedef {import("../javascript/BasicEvaluatedExpression")} BasicEvaluatedExpression */
|
||||
/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */
|
||||
/** @typedef {import("./HarmonyImportDependencyParserPlugin").HarmonySettings} HarmonySettings */
|
||||
|
|
@ -42,6 +43,9 @@ const DEFAULT_SYNTAX = [
|
|||
"Worker from worker_threads"
|
||||
];
|
||||
|
||||
/** @type {WeakMap<ParserState, number>} */
|
||||
const workerIndexMap = new WeakMap();
|
||||
|
||||
class WorkerPlugin {
|
||||
constructor(chunkLoading, wasmLoading) {
|
||||
this._chunkLoading = chunkLoading;
|
||||
|
|
@ -264,9 +268,20 @@ class WorkerPlugin {
|
|||
}
|
||||
|
||||
if (!entryOptions.runtime) {
|
||||
entryOptions.runtime = `${cachedContextify(
|
||||
let i = workerIndexMap.get(parser.state) || 0;
|
||||
workerIndexMap.set(parser.state, i + 1);
|
||||
let name = `${cachedContextify(
|
||||
parser.state.module.identifier()
|
||||
)}|${formatLocation(expr.loc)}`;
|
||||
)}|${i}`;
|
||||
const hash = createHash(compilation.outputOptions.hashFunction);
|
||||
hash.update(name);
|
||||
const digest = /** @type {string} */ (hash.digest(
|
||||
compilation.outputOptions.hashDigest
|
||||
));
|
||||
entryOptions.runtime = digest.slice(
|
||||
0,
|
||||
compilation.outputOptions.hashDigestLength
|
||||
);
|
||||
}
|
||||
|
||||
const block = new AsyncDependenciesBlock({
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ class JavascriptParser extends Parser {
|
|||
evaluateCallExpressionMember: new HookMap(
|
||||
() => new SyncBailHook(["expression", "param"])
|
||||
),
|
||||
/** @type {HookMap<SyncBailHook<[ExpressionNode | DeclarationNode, number], boolean | void>>} */
|
||||
/** @type {HookMap<SyncBailHook<[ExpressionNode | DeclarationNode | PrivateIdentifierNode, number], boolean | void>>} */
|
||||
isPure: new HookMap(
|
||||
() => new SyncBailHook(["expression", "commentsStartPosition"])
|
||||
),
|
||||
|
|
@ -176,8 +176,10 @@ class JavascriptParser extends Parser {
|
|||
statementIf: new SyncBailHook(["statement"]),
|
||||
/** @type {SyncBailHook<[ExpressionNode, ClassExpressionNode | ClassDeclarationNode], boolean | void>} */
|
||||
classExtendsExpression: new SyncBailHook(["expression", "statement"]),
|
||||
/** @type {SyncBailHook<[MethodDefinitionNode, ClassExpressionNode | ClassDeclarationNode], boolean | void>} */
|
||||
/** @type {SyncBailHook<[MethodDefinitionNode | PropertyDefinitionNode, ClassExpressionNode | ClassDeclarationNode], boolean | void>} */
|
||||
classBodyElement: new SyncBailHook(["element", "statement"]),
|
||||
/** @type {SyncBailHook<[ExpressionNode, MethodDefinitionNode | PropertyDefinitionNode, ClassExpressionNode | ClassDeclarationNode], boolean | void>} */
|
||||
classBodyValue: new SyncBailHook(["expression", "element", "statement"]),
|
||||
/** @type {HookMap<SyncBailHook<[LabeledStatementNode], boolean | void>>} */
|
||||
label: new HookMap(() => new SyncBailHook(["statement"])),
|
||||
/** @type {SyncBailHook<[StatementNode, ImportSource], boolean | void>} */
|
||||
|
|
@ -1363,29 +1365,30 @@ class JavascriptParser extends Parser {
|
|||
}
|
||||
}
|
||||
if (classy.body && classy.body.type === "ClassBody") {
|
||||
const wasTopLevel = this.scope.topLevelScope;
|
||||
for (const classElement of classy.body.body) {
|
||||
for (const classElement of /** @type {TODO} */ (classy.body.body)) {
|
||||
if (!this.hooks.classBodyElement.call(classElement, classy)) {
|
||||
if (classElement.type === "MethodDefinition") {
|
||||
this.scope.topLevelScope = false;
|
||||
this.walkMethodDefinition(classElement);
|
||||
this.scope.topLevelScope = wasTopLevel;
|
||||
if (classElement.computed && classElement.key) {
|
||||
this.walkExpression(classElement.key);
|
||||
}
|
||||
if (classElement.value) {
|
||||
if (
|
||||
!this.hooks.classBodyValue.call(
|
||||
classElement.value,
|
||||
classElement,
|
||||
classy
|
||||
)
|
||||
) {
|
||||
const wasTopLevel = this.scope.topLevelScope;
|
||||
this.scope.topLevelScope = false;
|
||||
this.walkExpression(classElement.value);
|
||||
this.scope.topLevelScope = wasTopLevel;
|
||||
}
|
||||
}
|
||||
// TODO add support for ClassProperty here once acorn supports it
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
walkMethodDefinition(methodDefinition) {
|
||||
if (methodDefinition.computed && methodDefinition.key) {
|
||||
this.walkExpression(methodDefinition.key);
|
||||
}
|
||||
if (methodDefinition.value) {
|
||||
this.walkExpression(methodDefinition.value);
|
||||
}
|
||||
}
|
||||
|
||||
// Pre walking iterates the scope for variable declarations
|
||||
preWalkStatements(statements) {
|
||||
for (let index = 0, len = statements.length; index < len; index++) {
|
||||
|
|
@ -3316,7 +3319,7 @@ class JavascriptParser extends Parser {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param {ExpressionNode | DeclarationNode | null | undefined} expr an expression
|
||||
* @param {ExpressionNode | DeclarationNode | PrivateIdentifierNode | null | undefined} expr an expression
|
||||
* @param {number} commentsStartPos source position from which annotation comments are checked
|
||||
* @returns {boolean} true, when the expression is pure
|
||||
*/
|
||||
|
|
@ -3328,27 +3331,32 @@ class JavascriptParser extends Parser {
|
|||
if (typeof result === "boolean") return result;
|
||||
switch (expr.type) {
|
||||
case "ClassDeclaration":
|
||||
case "ClassExpression":
|
||||
case "ClassExpression": {
|
||||
if (expr.body.type !== "ClassBody") return false;
|
||||
if (expr.superClass && !this.isPure(expr.superClass, expr.range[0])) {
|
||||
return false;
|
||||
}
|
||||
return expr.body.body.every(item => {
|
||||
switch (item.type) {
|
||||
// @ts-expect-error not yet supported by acorn
|
||||
case "ClassProperty":
|
||||
// TODO add test case once acorn supports it
|
||||
// Currently this is not parsable
|
||||
if (item.static) return this.isPure(item.value, item.range[0]);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
const items = /** @type {(MethodDefinitionNode | PropertyDefinitionNode)[]} */ (expr
|
||||
.body.body);
|
||||
return items.every(
|
||||
item =>
|
||||
(!item.computed ||
|
||||
!item.key ||
|
||||
this.isPure(item.key, item.range[0])) &&
|
||||
(!item.static ||
|
||||
!item.value ||
|
||||
this.isPure(
|
||||
item.value,
|
||||
item.key ? item.key.range[1] : item.range[0]
|
||||
))
|
||||
);
|
||||
}
|
||||
|
||||
case "FunctionDeclaration":
|
||||
case "FunctionExpression":
|
||||
case "ArrowFunctionExpression":
|
||||
case "Literal":
|
||||
case "PrivateIdentifier":
|
||||
return true;
|
||||
|
||||
case "VariableDeclaration":
|
||||
|
|
|
|||
|
|
@ -238,21 +238,20 @@ class InnerGraphPlugin {
|
|||
}
|
||||
);
|
||||
|
||||
parser.hooks.classBodyElement.tap(
|
||||
parser.hooks.classBodyValue.tap(
|
||||
"InnerGraphPlugin",
|
||||
(element, statement) => {
|
||||
(expression, element, statement) => {
|
||||
if (!InnerGraph.isEnabled(parser.state)) return;
|
||||
if (parser.scope.topLevelScope === true) {
|
||||
const fn = classWithTopLevelSymbol.get(statement);
|
||||
if (fn) {
|
||||
if (element.type === "MethodDefinition") {
|
||||
InnerGraph.setTopLevelSymbol(parser.state, fn);
|
||||
} else if (
|
||||
element.type === "ClassProperty" &&
|
||||
!element.static
|
||||
if (
|
||||
!element.static ||
|
||||
parser.isPure(
|
||||
expression,
|
||||
element.key ? element.key.range[1] : element.range[0]
|
||||
)
|
||||
) {
|
||||
// TODO add test case once acorn supports it
|
||||
// Currently this is not parsable
|
||||
InnerGraph.setTopLevelSymbol(parser.state, fn);
|
||||
} else {
|
||||
InnerGraph.setTopLevelSymbol(parser.state, undefined);
|
||||
|
|
|
|||
|
|
@ -119,7 +119,12 @@ class AsyncQueue {
|
|||
const entry = this._entries.get(key);
|
||||
if (entry !== undefined) {
|
||||
if (entry.state === DONE_STATE) {
|
||||
process.nextTick(() => callback(entry.error, entry.result));
|
||||
if (inHandleResult++ > 3) {
|
||||
process.nextTick(() => callback(entry.error, entry.result));
|
||||
} else {
|
||||
callback(entry.error, entry.result);
|
||||
}
|
||||
inHandleResult--;
|
||||
} else if (entry.callbacks === undefined) {
|
||||
entry.callbacks = [callback];
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -433,21 +433,27 @@ exports.compareLocations = (a, b) => {
|
|||
if (isObjectB) return -1;
|
||||
return 0;
|
||||
}
|
||||
if ("start" in a && "start" in b) {
|
||||
const ap = a.start;
|
||||
const bp = b.start;
|
||||
if (ap.line < bp.line) return -1;
|
||||
if (ap.line > bp.line) return 1;
|
||||
if (ap.column < bp.column) return -1;
|
||||
if (ap.column > bp.column) return 1;
|
||||
}
|
||||
if ("name" in a && "name" in b) {
|
||||
if (a.name < b.name) return -1;
|
||||
if (a.name > b.name) return 1;
|
||||
}
|
||||
if ("index" in a && "index" in b) {
|
||||
if (a.index < b.index) return -1;
|
||||
if (a.index > b.index) return 1;
|
||||
}
|
||||
if ("start" in a) {
|
||||
if ("start" in b) {
|
||||
const ap = a.start;
|
||||
const bp = b.start;
|
||||
if (ap.line < bp.line) return -1;
|
||||
if (ap.line > bp.line) return 1;
|
||||
if (ap.column < bp.column) return -1;
|
||||
if (ap.column > bp.column) return 1;
|
||||
} else return -1;
|
||||
} else if ("start" in b) return 1;
|
||||
if ("name" in a) {
|
||||
if ("name" in b) {
|
||||
if (a.name < b.name) return -1;
|
||||
if (a.name > b.name) return 1;
|
||||
} else return -1;
|
||||
} else if ("name" in b) return 1;
|
||||
if ("index" in a) {
|
||||
if ("index" in b) {
|
||||
if (a.index < b.index) return -1;
|
||||
if (a.index > b.index) return 1;
|
||||
} else return -1;
|
||||
} else if ("index" in b) return 1;
|
||||
return 0;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -23,9 +23,16 @@
|
|||
|
||||
/**
|
||||
* @template T
|
||||
* @template R
|
||||
* @typedef {Object} ItemWithGroups
|
||||
* @property {T} item
|
||||
* @property {Set<string>} groups
|
||||
* @property {Set<Group<T, R>>} groups
|
||||
*/
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @template R
|
||||
* @typedef {{ config: GroupConfig<T, R>, name: string, alreadyGrouped: boolean, items: Set<ItemWithGroups<T, R>> | undefined }} Group
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -36,22 +43,32 @@
|
|||
* @returns {(R | T)[]} grouped items
|
||||
*/
|
||||
const smartGrouping = (items, groupConfigs) => {
|
||||
/** @type {Set<ItemWithGroups<T>>} */
|
||||
/** @type {Set<ItemWithGroups<T, R>>} */
|
||||
const itemsWithGroups = new Set();
|
||||
/** @type {Map<string, [GroupConfig<T, R>, string]>} */
|
||||
const groupConfigMap = new Map();
|
||||
/** @type {Map<string, Group<T, R>>} */
|
||||
const allGroups = new Map();
|
||||
for (const item of items) {
|
||||
/** @type {Set<Group<T, R>>} */
|
||||
const groups = new Set();
|
||||
for (let i = 0; i < groupConfigs.length; i++) {
|
||||
const groupConfig = groupConfigs[i];
|
||||
const keys = groupConfig.getKeys(item);
|
||||
if (keys) {
|
||||
for (const group of keys) {
|
||||
const fullGroup = `${i}:${group}`;
|
||||
if (!groupConfigMap.has(fullGroup)) {
|
||||
groupConfigMap.set(fullGroup, [groupConfig, group]);
|
||||
for (const name of keys) {
|
||||
const key = `${i}:${name}`;
|
||||
let group = allGroups.get(key);
|
||||
if (group === undefined) {
|
||||
allGroups.set(
|
||||
key,
|
||||
(group = {
|
||||
config: groupConfig,
|
||||
name,
|
||||
alreadyGrouped: false,
|
||||
items: undefined
|
||||
})
|
||||
);
|
||||
}
|
||||
groups.add(fullGroup);
|
||||
groups.add(group);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -60,48 +77,62 @@ const smartGrouping = (items, groupConfigs) => {
|
|||
groups
|
||||
});
|
||||
}
|
||||
const alreadyGrouped = new Set();
|
||||
/**
|
||||
* @param {Set<ItemWithGroups<T>>} itemsWithGroups input items with groups
|
||||
* @param {Set<ItemWithGroups<T, R>>} itemsWithGroups input items with groups
|
||||
* @returns {(T | R)[]} groups items
|
||||
*/
|
||||
const runGrouping = itemsWithGroups => {
|
||||
const totalSize = itemsWithGroups.size;
|
||||
/** @type {Map<string, Set<ItemWithGroups<T>>>} */
|
||||
const groupMap = new Map();
|
||||
for (const entry of itemsWithGroups) {
|
||||
for (const group of entry.groups) {
|
||||
if (alreadyGrouped.has(group)) continue;
|
||||
const list = groupMap.get(group);
|
||||
if (list === undefined) {
|
||||
groupMap.set(group, new Set([entry]));
|
||||
if (group.alreadyGrouped) continue;
|
||||
const items = group.items;
|
||||
if (items === undefined) {
|
||||
group.items = new Set([entry]);
|
||||
} else {
|
||||
list.add(entry);
|
||||
items.add(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
/** @type {Set<string>} */
|
||||
const usedGroups = new Set();
|
||||
/** @type {Map<Group<T, R>, { items: Set<ItemWithGroups<T, R>>, options: GroupOptions | false | undefined, used: boolean }>} */
|
||||
const groupMap = new Map();
|
||||
for (const group of allGroups.values()) {
|
||||
if (group.items) {
|
||||
const items = group.items;
|
||||
group.items = undefined;
|
||||
groupMap.set(group, {
|
||||
items,
|
||||
options: undefined,
|
||||
used: false
|
||||
});
|
||||
}
|
||||
}
|
||||
/** @type {(T | R)[]} */
|
||||
const results = [];
|
||||
for (;;) {
|
||||
/** @type {Group<T, R>} */
|
||||
let bestGroup = undefined;
|
||||
let bestGroupSize = -1;
|
||||
let bestGroupItems = undefined;
|
||||
let bestGroupOptions = undefined;
|
||||
for (const [group, items] of groupMap) {
|
||||
if (items.size === 0) continue;
|
||||
const [groupConfig, groupKey] = groupConfigMap.get(group);
|
||||
const options =
|
||||
groupConfig.getOptions &&
|
||||
groupConfig.getOptions(
|
||||
groupKey,
|
||||
Array.from(items, ({ item }) => item)
|
||||
);
|
||||
for (const [group, state] of groupMap) {
|
||||
const { items, used } = state;
|
||||
let options = state.options;
|
||||
if (options === undefined) {
|
||||
const groupConfig = group.config;
|
||||
state.options = options =
|
||||
(groupConfig.getOptions &&
|
||||
groupConfig.getOptions(
|
||||
group.name,
|
||||
Array.from(items, ({ item }) => item)
|
||||
)) ||
|
||||
false;
|
||||
}
|
||||
|
||||
const force = options && options.force;
|
||||
if (!force) {
|
||||
if (bestGroupOptions && bestGroupOptions.force) continue;
|
||||
if (usedGroups.has(group)) continue;
|
||||
if (used) continue;
|
||||
if (items.size <= 1 || totalSize - items.size <= 1) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -137,25 +168,30 @@ const smartGrouping = (items, groupConfigs) => {
|
|||
itemsWithGroups.delete(item);
|
||||
// Remove all groups that items have from the map to not select them again
|
||||
for (const group of item.groups) {
|
||||
const list = groupMap.get(group);
|
||||
if (list !== undefined) list.delete(item);
|
||||
if (groupChildren) {
|
||||
usedGroups.add(group);
|
||||
const state = groupMap.get(group);
|
||||
if (state !== undefined) {
|
||||
state.items.delete(item);
|
||||
if (state.items.size === 0) {
|
||||
groupMap.delete(group);
|
||||
} else {
|
||||
state.options = undefined;
|
||||
if (groupChildren) {
|
||||
state.used = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
groupMap.delete(bestGroup);
|
||||
|
||||
const idx = bestGroup.indexOf(":");
|
||||
const configKey = bestGroup.slice(0, idx);
|
||||
const key = bestGroup.slice(idx + 1);
|
||||
const groupConfig = groupConfigs[+configKey];
|
||||
const key = bestGroup.name;
|
||||
const groupConfig = bestGroup.config;
|
||||
|
||||
const allItems = Array.from(items, ({ item }) => item);
|
||||
|
||||
alreadyGrouped.add(bestGroup);
|
||||
bestGroup.alreadyGrouped = true;
|
||||
const children = groupChildren ? runGrouping(items) : allItems;
|
||||
alreadyGrouped.delete(bestGroup);
|
||||
bestGroup.alreadyGrouped = false;
|
||||
|
||||
results.push(groupConfig.createGroup(key, children, allItems));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "webpack",
|
||||
"version": "5.35.0",
|
||||
"version": "5.36.2",
|
||||
"author": "Tobias Koppers @sokra",
|
||||
"description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
|
||||
"license": "MIT",
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
"@webassemblyjs/ast": "1.11.0",
|
||||
"@webassemblyjs/wasm-edit": "1.11.0",
|
||||
"@webassemblyjs/wasm-parser": "1.11.0",
|
||||
"acorn": "^8.0.4",
|
||||
"acorn": "^8.2.1",
|
||||
"browserslist": "^4.14.5",
|
||||
"chrome-trace-event": "^1.0.2",
|
||||
"enhanced-resolve": "^5.8.0",
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
"@babel/preset-react": "^7.10.4",
|
||||
"@types/es-module-lexer": "^0.3.0",
|
||||
"@types/jest": "^26.0.15",
|
||||
"@types/node": "^14.14.10",
|
||||
"@types/node": "^15.0.1",
|
||||
"babel-loader": "^8.1.0",
|
||||
"benchmark": "^2.1.4",
|
||||
"bundle-loader": "^0.5.6",
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
"eslint": "^7.14.0",
|
||||
"eslint-config-prettier": "^8.1.0",
|
||||
"eslint-plugin-jest": "^24.1.3",
|
||||
"eslint-plugin-jsdoc": "^32.0.2",
|
||||
"eslint-plugin-jsdoc": "^33.0.0",
|
||||
"eslint-plugin-node": "^11.0.0",
|
||||
"eslint-plugin-prettier": "^3.1.4",
|
||||
"file-loader": "^6.0.0",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -999,6 +999,10 @@
|
|||
"description": "Name for the cache. Different names will lead to different coexisting caches.",
|
||||
"type": "string"
|
||||
},
|
||||
"profile": {
|
||||
"description": "Track and log detailed timing information for individual cache items.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"store": {
|
||||
"description": "When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).",
|
||||
"enum": ["pack"]
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ describe("Defaults", () => {
|
|||
"minChunks": 1,
|
||||
"minRemainingSize": undefined,
|
||||
"minSize": 10000,
|
||||
"usedExports": true,
|
||||
"usedExports": false,
|
||||
},
|
||||
"usedExports": false,
|
||||
},
|
||||
|
|
@ -670,7 +670,9 @@ describe("Defaults", () => {
|
|||
+ "maxInitialRequests": 30,
|
||||
@@ ... @@
|
||||
- "minSize": 10000,
|
||||
- "usedExports": false,
|
||||
+ "minSize": 20000,
|
||||
+ "usedExports": true,
|
||||
@@ ... @@
|
||||
- "usedExports": false,
|
||||
+ "usedExports": true,
|
||||
|
|
@ -735,7 +737,9 @@ describe("Defaults", () => {
|
|||
+ "maxInitialRequests": 30,
|
||||
@@ ... @@
|
||||
- "minSize": 10000,
|
||||
- "usedExports": false,
|
||||
+ "minSize": 20000,
|
||||
+ "usedExports": true,
|
||||
@@ ... @@
|
||||
- "usedExports": false,
|
||||
+ "usedExports": true,
|
||||
|
|
@ -1489,6 +1493,7 @@ describe("Defaults", () => {
|
|||
+ "maxAge": 5184000000,
|
||||
+ "maxMemoryGenerations": Infinity,
|
||||
+ "name": "default-none",
|
||||
+ "profile": false,
|
||||
+ "store": "pack",
|
||||
+ "type": "filesystem",
|
||||
+ "version": "",
|
||||
|
|
@ -1529,6 +1534,7 @@ describe("Defaults", () => {
|
|||
+ "maxAge": 5184000000,
|
||||
+ "maxMemoryGenerations": 5,
|
||||
+ "name": "default-development",
|
||||
+ "profile": false,
|
||||
+ "store": "pack",
|
||||
+ "type": "filesystem",
|
||||
+ "version": "",
|
||||
|
|
@ -1620,7 +1626,7 @@ describe("Defaults", () => {
|
|||
- "minChunks": 1,
|
||||
- "minRemainingSize": undefined,
|
||||
- "minSize": 10000,
|
||||
- "usedExports": true,
|
||||
- "usedExports": false,
|
||||
- },
|
||||
+ "splitChunks": false,
|
||||
`)
|
||||
|
|
@ -1769,6 +1775,7 @@ describe("Defaults", () => {
|
|||
+ "maxAge": 5184000000,
|
||||
+ "maxMemoryGenerations": Infinity,
|
||||
+ "name": "default-none",
|
||||
+ "profile": false,
|
||||
+ "store": "pack",
|
||||
+ "type": "filesystem",
|
||||
+ "version": "",
|
||||
|
|
|
|||
|
|
@ -238,6 +238,19 @@ Object {
|
|||
"multiple": false,
|
||||
"simpleType": "string",
|
||||
},
|
||||
"cache-profile": Object {
|
||||
"configs": Array [
|
||||
Object {
|
||||
"description": "Track and log detailed timing information for individual cache items.",
|
||||
"multiple": false,
|
||||
"path": "cache.profile",
|
||||
"type": "boolean",
|
||||
},
|
||||
],
|
||||
"description": "Track and log detailed timing information for individual cache items.",
|
||||
"multiple": false,
|
||||
"simpleType": "boolean",
|
||||
},
|
||||
"cache-store": Object {
|
||||
"configs": Array [
|
||||
Object {
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
exports[`StatsTestCases should print correct stats for aggressive-splitting-entry 1`] = `
|
||||
"fitting:
|
||||
PublicPath: auto
|
||||
asset fitting-4b375e92f92df2c92bec.js 16 KiB [emitted] [immutable]
|
||||
asset fitting-f0d45b3d6edcabaf51d3.js 16 KiB [emitted] [immutable]
|
||||
asset fitting-1c702fff0ba9fe1126d9.js 1.9 KiB [emitted] [immutable]
|
||||
asset fitting-c0e0ed061413e64a66c5.js 1.9 KiB [emitted] [immutable]
|
||||
asset fitting-445185754184bf780ddc.js 1.08 KiB [emitted] [immutable]
|
||||
Entrypoint main 19.8 KiB = fitting-1c702fff0ba9fe1126d9.js 1.9 KiB fitting-c0e0ed061413e64a66c5.js 1.9 KiB fitting-4b375e92f92df2c92bec.js 16 KiB
|
||||
chunk (runtime: main) fitting-4b375e92f92df2c92bec.js 1.87 KiB (javascript) 8.56 KiB (runtime) [entry] [rendered]
|
||||
asset fitting-3fdf9ef59eba6cfd6536.js 1.08 KiB [emitted] [immutable]
|
||||
Entrypoint main 19.8 KiB = fitting-1c702fff0ba9fe1126d9.js 1.9 KiB fitting-c0e0ed061413e64a66c5.js 1.9 KiB fitting-f0d45b3d6edcabaf51d3.js 16 KiB
|
||||
chunk (runtime: main) fitting-f0d45b3d6edcabaf51d3.js 1.87 KiB (javascript) 8.56 KiB (runtime) [entry] [rendered]
|
||||
> ./index main
|
||||
runtime modules 8.56 KiB 11 modules
|
||||
cacheable modules 1.87 KiB
|
||||
|
|
@ -23,19 +23,19 @@ exports[`StatsTestCases should print correct stats for aggressive-splitting-entr
|
|||
> ./index main
|
||||
./a.js 899 bytes [built] [code generated]
|
||||
./b.js 899 bytes [built] [code generated]
|
||||
chunk (runtime: main) fitting-445185754184bf780ddc.js 916 bytes [rendered]
|
||||
chunk (runtime: main) fitting-3fdf9ef59eba6cfd6536.js 916 bytes [rendered]
|
||||
> ./g ./index.js 7:0-13
|
||||
./g.js 916 bytes [built] [code generated]
|
||||
fitting (webpack x.x.x) compiled successfully in X ms
|
||||
|
||||
content-change:
|
||||
PublicPath: auto
|
||||
asset content-change-0dc17ccd46aa2757f219.js 16 KiB [emitted] [immutable]
|
||||
asset content-change-14c3e81da6bb999e50c8.js 16 KiB [emitted] [immutable]
|
||||
asset content-change-1c702fff0ba9fe1126d9.js 1.9 KiB [emitted] [immutable]
|
||||
asset content-change-c0e0ed061413e64a66c5.js 1.9 KiB [emitted] [immutable]
|
||||
asset content-change-445185754184bf780ddc.js 1.08 KiB [emitted] [immutable]
|
||||
Entrypoint main 19.8 KiB = content-change-1c702fff0ba9fe1126d9.js 1.9 KiB content-change-c0e0ed061413e64a66c5.js 1.9 KiB content-change-0dc17ccd46aa2757f219.js 16 KiB
|
||||
chunk (runtime: main) content-change-0dc17ccd46aa2757f219.js 1.87 KiB (javascript) 8.56 KiB (runtime) [entry] [rendered]
|
||||
asset content-change-3fdf9ef59eba6cfd6536.js 1.08 KiB [emitted] [immutable]
|
||||
Entrypoint main 19.8 KiB = content-change-1c702fff0ba9fe1126d9.js 1.9 KiB content-change-c0e0ed061413e64a66c5.js 1.9 KiB content-change-14c3e81da6bb999e50c8.js 16 KiB
|
||||
chunk (runtime: main) content-change-14c3e81da6bb999e50c8.js 1.87 KiB (javascript) 8.56 KiB (runtime) [entry] [rendered]
|
||||
> ./index main
|
||||
runtime modules 8.56 KiB 11 modules
|
||||
cacheable modules 1.87 KiB
|
||||
|
|
@ -50,7 +50,7 @@ content-change:
|
|||
> ./index main
|
||||
./a.js 899 bytes [built] [code generated]
|
||||
./b.js 899 bytes [built] [code generated]
|
||||
chunk (runtime: main) content-change-445185754184bf780ddc.js 916 bytes [rendered]
|
||||
chunk (runtime: main) content-change-3fdf9ef59eba6cfd6536.js 916 bytes [rendered]
|
||||
> ./g ./index.js 7:0-13
|
||||
./g.js 916 bytes [built] [code generated]
|
||||
content-change (webpack x.x.x) compiled successfully in X ms"
|
||||
|
|
@ -58,7 +58,7 @@ content-change:
|
|||
|
||||
exports[`StatsTestCases should print correct stats for aggressive-splitting-on-demand 1`] = `
|
||||
"PublicPath: auto
|
||||
asset 273c7faaf1c5ed87b24b.js 11.5 KiB [emitted] [immutable] (name: main)
|
||||
asset a0fc232f4432610a2c68.js 11.5 KiB [emitted] [immutable] (name: main)
|
||||
asset b28b42175852a350ae55.js 1.91 KiB [emitted] [immutable]
|
||||
asset 5dc82ad1144129efc6f0.js 1.91 KiB [emitted] [immutable]
|
||||
asset 6861109a893ce5c56a08.js 1.9 KiB [emitted] [immutable]
|
||||
|
|
@ -70,12 +70,12 @@ asset c98f03fbb3549a9685f2.js 1.9 KiB [emitted] [immutable]
|
|||
asset 4437b7a806fda9652d78.js 1010 bytes [emitted] [immutable]
|
||||
asset 9711883e11bdd4d550ff.js 1010 bytes [emitted] [immutable]
|
||||
asset e0332efe5dd181ffeff5.js 1010 bytes [emitted] [immutable]
|
||||
Entrypoint main 11.5 KiB = 273c7faaf1c5ed87b24b.js
|
||||
Entrypoint main 11.5 KiB = a0fc232f4432610a2c68.js
|
||||
chunk (runtime: main) c0e0ed061413e64a66c5.js 1.76 KiB [rendered] [recorded] aggressive splitted
|
||||
> ./c ./d ./e ./index.js 3:0-30
|
||||
./c.js 899 bytes [built] [code generated]
|
||||
./d.js 899 bytes [built] [code generated]
|
||||
chunk (runtime: main) 273c7faaf1c5ed87b24b.js (main) 248 bytes (javascript) 6.25 KiB (runtime) [entry] [rendered]
|
||||
chunk (runtime: main) a0fc232f4432610a2c68.js (main) 248 bytes (javascript) 6.25 KiB (runtime) [entry] [rendered]
|
||||
> ./index main
|
||||
runtime modules 6.25 KiB 7 modules
|
||||
./index.js 248 bytes [built] [code generated]
|
||||
|
|
@ -658,9 +658,9 @@ webpack x.x.x compiled successfully in X ms"
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for commons-plugin-issue-4980 1`] = `
|
||||
"asset app.724140013cf9a0f83f3f-1.js 6.11 KiB [emitted] [immutable] (name: app)
|
||||
"asset app.20731e8c55e4789a408a-1.js 6.11 KiB [emitted] [immutable] (name: app)
|
||||
asset vendor.ebb9b6c7e5493f36bead-1.js 619 bytes [emitted] [immutable] (name: vendor) (id hint: vendor)
|
||||
Entrypoint app 6.71 KiB = vendor.ebb9b6c7e5493f36bead-1.js 619 bytes app.724140013cf9a0f83f3f-1.js 6.11 KiB
|
||||
Entrypoint app 6.71 KiB = vendor.ebb9b6c7e5493f36bead-1.js 619 bytes app.20731e8c55e4789a408a-1.js 6.11 KiB
|
||||
runtime modules 2.66 KiB 4 modules
|
||||
orphan modules 118 bytes [orphan] 2 modules
|
||||
cacheable modules 272 bytes
|
||||
|
|
@ -668,9 +668,9 @@ cacheable modules 272 bytes
|
|||
./constants.js 87 bytes [built] [code generated]
|
||||
webpack x.x.x compiled successfully in X ms
|
||||
|
||||
asset app.71ad650457023fca30e9-2.js 6.13 KiB [emitted] [immutable] (name: app)
|
||||
asset app.36305eb6cd9d6aad421e-2.js 6.13 KiB [emitted] [immutable] (name: app)
|
||||
asset vendor.ebb9b6c7e5493f36bead-2.js 619 bytes [emitted] [immutable] (name: vendor) (id hint: vendor)
|
||||
Entrypoint app 6.73 KiB = vendor.ebb9b6c7e5493f36bead-2.js 619 bytes app.71ad650457023fca30e9-2.js 6.13 KiB
|
||||
Entrypoint app 6.73 KiB = vendor.ebb9b6c7e5493f36bead-2.js 619 bytes app.36305eb6cd9d6aad421e-2.js 6.13 KiB
|
||||
runtime modules 2.66 KiB 4 modules
|
||||
orphan modules 125 bytes [orphan] 2 modules
|
||||
cacheable modules 279 bytes
|
||||
|
|
@ -700,10 +700,10 @@ exports[`StatsTestCases should print correct stats for concat-and-sideeffects 1`
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for context-independence 1`] = `
|
||||
"asset main-fb79b7466e6894496440.js 10.3 KiB [emitted] [immutable] (name: main)
|
||||
sourceMap main-fb79b7466e6894496440.js.map 9.21 KiB [emitted] [dev] (auxiliary name: main)
|
||||
asset 664-a0b92720f0f2d9d4aaf4.js 455 bytes [emitted] [immutable]
|
||||
sourceMap 664-a0b92720f0f2d9d4aaf4.js.map 344 bytes [emitted] [dev]
|
||||
"asset main-4d9216d100d42b71ee29.js 10.3 KiB [emitted] [immutable] (name: main)
|
||||
sourceMap main-4d9216d100d42b71ee29.js.map 9.21 KiB [emitted] [dev] (auxiliary name: main)
|
||||
asset 664-bca314bd02016092cab9.js 455 bytes [emitted] [immutable]
|
||||
sourceMap 664-bca314bd02016092cab9.js.map 344 bytes [emitted] [dev]
|
||||
runtime modules 6.23 KiB 8 modules
|
||||
orphan modules 19 bytes [orphan] 1 module
|
||||
cacheable modules 106 bytes
|
||||
|
|
@ -711,10 +711,10 @@ cacheable modules 106 bytes
|
|||
./a/chunk.js + 1 modules 66 bytes [built] [code generated]
|
||||
webpack x.x.x compiled successfully in X ms
|
||||
|
||||
asset main-fb79b7466e6894496440.js 10.3 KiB [emitted] [immutable] (name: main)
|
||||
sourceMap main-fb79b7466e6894496440.js.map 9.21 KiB [emitted] [dev] (auxiliary name: main)
|
||||
asset 664-a0b92720f0f2d9d4aaf4.js 455 bytes [emitted] [immutable]
|
||||
sourceMap 664-a0b92720f0f2d9d4aaf4.js.map 344 bytes [emitted] [dev]
|
||||
asset main-4d9216d100d42b71ee29.js 10.3 KiB [emitted] [immutable] (name: main)
|
||||
sourceMap main-4d9216d100d42b71ee29.js.map 9.21 KiB [emitted] [dev] (auxiliary name: main)
|
||||
asset 664-bca314bd02016092cab9.js 455 bytes [emitted] [immutable]
|
||||
sourceMap 664-bca314bd02016092cab9.js.map 344 bytes [emitted] [dev]
|
||||
runtime modules 6.23 KiB 8 modules
|
||||
orphan modules 19 bytes [orphan] 1 module
|
||||
cacheable modules 106 bytes
|
||||
|
|
@ -722,8 +722,8 @@ cacheable modules 106 bytes
|
|||
./b/chunk.js + 1 modules 66 bytes [built] [code generated]
|
||||
webpack x.x.x compiled successfully in X ms
|
||||
|
||||
asset main-f0c18662272cb710ab14.js 11.5 KiB [emitted] [immutable] (name: main)
|
||||
asset 664-3cdeef446e88ad105071.js 1.5 KiB [emitted] [immutable]
|
||||
asset main-0ff438be7b9b904d38a3.js 11.5 KiB [emitted] [immutable] (name: main)
|
||||
asset 664-8b8452d1081ed5563bde.js 1.5 KiB [emitted] [immutable]
|
||||
runtime modules 6.23 KiB 8 modules
|
||||
orphan modules 19 bytes [orphan] 1 module
|
||||
cacheable modules 106 bytes
|
||||
|
|
@ -731,8 +731,8 @@ cacheable modules 106 bytes
|
|||
./a/chunk.js + 1 modules 66 bytes [built] [code generated]
|
||||
webpack x.x.x compiled successfully in X ms
|
||||
|
||||
asset main-f0c18662272cb710ab14.js 11.5 KiB [emitted] [immutable] (name: main)
|
||||
asset 664-3cdeef446e88ad105071.js 1.5 KiB [emitted] [immutable]
|
||||
asset main-0ff438be7b9b904d38a3.js 11.5 KiB [emitted] [immutable] (name: main)
|
||||
asset 664-8b8452d1081ed5563bde.js 1.5 KiB [emitted] [immutable]
|
||||
runtime modules 6.23 KiB 8 modules
|
||||
orphan modules 19 bytes [orphan] 1 module
|
||||
cacheable modules 106 bytes
|
||||
|
|
@ -1060,7 +1060,7 @@ webpack x.x.x compiled with 2 warnings in X ms"
|
|||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for immutable 1`] = `
|
||||
"asset bcfc8dd2d8d4b3af2957.js 13.3 KiB [emitted] [immutable] (name: main)
|
||||
"asset 6bfadebffe6cc3d3d3a9.js 13.3 KiB [emitted] [immutable] (name: main)
|
||||
asset 22c24a3b26d46118dc06.js 809 bytes [emitted] [immutable]"
|
||||
`;
|
||||
|
||||
|
|
@ -1126,10 +1126,10 @@ runtime modules 2.37 KiB 3 modules
|
|||
webpack x.x.x compiled successfully in X ms
|
||||
|
||||
asset b-runtime~main-9f27ae1cd47de56689fd.js 5.73 KiB [emitted] [immutable] (name: runtime~main)
|
||||
asset b-all-b_js-286fe88eae15de65188e.js 475 bytes [emitted] [immutable] (id hint: all)
|
||||
asset b-all-b_js-d09f99e25781be397e6c.js 475 bytes [emitted] [immutable] (id hint: all)
|
||||
asset b-main-132fd6da6e6e6728c990.js 457 bytes [emitted] [immutable] (name: main)
|
||||
asset b-vendors-node_modules_vendor_js-499179597d8c965dd5e0.js 185 bytes [emitted] [immutable] (id hint: vendors)
|
||||
Entrypoint main 6.82 KiB = b-runtime~main-9f27ae1cd47de56689fd.js 5.73 KiB b-vendors-node_modules_vendor_js-499179597d8c965dd5e0.js 185 bytes b-all-b_js-286fe88eae15de65188e.js 475 bytes b-main-132fd6da6e6e6728c990.js 457 bytes
|
||||
Entrypoint main 6.82 KiB = b-runtime~main-9f27ae1cd47de56689fd.js 5.73 KiB b-vendors-node_modules_vendor_js-499179597d8c965dd5e0.js 185 bytes b-all-b_js-d09f99e25781be397e6c.js 475 bytes b-main-132fd6da6e6e6728c990.js 457 bytes
|
||||
runtime modules 2.93 KiB 5 modules
|
||||
cacheable modules 40 bytes
|
||||
./b.js 17 bytes [built] [code generated]
|
||||
|
|
@ -1137,12 +1137,12 @@ cacheable modules 40 bytes
|
|||
webpack x.x.x compiled successfully in X ms
|
||||
|
||||
assets by chunk 895 bytes (id hint: all)
|
||||
asset c-all-b_js-fe3b412293f057de38c8.js 502 bytes [emitted] [immutable] (id hint: all)
|
||||
asset c-all-c_js-172fc4c28be7e411e551.js 393 bytes [emitted] [immutable] (id hint: all)
|
||||
asset c-runtime~main-f7949987637e4c0477d5.js 13.4 KiB [emitted] [immutable] (name: runtime~main)
|
||||
asset c-all-b_js-3c3d3ae5b364fadfafb2.js 502 bytes [emitted] [immutable] (id hint: all)
|
||||
asset c-all-c_js-5a3e032792662f68ffa4.js 393 bytes [emitted] [immutable] (id hint: all)
|
||||
asset c-runtime~main-679cac90a0c7d3895571.js 13.4 KiB [emitted] [immutable] (name: runtime~main)
|
||||
asset c-main-a443d2f54b3b7aebaf75.js 664 bytes [emitted] [immutable] (name: main)
|
||||
asset c-vendors-node_modules_vendor_js-499179597d8c965dd5e0.js 185 bytes [emitted] [immutable] (id hint: vendors)
|
||||
Entrypoint main 14.5 KiB = c-runtime~main-f7949987637e4c0477d5.js 13.4 KiB c-all-c_js-172fc4c28be7e411e551.js 393 bytes c-main-a443d2f54b3b7aebaf75.js 664 bytes
|
||||
Entrypoint main 14.5 KiB = c-runtime~main-679cac90a0c7d3895571.js 13.4 KiB c-all-c_js-5a3e032792662f68ffa4.js 393 bytes c-main-a443d2f54b3b7aebaf75.js 664 bytes
|
||||
runtime modules 8.56 KiB 13 modules
|
||||
cacheable modules 101 bytes
|
||||
./c.js 61 bytes [built] [code generated]
|
||||
|
|
@ -1251,7 +1251,7 @@ asset <CLR=32,BOLD>main.js</CLR> 84 bytes <CLR=32,BOLD>[emitted]</CLR> (name: ma
|
|||
Message with named logger
|
||||
|
||||
<CLR=BOLD>LOG from webpack.FlagDependencyExportsPlugin</CLR>
|
||||
<CLR=BOLD>100% of exports of modules have been determined (1 not cached, 0 flagged uncacheable, 0 from cache, 0 additional calculations due to dependencies)</CLR>
|
||||
<CLR=BOLD>0% of exports of modules have been determined (1 no declared exports, 0 not cached, 0 flagged uncacheable, 0 from cache, 0 additional calculations due to dependencies)</CLR>
|
||||
+ 3 hidden lines
|
||||
|
||||
<CLR=BOLD>LOG from webpack.Compilation</CLR>
|
||||
|
|
@ -2040,7 +2040,7 @@ LOG from LogTestPlugin
|
|||
+ 6 hidden lines
|
||||
|
||||
LOG from webpack.FlagDependencyExportsPlugin
|
||||
100% of exports of modules have been determined (6 not cached, 0 flagged uncacheable, 0 from cache, 0 additional calculations due to dependencies)
|
||||
0% of exports of modules have been determined (6 no declared exports, 0 not cached, 0 flagged uncacheable, 0 from cache, 0 additional calculations due to dependencies)
|
||||
+ 3 hidden lines
|
||||
|
||||
LOG from webpack.Compilation
|
||||
|
|
@ -2066,7 +2066,7 @@ LOG from webpack.FileSystemInfo
|
|||
Directory info in cache: 0 timestamps 0 hashes 0 timestamp hash combinations
|
||||
Managed items info in cache: 0 items
|
||||
|
||||
1970-04-20 12:42:42: webpack x.x.x compiled successfully in X ms (4f9e9a5628f36d03dfbb)"
|
||||
1970-04-20 12:42:42: webpack x.x.x compiled successfully in X ms (d4736bc615b853b4617e)"
|
||||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for preset-errors-only 1`] = `""`;
|
||||
|
|
@ -2379,7 +2379,7 @@ LOG from webpack.Compilation
|
|||
LOG from webpack.FlagDependencyExportsPlugin
|
||||
<t> restore cached provided exports: X ms
|
||||
<t> figure out provided exports: X ms
|
||||
100% of exports of modules have been determined (6 not cached, 0 flagged uncacheable, 0 from cache, 0 additional calculations due to dependencies)
|
||||
0% of exports of modules have been determined (6 no declared exports, 0 not cached, 0 flagged uncacheable, 0 from cache, 0 additional calculations due to dependencies)
|
||||
<t> store provided exports into cache: X ms
|
||||
|
||||
LOG from webpack.InnerGraphPlugin
|
||||
|
|
@ -2435,7 +2435,7 @@ LOG from webpack.FileSystemInfo
|
|||
Directory info in cache: 0 timestamps 0 hashes 0 timestamp hash combinations
|
||||
Managed items info in cache: 0 items
|
||||
|
||||
1970-04-20 12:42:42: webpack x.x.x compiled successfully in X ms (4f9e9a5628f36d03dfbb)"
|
||||
1970-04-20 12:42:42: webpack x.x.x compiled successfully in X ms (d4736bc615b853b4617e)"
|
||||
`;
|
||||
|
||||
exports[`StatsTestCases should print correct stats for real-content-hash 1`] = `
|
||||
|
|
@ -2468,7 +2468,7 @@ exports[`StatsTestCases should print correct stats for real-content-hash 1`] = `
|
|||
|
||||
b-normal:
|
||||
assets by path *.js 3.22 KiB
|
||||
asset 3ff4cb81976a33814443-3ff4cb.js 2.7 KiB [emitted] [immutable] [minimized] (name: runtime)
|
||||
asset 5d9329c3b14d7be316de-5d9329.js 2.7 KiB [emitted] [immutable] [minimized] (name: runtime)
|
||||
asset a639a9edc4557744bf94-a639a9.js 288 bytes [emitted] [immutable] [minimized] (name: lazy)
|
||||
asset e00b58ce2785691cd374-e00b58.js 225 bytes [emitted] [immutable] [minimized] (name: index)
|
||||
asset 666f2b8847021ccc7608-666f2b.js 21 bytes [emitted] [immutable] [minimized] (name: a, b)
|
||||
|
|
@ -2476,7 +2476,7 @@ b-normal:
|
|||
asset 89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [from: file.png] (auxiliary name: lazy)
|
||||
asset 7382fad5b015914e0811.jpg?query 5.89 KiB [cached] [immutable] [from: file.jpg?query] (auxiliary name: lazy)
|
||||
asset 7382fad5b015914e0811.jpg 5.89 KiB [emitted] [immutable] [from: file.jpg] (auxiliary name: index)
|
||||
Entrypoint index 2.92 KiB (5.89 KiB) = 3ff4cb81976a33814443-3ff4cb.js 2.7 KiB e00b58ce2785691cd374-e00b58.js 225 bytes 1 auxiliary asset
|
||||
Entrypoint index 2.92 KiB (5.89 KiB) = 5d9329c3b14d7be316de-5d9329.js 2.7 KiB e00b58ce2785691cd374-e00b58.js 225 bytes 1 auxiliary asset
|
||||
Entrypoint a 21 bytes = 666f2b8847021ccc7608-666f2b.js
|
||||
Entrypoint b 21 bytes = 666f2b8847021ccc7608-666f2b.js
|
||||
runtime modules 7.19 KiB 9 modules
|
||||
|
|
@ -2495,8 +2495,8 @@ b-normal:
|
|||
|
||||
a-source-map:
|
||||
assets by path *.js 3.44 KiB
|
||||
asset 1710932a27591ee4a94d-171093.js 2.76 KiB [emitted] [immutable] [minimized] (name: runtime)
|
||||
sourceMap 1710932a27591ee4a94d-171093.js.map 14.2 KiB [emitted] [dev] (auxiliary name: runtime)
|
||||
asset 15bc5e7a3cba409fc993-15bc5e.js 2.76 KiB [emitted] [immutable] [minimized] (name: runtime)
|
||||
sourceMap 15bc5e7a3cba409fc993-15bc5e.js.map 14.2 KiB [emitted] [dev] (auxiliary name: runtime)
|
||||
asset 05c637d15dff2d0dc5fd-05c637.js 344 bytes [emitted] [immutable] [minimized] (name: lazy)
|
||||
sourceMap 05c637d15dff2d0dc5fd-05c637.js.map 399 bytes [emitted] [dev] (auxiliary name: lazy)
|
||||
asset c41aff3dd03dbe1d8aa3-c41aff.js 281 bytes [emitted] [immutable] [minimized] (name: index)
|
||||
|
|
@ -2507,7 +2507,7 @@ a-source-map:
|
|||
asset 89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [from: file.png] (auxiliary name: lazy)
|
||||
asset 7382fad5b015914e0811.jpg?query 5.89 KiB [cached] [immutable] [from: file.jpg?query] (auxiliary name: lazy)
|
||||
asset 7382fad5b015914e0811.jpg 5.89 KiB [emitted] [immutable] [from: file.jpg] (auxiliary name: index)
|
||||
Entrypoint index 3.03 KiB (20.5 KiB) = 1710932a27591ee4a94d-171093.js 2.76 KiB c41aff3dd03dbe1d8aa3-c41aff.js 281 bytes 3 auxiliary assets
|
||||
Entrypoint index 3.03 KiB (20.5 KiB) = 15bc5e7a3cba409fc993-15bc5e.js 2.76 KiB c41aff3dd03dbe1d8aa3-c41aff.js 281 bytes 3 auxiliary assets
|
||||
Entrypoint a 77 bytes (254 bytes) = 222c2acc68675174e6b2-222c2a.js 1 auxiliary asset
|
||||
Entrypoint b 77 bytes (254 bytes) = 222c2acc68675174e6b2-222c2a.js 1 auxiliary asset
|
||||
runtime modules 7.19 KiB 9 modules
|
||||
|
|
@ -2526,8 +2526,8 @@ a-source-map:
|
|||
|
||||
b-source-map:
|
||||
assets by path *.js 3.44 KiB
|
||||
asset 21d982bf196438b90b26-21d982.js 2.76 KiB [emitted] [immutable] [minimized] (name: runtime)
|
||||
sourceMap 21d982bf196438b90b26-21d982.js.map 14.2 KiB [emitted] [dev] (auxiliary name: runtime)
|
||||
asset 34097d095846bc2527cb-34097d.js 2.76 KiB [emitted] [immutable] [minimized] (name: runtime)
|
||||
sourceMap 34097d095846bc2527cb-34097d.js.map 14.2 KiB [emitted] [dev] (auxiliary name: runtime)
|
||||
asset 05c637d15dff2d0dc5fd-05c637.js 344 bytes [emitted] [immutable] [minimized] (name: lazy)
|
||||
sourceMap 05c637d15dff2d0dc5fd-05c637.js.map 395 bytes [emitted] [dev] (auxiliary name: lazy)
|
||||
asset c41aff3dd03dbe1d8aa3-c41aff.js 281 bytes [emitted] [immutable] [minimized] (name: index)
|
||||
|
|
@ -2538,7 +2538,7 @@ b-source-map:
|
|||
asset 89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [from: file.png] (auxiliary name: lazy)
|
||||
asset 7382fad5b015914e0811.jpg?query 5.89 KiB [cached] [immutable] [from: file.jpg?query] (auxiliary name: lazy)
|
||||
asset 7382fad5b015914e0811.jpg 5.89 KiB [emitted] [immutable] [from: file.jpg] (auxiliary name: index)
|
||||
Entrypoint index 3.03 KiB (20.4 KiB) = 21d982bf196438b90b26-21d982.js 2.76 KiB c41aff3dd03dbe1d8aa3-c41aff.js 281 bytes 3 auxiliary assets
|
||||
Entrypoint index 3.03 KiB (20.4 KiB) = 34097d095846bc2527cb-34097d.js 2.76 KiB c41aff3dd03dbe1d8aa3-c41aff.js 281 bytes 3 auxiliary assets
|
||||
Entrypoint a 77 bytes (254 bytes) = 222c2acc68675174e6b2-222c2a.js 1 auxiliary asset
|
||||
Entrypoint b 77 bytes (254 bytes) = 222c2acc68675174e6b2-222c2a.js 1 auxiliary asset
|
||||
runtime modules 7.19 KiB 9 modules
|
||||
|
|
@ -3177,7 +3177,7 @@ cacheable modules 1.35 KiB
|
|||
| [no exports used]
|
||||
| ./node_modules/big-module/index.js 44 bytes [built]
|
||||
| [only some exports used: a, huh]
|
||||
| ModuleConcatenation bailout: List of module exports is dynamic (huh: maybe provided (runtime-defined) and used in main)
|
||||
| ModuleConcatenation bailout: List of module exports is dynamic (a: maybe provided (runtime-defined) and used in main, huh: maybe provided (runtime-defined) and used in main)
|
||||
| ./node_modules/big-module/a.js 58 bytes [built]
|
||||
| [only some exports used: a, huh]
|
||||
| ModuleConcatenation bailout: List of module exports is dynamic (huh: maybe provided (runtime-defined) and used in main)
|
||||
|
|
@ -4391,7 +4391,7 @@ exports[`StatsTestCases should print correct stats for wasm-explorer-examples-sy
|
|||
asset 99.bundle.js 241 bytes [emitted]
|
||||
assets by path *.wasm 1.37 KiB
|
||||
asset 4098dd6bcb43bd54baf6.module.wasm 531 bytes [emitted] [immutable]
|
||||
asset c3c66cf69b0a4bd721a4.module.wasm 290 bytes [emitted] [immutable]
|
||||
asset a0bbe50b118b7ff0648b.module.wasm 290 bytes [emitted] [immutable]
|
||||
asset 86fec7665231a0198df8.module.wasm 156 bytes [emitted] [immutable]
|
||||
asset 1da1d844c1509ed4d4c3.module.wasm 154 bytes [emitted] [immutable]
|
||||
asset 2be4d707a05b1f7313ca.module.wasm 154 bytes [emitted] [immutable]
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ it("should load a utf-8 file with BOM", function () {
|
|||
});
|
||||
|
||||
it("should load a css file with BOM", function () {
|
||||
var css = require("!css-loader!./bomfile.css").default + "";
|
||||
var css = require("!css-loader?sourceMap=false!./bomfile.css").default + "";
|
||||
expect(css).toBe("body{color:#abc}");
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
import { a } from "./module";
|
||||
|
||||
class Class {
|
||||
#field = this instanceof Class ? a : false;
|
||||
field = this instanceof Class ? a : false;
|
||||
#method = () => (this instanceof Class ? a : false);
|
||||
method = () => (this instanceof Class ? a : false);
|
||||
[`key${!this ? a : false}`] = this instanceof Class ? a : false;
|
||||
|
||||
static CLASS = true;
|
||||
|
||||
static #sfield = this.CLASS ? a : false;
|
||||
static sfield = this.CLASS ? a : false;
|
||||
static #smethod = () => (this.CLASS ? a : false);
|
||||
static smethod = () => (this.CLASS ? a : false);
|
||||
static [`skey${!this ? a : false}`] = this.CLASS ? a : false;
|
||||
|
||||
test() {
|
||||
expect(this.#field).toBe(42);
|
||||
expect(this.field).toBe(42);
|
||||
expect(this.#method()).toBe(42);
|
||||
expect(this.method()).toBe(42);
|
||||
expect(this.key42).toBe(42);
|
||||
}
|
||||
|
||||
static stest() {
|
||||
expect(Class.#sfield).toBe(42);
|
||||
expect(Class.sfield).toBe(42);
|
||||
expect(Class.#smethod()).toBe(42);
|
||||
expect(Class.smethod()).toBe(42);
|
||||
expect(Class.skey42).toBe(42);
|
||||
}
|
||||
}
|
||||
|
||||
it("should support class fields", () => {
|
||||
Class.stest();
|
||||
new Class().test();
|
||||
});
|
||||
|
|
@ -0,0 +1 @@
|
|||
export const a = 42;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
var supportsClassFields = require("../../../helpers/supportsClassFields");
|
||||
|
||||
module.exports = function (config) {
|
||||
return supportsClassFields();
|
||||
};
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
// the message is inconsistency between some nodejs versions
|
||||
const UNKNOWN_FUNCTION_TABLE = /invalid index into function table|invalid function/;
|
||||
const UNKNOWN_FUNCTION_TABLE = /table index is out of bounds|invalid index into function table|invalid function/;
|
||||
|
||||
it("should support tables", function() {
|
||||
return import("./wasm-table.wat").then(function(wasm) {
|
||||
it("should support tables", function () {
|
||||
return import("./wasm-table.wat").then(function (wasm) {
|
||||
expect(wasm.callByIndex(0)).toEqual(42);
|
||||
expect(wasm.callByIndex(1)).toEqual(13);
|
||||
expect(() => wasm.callByIndex(2)).toThrow(UNKNOWN_FUNCTION_TABLE);
|
||||
});
|
||||
});
|
||||
|
||||
it("should support exported tables", function() {
|
||||
return import("./wasm-table-export.wat").then(function(wasm) {
|
||||
it("should support exported tables", function () {
|
||||
return import("./wasm-table-export.wat").then(function (wasm) {
|
||||
expect(wasm.table).toBeInstanceOf(WebAssembly.Table);
|
||||
expect(wasm.table.length).toBe(2);
|
||||
const e0 = wasm.table.get(0);
|
||||
|
|
@ -22,8 +22,8 @@ it("should support exported tables", function() {
|
|||
});
|
||||
});
|
||||
|
||||
it("should support imported tables", function() {
|
||||
return import("./wasm-table-imported.wat").then(function(wasm) {
|
||||
it("should support imported tables", function () {
|
||||
return import("./wasm-table-imported.wat").then(function (wasm) {
|
||||
expect(wasm.callByIndex(0)).toEqual(42);
|
||||
expect(wasm.callByIndex(1)).toEqual(13);
|
||||
expect(() => wasm.callByIndex(2)).toThrow(UNKNOWN_FUNCTION_TABLE);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import lodash from "lodash";
|
||||
import isomorphicFetch from "isomorphic-fetch";
|
||||
import { set } from "test";
|
||||
|
||||
set("ok");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
import isomorphicFetch from "isomorphic-fetch";
|
||||
import react from "react";
|
||||
import reactDOM from "react-dom";
|
||||
|
||||
it("should be able to load the modules", () => {
|
||||
expect(isomorphicFetch).toBe("isomorphic-fetch");
|
||||
expect(react).toBe("react");
|
||||
expect(reactDOM).toBe("react-dom");
|
||||
});
|
||||
|
||||
it("should have the correct modules in a lazy chunk", () => {
|
||||
const promise = import(/* webpackChunkName: "lazy" */ "./lazy").then(
|
||||
module => {
|
||||
module.default();
|
||||
}
|
||||
);
|
||||
__non_webpack_require__("./lazy.js");
|
||||
if (document.head._children[0]) document.head._children[0].onload();
|
||||
return promise;
|
||||
});
|
||||
|
||||
import { value } from "test";
|
||||
|
||||
it("other-vendors should run too", () => {
|
||||
expect(value).toBe("ok");
|
||||
});
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import isomorphicFetch from "isomorphic-fetch";
|
||||
import react from "react";
|
||||
import reactDOM from "react-dom";
|
||||
|
||||
it("should be able to load the modules", () => {
|
||||
expect(isomorphicFetch).toBe("isomorphic-fetch");
|
||||
expect(react).toBe("react");
|
||||
expect(reactDOM).toBe("react-dom");
|
||||
});
|
||||
|
||||
it("should have the correct modules in a lazy chunk", () => {
|
||||
const promise = import(/* webpackChunkName: "lazy" */ "./lazy").then(
|
||||
module => {
|
||||
module.default();
|
||||
}
|
||||
);
|
||||
__non_webpack_require__("./lazy.js");
|
||||
if (document.head._children[0]) document.head._children[0].onload();
|
||||
return promise;
|
||||
});
|
||||
|
||||
import { value } from "test";
|
||||
|
||||
it("other-vendors should run too", () => {
|
||||
expect(value).toBe("ok");
|
||||
});
|
||||
|
|
@ -1,11 +1,13 @@
|
|||
module.exports = {
|
||||
findBundle: function() {
|
||||
findBundle: function () {
|
||||
return [
|
||||
"./app.js",
|
||||
"./runtime.js",
|
||||
"./page1.js",
|
||||
"./react-vendors.js",
|
||||
"./other-vendors.js"
|
||||
"./page2.js",
|
||||
"./other-vendors.js",
|
||||
"./page3.js"
|
||||
];
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ module.exports = {
|
|||
return Promise.resolve({
|
||||
app: { import: "./app.js", dependOn: ["other-vendors"] },
|
||||
page1: { import: "./page1.js", dependOn: ["app", "react-vendors"] },
|
||||
page2: { import: "./page2.js", dependOn: ["app", "react-vendors"] },
|
||||
page3: { import: "./page3.js", dependOn: ["app"] },
|
||||
"react-vendors": ["react", "react-dom", "prop-types"],
|
||||
"other-vendors": "./other-vendors"
|
||||
});
|
||||
|
|
@ -37,21 +39,29 @@ module.exports = {
|
|||
chunkModules[chunk.name] = new Set();
|
||||
|
||||
for (const module of chunkGraph.getChunkModulesIterable(chunk)) {
|
||||
chunkModules[chunk.name].add(module);
|
||||
chunkModules[chunk.name].add(module.identifier());
|
||||
}
|
||||
}
|
||||
|
||||
expect([...chunkModules.app]).toStrictEqual(
|
||||
expect.not.arrayContaining([...chunkModules["other-vendors"]])
|
||||
);
|
||||
for (const module of chunkModules["other-vendors"]) {
|
||||
expect([...chunkModules.app]).not.toContain(module);
|
||||
}
|
||||
|
||||
expect([...chunkModules.page1]).toStrictEqual(
|
||||
expect.not.arrayContaining([
|
||||
...chunkModules["other-vendors"],
|
||||
...chunkModules["react-vendors"],
|
||||
...chunkModules["app"]
|
||||
])
|
||||
);
|
||||
for (const module of [
|
||||
...chunkModules["other-vendors"],
|
||||
...chunkModules["react-vendors"],
|
||||
...chunkModules["app"]
|
||||
]) {
|
||||
expect(chunkModules.page1).not.toContain(module);
|
||||
expect(chunkModules.page2).not.toContain(module);
|
||||
}
|
||||
|
||||
for (const module of [
|
||||
...chunkModules["other-vendors"],
|
||||
...chunkModules["app"]
|
||||
]) {
|
||||
expect([...chunkModules.page3]).not.toContain(module);
|
||||
}
|
||||
});
|
||||
};
|
||||
this.hooks.compilation.tap("testcase", handler);
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
import isomorphicFetch from "isomorphic-fetch";
|
||||
1
test/configCases/entry/depend-on-bug/node_modules/isomorphic-fetch.js
generated
vendored
Normal file
1
test/configCases/entry/depend-on-bug/node_modules/isomorphic-fetch.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
module.exports = "isomorphic-fetch";
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import isomorphicFetch from "isomorphic-fetch";
|
||||
|
||||
it("should run", () => {
|
||||
expect(
|
||||
__STATS__.modules.find(m => m.name.includes("isomorphic-fetch")).chunks
|
||||
).toHaveLength(1);
|
||||
});
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
return ["./other-vendors.js", "./page1.js", "./app.js"];
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/** @typedef {import("../../../../").Compiler} Compiler */
|
||||
/** @typedef {import("../../../../").Compilation} Compilation */
|
||||
/** @typedef {import("../../../../").Configuration} Configuration */
|
||||
|
||||
/** @type {Configuration} */
|
||||
/** @type {import("../../../../").Configuration} */
|
||||
module.exports = {
|
||||
entry() {
|
||||
return Promise.resolve({
|
||||
app: { import: "./app.js", dependOn: ["other-vendors"] },
|
||||
page1: { import: "./page1.js", dependOn: ["app"] },
|
||||
"other-vendors": "./other-vendors"
|
||||
});
|
||||
},
|
||||
target: "web",
|
||||
output: {
|
||||
filename: "[name].js"
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
module.exports = [
|
||||
[
|
||||
/Invalid generator object\. Asset Modules Plugin has been initialized using a generator object that does not match the API schema/,
|
||||
/generator has an unknown property 'filename'/
|
||||
]
|
||||
];
|
||||
|
|
@ -0,0 +1 @@
|
|||
import url from "./text.txt";
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello World
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
/** @type {import("../../../../").Configuration} */
|
||||
module.exports = {
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.txt$/,
|
||||
type: "asset/inline",
|
||||
generator: {
|
||||
filename: "[name].txt"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
|
@ -1,4 +1,13 @@
|
|||
import { deepEqual, equal } from "./assert";
|
||||
import {
|
||||
deepEqual,
|
||||
equal,
|
||||
strictEqual,
|
||||
notEqual,
|
||||
maybeEqual,
|
||||
definiteEqual,
|
||||
getNameA,
|
||||
getNameB
|
||||
} from "./assert";
|
||||
|
||||
function fun1() {
|
||||
deepEqual(1, 1);
|
||||
|
|
@ -27,3 +36,31 @@ export class ExportCls2 {
|
|||
this.name = equal;
|
||||
}
|
||||
}
|
||||
|
||||
export class ExportCls3 {
|
||||
static add = () => {
|
||||
strictEqual();
|
||||
};
|
||||
}
|
||||
|
||||
export class ExportCls4 {
|
||||
static name = notEqual;
|
||||
}
|
||||
|
||||
export class ExportCls5a {
|
||||
static name = getNameA();
|
||||
}
|
||||
|
||||
export class ExportCls5b {
|
||||
static [getNameB()] = "name";
|
||||
}
|
||||
|
||||
export class ExportCls6 {
|
||||
add = () => {
|
||||
maybeEqual();
|
||||
};
|
||||
}
|
||||
|
||||
export class ExportCls7 {
|
||||
add = definiteEqual();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
var supportsClassFields = require("../../../helpers/supportsClassFields");
|
||||
|
||||
module.exports = function (config) {
|
||||
return supportsClassFields();
|
||||
};
|
||||
|
|
@ -1,27 +1,75 @@
|
|||
const createTestCases = require("../_helpers/createTestCases");
|
||||
const base = ["getNameA", "getNameB"];
|
||||
module.exports = createTestCases({
|
||||
nothing: {
|
||||
usedExports: [],
|
||||
expect: {
|
||||
"./assert": []
|
||||
"./assert": [...base]
|
||||
}
|
||||
},
|
||||
ExportCls1: {
|
||||
usedExports: ["ExportCls1"],
|
||||
expect: {
|
||||
"./assert": ["deepEqual"]
|
||||
"./assert": [...base, "deepEqual"]
|
||||
}
|
||||
},
|
||||
ExportCls2: {
|
||||
usedExports: ["ExportCls2"],
|
||||
expect: {
|
||||
"./assert": ["equal"]
|
||||
"./assert": [...base, "equal"]
|
||||
}
|
||||
},
|
||||
ExportCls3: {
|
||||
usedExports: ["ExportCls3"],
|
||||
expect: {
|
||||
"./assert": [...base, "strictEqual"]
|
||||
}
|
||||
},
|
||||
ExportCls4: {
|
||||
usedExports: ["ExportCls4"],
|
||||
expect: {
|
||||
"./assert": [...base, "notEqual"]
|
||||
}
|
||||
},
|
||||
ExportCls6: {
|
||||
usedExports: ["ExportCls6"],
|
||||
expect: {
|
||||
"./assert": [...base, "maybeEqual"]
|
||||
}
|
||||
},
|
||||
ExportCls7: {
|
||||
usedExports: ["ExportCls7"],
|
||||
expect: {
|
||||
"./assert": [...base, "definiteEqual"]
|
||||
}
|
||||
},
|
||||
ExportCls1_2: {
|
||||
usedExports: ["ExportCls1", "ExportCls2"],
|
||||
expect: {
|
||||
"./assert": [...base, "deepEqual", "equal"]
|
||||
}
|
||||
},
|
||||
all: {
|
||||
usedExports: ["ExportCls1", "ExportCls2"],
|
||||
usedExports: [
|
||||
"ExportCls1",
|
||||
"ExportCls2",
|
||||
"ExportCls3",
|
||||
"ExportCls4",
|
||||
"ExportCls5a",
|
||||
"ExportCls5b",
|
||||
"ExportCls6",
|
||||
"ExportCls7"
|
||||
],
|
||||
expect: {
|
||||
"./assert": ["deepEqual", "equal"]
|
||||
"./assert": [
|
||||
...base,
|
||||
"deepEqual",
|
||||
"equal",
|
||||
"strictEqual",
|
||||
"notEqual",
|
||||
"maybeEqual",
|
||||
"definiteEqual"
|
||||
]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
module.exports = function supportsES6() {
|
||||
try {
|
||||
eval("class A { #field = 1 }");
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
@ -1,11 +1,16 @@
|
|||
it("should return a valid url when cached", () => {
|
||||
import { stat } from "fs";
|
||||
import { promisify } from "util";
|
||||
|
||||
it("should return a valid url when cached", async () => {
|
||||
const url = new URL("file.txt", import.meta.url);
|
||||
expect(url.pathname).toMatch(/\.txt$/);
|
||||
expect((await promisify(stat)(url)).isFile()).toBe(true);
|
||||
});
|
||||
|
||||
it("should return a valid url when modified", () => {
|
||||
it("should return a valid url when modified", async () => {
|
||||
const url = new URL("other.txt", import.meta.url);
|
||||
expect(url.pathname).toMatch(/\.txt$/);
|
||||
expect((await promisify(stat)(url)).isFile()).toBe(true);
|
||||
});
|
||||
|
||||
it("should not emit undefined files", () => {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
it("should not emit files", () => {
|
||||
expect(STATS_JSON.assets.map(a => a.name)).not.toContainEqual(
|
||||
expect.stringMatching(/\.txt$/)
|
||||
);
|
||||
});
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
import { stat } from "fs";
|
||||
import { promisify } from "util";
|
||||
|
||||
it("should return a valid url when cached", async () => {
|
||||
const url = new URL("file.txt", import.meta.url);
|
||||
expect(url.pathname).toMatch(/\.txt$/);
|
||||
expect((await promisify(stat)(url)).isFile()).toBe(true);
|
||||
});
|
||||
|
||||
it("should return a valid url when modified", async () => {
|
||||
const url = new URL("other.txt", import.meta.url);
|
||||
expect(url.pathname).toMatch(/\.txt$/);
|
||||
expect((await promisify(stat)(url)).isFile()).toBe(true);
|
||||
});
|
||||
|
||||
it("should not emit undefined files", () => {
|
||||
expect(STATS_JSON.assets.map(a => a.name)).not.toContain(undefined);
|
||||
expect(STATS_JSON.assets.map(a => a.name)).not.toContain("undefined");
|
||||
});
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello World
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
import { stat } from "fs";
|
||||
import { promisify } from "util";
|
||||
|
||||
it("should return a valid url when cached", async () => {
|
||||
const url = new URL("file.txt", import.meta.url);
|
||||
expect(url.pathname).toMatch(/\.txt$/);
|
||||
expect((await promisify(stat)(url)).isFile()).toBe(true);
|
||||
});
|
||||
|
||||
it("should return a valid url when modified", async () => {
|
||||
const url = new URL("other.txt", import.meta.url);
|
||||
expect(url.pathname).toMatch(/\.txt$/);
|
||||
expect((await promisify(stat)(url)).isFile()).toBe(true);
|
||||
});
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello World 2
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello World
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello World 3
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
it("should not emit files", () => {
|
||||
expect(STATS_JSON.assets.map(a => a.name)).not.toContainEqual(
|
||||
expect.stringMatching(/\.txt$/)
|
||||
);
|
||||
});
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
import { stat } from "fs";
|
||||
import { promisify } from "util";
|
||||
|
||||
it("should return a valid url when cached", async () => {
|
||||
const url = new URL("file.txt", import.meta.url);
|
||||
expect(url.pathname).toMatch(/\.txt$/);
|
||||
expect((await promisify(stat)(url)).isFile()).toBe(true);
|
||||
});
|
||||
|
||||
it("should return a valid url when modified", async () => {
|
||||
const url = new URL("other.txt", import.meta.url);
|
||||
expect(url.pathname).toMatch(/\.txt$/);
|
||||
expect((await promisify(stat)(url)).isFile()).toBe(true);
|
||||
});
|
||||
|
||||
it("should not rewrite files and only compare them", () => {
|
||||
for (const asset of STATS_JSON.assets) {
|
||||
if (asset.name.endsWith(".txt")) {
|
||||
expect(asset).toHaveProperty("emitted", true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
output: {
|
||||
clean: true
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello World
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
import { stat } from "fs";
|
||||
import { promisify } from "util";
|
||||
|
||||
it("should return a valid url when cached", async () => {
|
||||
const url = new URL("file.txt", import.meta.url);
|
||||
expect(url.pathname).toMatch(/\.txt$/);
|
||||
expect((await promisify(stat)(url)).isFile()).toBe(true);
|
||||
});
|
||||
|
||||
it("should return a valid url when modified", async () => {
|
||||
const url = new URL("other.txt", import.meta.url);
|
||||
expect(url.pathname).toMatch(/\.txt$/);
|
||||
expect((await promisify(stat)(url)).isFile()).toBe(true);
|
||||
});
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello World 2
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello World
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello World 3
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
it("should not emit files", () => {
|
||||
expect(STATS_JSON.assets.map(a => a.name)).not.toContainEqual(
|
||||
expect.stringMatching(/\.txt$/)
|
||||
);
|
||||
});
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
import { stat } from "fs";
|
||||
import { promisify } from "util";
|
||||
|
||||
it("should return a valid url when cached", async () => {
|
||||
const url = new URL("file.txt", import.meta.url);
|
||||
expect(url.pathname).toMatch(/\.txt$/);
|
||||
expect((await promisify(stat)(url)).isFile()).toBe(true);
|
||||
});
|
||||
|
||||
it("should return a valid url when modified", async () => {
|
||||
const url = new URL("other.txt", import.meta.url);
|
||||
expect(url.pathname).toMatch(/\.txt$/);
|
||||
expect((await promisify(stat)(url)).isFile()).toBe(true);
|
||||
});
|
||||
|
||||
it("should not rewrite files and only compare them", () => {
|
||||
for (const asset of STATS_JSON.assets) {
|
||||
if (asset.name.endsWith(".txt")) {
|
||||
expect(asset).toHaveProperty("cached", true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
output: {
|
||||
clean: false
|
||||
}
|
||||
};
|
||||
|
|
@ -60,6 +60,7 @@ import {
|
|||
SequenceExpression,
|
||||
SimpleCallExpression,
|
||||
SimpleLiteral,
|
||||
SourceLocation,
|
||||
SpreadElement,
|
||||
Super,
|
||||
SwitchCase,
|
||||
|
|
@ -887,10 +888,15 @@ declare class ChunkGraph {
|
|||
): ReadonlySet<string>;
|
||||
getChunkRuntimeRequirements(chunk: Chunk): ReadonlySet<string>;
|
||||
getModuleGraphHash(
|
||||
module?: any,
|
||||
runtime?: any,
|
||||
module: Module,
|
||||
runtime: RuntimeSpec,
|
||||
withConnections?: boolean
|
||||
): any;
|
||||
): string;
|
||||
getModuleGraphHashBigInt(
|
||||
module: Module,
|
||||
runtime: RuntimeSpec,
|
||||
withConnections?: boolean
|
||||
): bigint;
|
||||
getTreeRuntimeRequirements(chunk: Chunk): ReadonlySet<string>;
|
||||
static getChunkGraphForModule(
|
||||
module: Module,
|
||||
|
|
@ -2457,9 +2463,9 @@ declare class Dependency {
|
|||
constructor();
|
||||
weak: boolean;
|
||||
optional: boolean;
|
||||
loc: DependencyLocation;
|
||||
readonly type: string;
|
||||
readonly category: string;
|
||||
loc: DependencyLocation;
|
||||
getResourceIdentifier(): null | string;
|
||||
|
||||
/**
|
||||
|
|
@ -3819,6 +3825,11 @@ declare interface FileCacheOptions {
|
|||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* Track and log detailed timing information for individual cache items.
|
||||
*/
|
||||
profile?: boolean;
|
||||
|
||||
/**
|
||||
* When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).
|
||||
*/
|
||||
|
|
@ -4552,6 +4563,7 @@ declare class JavascriptParser extends Parser {
|
|||
| FunctionDeclaration
|
||||
| VariableDeclaration
|
||||
| ClassDeclaration
|
||||
| PrivateIdentifierNode
|
||||
),
|
||||
number
|
||||
],
|
||||
|
|
@ -4654,7 +4666,18 @@ declare class JavascriptParser extends Parser {
|
|||
boolean | void
|
||||
>;
|
||||
classBodyElement: SyncBailHook<
|
||||
[MethodDefinition, ClassExpression | ClassDeclaration],
|
||||
[
|
||||
MethodDefinition | PropertyDefinitionNode,
|
||||
ClassExpression | ClassDeclaration
|
||||
],
|
||||
boolean | void
|
||||
>;
|
||||
classBodyValue: SyncBailHook<
|
||||
[
|
||||
Expression,
|
||||
MethodDefinition | PropertyDefinitionNode,
|
||||
ClassExpression | ClassDeclaration
|
||||
],
|
||||
boolean | void
|
||||
>;
|
||||
label: HookMap<SyncBailHook<[LabeledStatement], boolean | void>>;
|
||||
|
|
@ -4783,7 +4806,6 @@ declare class JavascriptParser extends Parser {
|
|||
currentTagData: any;
|
||||
getRenameIdentifier(expr?: any): undefined | string;
|
||||
walkClass(classy: ClassExpression | ClassDeclaration): void;
|
||||
walkMethodDefinition(methodDefinition?: any): void;
|
||||
preWalkStatements(statements?: any): void;
|
||||
blockPreWalkStatements(statements?: any): void;
|
||||
walkStatements(statements?: any): void;
|
||||
|
|
@ -4968,7 +4990,8 @@ declare class JavascriptParser extends Parser {
|
|||
| ChainExpression
|
||||
| FunctionDeclaration
|
||||
| VariableDeclaration
|
||||
| ClassDeclaration,
|
||||
| ClassDeclaration
|
||||
| PrivateIdentifierNode,
|
||||
commentsStartPos: number
|
||||
): boolean;
|
||||
getComments(range?: any): any[];
|
||||
|
|
@ -8373,6 +8396,12 @@ declare interface PrintedElement {
|
|||
element: string;
|
||||
content: string;
|
||||
}
|
||||
declare interface PrivateIdentifierNode {
|
||||
type: "PrivateIdentifier";
|
||||
name: string;
|
||||
loc?: null | SourceLocation;
|
||||
range?: [number, number];
|
||||
}
|
||||
declare interface Problem {
|
||||
type: ProblemType;
|
||||
path: string;
|
||||
|
|
@ -8490,6 +8519,71 @@ declare interface ProgressPluginOptions {
|
|||
*/
|
||||
profile?: null | boolean;
|
||||
}
|
||||
declare interface PropertyDefinitionNode {
|
||||
type: "PropertyDefinition";
|
||||
key:
|
||||
| UnaryExpression
|
||||
| ThisExpression
|
||||
| ArrayExpression
|
||||
| ObjectExpression
|
||||
| FunctionExpression
|
||||
| ArrowFunctionExpression
|
||||
| YieldExpression
|
||||
| SimpleLiteral
|
||||
| RegExpLiteral
|
||||
| BigIntLiteral
|
||||
| UpdateExpression
|
||||
| BinaryExpression
|
||||
| AssignmentExpression
|
||||
| LogicalExpression
|
||||
| MemberExpression
|
||||
| ConditionalExpression
|
||||
| SimpleCallExpression
|
||||
| NewExpression
|
||||
| SequenceExpression
|
||||
| TemplateLiteral
|
||||
| TaggedTemplateExpression
|
||||
| ClassExpression
|
||||
| MetaProperty
|
||||
| Identifier
|
||||
| AwaitExpression
|
||||
| ImportExpression
|
||||
| ChainExpression
|
||||
| PrivateIdentifierNode;
|
||||
value:
|
||||
| null
|
||||
| UnaryExpression
|
||||
| ThisExpression
|
||||
| ArrayExpression
|
||||
| ObjectExpression
|
||||
| FunctionExpression
|
||||
| ArrowFunctionExpression
|
||||
| YieldExpression
|
||||
| SimpleLiteral
|
||||
| RegExpLiteral
|
||||
| BigIntLiteral
|
||||
| UpdateExpression
|
||||
| BinaryExpression
|
||||
| AssignmentExpression
|
||||
| LogicalExpression
|
||||
| MemberExpression
|
||||
| ConditionalExpression
|
||||
| SimpleCallExpression
|
||||
| NewExpression
|
||||
| SequenceExpression
|
||||
| TemplateLiteral
|
||||
| TaggedTemplateExpression
|
||||
| ClassExpression
|
||||
| MetaProperty
|
||||
| Identifier
|
||||
| AwaitExpression
|
||||
| ImportExpression
|
||||
| ChainExpression;
|
||||
computed: boolean;
|
||||
static: boolean;
|
||||
loc?: null | SourceLocation;
|
||||
range?: [number, number];
|
||||
}
|
||||
declare class ProvidePlugin {
|
||||
constructor(definitions: Record<string, string | string[]>);
|
||||
definitions: Record<string, string | string[]>;
|
||||
|
|
|
|||
224
yarn.lock
224
yarn.lock
|
|
@ -25,25 +25,25 @@
|
|||
dependencies:
|
||||
"@babel/highlight" "^7.12.13"
|
||||
|
||||
"@babel/compat-data@^7.13.12":
|
||||
version "7.13.12"
|
||||
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.13.12.tgz#a8a5ccac19c200f9dd49624cac6e19d7be1236a1"
|
||||
integrity sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==
|
||||
"@babel/compat-data@^7.13.15":
|
||||
version "7.13.15"
|
||||
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.13.15.tgz#7e8eea42d0b64fda2b375b22d06c605222e848f4"
|
||||
integrity sha512-ltnibHKR1VnrU4ymHyQ/CXtNXI6yZC0oJThyW78Hft8XndANwi+9H+UIklBDraIjFEJzw8wmcM427oDd9KS5wA==
|
||||
|
||||
"@babel/core@^7.1.0", "@babel/core@^7.11.1", "@babel/core@^7.7.5":
|
||||
version "7.13.15"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.13.15.tgz#a6d40917df027487b54312202a06812c4f7792d0"
|
||||
integrity sha512-6GXmNYeNjS2Uz+uls5jalOemgIhnTMeaXo+yBUA72kC2uX/8VW6XyhVIo2L8/q0goKQA3EVKx0KOQpVKSeWadQ==
|
||||
version "7.13.16"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.13.16.tgz#7756ab24396cc9675f1c3fcd5b79fcce192ea96a"
|
||||
integrity sha512-sXHpixBiWWFti0AV2Zq7avpTasr6sIAu7Y396c608541qAU2ui4a193m0KSQmfPSKFZLnQ3cvlKDOm3XkuXm3Q==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.12.13"
|
||||
"@babel/generator" "^7.13.9"
|
||||
"@babel/helper-compilation-targets" "^7.13.13"
|
||||
"@babel/generator" "^7.13.16"
|
||||
"@babel/helper-compilation-targets" "^7.13.16"
|
||||
"@babel/helper-module-transforms" "^7.13.14"
|
||||
"@babel/helpers" "^7.13.10"
|
||||
"@babel/parser" "^7.13.15"
|
||||
"@babel/helpers" "^7.13.16"
|
||||
"@babel/parser" "^7.13.16"
|
||||
"@babel/template" "^7.12.13"
|
||||
"@babel/traverse" "^7.13.15"
|
||||
"@babel/types" "^7.13.14"
|
||||
"@babel/types" "^7.13.16"
|
||||
convert-source-map "^1.7.0"
|
||||
debug "^4.1.0"
|
||||
gensync "^1.0.0-beta.2"
|
||||
|
|
@ -51,12 +51,12 @@
|
|||
semver "^6.3.0"
|
||||
source-map "^0.5.0"
|
||||
|
||||
"@babel/generator@^7.13.9":
|
||||
version "7.13.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.9.tgz#3a7aa96f9efb8e2be42d38d80e2ceb4c64d8de39"
|
||||
integrity sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==
|
||||
"@babel/generator@^7.13.16", "@babel/generator@^7.13.9":
|
||||
version "7.13.16"
|
||||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.16.tgz#0befc287031a201d84cdfc173b46b320ae472d14"
|
||||
integrity sha512-grBBR75UnKOcUWMp8WoDxNsWCFl//XCK6HWTrBQKTr5SV9f5g0pNOjdyzi/DTBv12S9GnYPInIXQBTky7OXEMg==
|
||||
dependencies:
|
||||
"@babel/types" "^7.13.0"
|
||||
"@babel/types" "^7.13.16"
|
||||
jsesc "^2.5.1"
|
||||
source-map "^0.5.0"
|
||||
|
||||
|
|
@ -67,12 +67,12 @@
|
|||
dependencies:
|
||||
"@babel/types" "^7.12.13"
|
||||
|
||||
"@babel/helper-compilation-targets@^7.13.13":
|
||||
version "7.13.13"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.13.tgz#2b2972a0926474853f41e4adbc69338f520600e5"
|
||||
integrity sha512-q1kcdHNZehBwD9jYPh3WyXcsFERi39X4I59I3NadciWtNDyZ6x+GboOxncFK0kXlKIv6BJm5acncehXWUjWQMQ==
|
||||
"@babel/helper-compilation-targets@^7.13.16":
|
||||
version "7.13.16"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz#6e91dccf15e3f43e5556dffe32d860109887563c"
|
||||
integrity sha512-3gmkYIrpqsLlieFwjkGgLaSHmhnvlAYzZLlYVjlW+QwI+1zE17kGxuJGmIqDQdYp56XdmGeD+Bswx0UTyG18xA==
|
||||
dependencies:
|
||||
"@babel/compat-data" "^7.13.12"
|
||||
"@babel/compat-data" "^7.13.15"
|
||||
"@babel/helper-validator-option" "^7.12.17"
|
||||
browserslist "^4.14.5"
|
||||
semver "^6.3.0"
|
||||
|
|
@ -167,14 +167,14 @@
|
|||
resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz#d1fbf012e1a79b7eebbfdc6d270baaf8d9eb9831"
|
||||
integrity sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==
|
||||
|
||||
"@babel/helpers@^7.13.10":
|
||||
version "7.13.10"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.13.10.tgz#fd8e2ba7488533cdeac45cc158e9ebca5e3c7df8"
|
||||
integrity sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==
|
||||
"@babel/helpers@^7.13.16":
|
||||
version "7.13.16"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.13.16.tgz#08af075f786fd06a56e41bcac3e8cc87ddc4d0b3"
|
||||
integrity sha512-x5otxUaLpdWHl02P4L94wBU+2BJXBkvO+6d6uzQ+xD9/h2hTSAwA5O8QV8GqKx/l8i+VYmKKQg9e2QGTa2Wu3Q==
|
||||
dependencies:
|
||||
"@babel/template" "^7.12.13"
|
||||
"@babel/traverse" "^7.13.0"
|
||||
"@babel/types" "^7.13.0"
|
||||
"@babel/traverse" "^7.13.15"
|
||||
"@babel/types" "^7.13.16"
|
||||
|
||||
"@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13":
|
||||
version "7.12.13"
|
||||
|
|
@ -185,10 +185,10 @@
|
|||
chalk "^2.0.0"
|
||||
js-tokens "^4.0.0"
|
||||
|
||||
"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.15", "@babel/parser@^7.6.0", "@babel/parser@^7.9.6":
|
||||
version "7.13.15"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.15.tgz#8e66775fb523599acb6a289e12929fa5ab0954d8"
|
||||
integrity sha512-b9COtcAlVEQljy/9fbcMHpG+UIW9ReF+gpaxDHTlZd0c6/UU9ng8zdySAW9sRTzpvcdCHn6bUcbuYUgGzLAWVQ==
|
||||
"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.15", "@babel/parser@^7.13.16", "@babel/parser@^7.6.0", "@babel/parser@^7.9.6":
|
||||
version "7.13.16"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.16.tgz#0f18179b0448e6939b1f3f5c4c355a3a9bcdfd37"
|
||||
integrity sha512-6bAg36mCwuqLO0hbR+z7PHuqWiCeP7Dzg73OpQwsAB1Eb8HnGEz5xYBzCfbu+YjoaJsJs+qheDxVAuqbt3ILEw==
|
||||
|
||||
"@babel/plugin-syntax-async-generators@^7.8.4":
|
||||
version "7.8.4"
|
||||
|
|
@ -349,13 +349,12 @@
|
|||
debug "^4.1.0"
|
||||
globals "^11.1.0"
|
||||
|
||||
"@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.0", "@babel/types@^7.13.12", "@babel/types@^7.13.14", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.6.1", "@babel/types@^7.9.6":
|
||||
version "7.13.14"
|
||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.14.tgz#c35a4abb15c7cd45a2746d78ab328e362cbace0d"
|
||||
integrity sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ==
|
||||
"@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.12", "@babel/types@^7.13.14", "@babel/types@^7.13.16", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.6.1", "@babel/types@^7.9.6":
|
||||
version "7.13.16"
|
||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.16.tgz#916120b858aa5655cfba84bd0f6021ff5bdb4e65"
|
||||
integrity sha512-7enM8Wxhrl1hB1+k6+xO6RmxpNkaveRWkdpyii8DkrLWRgr0l3x29/SEuhTIkP+ynHsU/Hpjn8Evd/axv/ll6Q==
|
||||
dependencies:
|
||||
"@babel/helper-validator-identifier" "^7.12.11"
|
||||
lodash "^4.17.19"
|
||||
to-fast-properties "^2.0.0"
|
||||
|
||||
"@bcoe/v8-coverage@^0.2.3":
|
||||
|
|
@ -541,6 +540,11 @@
|
|||
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz#8f03a22a04de437254e8ce8cc84ba39689288752"
|
||||
integrity sha512-HyYEUDeIj5rRQU2Hk5HTB2uHsbRQpF70nvMhVzi+VJR0X+xNEhjPui4/kBf3VeH/wqD28PT4sVOm8qqLjBrSZg==
|
||||
|
||||
"@es-joy/jsdoccomment@^0.1.1":
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.1.1.tgz#23c54b8803cd10a2455385a5b2d7c27d6b55c36d"
|
||||
integrity sha512-6lIx5Pjc50D7VJU9lfRZ1twfIrIwQk+aeT9Ink2C07IUu/y9pxkIpDqmhY/VN3jAW42dA5z6ioOdyhOZZU1isw==
|
||||
|
||||
"@eslint/eslintrc@^0.4.0":
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.0.tgz#99cc0a0584d72f1df38b900fb062ba995f395547"
|
||||
|
|
@ -896,9 +900,9 @@
|
|||
"@types/istanbul-lib-report" "*"
|
||||
|
||||
"@types/jest@^26.0.15":
|
||||
version "26.0.22"
|
||||
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.22.tgz#8308a1debdf1b807aa47be2838acdcd91e88fbe6"
|
||||
integrity sha512-eeWwWjlqxvBxc4oQdkueW5OF/gtfSceKk4OnOAGlUSwS/liBRtZppbJuz1YkgbrbfGOoeBHun9fOvXnjNwrSOw==
|
||||
version "26.0.23"
|
||||
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.23.tgz#a1b7eab3c503b80451d019efb588ec63522ee4e7"
|
||||
integrity sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA==
|
||||
dependencies:
|
||||
jest-diff "^26.0.0"
|
||||
pretty-format "^26.0.0"
|
||||
|
|
@ -913,10 +917,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6"
|
||||
integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=
|
||||
|
||||
"@types/node@*", "@types/node@^14.14.10":
|
||||
version "14.14.39"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.39.tgz#9ef394d4eb52953d2890e4839393c309aa25d2d1"
|
||||
integrity sha512-Qipn7rfTxGEDqZiezH+wxqWYR8vcXq5LRpZrETD19Gs4o8LbklbmqotSUsMU+s5G3PJwMRDfNEYoxrcBwIxOuw==
|
||||
"@types/node@*", "@types/node@^15.0.1":
|
||||
version "15.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-15.0.1.tgz#ef34dea0881028d11398be5bf4e856743e3dc35a"
|
||||
integrity sha512-TMkXt0Ck1y0KKsGr9gJtWGjttxlZnnvDtphxUOSd0bfaR6Q1jle+sPvrzNR1urqYTWMinoKvjKfXUGsumaO1PA==
|
||||
|
||||
"@types/normalize-package-data@^2.4.0":
|
||||
version "2.4.0"
|
||||
|
|
@ -1188,10 +1192,10 @@ acorn@^7.1.1, acorn@^7.4.0:
|
|||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
|
||||
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
|
||||
|
||||
acorn@^8.0.4:
|
||||
version "8.1.1"
|
||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.1.1.tgz#fb0026885b9ac9f48bac1e185e4af472971149ff"
|
||||
integrity sha512-xYiIVjNuqtKXMxlRMDc6mZUhXehod4a3gbZ1qRlM7icK4EbxUFNLhWoPblCvFtB2Y9CIqHP3CF/rdxLItaQv8g==
|
||||
acorn@^8.2.1:
|
||||
version "8.2.2"
|
||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.2.2.tgz#c4574e4fea298d6e6ed4b85ab844b06dd59f26d6"
|
||||
integrity sha512-VrMS8kxT0e7J1EX0p6rI/E0FbfOVcvBpbIqHThFv+f8YrZIlMfVotYcXKVPmTvPW8sW5miJzfUFrrvthUZg8VQ==
|
||||
|
||||
aggregate-error@^3.0.0:
|
||||
version "3.0.1"
|
||||
|
|
@ -1566,13 +1570,13 @@ browser-process-hrtime@^1.0.0:
|
|||
integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==
|
||||
|
||||
browserslist@^4.14.5:
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.4.tgz#7ebf913487f40caf4637b892b268069951c35d58"
|
||||
integrity sha512-d7rCxYV8I9kj41RH8UKYnvDYCRENUlHRgyXy/Rhr/1BaeLGfiCptEdFE8MIrvGfWbBFNjVYx76SQWvNX1j+/cQ==
|
||||
version "4.16.6"
|
||||
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2"
|
||||
integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==
|
||||
dependencies:
|
||||
caniuse-lite "^1.0.30001208"
|
||||
caniuse-lite "^1.0.30001219"
|
||||
colorette "^1.2.2"
|
||||
electron-to-chromium "^1.3.712"
|
||||
electron-to-chromium "^1.3.723"
|
||||
escalade "^3.1.1"
|
||||
node-releases "^1.1.71"
|
||||
|
||||
|
|
@ -1639,10 +1643,10 @@ camelcase@^6.0.0, camelcase@^6.2.0:
|
|||
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809"
|
||||
integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==
|
||||
|
||||
caniuse-lite@^1.0.30001208:
|
||||
version "1.0.30001208"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001208.tgz#a999014a35cebd4f98c405930a057a0d75352eb9"
|
||||
integrity sha512-OE5UE4+nBOro8Dyvv0lfx+SRtfVIOM9uhKqFmJeUbGriqhhStgp1A0OyBpgy3OUF8AhYCT+PVwPC1gMl2ZcQMA==
|
||||
caniuse-lite@^1.0.30001219:
|
||||
version "1.0.30001219"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001219.tgz#5bfa5d0519f41f993618bd318f606a4c4c16156b"
|
||||
integrity sha512-c0yixVG4v9KBc/tQ2rlbB3A/bgBFRvl8h8M4IeUbqCca4gsiCfvtaheUssbnux/Mb66Vjz7x8yYjDgYcNQOhyQ==
|
||||
|
||||
capture-exit@^2.0.0:
|
||||
version "2.0.0"
|
||||
|
|
@ -1882,10 +1886,10 @@ comment-json@^4.0.6, comment-json@^4.1.0:
|
|||
has-own-prop "^2.0.0"
|
||||
repeat-string "^1.6.1"
|
||||
|
||||
comment-parser@1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.1.2.tgz#e5317d7a2ec22b470dcb54a29b25426c30bf39d8"
|
||||
integrity sha512-AOdq0i8ghZudnYv8RUnHrhTgafUGs61Rdz9jemU5x2lnZwAWyOq7vySo626K59e1fVKH1xSRorJwPVRLSWOoAQ==
|
||||
comment-parser@1.1.5:
|
||||
version "1.1.5"
|
||||
resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.1.5.tgz#453627ef8f67dbcec44e79a9bd5baa37f0bce9b2"
|
||||
integrity sha512-RePCE4leIhBlmrqiYTvaqEeGYg7qpSl4etaIabKtdOQVi+mSTIBBklGUwIr79GXYnl3LpMwmDw4KeR2stNc6FA==
|
||||
|
||||
commondir@^1.0.1:
|
||||
version "1.0.1"
|
||||
|
|
@ -1942,9 +1946,9 @@ copy-descriptor@^0.1.0:
|
|||
integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
|
||||
|
||||
core-js@^3.6.5:
|
||||
version "3.10.1"
|
||||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.10.1.tgz#e683963978b6806dcc6c0a4a8bd4ab0bdaf3f21a"
|
||||
integrity sha512-pwCxEXnj27XG47mu7SXAwhLP3L5CrlvCB91ANUkIz40P27kUcvNfSdvyZJ9CLHiVoKSp+TTChMQMSKQEH/IQxA==
|
||||
version "3.12.0"
|
||||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.12.0.tgz#62bac86f7d7f087d40dba3e90a211c2c3c8559ea"
|
||||
integrity sha512-SaMnchL//WwU2Ot1hhkPflE8gzo7uq1FGvUJ8GKmi3TOU7rGTHIU+eir1WGf6qOtTyxdfdcp10yPdGZ59sQ3hw==
|
||||
|
||||
core-util-is@1.0.2, core-util-is@^1.0.2, core-util-is@~1.0.0:
|
||||
version "1.0.2"
|
||||
|
|
@ -2103,22 +2107,21 @@ cspell@^4.0.63:
|
|||
minimatch "^3.0.4"
|
||||
|
||||
css-loader@^5.0.1:
|
||||
version "5.2.1"
|
||||
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-5.2.1.tgz#15fbd5b6ac4c1b170a098f804c5abd0722f2aa73"
|
||||
integrity sha512-YCyRzlt/jgG1xanXZDG/DHqAueOtXFHeusP9TS478oP1J++JSKOyEgGW1GHVoCj/rkS+GWOlBwqQJBr9yajQ9w==
|
||||
version "5.2.4"
|
||||
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-5.2.4.tgz#e985dcbce339812cb6104ef3670f08f9893a1536"
|
||||
integrity sha512-OFYGyINCKkdQsTrSYxzGSFnGS4gNjcXkKkQgWxK138jgnPt+lepxdjSZNc8sHAl5vP3DhsJUxufWIjOwI8PMMw==
|
||||
dependencies:
|
||||
camelcase "^6.2.0"
|
||||
cssesc "^3.0.0"
|
||||
icss-utils "^5.1.0"
|
||||
loader-utils "^2.0.0"
|
||||
postcss "^8.2.8"
|
||||
postcss "^8.2.10"
|
||||
postcss-modules-extract-imports "^3.0.0"
|
||||
postcss-modules-local-by-default "^4.0.0"
|
||||
postcss-modules-scope "^3.0.0"
|
||||
postcss-modules-values "^4.0.0"
|
||||
postcss-value-parser "^4.1.0"
|
||||
schema-utils "^3.0.0"
|
||||
semver "^7.3.4"
|
||||
semver "^7.3.5"
|
||||
|
||||
cssesc@^3.0.0:
|
||||
version "3.0.0"
|
||||
|
|
@ -2313,10 +2316,10 @@ ecc-jsbn@~0.1.1:
|
|||
jsbn "~0.1.0"
|
||||
safer-buffer "^2.1.0"
|
||||
|
||||
electron-to-chromium@^1.3.712:
|
||||
version "1.3.712"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.712.tgz#ae467ffe5f95961c6d41ceefe858fc36eb53b38f"
|
||||
integrity sha512-3kRVibBeCM4vsgoHHGKHmPocLqtFAGTrebXxxtgKs87hNUzXrX2NuS3jnBys7IozCnw7viQlozxKkmty2KNfrw==
|
||||
electron-to-chromium@^1.3.723:
|
||||
version "1.3.723"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.723.tgz#52769a75635342a4db29af5f1e40bd3dad02c877"
|
||||
integrity sha512-L+WXyXI7c7+G1V8ANzRsPI5giiimLAUDC6Zs1ojHHPhYXb3k/iTABFmWjivEtsWrRQymjnO66/rO2ZTABGdmWg==
|
||||
|
||||
emittery@^0.7.1:
|
||||
version "0.7.2"
|
||||
|
|
@ -2469,9 +2472,9 @@ escodegen@^1.14.1:
|
|||
source-map "~0.6.1"
|
||||
|
||||
eslint-config-prettier@^8.1.0:
|
||||
version "8.2.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.2.0.tgz#78de77d63bca8e9e59dae75a614b5299925bb7b3"
|
||||
integrity sha512-dWV9EVeSo2qodOPi1iBYU/x6F6diHv8uujxbxr77xExs3zTAlNXvVZKiyLsQGNz7yPV2K49JY5WjPzNIuDc2Bw==
|
||||
version "8.3.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a"
|
||||
integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==
|
||||
|
||||
eslint-plugin-es@^3.0.0:
|
||||
version "3.0.1"
|
||||
|
|
@ -2482,23 +2485,24 @@ eslint-plugin-es@^3.0.0:
|
|||
regexpp "^3.0.0"
|
||||
|
||||
eslint-plugin-jest@^24.1.3:
|
||||
version "24.3.5"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.5.tgz#71f0b580f87915695c286c3f0eb88cf23664d044"
|
||||
integrity sha512-XG4rtxYDuJykuqhsOqokYIR84/C8pRihRtEpVskYLbIIKGwPNW2ySxdctuVzETZE+MbF/e7wmsnbNVpzM0rDug==
|
||||
version "24.3.6"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.6.tgz#5f0ca019183c3188c5ad3af8e80b41de6c8e9173"
|
||||
integrity sha512-WOVH4TIaBLIeCX576rLcOgjNXqP+jNlCiEmRgFTfQtJ52DpwnIQKAVGlGPAN7CZ33bW6eNfHD6s8ZbEUTQubJg==
|
||||
dependencies:
|
||||
"@typescript-eslint/experimental-utils" "^4.0.1"
|
||||
|
||||
eslint-plugin-jsdoc@^32.0.2:
|
||||
version "32.3.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-32.3.0.tgz#7c9fa5da8c72bd6ad7d97bbf8dee8bc29bec3f9e"
|
||||
integrity sha512-zyx7kajDK+tqS1bHuY5sapkad8P8KT0vdd/lE55j47VPG2MeenSYuIY/M/Pvmzq5g0+3JB+P3BJGUXmHxtuKPQ==
|
||||
eslint-plugin-jsdoc@^33.0.0:
|
||||
version "33.0.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-33.0.0.tgz#0aefe92706176b8c02c5a8ae721bf3b4705936a5"
|
||||
integrity sha512-bkopnnuDdT04abKWPfDdD6XcAp2yX6UDpDViyvIdYmxbZYbpHXCRzQzLqCTo+SzWSTS0KFWz/V3shmmMr+x4EA==
|
||||
dependencies:
|
||||
comment-parser "1.1.2"
|
||||
"@es-joy/jsdoccomment" "^0.1.1"
|
||||
comment-parser "1.1.5"
|
||||
debug "^4.3.1"
|
||||
jsdoctypeparser "^9.0.0"
|
||||
lodash "^4.17.20"
|
||||
lodash "^4.17.21"
|
||||
regextras "^0.7.1"
|
||||
semver "^7.3.4"
|
||||
semver "^7.3.5"
|
||||
spdx-expression-parse "^3.0.1"
|
||||
|
||||
eslint-plugin-node@^11.0.0:
|
||||
|
|
@ -2546,9 +2550,9 @@ eslint-visitor-keys@^2.0.0:
|
|||
integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==
|
||||
|
||||
eslint@^7.14.0:
|
||||
version "7.24.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.24.0.tgz#2e44fa62d93892bfdb100521f17345ba54b8513a"
|
||||
integrity sha512-k9gaHeHiFmGCDQ2rEfvULlSLruz6tgfA8DEn+rY9/oYPFFTlz55mM/Q/Rij1b2Y42jwZiK3lXvNTw6w6TXzcKQ==
|
||||
version "7.25.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.25.0.tgz#1309e4404d94e676e3e831b3a3ad2b050031eb67"
|
||||
integrity sha512-TVpSovpvCNpLURIScDRB6g5CYu/ZFq9GfX2hLNIV4dSBKxIWojeDODvYl3t0k0VtMxYeR8OXPCFE5+oHMlGfhw==
|
||||
dependencies:
|
||||
"@babel/code-frame" "7.12.11"
|
||||
"@eslint/eslintrc" "^0.4.0"
|
||||
|
|
@ -2924,9 +2928,9 @@ forever-agent@~0.6.1:
|
|||
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
|
||||
|
||||
fork-ts-checker-webpack-plugin@^6.0.5:
|
||||
version "6.2.1"
|
||||
resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.2.1.tgz#e3a7e64c90e5490a75d43d86d47f02e538c0a13e"
|
||||
integrity sha512-Pyhn2kav/Y2g6I7aInABgcph/B78jjdXc4kGHzaAUBL4UVthknxM6aMH47JwpnuTJmdOuf6p5vMbIahsBHuWGg==
|
||||
version "6.2.5"
|
||||
resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.2.5.tgz#09e81ad57ed862c9dd093298550e7f6966ab1a2f"
|
||||
integrity sha512-EqHkTmxOotb5WJEc8kjzJh8IRuRUpHxtBh+jGyOHJcEwwZzqTmlMNAJsVF3tvALohi9yJzV8C1j215DyK8Ta8w==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.8.3"
|
||||
"@types/json-schema" "^7.0.5"
|
||||
|
|
@ -4274,9 +4278,9 @@ lcov-parse@^1.0.0:
|
|||
integrity sha1-6w1GtUER68VhrLTECO+TY73I9+A=
|
||||
|
||||
less-loader@^8.0.0:
|
||||
version "8.1.0"
|
||||
resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-8.1.0.tgz#8276adc16bf6576dd80b71563685a2cfe93b0a50"
|
||||
integrity sha512-IE73O5LY5WHA71EDwszM2PIEGDF30xz45GplpRhYuxMXhAvXoMudu/ItjllNR/ht7XLh5N7JegzRg11HYu+xxg==
|
||||
version "8.1.1"
|
||||
resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-8.1.1.tgz#ababe912580457ad00a4318146aac5b53e023f42"
|
||||
integrity sha512-K93jJU7fi3n6rxVvzp8Cb88Uy9tcQKfHlkoezHwKILXhlNYiRQl4yowLIkQqmBXOH/5I8yoKiYeIf781HGkW9g==
|
||||
dependencies:
|
||||
klona "^2.0.4"
|
||||
|
||||
|
|
@ -4601,9 +4605,9 @@ min-indent@^1.0.0:
|
|||
integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==
|
||||
|
||||
mini-css-extract-plugin@^1.0.0:
|
||||
version "1.4.1"
|
||||
resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-1.4.1.tgz#975e27c1d0bd8e052972415f47c79cea5ed37548"
|
||||
integrity sha512-COAGbpAsU0ioFzj+/RRfO5Qv177L1Z/XAx2EmCF33b8GDDqKygMffBTws2lit8iaPdrbKEY5P+zsseBUCREZWQ==
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-1.6.0.tgz#b4db2525af2624899ed64a23b0016e0036411893"
|
||||
integrity sha512-nPFKI7NSy6uONUo9yn2hIfb9vyYvkFu95qki0e21DQ9uaqNKDP15DGpK0KnV6wDroWxPHtExrdEwx/yDQ8nVRw==
|
||||
dependencies:
|
||||
loader-utils "^2.0.0"
|
||||
schema-utils "^3.0.0"
|
||||
|
|
@ -5099,10 +5103,10 @@ postcss-value-parser@^4.1.0:
|
|||
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb"
|
||||
integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==
|
||||
|
||||
postcss@^8.2.8:
|
||||
version "8.2.9"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.9.tgz#fd95ff37b5cee55c409b3fdd237296ab4096fba3"
|
||||
integrity sha512-b+TmuIL4jGtCHtoLi+G/PisuIl9avxs8IZMSmlABRwNz5RLUUACrC+ws81dcomz1nRezm5YPdXiMEzBEKgYn+Q==
|
||||
postcss@^8.2.10:
|
||||
version "8.2.10"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.10.tgz#ca7a042aa8aff494b334d0ff3e9e77079f6f702b"
|
||||
integrity sha512-b/h7CPV7QEdrqIxtAf2j31U5ef05uBDuvoXv6L51Q4rcS1jdlXAVKJv+atCFdUXYl9dyTHGyoMzIepwowRJjFw==
|
||||
dependencies:
|
||||
colorette "^1.2.2"
|
||||
nanoid "^3.1.22"
|
||||
|
|
@ -5696,10 +5700,10 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.3.0:
|
|||
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
|
||||
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
|
||||
|
||||
semver@^7.2.1, semver@^7.3.2, semver@^7.3.4:
|
||||
version "7.3.4"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97"
|
||||
integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==
|
||||
semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5:
|
||||
version "7.3.5"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
|
||||
integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
|
||||
dependencies:
|
||||
lru-cache "^6.0.0"
|
||||
|
||||
|
|
@ -6305,9 +6309,9 @@ trim-newlines@^3.0.0:
|
|||
integrity sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA==
|
||||
|
||||
ts-loader@^8.0.2:
|
||||
version "8.1.0"
|
||||
resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-8.1.0.tgz#d6292487df279c7cc79b6d3b70bb9d31682b693e"
|
||||
integrity sha512-YiQipGGAFj2zBfqLhp28yUvPP9jUGqHxRzrGYuc82Z2wM27YIHbElXiaZDc93c3x0mz4zvBmS6q/DgExpdj37A==
|
||||
version "8.2.0"
|
||||
resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-8.2.0.tgz#6a3aeaa378aecda543e2ed2c332d3123841d52e0"
|
||||
integrity sha512-ebXBFrNyMSmbWgjnb3WBloUBK+VSx1xckaXsMXxlZRDqce/OPdYBVN5efB0W3V0defq0Gcy4YuzvPGqRgjj85A==
|
||||
dependencies:
|
||||
chalk "^4.1.0"
|
||||
enhanced-resolve "^4.0.0"
|
||||
|
|
|
|||
Loading…
Reference in New Issue