mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2026-01-02 11:07:20 +01:00
Updated to v1.9.9
This commit is contained in:
100
conf/site/node_modules/webpack/lib/buildChunkGraph.js
generated
vendored
100
conf/site/node_modules/webpack/lib/buildChunkGraph.js
generated
vendored
@@ -38,8 +38,8 @@ const GraphHelpers = require("./GraphHelpers");
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} ChunkGroupDep
|
||||
* @property {AsyncDependenciesBlock} block referencing block
|
||||
* @typedef {Object} BlockChunkGroupConnection
|
||||
* @property {ChunkGroupInfo} originChunkGroupInfo origin chunk group
|
||||
* @property {ChunkGroup} chunkGroup referenced chunk group
|
||||
*/
|
||||
|
||||
@@ -143,7 +143,7 @@ const extraceBlockInfoMap = compilation => {
|
||||
* @param {Compilation} compilation the compilation
|
||||
* @param {Entrypoint[]} inputChunkGroups input groups
|
||||
* @param {Map<ChunkGroup, ChunkGroupInfo>} chunkGroupInfoMap mapping from chunk group to available modules
|
||||
* @param {Map<ChunkGroup, ChunkGroupDep[]>} chunkDependencies dependencies for chunk groups
|
||||
* @param {Map<AsyncDependenciesBlock, BlockChunkGroupConnection[]>} blockConnections connection for blocks
|
||||
* @param {Set<DependenciesBlock>} blocksWithNestedBlocks flag for blocks that have nested blocks
|
||||
* @param {Set<ChunkGroup>} allCreatedChunkGroups filled with all chunk groups that are created here
|
||||
*/
|
||||
@@ -151,7 +151,7 @@ const visitModules = (
|
||||
compilation,
|
||||
inputChunkGroups,
|
||||
chunkGroupInfoMap,
|
||||
chunkDependencies,
|
||||
blockConnections,
|
||||
blocksWithNestedBlocks,
|
||||
allCreatedChunkGroups
|
||||
) => {
|
||||
@@ -229,6 +229,8 @@ const visitModules = (
|
||||
let chunk;
|
||||
/** @type {ChunkGroup} */
|
||||
let chunkGroup;
|
||||
/** @type {ChunkGroupInfo} */
|
||||
let chunkGroupInfo;
|
||||
/** @type {DependenciesBlock} */
|
||||
let block;
|
||||
/** @type {Set<Module>} */
|
||||
@@ -263,17 +265,17 @@ const visitModules = (
|
||||
blockChunkGroups.set(b, c);
|
||||
allCreatedChunkGroups.add(c);
|
||||
}
|
||||
blockConnections.set(b, []);
|
||||
} else {
|
||||
// TODO webpack 5 remove addOptions check
|
||||
if (c.addOptions) c.addOptions(b.groupOptions);
|
||||
c.addOrigin(module, b.loc, b.request);
|
||||
}
|
||||
|
||||
// 2. We store the Block+Chunk mapping as dependency for the chunk
|
||||
let deps = chunkDependencies.get(chunkGroup);
|
||||
if (!deps) chunkDependencies.set(chunkGroup, (deps = []));
|
||||
deps.push({
|
||||
block: b,
|
||||
// 2. We store the connection for the block
|
||||
// to connect it later if needed
|
||||
blockConnections.get(b).push({
|
||||
originChunkGroupInfo: chunkGroupInfo,
|
||||
chunkGroup: c
|
||||
});
|
||||
|
||||
@@ -306,7 +308,7 @@ const visitModules = (
|
||||
chunk = queueItem.chunk;
|
||||
if (chunkGroup !== queueItem.chunkGroup) {
|
||||
chunkGroup = queueItem.chunkGroup;
|
||||
const chunkGroupInfo = chunkGroupInfoMap.get(chunkGroup);
|
||||
chunkGroupInfo = chunkGroupInfoMap.get(chunkGroup);
|
||||
minAvailableModules = chunkGroupInfo.minAvailableModules;
|
||||
skippedItems = chunkGroupInfo.skippedItems;
|
||||
}
|
||||
@@ -583,17 +585,14 @@ const visitModules = (
|
||||
/**
|
||||
*
|
||||
* @param {Set<DependenciesBlock>} blocksWithNestedBlocks flag for blocks that have nested blocks
|
||||
* @param {Map<ChunkGroup, ChunkGroupDep[]>} chunkDependencies dependencies for chunk groups
|
||||
* @param {Map<AsyncDependenciesBlock, BlockChunkGroupConnection[]>} blockConnections connection for blocks
|
||||
* @param {Map<ChunkGroup, ChunkGroupInfo>} chunkGroupInfoMap mapping from chunk group to available modules
|
||||
*/
|
||||
const connectChunkGroups = (
|
||||
blocksWithNestedBlocks,
|
||||
chunkDependencies,
|
||||
blockConnections,
|
||||
chunkGroupInfoMap
|
||||
) => {
|
||||
/** @type {Set<Module>} */
|
||||
let resultingAvailableModules;
|
||||
|
||||
/**
|
||||
* Helper function to check if all modules of a chunk are available
|
||||
*
|
||||
@@ -611,49 +610,38 @@ const connectChunkGroups = (
|
||||
};
|
||||
|
||||
// For each edge in the basic chunk graph
|
||||
/**
|
||||
* @param {ChunkGroupDep} dep the dependency used for filtering
|
||||
* @returns {boolean} used to filter "edges" (aka Dependencies) that were pointing
|
||||
* to modules that are already available. Also filters circular dependencies in the chunks graph
|
||||
*/
|
||||
const filterFn = dep => {
|
||||
const depChunkGroup = dep.chunkGroup;
|
||||
// TODO is this needed?
|
||||
if (blocksWithNestedBlocks.has(dep.block)) return true;
|
||||
if (areModulesAvailable(depChunkGroup, resultingAvailableModules)) {
|
||||
return false; // break all modules are already available
|
||||
for (const [block, connections] of blockConnections) {
|
||||
// 1. Check if connection is needed
|
||||
// When none of the dependencies need to be connected
|
||||
// we can skip all of them
|
||||
// It's not possible to filter each item so it doesn't create inconsistent
|
||||
// connections and modules can only create one version
|
||||
// TODO maybe decide this per runtime
|
||||
if (
|
||||
// TODO is this needed?
|
||||
!blocksWithNestedBlocks.has(block) &&
|
||||
connections.every(({ chunkGroup, originChunkGroupInfo }) =>
|
||||
areModulesAvailable(
|
||||
chunkGroup,
|
||||
originChunkGroupInfo.resultingAvailableModules
|
||||
)
|
||||
)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
// For all deps, check if chunk groups need to be connected
|
||||
for (const [chunkGroup, deps] of chunkDependencies) {
|
||||
if (deps.length === 0) continue;
|
||||
|
||||
// 1. Get info from chunk group info map
|
||||
const info = chunkGroupInfoMap.get(chunkGroup);
|
||||
resultingAvailableModules = info.resultingAvailableModules;
|
||||
|
||||
// 2. Foreach edge
|
||||
for (let i = 0; i < deps.length; i++) {
|
||||
const dep = deps[i];
|
||||
for (let i = 0; i < connections.length; i++) {
|
||||
const { chunkGroup, originChunkGroupInfo } = connections[i];
|
||||
|
||||
// Filter inline, rather than creating a new array from `.filter()`
|
||||
// TODO check if inlining filterFn makes sense here
|
||||
if (!filterFn(dep)) {
|
||||
continue;
|
||||
}
|
||||
const depChunkGroup = dep.chunkGroup;
|
||||
const depBlock = dep.block;
|
||||
// 3. Connect block with chunk
|
||||
GraphHelpers.connectDependenciesBlockAndChunkGroup(block, chunkGroup);
|
||||
|
||||
// 5. Connect block with chunk
|
||||
GraphHelpers.connectDependenciesBlockAndChunkGroup(
|
||||
depBlock,
|
||||
depChunkGroup
|
||||
// 4. Connect chunk with parent
|
||||
GraphHelpers.connectChunkGroupParentAndChild(
|
||||
originChunkGroupInfo.chunkGroup,
|
||||
chunkGroup
|
||||
);
|
||||
|
||||
// 6. Connect chunk with parent
|
||||
GraphHelpers.connectChunkGroupParentAndChild(chunkGroup, depChunkGroup);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -685,8 +673,8 @@ const cleanupUnconnectedGroups = (compilation, allCreatedChunkGroups) => {
|
||||
const buildChunkGraph = (compilation, inputChunkGroups) => {
|
||||
// SHARED STATE
|
||||
|
||||
/** @type {Map<ChunkGroup, ChunkGroupDep[]>} */
|
||||
const chunkDependencies = new Map();
|
||||
/** @type {Map<AsyncDependenciesBlock, BlockChunkGroupConnection[]>} */
|
||||
const blockConnections = new Map();
|
||||
|
||||
/** @type {Set<ChunkGroup>} */
|
||||
const allCreatedChunkGroups = new Set();
|
||||
@@ -703,7 +691,7 @@ const buildChunkGraph = (compilation, inputChunkGroups) => {
|
||||
compilation,
|
||||
inputChunkGroups,
|
||||
chunkGroupInfoMap,
|
||||
chunkDependencies,
|
||||
blockConnections,
|
||||
blocksWithNestedBlocks,
|
||||
allCreatedChunkGroups
|
||||
);
|
||||
@@ -712,7 +700,7 @@ const buildChunkGraph = (compilation, inputChunkGroups) => {
|
||||
|
||||
connectChunkGroups(
|
||||
blocksWithNestedBlocks,
|
||||
chunkDependencies,
|
||||
blockConnections,
|
||||
chunkGroupInfoMap
|
||||
);
|
||||
|
||||
|
||||
22
conf/site/node_modules/webpack/package.json
generated
vendored
22
conf/site/node_modules/webpack/package.json
generated
vendored
@@ -1,20 +1,20 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"webpack@4.44.1",
|
||||
"webpack@4.44.2",
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "webpack@4.44.1",
|
||||
"_id": "webpack@4.44.1",
|
||||
"_from": "webpack@4.44.2",
|
||||
"_id": "webpack@4.44.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-4UOGAohv/VGUNQJstzEywwNxqX417FnjZgZJpJQegddzPmTvph37eBIRbRTfdySXzVtJXLJfbMN3mMYhM6GdmQ==",
|
||||
"_integrity": "sha512-6KJVGlCxYdISyurpQ0IPTklv+DULv05rs2hseIXer6D7KrUicRDLFb4IUM1S6LUAKypPM/nSiVSuv8jHu1m3/Q==",
|
||||
"_location": "/webpack",
|
||||
"_phantomChildren": {
|
||||
"ajv": "6.12.4",
|
||||
"ajv-errors": "1.0.1",
|
||||
"ajv-keywords": "3.4.1",
|
||||
"ajv-keywords": "3.5.2",
|
||||
"bluebird": "3.7.2",
|
||||
"chownr": "1.1.4",
|
||||
"commander": "2.20.3",
|
||||
@@ -40,18 +40,18 @@
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "webpack@4.44.1",
|
||||
"raw": "webpack@4.44.2",
|
||||
"name": "webpack",
|
||||
"escapedName": "webpack",
|
||||
"rawSpec": "4.44.1",
|
||||
"rawSpec": "4.44.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "4.44.1"
|
||||
"fetchSpec": "4.44.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/laravel-mix"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/webpack/-/webpack-4.44.1.tgz",
|
||||
"_spec": "4.44.1",
|
||||
"_resolved": "https://registry.npmjs.org/webpack/-/webpack-4.44.2.tgz",
|
||||
"_spec": "4.44.2",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"author": {
|
||||
"name": "Tobias Koppers @sokra"
|
||||
@@ -267,6 +267,6 @@
|
||||
"travis:lintunit": "yarn lint && yarn cover:unit --ci $JEST",
|
||||
"type-lint": "tsc --pretty"
|
||||
},
|
||||
"version": "4.44.1",
|
||||
"version": "4.44.2",
|
||||
"web": "lib/webpack.web.js"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user