Update npm packages (73 packages including @jqhtml 2.3.36)
Update npm registry domain from privatenpm.hanson.xyz to npm.internal.hanson.xyz 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
35
node_modules/webpack/lib/css/CssGenerator.js
generated
vendored
35
node_modules/webpack/lib/css/CssGenerator.js
generated
vendored
@@ -19,6 +19,7 @@ const {
|
||||
const RuntimeGlobals = require("../RuntimeGlobals");
|
||||
const Template = require("../Template");
|
||||
const CssImportDependency = require("../dependencies/CssImportDependency");
|
||||
const EntryDependency = require("../dependencies/EntryDependency");
|
||||
const { getUndoPath } = require("../util/identifier");
|
||||
const memoize = require("../util/memoize");
|
||||
|
||||
@@ -362,6 +363,7 @@ class CssGenerator extends Generator {
|
||||
|
||||
if (generateContext.concatenationScope) {
|
||||
const source = new ConcatSource();
|
||||
/** @type {Set<string>} */
|
||||
const usedIdentifiers = new Set();
|
||||
const { RESERVED_IDENTIFIER } = getPropertyName();
|
||||
|
||||
@@ -413,6 +415,7 @@ class CssGenerator extends Generator {
|
||||
);
|
||||
}
|
||||
|
||||
/** @type {string[]} */
|
||||
const exports = [];
|
||||
|
||||
for (const [name, v] of cssData.exports) {
|
||||
@@ -465,13 +468,19 @@ class CssGenerator extends Generator {
|
||||
* @returns {SourceTypes} available types (do not mutate)
|
||||
*/
|
||||
getTypes(module) {
|
||||
if (this._generatesJsOnly(module)) {
|
||||
return JAVASCRIPT_TYPES;
|
||||
}
|
||||
const exportType = /** @type {BuildMeta} */ (module.buildMeta).exportType;
|
||||
const sourceTypes = new Set();
|
||||
const connections = this._moduleGraph.getIncomingConnections(module);
|
||||
|
||||
let isEntryModule = false;
|
||||
for (const connection of connections) {
|
||||
if (connection.dependency instanceof CssImportDependency) {
|
||||
if (connection.dependency instanceof EntryDependency) {
|
||||
isEntryModule = true;
|
||||
}
|
||||
if (
|
||||
exportType === "link" &&
|
||||
connection.dependency instanceof CssImportDependency
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
if (!connection.originModule) {
|
||||
@@ -479,8 +488,26 @@ class CssGenerator extends Generator {
|
||||
}
|
||||
if (connection.originModule.type.split("/")[0] !== CSS_TYPE) {
|
||||
sourceTypes.add(JAVASCRIPT_TYPE);
|
||||
} else {
|
||||
const originModule = /** @type {CssModule} */ connection.originModule;
|
||||
const originExportType = /** @type {BuildMeta} */ (
|
||||
originModule.buildMeta
|
||||
).exportType;
|
||||
if (
|
||||
/** @type {boolean} */ (
|
||||
originExportType && originExportType !== "link"
|
||||
)
|
||||
) {
|
||||
sourceTypes.add(JAVASCRIPT_TYPE);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this._generatesJsOnly(module)) {
|
||||
if (sourceTypes.has(JAVASCRIPT_TYPE) || isEntryModule) {
|
||||
return JAVASCRIPT_TYPES;
|
||||
}
|
||||
return new Set();
|
||||
}
|
||||
if (sourceTypes.has(JAVASCRIPT_TYPE)) {
|
||||
return JAVASCRIPT_AND_CSS_TYPES;
|
||||
}
|
||||
|
||||
56
node_modules/webpack/lib/css/CssModulesPlugin.js
generated
vendored
56
node_modules/webpack/lib/css/CssModulesPlugin.js
generated
vendored
@@ -35,7 +35,7 @@ const CssImportDependency = require("../dependencies/CssImportDependency");
|
||||
const CssUrlDependency = require("../dependencies/CssUrlDependency");
|
||||
const StaticExportsDependency = require("../dependencies/StaticExportsDependency");
|
||||
const JavascriptModulesPlugin = require("../javascript/JavascriptModulesPlugin");
|
||||
const { compareModulesByIdOrIdentifier } = require("../util/comparators");
|
||||
const { compareModulesByFullName } = require("../util/comparators");
|
||||
const createSchemaValidation = require("../util/create-schema-validation");
|
||||
const createHash = require("../util/createHash");
|
||||
const { getUndoPath } = require("../util/identifier");
|
||||
@@ -311,7 +311,7 @@ class CssModulesPlugin {
|
||||
(compilation.moduleGraph.getParentModule(dependency));
|
||||
|
||||
if (parent instanceof CssModule) {
|
||||
/** @type {import("../CssModule").Inheritance | undefined} */
|
||||
/** @type {Inheritance | undefined} */
|
||||
let inheritance;
|
||||
|
||||
if (
|
||||
@@ -417,6 +417,7 @@ class CssModulesPlugin {
|
||||
|
||||
return source;
|
||||
});
|
||||
/** @type {WeakMap<Chunk, CssModule[]>} */
|
||||
const orderedCssModulesPerChunk = new WeakMap();
|
||||
compilation.hooks.afterCodeGeneration.tap(PLUGIN_NAME, () => {
|
||||
const { chunkGraph } = compilation;
|
||||
@@ -526,6 +527,7 @@ class CssModulesPlugin {
|
||||
: globalChunkLoading;
|
||||
return chunkLoading === "jsonp" || chunkLoading === "import";
|
||||
};
|
||||
/** @type {WeakSet<Chunk>} */
|
||||
const onceForChunkSet = new WeakSet();
|
||||
/**
|
||||
* @param {Chunk} chunk chunk to check
|
||||
@@ -597,7 +599,7 @@ class CssModulesPlugin {
|
||||
|
||||
/**
|
||||
* @param {Chunk} chunk chunk
|
||||
* @param {Iterable<Module>} modules unordered modules
|
||||
* @param {Iterable<Module> | undefined} modules unordered modules
|
||||
* @param {Compilation} compilation compilation
|
||||
* @returns {Module[]} ordered modules
|
||||
*/
|
||||
@@ -632,8 +634,8 @@ class CssModulesPlugin {
|
||||
return modulesByChunkGroup[0].list.reverse();
|
||||
}
|
||||
|
||||
const boundCompareModulesByIdOrIdentifier = compareModulesByIdOrIdentifier(
|
||||
compilation.chunkGraph
|
||||
const boundCompareModulesByFullName = compareModulesByFullName(
|
||||
compilation.compiler
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -646,10 +648,7 @@ class CssModulesPlugin {
|
||||
return b.length === 0 ? 0 : 1;
|
||||
}
|
||||
if (b.length === 0) return -1;
|
||||
return boundCompareModulesByIdOrIdentifier(
|
||||
a[a.length - 1],
|
||||
b[b.length - 1]
|
||||
);
|
||||
return boundCompareModulesByFullName(a[a.length - 1], b[b.length - 1]);
|
||||
};
|
||||
|
||||
modulesByChunkGroup.sort(compareModuleLists);
|
||||
@@ -658,6 +657,7 @@ class CssModulesPlugin {
|
||||
const finalModules = [];
|
||||
|
||||
for (;;) {
|
||||
/** @type {Set<Module>} */
|
||||
const failedModules = new Set();
|
||||
const list = modulesByChunkGroup[0].list;
|
||||
if (list.length === 0) {
|
||||
@@ -666,6 +666,7 @@ class CssModulesPlugin {
|
||||
}
|
||||
/** @type {Module} */
|
||||
let selectedModule = list[list.length - 1];
|
||||
/** @type {undefined | false | Module} */
|
||||
let hasFailed;
|
||||
outer: for (;;) {
|
||||
for (const { list, set } of modulesByChunkGroup) {
|
||||
@@ -690,10 +691,9 @@ class CssModulesPlugin {
|
||||
// TODO print better warning
|
||||
compilation.warnings.push(
|
||||
new WebpackError(
|
||||
`chunk ${chunk.name || chunk.id}\nConflicting order between ${
|
||||
/** @type {Module} */
|
||||
(hasFailed).readableIdentifier(compilation.requestShortener)
|
||||
} and ${selectedModule.readableIdentifier(
|
||||
`chunk ${chunk.name || chunk.id}\nConflicting order between ${hasFailed.readableIdentifier(
|
||||
compilation.requestShortener
|
||||
)} and ${selectedModule.readableIdentifier(
|
||||
compilation.requestShortener
|
||||
)}`
|
||||
)
|
||||
@@ -721,35 +721,29 @@ class CssModulesPlugin {
|
||||
* @param {Chunk} chunk chunk
|
||||
* @param {ChunkGraph} chunkGraph chunk graph
|
||||
* @param {Compilation} compilation compilation
|
||||
* @returns {Module[]} ordered css modules
|
||||
* @returns {CssModule[]} ordered css modules
|
||||
*/
|
||||
getOrderedChunkCssModules(chunk, chunkGraph, compilation) {
|
||||
return [
|
||||
return /** @type {CssModule[]} */ ([
|
||||
...this.getModulesInOrder(
|
||||
chunk,
|
||||
/** @type {Iterable<Module>} */
|
||||
(
|
||||
chunkGraph.getOrderedChunkModulesIterableBySourceType(
|
||||
chunk,
|
||||
CSS_IMPORT_TYPE,
|
||||
compareModulesByIdOrIdentifier(chunkGraph)
|
||||
)
|
||||
chunkGraph.getOrderedChunkModulesIterableBySourceType(
|
||||
chunk,
|
||||
CSS_IMPORT_TYPE,
|
||||
compareModulesByFullName(compilation.compiler)
|
||||
),
|
||||
compilation
|
||||
),
|
||||
...this.getModulesInOrder(
|
||||
chunk,
|
||||
/** @type {Iterable<Module>} */
|
||||
(
|
||||
chunkGraph.getOrderedChunkModulesIterableBySourceType(
|
||||
chunk,
|
||||
CSS_TYPE,
|
||||
compareModulesByIdOrIdentifier(chunkGraph)
|
||||
)
|
||||
chunkGraph.getOrderedChunkModulesIterableBySourceType(
|
||||
chunk,
|
||||
CSS_TYPE,
|
||||
compareModulesByFullName(compilation.compiler)
|
||||
),
|
||||
compilation
|
||||
)
|
||||
];
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -768,6 +762,7 @@ class CssModulesPlugin {
|
||||
inheritance.push(...module.inheritance);
|
||||
}
|
||||
|
||||
/** @type {CachedSource} */
|
||||
let source;
|
||||
if (
|
||||
cacheEntry &&
|
||||
@@ -792,6 +787,7 @@ class CssModulesPlugin {
|
||||
);
|
||||
/** @type {Source} */
|
||||
let moduleSource = new ReplaceSource(moduleSourceContent);
|
||||
/** @type {null | RegExpExecArray} */
|
||||
let match;
|
||||
while ((match = publicPathAutoRegex.exec(moduleSourceCode))) {
|
||||
/** @type {ReplaceSource} */ (moduleSource).replace(
|
||||
|
||||
21
node_modules/webpack/lib/css/CssParser.js
generated
vendored
21
node_modules/webpack/lib/css/CssParser.js
generated
vendored
@@ -56,11 +56,11 @@ const CC_EQUAL = "=".charCodeAt(0);
|
||||
const STRING_MULTILINE = /\\[\n\r\f]/g;
|
||||
// https://www.w3.org/TR/css-syntax-3/#whitespace
|
||||
const TRIM_WHITE_SPACES = /(^[ \t\n\r\f]*|[ \t\n\r\f]*$)/g;
|
||||
const UNESCAPE = /\\([0-9a-fA-F]{1,6}[ \t\n\r\f]?|[\s\S])/g;
|
||||
const IMAGE_SET_FUNCTION = /^(-\w+-)?image-set$/i;
|
||||
const OPTIONALLY_VENDOR_PREFIXED_KEYFRAMES_AT_RULE = /^@(-\w+-)?keyframes$/;
|
||||
const COMPOSES_PROPERTY = /^(composes|compose-with)$/i;
|
||||
const IS_MODULES = /\.module(s)?\.[^.]+$/i;
|
||||
const UNESCAPE = /\\([0-9a-f]{1,6}[ \t\n\r\f]?|[\s\S])/gi;
|
||||
const IMAGE_SET_FUNCTION = /^(?:-\w+-)?image-set$/i;
|
||||
const OPTIONALLY_VENDOR_PREFIXED_KEYFRAMES_AT_RULE = /^@(?:-\w+-)?keyframes$/;
|
||||
const COMPOSES_PROPERTY = /^(?:composes|compose-with)$/i;
|
||||
const IS_MODULES = /\.modules?\.[^.]+$/i;
|
||||
const CSS_COMMENT = /\/\*((?!\*\/).*?)\*\//g;
|
||||
|
||||
/**
|
||||
@@ -72,6 +72,7 @@ const matchAll = (regexp, str) => {
|
||||
/** @type {RegExpExecArray[]} */
|
||||
const result = [];
|
||||
|
||||
/** @type {null | RegExpExecArray} */
|
||||
let match;
|
||||
|
||||
// Use a while loop with exec() to find all matches
|
||||
@@ -123,8 +124,7 @@ const normalizeUrl = (str, isString) => {
|
||||
return str;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
const regexSingleEscape = /[ -,.\/:-@[\]\^`{-~]/;
|
||||
const regexSingleEscape = /[ -,./:-@[\]^`{-~]/;
|
||||
const regexExcessiveSpaces =
|
||||
/(^|\\+)?(\\[A-F0-9]{1,6})\u0020(?![a-fA-F0-9\u0020])/g;
|
||||
|
||||
@@ -139,10 +139,10 @@ const escapeIdentifier = (str) => {
|
||||
while (counter < str.length) {
|
||||
const character = str.charAt(counter++);
|
||||
|
||||
/** @type {string} */
|
||||
let value;
|
||||
|
||||
// eslint-disable-next-line no-control-regex
|
||||
if (/[\t\n\f\r\u000B]/.test(character)) {
|
||||
if (/[\t\n\f\r\v]/.test(character)) {
|
||||
const codePoint = character.charCodeAt(0);
|
||||
|
||||
value = `\\${codePoint.toString(16).toUpperCase()} `;
|
||||
@@ -829,12 +829,14 @@ class CssParser extends Parser {
|
||||
return newline;
|
||||
}
|
||||
|
||||
/** @type {undefined | string} */
|
||||
let layer;
|
||||
|
||||
if (tokens[1]) {
|
||||
layer = input.slice(tokens[1][0] + 6, tokens[1][1] - 1).trim();
|
||||
}
|
||||
|
||||
/** @type {undefined | string} */
|
||||
let supports;
|
||||
|
||||
if (tokens[2]) {
|
||||
@@ -847,6 +849,7 @@ class CssParser extends Parser {
|
||||
last[1]
|
||||
)[0];
|
||||
|
||||
/** @type {undefined | string} */
|
||||
let media;
|
||||
|
||||
if (mediaStart !== semi - 1) {
|
||||
|
||||
Reference in New Issue
Block a user