🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

webpack

Package Overview
Dependencies
Maintainers
8
Versions
879
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack - npm Package Compare versions

Comparing version
5.108.2
to
5.108.3
+8
-16
lib/dependencies/HarmonyAcceptDependency.js

@@ -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 @@ /**

{
"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