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:
109
node_modules/webpack/lib/config/defaults.js
generated
vendored
109
node_modules/webpack/lib/config/defaults.js
generated
vendored
@@ -39,6 +39,7 @@ const {
|
||||
|
||||
/** @typedef {import("../../declarations/WebpackOptions").CacheOptionsNormalized} CacheOptionsNormalized */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").Context} Context */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").DevTool} Devtool */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").CssGeneratorOptions} CssGeneratorOptions */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").EntryDescription} EntryDescription */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").EntryNormalized} Entry */
|
||||
@@ -72,6 +73,8 @@ const {
|
||||
/** @typedef {import("../../declarations/WebpackOptions").SnapshotOptions} SnapshotOptions */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptionsNormalized */
|
||||
/** @typedef {import("../Module")} Module */
|
||||
/** @typedef {import("../javascript/EnableChunkLoadingPlugin").ChunkLoadingTypes} ChunkLoadingTypes */
|
||||
/** @typedef {import("../wasm/EnableWasmLoadingPlugin").WasmLoadingTypes} WasmLoadingTypes */
|
||||
/** @typedef {import("./target").PlatformTargetProperties} PlatformTargetProperties */
|
||||
/** @typedef {import("./target").TargetProperties} TargetProperties */
|
||||
|
||||
@@ -90,14 +93,14 @@ const {
|
||||
* hotUpdateChunkFilename: NonNullable<Output["hotUpdateChunkFilename"]>,
|
||||
* hotUpdateGlobal: NonNullable<Output["hotUpdateGlobal"]>,
|
||||
* assetModuleFilename: NonNullable<Output["assetModuleFilename"]>,
|
||||
* webassemblyModuleFilename: NonNullable<Output["webassemblyModuleFilename"]>
|
||||
* webassemblyModuleFilename: NonNullable<Output["webassemblyModuleFilename"]>,
|
||||
* sourceMapFilename: NonNullable<Output["sourceMapFilename"]>,
|
||||
* hotUpdateMainFilename: NonNullable<Output["hotUpdateMainFilename"]>,
|
||||
* devtoolNamespace: NonNullable<Output["devtoolNamespace"]>,
|
||||
* publicPath: NonNullable<Output["publicPath"]>
|
||||
* workerPublicPath: NonNullable<Output["workerPublicPath"]>
|
||||
* workerWasmLoading: NonNullable<Output["workerWasmLoading"]>
|
||||
* workerChunkLoading: NonNullable<Output["workerChunkLoading"]>
|
||||
* publicPath: NonNullable<Output["publicPath"]>,
|
||||
* workerPublicPath: NonNullable<Output["workerPublicPath"]>,
|
||||
* workerWasmLoading: NonNullable<Output["workerWasmLoading"]>,
|
||||
* workerChunkLoading: NonNullable<Output["workerChunkLoading"]>,
|
||||
* chunkFormat: NonNullable<Output["chunkFormat"]>,
|
||||
* module: NonNullable<Output["module"]>,
|
||||
* asyncChunks: NonNullable<Output["asyncChunks"]>,
|
||||
@@ -187,31 +190,11 @@ const {
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {WebpackOptionsNormalized
|
||||
* & { context: NonNullable<WebpackOptionsNormalized["context"]> }
|
||||
* & { infrastructureLogging: InfrastructureLoggingNormalizedWithDefaults }
|
||||
* } WebpackOptionsNormalizedWithBaseDefaults
|
||||
* @typedef {WebpackOptionsNormalized & { context: NonNullable<WebpackOptionsNormalized["context"]> } & { infrastructureLogging: InfrastructureLoggingNormalizedWithDefaults }} WebpackOptionsNormalizedWithBaseDefaults
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {WebpackOptionsNormalizedWithBaseDefaults
|
||||
* & { target: NonNullable<WebpackOptionsNormalized["target"]> }
|
||||
* & { output: OutputNormalizedWithDefaults }
|
||||
* & { optimization: OptimizationNormalizedWithDefaults }
|
||||
* & { devtool: NonNullable<WebpackOptionsNormalized["devtool"]> }
|
||||
* & { stats: NonNullable<WebpackOptionsNormalized["stats"]> }
|
||||
* & { node: NonNullable<WebpackOptionsNormalized["node"]> }
|
||||
* & { profile: NonNullable<WebpackOptionsNormalized["profile"]> }
|
||||
* & { parallelism: NonNullable<WebpackOptionsNormalized["parallelism"]> }
|
||||
* & { snapshot: SnapshotNormalizedWithDefaults }
|
||||
* & { externalsPresets: ExternalsPresetsNormalizedWithDefaults }
|
||||
* & { externalsType: NonNullable<WebpackOptionsNormalized["externalsType"]> }
|
||||
* & { watch: NonNullable<WebpackOptionsNormalized["watch"]> }
|
||||
* & { performance: NonNullable<WebpackOptionsNormalized["performance"]> }
|
||||
* & { recordsInputPath: NonNullable<WebpackOptionsNormalized["recordsInputPath"]> }
|
||||
* & { recordsOutputPath: NonNullable<WebpackOptionsNormalized["recordsOutputPath"]>
|
||||
* & { dotenv: NonNullable<WebpackOptionsNormalized["dotenv"]> }
|
||||
* }} WebpackOptionsNormalizedWithDefaults
|
||||
* @typedef {WebpackOptionsNormalizedWithBaseDefaults & { target: NonNullable<WebpackOptionsNormalized["target"]> } & { output: OutputNormalizedWithDefaults } & { optimization: OptimizationNormalizedWithDefaults } & { devtool: NonNullable<WebpackOptionsNormalized["devtool"]> } & { stats: NonNullable<WebpackOptionsNormalized["stats"]> } & { node: NonNullable<WebpackOptionsNormalized["node"]> } & { profile: NonNullable<WebpackOptionsNormalized["profile"]> } & { parallelism: NonNullable<WebpackOptionsNormalized["parallelism"]> } & { snapshot: SnapshotNormalizedWithDefaults } & { externalsPresets: ExternalsPresetsNormalizedWithDefaults } & { externalsType: NonNullable<WebpackOptionsNormalized["externalsType"]> } & { watch: NonNullable<WebpackOptionsNormalized["watch"]> } & { performance: NonNullable<WebpackOptionsNormalized["performance"]> } & { recordsInputPath: NonNullable<WebpackOptionsNormalized["recordsInputPath"]> } & { recordsOutputPath: NonNullable<WebpackOptionsNormalized["recordsOutputPath"]> } & { dotenv: NonNullable<WebpackOptionsNormalized["dotenv"]> }} WebpackOptionsNormalizedWithDefaults
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -342,7 +325,28 @@ const applyWebpackOptionsDefaults = (options, compilerIndex) => {
|
||||
}
|
||||
}
|
||||
|
||||
F(options, "devtool", () => (development ? "eval" : false));
|
||||
F(
|
||||
options,
|
||||
"devtool",
|
||||
() =>
|
||||
/** @type {Devtool} */ (
|
||||
development
|
||||
? [
|
||||
options.experiments.css
|
||||
? {
|
||||
type: "css",
|
||||
use: "source-map"
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
type: "javascript",
|
||||
use: "eval"
|
||||
}
|
||||
].filter(Boolean)
|
||||
: false
|
||||
)
|
||||
);
|
||||
|
||||
D(options, "watch", false);
|
||||
D(options, "profile", false);
|
||||
D(options, "parallelism", 100);
|
||||
@@ -423,7 +427,10 @@ const applyWebpackOptionsDefaults = (options, compilerIndex) => {
|
||||
isNode: targetProperties && targetProperties.node === true,
|
||||
uniqueName: /** @type {string} */ (options.output.uniqueName),
|
||||
targetProperties,
|
||||
mode: options.mode
|
||||
mode: options.mode,
|
||||
outputModule:
|
||||
/** @type {NonNullable<WebpackOptionsNormalized["output"]["module"]>} */
|
||||
(options.output.module)
|
||||
});
|
||||
|
||||
applyExternalsPresetsDefaults(options.externalsPresets, {
|
||||
@@ -715,11 +722,12 @@ const applySnapshotDefaults = (snapshot, { production, futureDefaults }) => {
|
||||
* @param {boolean} options.futureDefaults is future defaults enabled
|
||||
* @param {boolean} options.deferImport is defer import enabled
|
||||
* @param {boolean} options.isNode is node target platform
|
||||
* @param {boolean} options.outputModule is output.module enabled
|
||||
* @returns {void}
|
||||
*/
|
||||
const applyJavascriptParserOptionsDefaults = (
|
||||
parserOptions,
|
||||
{ futureDefaults, deferImport, isNode }
|
||||
{ futureDefaults, deferImport, isNode, outputModule }
|
||||
) => {
|
||||
D(parserOptions, "unknownContextRequest", ".");
|
||||
D(parserOptions, "unknownContextRegExp", false);
|
||||
@@ -733,7 +741,7 @@ const applyJavascriptParserOptionsDefaults = (
|
||||
D(parserOptions, "wrappedContextRecursive", true);
|
||||
D(parserOptions, "wrappedContextCritical", false);
|
||||
D(parserOptions, "strictThisContextOnImports", false);
|
||||
D(parserOptions, "importMeta", true);
|
||||
D(parserOptions, "importMeta", outputModule ? "preserve-unknown" : true);
|
||||
D(parserOptions, "dynamicImportMode", "lazy");
|
||||
D(parserOptions, "dynamicImportPrefetch", false);
|
||||
D(parserOptions, "dynamicImportPreload", false);
|
||||
@@ -786,6 +794,7 @@ const applyCssGeneratorOptionsDefaults = (
|
||||
* @param {HashSalt} options.hashSalt hash salt
|
||||
* @param {HashDigest} options.hashDigest hash digest
|
||||
* @param {HashDigestLength} options.hashDigestLength hash digest length
|
||||
* @param {boolean} options.outputModule is output.module enabled
|
||||
* @returns {void}
|
||||
*/
|
||||
const applyModuleDefaults = (
|
||||
@@ -803,7 +812,8 @@ const applyModuleDefaults = (
|
||||
uniqueName,
|
||||
targetProperties,
|
||||
mode,
|
||||
deferImport
|
||||
deferImport,
|
||||
outputModule
|
||||
}
|
||||
) => {
|
||||
if (cache) {
|
||||
@@ -862,7 +872,8 @@ const applyModuleDefaults = (
|
||||
{
|
||||
futureDefaults,
|
||||
deferImport,
|
||||
isNode
|
||||
isNode,
|
||||
outputModule
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1443,9 +1454,7 @@ const applyOutputDefaults = (
|
||||
throw new Error(
|
||||
"For the selected environment is no default ESM chunk format available:\n" +
|
||||
"ESM exports can be chosen when 'import()' is available.\n" +
|
||||
`JSONP Array push can be chosen when 'document' is available.\n${
|
||||
helpMessage
|
||||
}`
|
||||
`JSONP Array push can be chosen when 'document' is available.\n${helpMessage}`
|
||||
);
|
||||
} else {
|
||||
if (tp.document) return "array-push";
|
||||
@@ -1460,9 +1469,7 @@ const applyOutputDefaults = (
|
||||
: ""
|
||||
}\n` +
|
||||
"JSONP Array push ('array-push') can be chosen when 'document' or 'importScripts' is available.\n" +
|
||||
`CommonJs exports ('commonjs') can be chosen when 'require' or node builtins are available.\n${
|
||||
helpMessage
|
||||
}`
|
||||
`CommonJs exports ('commonjs') can be chosen when 'require' or node builtins are available.\n${helpMessage}`
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1588,7 +1595,7 @@ const applyOutputDefaults = (
|
||||
"policyName",
|
||||
() =>
|
||||
/** @type {NonNullable<Output["uniqueName"]>} */
|
||||
(output.uniqueName).replace(/[^a-zA-Z0-9\-#=_/@.%]+/g, "_") || "webpack"
|
||||
(output.uniqueName).replace(/[^a-z0-9\-#=_/@.%]+/gi, "_") || "webpack"
|
||||
);
|
||||
D(trustedTypes, "onPolicyCreationFailure", "stop");
|
||||
}
|
||||
@@ -1617,6 +1624,7 @@ const applyOutputDefaults = (
|
||||
});
|
||||
|
||||
A(output, "enabledChunkLoadingTypes", () => {
|
||||
/** @type {ChunkLoadingTypes} */
|
||||
const enabledChunkLoadingTypes = new Set();
|
||||
if (output.chunkLoading) {
|
||||
enabledChunkLoadingTypes.add(output.chunkLoading);
|
||||
@@ -1633,6 +1641,7 @@ const applyOutputDefaults = (
|
||||
});
|
||||
|
||||
A(output, "enabledWasmLoadingTypes", () => {
|
||||
/** @type {WasmLoadingTypes} */
|
||||
const enabledWasmLoadingTypes = new Set();
|
||||
if (output.wasmLoading) {
|
||||
enabledWasmLoadingTypes.add(output.wasmLoading);
|
||||
@@ -1957,6 +1966,20 @@ const getResolveDefaults = ({
|
||||
extensions: [...jsExtensions]
|
||||
});
|
||||
|
||||
/** @type {() => ResolveOptions} */
|
||||
const workerDeps = () => {
|
||||
const options = esmDeps();
|
||||
|
||||
const conditionNames = options.conditionNames
|
||||
? ["worker", ...options.conditionNames]
|
||||
: options.conditionNames;
|
||||
return {
|
||||
...options,
|
||||
conditionNames,
|
||||
preferRelative: true
|
||||
};
|
||||
};
|
||||
|
||||
/** @type {ResolveOptions} */
|
||||
const resolveOptions = {
|
||||
cache,
|
||||
@@ -1976,10 +1999,7 @@ const getResolveDefaults = ({
|
||||
url: {
|
||||
preferRelative: true
|
||||
},
|
||||
worker: {
|
||||
...esmDeps(),
|
||||
preferRelative: true
|
||||
},
|
||||
worker: workerDeps(),
|
||||
commonjs: cjsDeps(),
|
||||
amd: cjsDeps(),
|
||||
// for backward-compat: loadModule
|
||||
@@ -1992,6 +2012,7 @@ const getResolveDefaults = ({
|
||||
};
|
||||
|
||||
if (css) {
|
||||
/** @type {string[]} */
|
||||
const styleConditions = [];
|
||||
|
||||
styleConditions.push("webpack");
|
||||
|
||||
Reference in New Issue
Block a user