Enhance refactor commands with controller-aware Route() updates and fix code quality violations
Add semantic token highlighting for 'that' variable and comment file references in VS Code extension Add Phone_Text_Input and Currency_Input components with formatting utilities Implement client widgets, form standardization, and soft delete functionality Add modal scroll lock and update documentation Implement comprehensive modal system with form integration and validation Fix modal component instantiation using jQuery plugin API Implement modal system with responsive sizing, queuing, and validation support Implement form submission with validation, error handling, and loading states Implement country/state selectors with dynamic data loading and Bootstrap styling Revert Rsx::Route() highlighting in Blade/PHP files Target specific PHP scopes for Rsx::Route() highlighting in Blade Expand injection selector for Rsx::Route() highlighting Add custom syntax highlighting for Rsx::Route() and Rsx.Route() calls Update jqhtml packages to v2.2.165 Add bundle path validation for common mistakes (development mode only) Create Ajax_Select_Input widget and Rsx_Reference_Data controller Create Country_Select_Input widget with default country support Initialize Tom Select on Select_Input widgets Add Tom Select bundle for enhanced select dropdowns Implement ISO 3166 geographic data system for country/region selection Implement widget-based form system with disabled state support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
237
node_modules/webpack/lib/NormalModule.js
generated
vendored
237
node_modules/webpack/lib/NormalModule.js
generated
vendored
@@ -54,54 +54,49 @@ const {
|
||||
const makeSerializable = require("./util/makeSerializable");
|
||||
const memoize = require("./util/memoize");
|
||||
|
||||
/** @typedef {import("enhanced-resolve").ResolveContext} ResolveContext */
|
||||
/** @typedef {import("enhanced-resolve").ResolveRequest} ResolveRequest */
|
||||
/** @typedef {import("webpack-sources").Source} Source */
|
||||
/** @typedef {import("webpack-sources").RawSourceMap} RawSourceMap */
|
||||
/** @typedef {import("../declarations/WebpackOptions").Mode} Mode */
|
||||
/** @typedef {import("../declarations/WebpackOptions").ResolveOptions} ResolveOptions */
|
||||
/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */
|
||||
/** @typedef {import("../declarations/WebpackOptions").NoParse} NoParse */
|
||||
/** @typedef {import("./ChunkGraph")} ChunkGraph */
|
||||
/** @typedef {import("./Compiler")} Compiler */
|
||||
/** @typedef {import("./config/defaults").WebpackOptionsNormalizedWithDefaults} WebpackOptions */
|
||||
/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */
|
||||
/** @typedef {import("./DependencyTemplates")} DependencyTemplates */
|
||||
/** @typedef {import("./Generator")} Generator */
|
||||
/** @typedef {import("./Generator").GenerateErrorFn} GenerateErrorFn */
|
||||
/** @typedef {import("./Generator").GenerateContextData} GenerateContextData */
|
||||
/** @typedef {import("./Module").BuildInfo} BuildInfo */
|
||||
/** @typedef {import("./Module").FileSystemDependencies} FileSystemDependencies */
|
||||
/** @typedef {import("./Module").BuildMeta} BuildMeta */
|
||||
/** @typedef {import("./Module").CodeGenerationContext} CodeGenerationContext */
|
||||
/** @typedef {import("./Module").CodeGenerationResult} CodeGenerationResult */
|
||||
/** @typedef {import("./Module").CodeGenerationResultData} CodeGenerationResultData */
|
||||
/** @typedef {import("./Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */
|
||||
/** @typedef {import("./Module").KnownBuildInfo} KnownBuildInfo */
|
||||
/** @typedef {import("./Module").LibIdentOptions} LibIdentOptions */
|
||||
/** @typedef {import("./Module").LibIdent} LibIdent */
|
||||
/** @typedef {import("./Module").NameForCondition} NameForCondition */
|
||||
/** @typedef {import("./Module").NeedBuildContext} NeedBuildContext */
|
||||
/** @typedef {import("./Module").NeedBuildCallback} NeedBuildCallback */
|
||||
/** @typedef {import("./Module").BuildCallback} BuildCallback */
|
||||
/** @typedef {import("./Module").RuntimeRequirements} RuntimeRequirements */
|
||||
/** @typedef {import("./Generator").SourceTypes} SourceTypes */
|
||||
/** @typedef {import("./Module").UnsafeCacheData} UnsafeCacheData */
|
||||
/** @typedef {import("./ModuleGraph")} ModuleGraph */
|
||||
/** @typedef {import("./ModuleGraphConnection").ConnectionState} ConnectionState */
|
||||
/** @typedef {import("./ModuleTypeConstants").ModuleTypes} ModuleTypes */
|
||||
/** @typedef {import("./NormalModuleFactory")} NormalModuleFactory */
|
||||
/** @typedef {import("./NormalModuleFactory").ResourceDataWithData} ResourceDataWithData */
|
||||
/** @typedef {import("./NormalModuleFactory").NormalModuleTypes} NormalModuleTypes */
|
||||
/** @typedef {import("./NormalModuleFactory").ResourceSchemeData} ResourceSchemeData */
|
||||
/** @typedef {import("./Parser")} Parser */
|
||||
/** @typedef {import("./Parser").PreparsedAst} PreparsedAst */
|
||||
/** @typedef {import("./RequestShortener")} RequestShortener */
|
||||
/** @typedef {import("./ResolverFactory").ResolveContext} ResolveContext */
|
||||
/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */
|
||||
/** @typedef {import("./ResolverFactory").ResolveRequest} ResolveRequest */
|
||||
/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */
|
||||
/** @typedef {import("./logging/Logger").Logger} WebpackLogger */
|
||||
/** @typedef {import("./serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
|
||||
/** @typedef {import("./serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
|
||||
/** @typedef {import("./util/Hash")} Hash */
|
||||
/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */
|
||||
/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */
|
||||
/** @typedef {import("../declarations/WebpackOptions").HashFunction} HashFunction */
|
||||
/** @typedef {import("./util/identifier").AssociatedObjectForCache} AssociatedObjectForCache */
|
||||
/** @typedef {import("./dependencies/HarmonyImportSideEffectDependency")} HarmonyImportSideEffectDependency */
|
||||
/** @typedef {import("./dependencies/HarmonyImportSpecifierDependency")} HarmonyImportSpecifierDependency */
|
||||
/** @typedef {import("../declarations/WebpackOptions").RuleSetRule["extractSourceMap"]} ExtractSourceMapOptions */
|
||||
/**
|
||||
* @template T
|
||||
* @typedef {import("./util/deprecation").FakeHook<T>} FakeHook
|
||||
@@ -123,6 +118,9 @@ const memoize = require("./util/memoize");
|
||||
const getInvalidDependenciesModuleWarning = memoize(() =>
|
||||
require("./InvalidDependenciesModuleWarning")
|
||||
);
|
||||
|
||||
const getExtractSourceMap = memoize(() => require("./util/extractSourceMap"));
|
||||
|
||||
const getValidate = memoize(() => require("schema-utils").validate);
|
||||
|
||||
const ABSOLUTE_PATH_REGEX = /^([a-zA-Z]:\\|\\\\|\/)/;
|
||||
@@ -131,8 +129,8 @@ const ABSOLUTE_PATH_REGEX = /^([a-zA-Z]:\\|\\\\|\/)/;
|
||||
* @typedef {object} LoaderItem
|
||||
* @property {string} loader
|
||||
* @property {string | null | undefined | Record<string, EXPECTED_ANY>} options
|
||||
* @property {string?} ident
|
||||
* @property {string?} type
|
||||
* @property {string | null=} ident
|
||||
* @property {string | null=} type
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -226,14 +224,16 @@ makeSerializable(
|
||||
|
||||
/** @typedef {[string | Buffer, string | RawSourceMap | undefined, PreparsedAst | undefined]} Result */
|
||||
|
||||
/** @typedef {LoaderContext<EXPECTED_ANY>} AnyLoaderContext */
|
||||
|
||||
/**
|
||||
* @typedef {object} NormalModuleCompilationHooks
|
||||
* @property {SyncHook<[LoaderContext<EXPECTED_ANY>, NormalModule]>} loader
|
||||
* @property {SyncHook<[LoaderItem[], NormalModule, LoaderContext<EXPECTED_ANY>]>} beforeLoaders
|
||||
* @property {SyncHook<[AnyLoaderContext, NormalModule]>} loader
|
||||
* @property {SyncHook<[LoaderItem[], NormalModule, AnyLoaderContext]>} beforeLoaders
|
||||
* @property {SyncHook<[NormalModule]>} beforeParse
|
||||
* @property {SyncHook<[NormalModule]>} beforeSnapshot
|
||||
* @property {HookMap<FakeHook<AsyncSeriesBailHook<[string, NormalModule], string | Buffer | null>>>} readResourceForScheme
|
||||
* @property {HookMap<AsyncSeriesBailHook<[LoaderContext<EXPECTED_ANY>], string | Buffer | null>>} readResource
|
||||
* @property {HookMap<AsyncSeriesBailHook<[AnyLoaderContext], string | Buffer | null>>} readResource
|
||||
* @property {SyncWaterfallHook<[Result, NormalModule]>} processResult
|
||||
* @property {AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>} needBuild
|
||||
*/
|
||||
@@ -241,7 +241,7 @@ makeSerializable(
|
||||
/**
|
||||
* @typedef {object} NormalModuleCreateData
|
||||
* @property {string=} layer an optional layer in which the module is
|
||||
* @property {ModuleTypes | ""} type module type. When deserializing, this is set to an empty string "".
|
||||
* @property {NormalModuleTypes | ""} type module type. When deserializing, this is set to an empty string "".
|
||||
* @property {string} request request string
|
||||
* @property {string} userRequest request intended by user (without loaders from config)
|
||||
* @property {string} rawRequest request without resolving
|
||||
@@ -255,6 +255,11 @@ makeSerializable(
|
||||
* @property {Generator} generator the generator used
|
||||
* @property {GeneratorOptions=} generatorOptions the options of the generator used
|
||||
* @property {ResolveOptions=} resolveOptions options used for resolving requests from this module
|
||||
* @property {boolean=} extractSourceMap enable/disable extracting source map
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {(resourcePath: string, getLoaderContext: (resourcePath: string) => AnyLoaderContext) => Promise<string | Buffer<ArrayBufferLike>>} ReadResource
|
||||
*/
|
||||
|
||||
/** @type {WeakMap<Compilation, NormalModuleCompilationHooks>} */
|
||||
@@ -342,7 +347,8 @@ class NormalModule extends Module {
|
||||
parserOptions,
|
||||
generator,
|
||||
generatorOptions,
|
||||
resolveOptions
|
||||
resolveOptions,
|
||||
extractSourceMap
|
||||
}) {
|
||||
super(type, context || getContext(resource), layer);
|
||||
|
||||
@@ -374,6 +380,8 @@ class NormalModule extends Module {
|
||||
// already declared in super class
|
||||
this.resolveOptions = resolveOptions;
|
||||
}
|
||||
/** @type {ExtractSourceMapOptions} */
|
||||
this.extractSourceMap = extractSourceMap;
|
||||
|
||||
// Info from Build
|
||||
/** @type {WebpackError | null} */
|
||||
@@ -400,7 +408,7 @@ class NormalModule extends Module {
|
||||
this._isEvaluatingSideEffects = false;
|
||||
/** @type {WeakSet<ModuleGraph> | undefined} */
|
||||
this._addedSideEffectsBailout = undefined;
|
||||
/** @type {GenerateContextData} */
|
||||
/** @type {CodeGenerationResultData} */
|
||||
this._codeGeneratorData = new Map();
|
||||
}
|
||||
|
||||
@@ -425,9 +433,16 @@ class NormalModule extends Module {
|
||||
return /** @type {string} */ (requestShortener.shorten(this.userRequest));
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string | null} return the resource path
|
||||
*/
|
||||
getResource() {
|
||||
return this.matchResource || this.resource;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {LibIdentOptions} options options
|
||||
* @returns {string | null} an identifier for library inclusion
|
||||
* @returns {LibIdent | null} an identifier for library inclusion
|
||||
*/
|
||||
libIdent(options) {
|
||||
let ident = contextify(
|
||||
@@ -440,10 +455,10 @@ class NormalModule extends Module {
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string | null} absolute path which should be used for condition matching (usually the resource path)
|
||||
* @returns {NameForCondition | null} absolute path which should be used for condition matching (usually the resource path)
|
||||
*/
|
||||
nameForCondition() {
|
||||
const resource = this.matchResource || this.resource;
|
||||
const resource = /** @type {string} */ (this.getResource());
|
||||
const idx = resource.indexOf("?");
|
||||
if (idx >= 0) return resource.slice(0, idx);
|
||||
return resource;
|
||||
@@ -589,7 +604,8 @@ class NormalModule extends Module {
|
||||
const { requestShortener } = compilation.runtimeTemplate;
|
||||
const getCurrentLoaderName = () => {
|
||||
const currentLoader = this.getCurrentLoader(
|
||||
/** @type {LoaderContext<EXPECTED_ANY>} */ (loaderContext)
|
||||
/** @type {AnyLoaderContext} */
|
||||
(loaderContext)
|
||||
);
|
||||
if (!currentLoader) return "(not in loader scope)";
|
||||
return requestShortener.shorten(currentLoader.loader);
|
||||
@@ -600,21 +616,18 @@ class NormalModule extends Module {
|
||||
const getResolveContext = () => ({
|
||||
fileDependencies: {
|
||||
add: (d) =>
|
||||
/** @type {LoaderContext<EXPECTED_ANY>} */ (
|
||||
loaderContext
|
||||
).addDependency(d)
|
||||
/** @type {AnyLoaderContext} */
|
||||
(loaderContext).addDependency(d)
|
||||
},
|
||||
contextDependencies: {
|
||||
add: (d) =>
|
||||
/** @type {LoaderContext<EXPECTED_ANY>} */ (
|
||||
loaderContext
|
||||
).addContextDependency(d)
|
||||
/** @type {AnyLoaderContext} */
|
||||
(loaderContext).addContextDependency(d)
|
||||
},
|
||||
missingDependencies: {
|
||||
add: (d) =>
|
||||
/** @type {LoaderContext<EXPECTED_ANY>} */ (
|
||||
loaderContext
|
||||
).addMissingDependency(d)
|
||||
/** @type {AnyLoaderContext} */
|
||||
(loaderContext).addMissingDependency(d)
|
||||
}
|
||||
});
|
||||
const getAbsolutify = memoize(() =>
|
||||
@@ -661,13 +674,9 @@ class NormalModule extends Module {
|
||||
* @returns {Hash} hash
|
||||
*/
|
||||
createHash: (type) =>
|
||||
createHash(
|
||||
type ||
|
||||
/** @type {HashFunction} */
|
||||
(compilation.outputOptions.hashFunction)
|
||||
)
|
||||
createHash(type || compilation.outputOptions.hashFunction)
|
||||
};
|
||||
/** @type {import("../declarations/LoaderContext").NormalModuleLoaderContext<T>} */
|
||||
/** @type {NormalModuleLoaderContext<T>} */
|
||||
const loaderContext = {
|
||||
version: 2,
|
||||
/**
|
||||
@@ -676,7 +685,8 @@ class NormalModule extends Module {
|
||||
*/
|
||||
getOptions: (schema) => {
|
||||
const loader = this.getCurrentLoader(
|
||||
/** @type {LoaderContext<EXPECTED_ANY>} */ (loaderContext)
|
||||
/** @type {AnyLoaderContext} */
|
||||
(loaderContext)
|
||||
);
|
||||
|
||||
let { options } = /** @type {LoaderItem} */ (loader);
|
||||
@@ -738,7 +748,8 @@ class NormalModule extends Module {
|
||||
},
|
||||
getLogger: (name) => {
|
||||
const currentLoader = this.getCurrentLoader(
|
||||
/** @type {LoaderContext<EXPECTED_ANY>} */ (loaderContext)
|
||||
/** @type {AnyLoaderContext} */
|
||||
(loaderContext)
|
||||
);
|
||||
return compilation.getLogger(() =>
|
||||
[currentLoader && currentLoader.loader, name, this.identifier()]
|
||||
@@ -794,7 +805,7 @@ class NormalModule extends Module {
|
||||
(buildInfo.assetsInfo);
|
||||
|
||||
assets[name] = this.createSourceForAsset(
|
||||
/** @type {string} */ (options.context),
|
||||
options.context,
|
||||
name,
|
||||
content,
|
||||
sourceMap,
|
||||
@@ -811,14 +822,14 @@ class NormalModule extends Module {
|
||||
buildInfo.buildDependencies.add(dep);
|
||||
},
|
||||
utils,
|
||||
rootContext: /** @type {string} */ (options.context),
|
||||
rootContext: options.context,
|
||||
webpack: true,
|
||||
sourceMap: Boolean(this.useSourceMap),
|
||||
mode: options.mode || "production",
|
||||
hashFunction: /** @type {string} */ (options.output.hashFunction),
|
||||
hashDigest: /** @type {string} */ (options.output.hashDigest),
|
||||
hashDigestLength: /** @type {number} */ (options.output.hashDigestLength),
|
||||
hashSalt: /** @type {string} */ (options.output.hashSalt),
|
||||
hashFunction: options.output.hashFunction,
|
||||
hashDigest: options.output.hashDigest,
|
||||
hashDigestLength: options.output.hashDigestLength,
|
||||
hashSalt: options.output.hashSalt,
|
||||
_module: this,
|
||||
_compilation: compilation,
|
||||
_compiler: compilation.compiler,
|
||||
@@ -827,19 +838,18 @@ class NormalModule extends Module {
|
||||
|
||||
Object.assign(loaderContext, options.loader);
|
||||
|
||||
// After `hooks.loader.call` is called, the loaderContext is typed as LoaderContext<EXPECTED_ANY>
|
||||
hooks.loader.call(
|
||||
/** @type {LoaderContext<EXPECTED_ANY>} */
|
||||
/** @type {AnyLoaderContext} */
|
||||
(loaderContext),
|
||||
this
|
||||
);
|
||||
|
||||
return /** @type {LoaderContext<EXPECTED_ANY>} */ (loaderContext);
|
||||
return /** @type {AnyLoaderContext} */ (loaderContext);
|
||||
}
|
||||
|
||||
// TODO remove `loaderContext` in webpack@6
|
||||
/**
|
||||
* @param {LoaderContext<EXPECTED_ANY>} loaderContext loader context
|
||||
* @param {AnyLoaderContext} loaderContext loader context
|
||||
* @param {number} index index
|
||||
* @returns {LoaderItem | null} loader
|
||||
*/
|
||||
@@ -962,7 +972,7 @@ class NormalModule extends Module {
|
||||
: this.binary;
|
||||
|
||||
this._source = this.createSource(
|
||||
/** @type {string} */ (options.context),
|
||||
options.context,
|
||||
isBinaryModule ? asBuffer(source) : asString(source),
|
||||
sourceMap,
|
||||
compilation.compiler.root
|
||||
@@ -988,7 +998,7 @@ class NormalModule extends Module {
|
||||
hooks.beforeLoaders.call(
|
||||
this.loaders,
|
||||
this,
|
||||
/** @type {LoaderContext<EXPECTED_ANY>} */
|
||||
/** @type {AnyLoaderContext} */
|
||||
(loaderContext)
|
||||
);
|
||||
} catch (err) {
|
||||
@@ -1007,28 +1017,80 @@ class NormalModule extends Module {
|
||||
loaders: this.loaders,
|
||||
context: loaderContext,
|
||||
/**
|
||||
* @param {LoaderContext<EXPECTED_ANY>} loaderContext the loader context
|
||||
* @param {AnyLoaderContext} loaderContext the loader context
|
||||
* @param {string} resourcePath the resource Path
|
||||
* @param {(err: Error | null, result?: string | Buffer) => void} callback callback
|
||||
* @param {(err: Error | null, result?: string | Buffer, sourceMap?: Result[1]) => void} callback callback
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
processResource: (loaderContext, resourcePath, callback) => {
|
||||
const resource = loaderContext.resource;
|
||||
const scheme = getScheme(resource);
|
||||
hooks.readResource
|
||||
.for(scheme)
|
||||
.callAsync(loaderContext, (err, result) => {
|
||||
if (err) return callback(err);
|
||||
if (typeof result !== "string" && !result) {
|
||||
return callback(
|
||||
new UnhandledSchemeError(
|
||||
/** @type {string} */
|
||||
(scheme),
|
||||
resource
|
||||
)
|
||||
);
|
||||
}
|
||||
return callback(null, result);
|
||||
processResource: async (loaderContext, resourcePath, callback) => {
|
||||
/** @type {ReadResource} */
|
||||
const readResource = (resourcePath, getLoaderContext) => {
|
||||
const scheme = getScheme(resourcePath);
|
||||
return new Promise((resolve, reject) => {
|
||||
hooks.readResource
|
||||
.for(scheme)
|
||||
.callAsync(getLoaderContext(resourcePath), (err, result) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
if (typeof result !== "string" && !result) {
|
||||
return reject(
|
||||
new UnhandledSchemeError(
|
||||
/** @type {string} */
|
||||
(scheme),
|
||||
resourcePath
|
||||
)
|
||||
);
|
||||
}
|
||||
resolve(result);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
try {
|
||||
const result = await readResource(
|
||||
resourcePath,
|
||||
() => loaderContext
|
||||
);
|
||||
if (
|
||||
this.extractSourceMap &&
|
||||
(this.useSourceMap || this.useSimpleSourceMap)
|
||||
) {
|
||||
try {
|
||||
const { source, sourceMap } = await getExtractSourceMap()(
|
||||
result,
|
||||
resourcePath,
|
||||
/** @type {ReadResource} */
|
||||
(resourcePath) =>
|
||||
readResource(
|
||||
resourcePath,
|
||||
(resourcePath) =>
|
||||
/** @type {AnyLoaderContext} */
|
||||
({
|
||||
addDependency(dependency) {
|
||||
loaderContext.addDependency(dependency);
|
||||
},
|
||||
fs: loaderContext.fs,
|
||||
_module: undefined,
|
||||
resourcePath,
|
||||
resource: resourcePath
|
||||
})
|
||||
).catch((err) => {
|
||||
throw new Error(
|
||||
`Failed to parse source map. ${/** @type {Error} */ (err).message}`
|
||||
);
|
||||
})
|
||||
);
|
||||
return callback(null, source, sourceMap);
|
||||
} catch (err) {
|
||||
this.addWarning(new ModuleWarning(/** @type {Error} */ (err)));
|
||||
return callback(null, result);
|
||||
}
|
||||
}
|
||||
return callback(null, result);
|
||||
} catch (error) {
|
||||
return callback(/** @type {Error} */ (error));
|
||||
}
|
||||
}
|
||||
},
|
||||
(err, result) => {
|
||||
@@ -1141,10 +1203,7 @@ class NormalModule extends Module {
|
||||
* @private
|
||||
*/
|
||||
_initBuildHash(compilation) {
|
||||
const hash = createHash(
|
||||
/** @type {HashFunction} */
|
||||
(compilation.outputOptions.hashFunction)
|
||||
);
|
||||
const hash = createHash(compilation.outputOptions.hashFunction);
|
||||
if (this._source) {
|
||||
hash.update("source");
|
||||
this._source.updateHash(hash);
|
||||
@@ -1152,7 +1211,7 @@ class NormalModule extends Module {
|
||||
hash.update("meta");
|
||||
hash.update(JSON.stringify(this.buildMeta));
|
||||
/** @type {BuildInfo} */
|
||||
(this.buildInfo).hash = /** @type {string} */ (hash.digest("hex"));
|
||||
(this.buildInfo).hash = hash.digest("hex");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1205,11 +1264,7 @@ class NormalModule extends Module {
|
||||
const handleParseError = (e) => {
|
||||
const source = /** @type {Source} */ (this._source).source();
|
||||
const loaders = this.loaders.map((item) =>
|
||||
contextify(
|
||||
/** @type {string} */ (options.context),
|
||||
item.loader,
|
||||
compilation.compiler.root
|
||||
)
|
||||
contextify(options.context, item.loader, compilation.compiler.root)
|
||||
);
|
||||
const error = new ModuleParseError(source, e, loaders, this.type);
|
||||
this.markModuleAsErrored(error);
|
||||
@@ -1446,7 +1501,7 @@ class NormalModule extends Module {
|
||||
codeGenerationResults,
|
||||
sourceTypes
|
||||
}) {
|
||||
/** @type {Set<string>} */
|
||||
/** @type {RuntimeRequirements} */
|
||||
const runtimeRequirements = new Set();
|
||||
|
||||
const { parsed } = /** @type {BuildInfo} */ (this.buildInfo);
|
||||
@@ -1604,10 +1659,10 @@ class NormalModule extends Module {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {LazySet<string>} fileDependencies set where file dependencies are added to
|
||||
* @param {LazySet<string>} contextDependencies set where context dependencies are added to
|
||||
* @param {LazySet<string>} missingDependencies set where missing dependencies are added to
|
||||
* @param {LazySet<string>} buildDependencies set where build dependencies are added to
|
||||
* @param {FileSystemDependencies} fileDependencies set where file dependencies are added to
|
||||
* @param {FileSystemDependencies} contextDependencies set where context dependencies are added to
|
||||
* @param {FileSystemDependencies} missingDependencies set where missing dependencies are added to
|
||||
* @param {FileSystemDependencies} buildDependencies set where build dependencies are added to
|
||||
*/
|
||||
addCacheDependencies(
|
||||
fileDependencies,
|
||||
@@ -1666,6 +1721,7 @@ class NormalModule extends Module {
|
||||
write(this._lastSuccessfulBuildMeta);
|
||||
write(this._forceBuild);
|
||||
write(this._codeGeneratorData);
|
||||
write(this.extractSourceMap);
|
||||
super.serialize(context);
|
||||
}
|
||||
|
||||
@@ -1706,6 +1762,7 @@ class NormalModule extends Module {
|
||||
this._lastSuccessfulBuildMeta = read();
|
||||
this._forceBuild = read();
|
||||
this._codeGeneratorData = read();
|
||||
this.extractSourceMap = read();
|
||||
super.deserialize(context);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user