webpack 5.101.0 → 5.101.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpack",
3
- "version": "5.101.0",
3
+ "version": "5.101.1",
4
4
  "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
5
  "homepage": "https://github.com/webpack/webpack",
6
6
  "bugs": "https://github.com/webpack/webpack/issues",
@@ -91,7 +91,7 @@
91
91
  "acorn-import-phases": "^1.0.3",
92
92
  "browserslist": "^4.24.0",
93
93
  "chrome-trace-event": "^1.0.2",
94
- "enhanced-resolve": "^5.17.2",
94
+ "enhanced-resolve": "^5.17.3",
95
95
  "es-module-lexer": "^1.2.1",
96
96
  "eslint-scope": "5.1.1",
97
97
  "events": "^3.2.0",
@@ -179,12 +179,12 @@
179
179
  "strip-ansi": "^6.0.0",
180
180
  "style-loader": "^4.0.0",
181
181
  "terser": "^5.43.1",
182
- "three": "^0.178.0",
182
+ "three": "^0.179.1",
183
183
  "tinybench": "^4.0.1",
184
184
  "toml": "^3.0.0",
185
185
  "tooling": "webpack/tooling#v1.24.3",
186
186
  "ts-loader": "^9.5.1",
187
- "typescript": "^5.8.2",
187
+ "typescript": "^5.9.2",
188
188
  "url-loader": "^4.1.0",
189
189
  "wast-loader": "^1.12.1",
190
190
  "webassembly-feature": "1.3.0",
package/types.d.ts CHANGED
@@ -160,6 +160,12 @@ declare class AbstractLibraryPlugin<T> {
160
160
  renderContext: StartupRenderContext,
161
161
  libraryContext: LibraryContext<T>
162
162
  ): Source;
163
+ renderModuleContent(
164
+ source: Source,
165
+ module: Module,
166
+ renderContext: ModuleRenderContext,
167
+ libraryContext: Omit<LibraryContext<T>, "options">
168
+ ): Source;
163
169
  chunkHash(
164
170
  chunk: Chunk,
165
171
  hash: Hash,
@@ -1367,6 +1373,7 @@ declare class ChunkGraph {
1367
1373
  getNumberOfRuntimeModules(chunk: Chunk): number;
1368
1374
  getChunkEntryModulesIterable(chunk: Chunk): Iterable<Module>;
1369
1375
  getChunkEntryDependentChunksIterable(chunk: Chunk): Iterable<Chunk>;
1376
+ getChunkEntryDependOnChunksIterable(chunk: Chunk): Iterable<Chunk>;
1370
1377
  hasChunkEntryDependentChunks(chunk: Chunk): boolean;
1371
1378
  getChunkRuntimeModulesIterable(chunk: Chunk): Iterable<RuntimeModule>;
1372
1379
  getChunkRuntimeModulesInOrder(chunk: Chunk): RuntimeModule[];
@@ -2549,15 +2556,11 @@ declare interface CompilationHooksCssModulesPlugin {
2549
2556
  chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
2550
2557
  }
2551
2558
  declare interface CompilationHooksJavascriptModulesPlugin {
2552
- renderModuleContent: SyncWaterfallHook<
2553
- [Source, Module, ChunkRenderContextJavascriptModulesPlugin]
2554
- >;
2559
+ renderModuleContent: SyncWaterfallHook<[Source, Module, ModuleRenderContext]>;
2555
2560
  renderModuleContainer: SyncWaterfallHook<
2556
- [Source, Module, ChunkRenderContextJavascriptModulesPlugin]
2557
- >;
2558
- renderModulePackage: SyncWaterfallHook<
2559
- [Source, Module, ChunkRenderContextJavascriptModulesPlugin]
2561
+ [Source, Module, ModuleRenderContext]
2560
2562
  >;
2563
+ renderModulePackage: SyncWaterfallHook<[Source, Module, ModuleRenderContext]>;
2561
2564
  renderChunk: SyncWaterfallHook<
2562
2565
  [Source, RenderContextJavascriptModulesPlugin]
2563
2566
  >;
@@ -6461,9 +6464,8 @@ declare class JavascriptModulesPlugin {
6461
6464
  apply(compiler: Compiler): void;
6462
6465
  renderModule(
6463
6466
  module: Module,
6464
- renderContext: ChunkRenderContextJavascriptModulesPlugin,
6465
- hooks: CompilationHooksJavascriptModulesPlugin,
6466
- factory: boolean
6467
+ renderContext: ModuleRenderContext,
6468
+ hooks: CompilationHooksJavascriptModulesPlugin
6467
6469
  ): null | Source;
6468
6470
  renderChunk(
6469
6471
  renderContext: RenderContextJavascriptModulesPlugin,
@@ -8076,7 +8078,7 @@ declare interface JsonGeneratorOptions {
8076
8078
  */
8077
8079
  JSONParse?: boolean;
8078
8080
  }
8079
- type JsonObjectFs = { [index: string]: JsonValueFs } & {
8081
+ declare interface JsonObjectFs {
8080
8082
  [index: string]:
8081
8083
  | undefined
8082
8084
  | null
@@ -8085,8 +8087,8 @@ type JsonObjectFs = { [index: string]: JsonValueFs } & {
8085
8087
  | boolean
8086
8088
  | JsonObjectFs
8087
8089
  | JsonValueFs[];
8088
- };
8089
- type JsonObjectTypes = { [index: string]: JsonValueTypes } & {
8090
+ }
8091
+ declare interface JsonObjectTypes {
8090
8092
  [index: string]:
8091
8093
  | undefined
8092
8094
  | null
@@ -8095,7 +8097,7 @@ type JsonObjectTypes = { [index: string]: JsonValueTypes } & {
8095
8097
  | boolean
8096
8098
  | JsonObjectTypes
8097
8099
  | JsonValueTypes[];
8098
- };
8100
+ }
8099
8101
 
8100
8102
  /**
8101
8103
  * Parser options for JSON modules.
@@ -8355,9 +8357,10 @@ declare interface KnownBuildMeta {
8355
8357
  strictHarmonyModule?: boolean;
8356
8358
  async?: boolean;
8357
8359
  sideEffectFree?: boolean;
8358
- exportsFinalName?: Record<string, string>;
8359
8360
  isCSSModule?: boolean;
8360
8361
  jsIncompatibleExports?: Record<string, string>;
8362
+ exportsFinalName?: Record<string, string>;
8363
+ factoryExportsBinding?: string;
8361
8364
  }
8362
8365
  declare interface KnownCreateStatsOptionsContext {
8363
8366
  forToString?: boolean;
@@ -9848,7 +9851,8 @@ declare class ModuleExternalInitFragment extends InitFragment<GenerateContext> {
9848
9851
  static STAGE_ASYNC_DEPENDENCIES: number;
9849
9852
  static STAGE_ASYNC_HARMONY_IMPORTS: number;
9850
9853
  }
9851
- declare abstract class ModuleFactory {
9854
+ declare class ModuleFactory {
9855
+ constructor();
9852
9856
  create(
9853
9857
  data: ModuleFactoryCreateData,
9854
9858
  callback: (err?: null | Error, result?: ModuleFactoryResult) => void
@@ -10355,6 +10359,57 @@ declare interface ModuleReferenceOptions {
10355
10359
  */
10356
10360
  asiSafe?: boolean;
10357
10361
  }
10362
+ declare interface ModuleRenderContext {
10363
+ /**
10364
+ * the chunk
10365
+ */
10366
+ chunk: Chunk;
10367
+
10368
+ /**
10369
+ * the dependency templates
10370
+ */
10371
+ dependencyTemplates: DependencyTemplates;
10372
+
10373
+ /**
10374
+ * the runtime template
10375
+ */
10376
+ runtimeTemplate: RuntimeTemplate;
10377
+
10378
+ /**
10379
+ * the module graph
10380
+ */
10381
+ moduleGraph: ModuleGraph;
10382
+
10383
+ /**
10384
+ * the chunk graph
10385
+ */
10386
+ chunkGraph: ChunkGraph;
10387
+
10388
+ /**
10389
+ * results of code generation
10390
+ */
10391
+ codeGenerationResults: CodeGenerationResults;
10392
+
10393
+ /**
10394
+ * init fragments for the chunk
10395
+ */
10396
+ chunkInitFragments: InitFragment<ChunkRenderContextJavascriptModulesPlugin>[];
10397
+
10398
+ /**
10399
+ * rendering in strict context
10400
+ */
10401
+ strictMode?: boolean;
10402
+
10403
+ /**
10404
+ * true: renders as factory method, false: pure module content
10405
+ */
10406
+ factory: boolean;
10407
+
10408
+ /**
10409
+ * the inlined entry module is wrapped in an IIFE, existing only when `factory` is set to false
10410
+ */
10411
+ inlinedInIIFE?: boolean;
10412
+ }
10358
10413
  declare interface ModuleResult {
10359
10414
  client: string;
10360
10415
  data: string;
@@ -10402,7 +10457,7 @@ declare abstract class ModuleTemplate {
10402
10457
  fn: (
10403
10458
  source: Source,
10404
10459
  module: Module,
10405
- chunkRenderContext: ChunkRenderContextJavascriptModulesPlugin,
10460
+ moduleRenderContext: ModuleRenderContext,
10406
10461
  dependencyTemplates: DependencyTemplates
10407
10462
  ) => Source
10408
10463
  ) => void;
@@ -10415,7 +10470,7 @@ declare abstract class ModuleTemplate {
10415
10470
  fn: (
10416
10471
  source: Source,
10417
10472
  module: Module,
10418
- chunkRenderContext: ChunkRenderContextJavascriptModulesPlugin,
10473
+ moduleRenderContext: ModuleRenderContext,
10419
10474
  dependencyTemplates: DependencyTemplates
10420
10475
  ) => Source
10421
10476
  ) => void;
@@ -15976,9 +16031,52 @@ declare abstract class StackedMap<K, V> {
15976
16031
  get size(): number;
15977
16032
  createChild(): StackedMap<K, V>;
15978
16033
  }
15979
- type StartupRenderContext = RenderContextJavascriptModulesPlugin & {
16034
+ declare interface StartupRenderContext {
16035
+ /**
16036
+ * the chunk
16037
+ */
16038
+ chunk: Chunk;
16039
+
16040
+ /**
16041
+ * the dependency templates
16042
+ */
16043
+ dependencyTemplates: DependencyTemplates;
16044
+
16045
+ /**
16046
+ * the runtime template
16047
+ */
16048
+ runtimeTemplate: RuntimeTemplate;
16049
+
16050
+ /**
16051
+ * the module graph
16052
+ */
16053
+ moduleGraph: ModuleGraph;
16054
+
16055
+ /**
16056
+ * the chunk graph
16057
+ */
16058
+ chunkGraph: ChunkGraph;
16059
+
16060
+ /**
16061
+ * results of code generation
16062
+ */
16063
+ codeGenerationResults: CodeGenerationResults;
16064
+
16065
+ /**
16066
+ * rendering in strict context
16067
+ */
16068
+ strictMode?: boolean;
16069
+
16070
+ /**
16071
+ * inlined
16072
+ */
15980
16073
  inlined: boolean;
15981
- };
16074
+
16075
+ /**
16076
+ * the inlined entry module is wrapped in an IIFE
16077
+ */
16078
+ inlinedInIIFE?: boolean;
16079
+ }
15982
16080
  declare interface StatFs {
15983
16081
  (
15984
16082
  path: PathLikeFs,
@@ -18147,6 +18245,7 @@ declare namespace exports {
18147
18245
  LoaderOptionsPlugin,
18148
18246
  LoaderTargetPlugin,
18149
18247
  Module,
18248
+ ModuleFactory,
18150
18249
  ModuleGraph,
18151
18250
  ModuleGraphConnection,
18152
18251
  NoEmitOnErrorsPlugin,
@@ -18210,6 +18309,9 @@ declare namespace exports {
18210
18309
  ParserState,
18211
18310
  ResolvePluginInstance,
18212
18311
  Resolver,
18312
+ RenderManifestEntry,
18313
+ RenderManifestOptions,
18314
+ TemplatePath,
18213
18315
  Watching,
18214
18316
  Argument,
18215
18317
  Problem,
@@ -18229,6 +18331,8 @@ declare namespace exports {
18229
18331
  StatsModuleTraceDependency,
18230
18332
  StatsModuleTraceItem,
18231
18333
  StatsProfile,
18334
+ ObjectSerializerContext,
18335
+ ObjectDeserializerContext,
18232
18336
  InputFileSystem,
18233
18337
  OutputFileSystem,
18234
18338
  LoaderModule,