@@ -22,4 +22,2 @@ /* | ||
| /** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext<[Range, HarmonyAcceptImportDependency[], boolean]>} ObjectSerializerContext */ | ||
| /** @typedef {import("../Module")} Module */ | ||
| /** @typedef {import("../Module").ModuleId} ModuleId */ | ||
@@ -96,12 +94,2 @@ class HarmonyAcceptDependency extends NullDependency { | ||
| /** | ||
| * Gets dependency module id. | ||
| * @param {Dependency} dependency the dependency to get module id for | ||
| * @returns {ModuleId | null} the module id or null if not found | ||
| */ | ||
| const getDependencyModuleId = (dependency) => | ||
| chunkGraph.getModuleId( | ||
| /** @type {Module} */ (moduleGraph.getModule(dependency)) | ||
| ); | ||
| /** | ||
| * Checks whether this harmony accept dependency is related harmony import dependency. | ||
@@ -112,6 +100,10 @@ * @param {Dependency} a the first dependency | ||
| */ | ||
| const isRelatedHarmonyImportDependency = (a, b) => | ||
| a !== b && | ||
| b instanceof HarmonyImportDependency && | ||
| getDependencyModuleId(a) === getDependencyModuleId(b); | ||
| const isRelatedHarmonyImportDependency = (a, b) => { | ||
| if (a === b || !(b instanceof HarmonyImportDependency)) return false; | ||
| // Compare modules by reference: an unresolved import (ignored/failed, or a | ||
| // deferred lazy-barrel re-export) has no module, and a module not in any | ||
| // chunk has a null id — so comparing ids would crash or miss real matches. | ||
| const moduleA = moduleGraph.getModule(a); | ||
| return moduleA !== null && moduleA === moduleGraph.getModule(b); | ||
| }; | ||
@@ -118,0 +110,0 @@ /** |
+1
-1
| { | ||
| "name": "webpack", | ||
| "version": "5.108.2", | ||
| "version": "5.108.3", | ||
| "description": "Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/webpack/webpack", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 2 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 2 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
7233911
0.28%204355
0.24%