Framework updates
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
50
node_modules/webpack/lib/Module.js
generated
vendored
50
node_modules/webpack/lib/Module.js
generated
vendored
@@ -80,6 +80,8 @@ const makeSerializable = require("./util/makeSerializable");
|
||||
/** @typedef {KnownSourceType | string} SourceType */
|
||||
/** @typedef {ReadonlySet<SourceType>} SourceTypes */
|
||||
|
||||
/** @typedef {ReadonlySet<typeof JAVASCRIPT_TYPE | string>} BasicSourceTypes */
|
||||
|
||||
// TODO webpack 6: compilation will be required in CodeGenerationContext
|
||||
/**
|
||||
* @typedef {object} CodeGenerationContext
|
||||
@@ -104,11 +106,36 @@ const makeSerializable = require("./util/makeSerializable");
|
||||
/** @typedef {Set<string>} RuntimeRequirements */
|
||||
/** @typedef {ReadonlySet<string>} ReadOnlyRuntimeRequirements */
|
||||
|
||||
/** @typedef {Map<"topLevelDeclarations", Set<string>> & Map<"chunkInitFragments", InitFragment<EXPECTED_ANY>[]>} KnownCodeGenerationResultDataForJavascriptModules */
|
||||
/** @typedef {Map<"url", { ["css-url"]: string }>} KnownCodeGenerationResultDataForCssModules */
|
||||
/** @typedef {Map<"filename", string> & Map<"assetInfo", AssetInfo> & Map<"fullContentHash", string> & Map<"url", { javascript: string }>} KnownCodeGenerationResultDataForAssetModules */
|
||||
/** @typedef {Map<"share-init", [{ shareScope: string, initStage: number, init: string }]>} KnownCodeGenerationResultForSharing */
|
||||
/** @typedef {KnownCodeGenerationResultDataForJavascriptModules & KnownCodeGenerationResultDataForCssModules & KnownCodeGenerationResultDataForAssetModules & KnownCodeGenerationResultForSharing & Map<string, EXPECTED_ANY>} CodeGenerationResultData */
|
||||
/**
|
||||
* @typedef {object} AllCodeGenerationSchemas
|
||||
* @property {Set<string>} topLevelDeclarations top level declarations for javascript modules
|
||||
* @property {InitFragment<EXPECTED_ANY>[]} chunkInitFragments chunk init fragments for javascript modules
|
||||
* @property {{ javascript?: string, ["css-url"]?: string }} url url for css and javascript modules
|
||||
* @property {string} filename a filename for asset modules
|
||||
* @property {AssetInfo} assetInfo an asset info for asset modules
|
||||
* @property {string} fullContentHash a full content hash for asset modules
|
||||
* @property {[{ shareScope: string, initStage: number, init: string }]} share-init share-init for modules federation
|
||||
*/
|
||||
|
||||
/* eslint-disable jsdoc/type-formatting */
|
||||
/**
|
||||
* @template {string} K
|
||||
* @typedef {K extends keyof AllCodeGenerationSchemas ? AllCodeGenerationSchemas[K] : EXPECTED_ANY} CodeGenValue
|
||||
*/
|
||||
/* eslint-enable jsdoc/type-formatting */
|
||||
|
||||
/* eslint-disable jsdoc/require-template */
|
||||
/**
|
||||
* @typedef {object} CodeGenMapOverloads
|
||||
* @property {<K extends string>(key: K) => CodeGenValue<K> | undefined} get
|
||||
* @property {<K extends string>(key: K, value: CodeGenValue<K>) => CodeGenerationResultData} set
|
||||
* @property {<K extends string>(key: K) => boolean} has
|
||||
* @property {<K extends string>(key: K) => boolean} delete
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Omit<Map<string, EXPECTED_ANY>, "get" | "set" | "has" | "delete"> & CodeGenMapOverloads} CodeGenerationResultData
|
||||
*/
|
||||
|
||||
/** @typedef {Map<SourceType, Source>} Sources */
|
||||
|
||||
@@ -941,6 +968,19 @@ class Module extends DependenciesBlock {
|
||||
return JAVASCRIPT_TYPES;
|
||||
}
|
||||
|
||||
/**
|
||||
* Basic source types are high-level categories like javascript, css, webassembly, etc.
|
||||
* We only have built-in knowledge about the javascript basic type here; other basic types may be
|
||||
* added or changed over time by generators and do not need to be handled or detected here.
|
||||
*
|
||||
* Some modules, e.g. RemoteModule, may return non-basic source types like "remote" and "share-init"
|
||||
* from getSourceTypes(), but their generated output is still JavaScript, i.e. their basic type is JS.
|
||||
* @returns {BasicSourceTypes} types available (do not mutate)
|
||||
*/
|
||||
getSourceBasicTypes() {
|
||||
return this.getSourceTypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @deprecated Use codeGeneration() instead
|
||||
|
||||
Reference in New Issue
Block a user