feat: refactoring project
This commit is contained in:
13
node_modules/webpack/lib/ModuleGraph.js
generated
vendored
13
node_modules/webpack/lib/ModuleGraph.js
generated
vendored
@@ -36,7 +36,7 @@ const getConnectionsByOriginModule = set => {
|
||||
/** @type {Module | 0} */
|
||||
let lastModule = 0;
|
||||
/** @type {ModuleGraphConnection[] | undefined} */
|
||||
let lastList = undefined;
|
||||
let lastList;
|
||||
for (const connection of set) {
|
||||
const { originModule } = connection;
|
||||
if (lastModule === originModule) {
|
||||
@@ -67,7 +67,7 @@ const getConnectionsByModule = set => {
|
||||
/** @type {Module | 0} */
|
||||
let lastModule = 0;
|
||||
/** @type {ModuleGraphConnection[] | undefined} */
|
||||
let lastList = undefined;
|
||||
let lastList;
|
||||
for (const connection of set) {
|
||||
const { module } = connection;
|
||||
if (lastModule === module) {
|
||||
@@ -445,7 +445,7 @@ class ModuleGraph {
|
||||
}
|
||||
}
|
||||
this._dependencyMap.set(dependency, null);
|
||||
return undefined;
|
||||
return;
|
||||
}
|
||||
return connection === null ? undefined : connection;
|
||||
}
|
||||
@@ -851,12 +851,13 @@ class ModuleGraph {
|
||||
const moduleGraph = moduleGraphForModuleMap.get(module);
|
||||
if (!moduleGraph)
|
||||
throw new Error(
|
||||
deprecateMessage +
|
||||
"There was no ModuleGraph assigned to the Module for backward-compat (Use the new API)"
|
||||
`${
|
||||
deprecateMessage
|
||||
}There was no ModuleGraph assigned to the Module for backward-compat (Use the new API)`
|
||||
);
|
||||
return moduleGraph;
|
||||
},
|
||||
deprecateMessage + ": Use new ModuleGraph API",
|
||||
`${deprecateMessage}: Use new ModuleGraph API`,
|
||||
deprecationCode
|
||||
);
|
||||
deprecateMap.set(deprecateMessage, newFn);
|
||||
|
||||
Reference in New Issue
Block a user