@rspack/core 1.0.14 → 1.1.0

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.
Files changed (46) hide show
  1. package/compiled/@swc/types/index.d.ts +1962 -0
  2. package/compiled/@swc/types/index.js +19 -0
  3. package/compiled/@swc/types/license +201 -0
  4. package/compiled/@swc/types/package.json +1 -0
  5. package/compiled/enhanced-resolve/CachedInputFileSystem.js +267 -80
  6. package/compiled/enhanced-resolve/index.d.ts +849 -236
  7. package/compiled/enhanced-resolve/package.json +1 -1
  8. package/compiled/graceful-fs/index.js +10 -10
  9. package/compiled/graceful-fs/package.json +1 -1
  10. package/compiled/zod/index.d.ts +2 -2
  11. package/dist/Compilation.d.ts +7 -18
  12. package/dist/DependenciesBlock.d.ts +6 -4
  13. package/dist/FileSystem.d.ts +7 -2
  14. package/dist/Module.d.ts +17 -14
  15. package/dist/builtin-loader/swc/types.d.ts +9 -435
  16. package/dist/builtin-plugin/EntryPlugin.d.ts +14 -11
  17. package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +10 -10
  18. package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +1 -1
  19. package/dist/builtin-plugin/MangleExportsPlugin.d.ts +10 -10
  20. package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +8 -10
  21. package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +10 -0
  22. package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +8 -8
  23. package/dist/builtin-plugin/SplitChunksPlugin.d.ts +1 -1
  24. package/dist/builtin-plugin/index.d.ts +4 -2
  25. package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +3 -3
  26. package/dist/builtin-plugin/lazy-compilation/plugin.d.ts +3 -3
  27. package/dist/config/adapter.d.ts +1 -1
  28. package/dist/config/adapterRuleUse.d.ts +1 -1
  29. package/dist/config/index.d.ts +1 -0
  30. package/dist/config/normalization.d.ts +4 -11
  31. package/dist/config/types.d.ts +417 -9
  32. package/dist/config/zod.d.ts +1044 -1303
  33. package/dist/exports.d.ts +4 -2
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.js +1023 -5103
  36. package/dist/util/ArrayQueue.d.ts +1 -9
  37. package/dist/util/asyncLib.d.ts +54 -0
  38. package/package.json +9 -9
  39. package/dist/builtin-loader/swc/react.d.ts +0 -15
  40. package/dist/lib/Dependency.d.ts +0 -23
  41. package/dist/lib/formatLocation.d.ts +0 -16
  42. package/dist/logging/runtime.d.ts +0 -16
  43. package/dist/util/IterableHelpers.d.ts +0 -12
  44. package/dist/util/scheme.d.ts +0 -6
  45. package/dist/util/webpack.d.ts +0 -4
  46. /package/dist/builtin-plugin/{LightningCssMiminizerRspackPlugin.d.ts → LightningCssMinimizerRspackPlugin.d.ts} +0 -0
@@ -1 +1 @@
1
- {"name":"enhanced-resolve","author":"Tobias Koppers @sokra","version":"5.12.0","license":"MIT","types":"index.d.ts","type":"commonjs"}
1
+ {"name":"enhanced-resolve","author":"Tobias Koppers @sokra","version":"5.17.1","license":"MIT","types":"index.d.ts","type":"commonjs"}
@@ -1,7 +1,7 @@
1
1
  /******/ (() => { // webpackBootstrap
2
2
  /******/ var __webpack_modules__ = ({
3
3
 
4
- /***/ 129:
4
+ /***/ 534:
5
5
  /***/ ((module) => {
6
6
 
7
7
  "use strict";
@@ -32,13 +32,13 @@ function clone (obj) {
32
32
 
33
33
  /***/ }),
34
34
 
35
- /***/ 545:
35
+ /***/ 796:
36
36
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
37
37
 
38
38
  var fs = __nccwpck_require__(147)
39
- var polyfills = __nccwpck_require__(325)
40
- var legacy = __nccwpck_require__(560)
41
- var clone = __nccwpck_require__(129)
39
+ var polyfills = __nccwpck_require__(50)
40
+ var legacy = __nccwpck_require__(318)
41
+ var clone = __nccwpck_require__(534)
42
42
 
43
43
  var util = __nccwpck_require__(837)
44
44
 
@@ -216,7 +216,7 @@ function patch (fs) {
216
216
 
217
217
  function go$copyFile (src, dest, flags, cb, startTime) {
218
218
  return fs$copyFile(src, dest, flags, function (err) {
219
- if (err && (err.code === 'EMFILE' || err.code === 'ENFILE' || err.code === 'EBUSY'))
219
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
220
220
  enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()])
221
221
  else {
222
222
  if (typeof cb === 'function')
@@ -487,7 +487,7 @@ function retry () {
487
487
 
488
488
  /***/ }),
489
489
 
490
- /***/ 560:
490
+ /***/ 318:
491
491
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
492
492
 
493
493
  var Stream = (__nccwpck_require__(781).Stream)
@@ -612,7 +612,7 @@ function legacy (fs) {
612
612
 
613
613
  /***/ }),
614
614
 
615
- /***/ 325:
615
+ /***/ 50:
616
616
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
617
617
 
618
618
  var constants = __nccwpck_require__(57)
@@ -718,7 +718,7 @@ function patch (fs) {
718
718
  var backoff = 0;
719
719
  fs$rename(from, to, function CB (er) {
720
720
  if (er
721
- && (er.code === "EACCES" || er.code === "EPERM")
721
+ && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY")
722
722
  && Date.now() - start < 60000) {
723
723
  setTimeout(function() {
724
724
  fs.stat(to, function (stater, st) {
@@ -1056,7 +1056,7 @@ module.exports = require("util");
1056
1056
  /******/ // startup
1057
1057
  /******/ // Load entry module and return exports
1058
1058
  /******/ // This entry module is referenced by other modules so it can't be inlined
1059
- /******/ var __webpack_exports__ = __nccwpck_require__(545);
1059
+ /******/ var __webpack_exports__ = __nccwpck_require__(796);
1060
1060
  /******/ module.exports = __webpack_exports__;
1061
1061
  /******/
1062
1062
  /******/ })()
@@ -1 +1 @@
1
- {"name":"graceful-fs","version":"4.2.10","license":"ISC","types":"index.d.ts","type":"commonjs"}
1
+ {"name":"graceful-fs","version":"4.2.11","license":"ISC","types":"index.d.ts","type":"commonjs"}
@@ -1716,7 +1716,7 @@ type z_mergeTypes<A, B> = mergeTypes<A, B>;
1716
1716
  type z_noUnrecognized<Obj extends object, Shape extends object> = noUnrecognized<Obj, Shape>;
1717
1717
  type z_objectInputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny, UnknownKeys extends UnknownKeysParam = UnknownKeysParam> = objectInputType<Shape, Catchall, UnknownKeys>;
1718
1718
  type z_objectOutputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny, UnknownKeys extends UnknownKeysParam = UnknownKeysParam> = objectOutputType<Shape, Catchall, UnknownKeys>;
1719
- declare const z_objectUtil: typeof objectUtil;
1719
+ import z_objectUtil = objectUtil;
1720
1720
  declare const z_oboolean: typeof oboolean;
1721
1721
  declare const z_onumber: typeof onumber;
1722
1722
  declare const z_ostring: typeof ostring;
@@ -1725,7 +1725,7 @@ declare const z_quotelessJson: typeof quotelessJson;
1725
1725
  declare const z_setErrorMap: typeof setErrorMap;
1726
1726
  type z_typeToFlattenedError<T, U = string> = typeToFlattenedError<T, U>;
1727
1727
  type z_typecast<A, T> = typecast<A, T>;
1728
- declare const z_util: typeof util;
1728
+ import z_util = util;
1729
1729
  declare namespace z {
1730
1730
  export { type z_AnyZodObject as AnyZodObject, type z_AnyZodTuple as AnyZodTuple, type z_ArrayCardinality as ArrayCardinality, type z_ArrayKeys as ArrayKeys, type z_AssertArray as AssertArray, type z_AsyncParseReturnType as AsyncParseReturnType, type z_BRAND as BRAND, type z_CatchallInput as CatchallInput, type z_CatchallOutput as CatchallOutput, type z_CustomErrorParams as CustomErrorParams, z_DIRTY as DIRTY, type z_DenormalizedError as DenormalizedError, z_EMPTY_PATH as EMPTY_PATH, type z_Effect as Effect, type z_EnumLike as EnumLike, type z_EnumValues as EnumValues, type z_ErrorMapCtx as ErrorMapCtx, type z_FilterEnum as FilterEnum, z_INVALID as INVALID, type z_Indices as Indices, type z_InnerTypeOfFunction as InnerTypeOfFunction, type z_InputTypeOfTuple as InputTypeOfTuple, type z_InputTypeOfTupleWithRest as InputTypeOfTupleWithRest, type z_IpVersion as IpVersion, type z_IssueData as IssueData, type z_KeySchema as KeySchema, z_NEVER as NEVER, z_OK as OK, type z_ObjectPair as ObjectPair, type z_OuterTypeOfFunction as OuterTypeOfFunction, type z_OutputTypeOfTuple as OutputTypeOfTuple, type z_OutputTypeOfTupleWithRest as OutputTypeOfTupleWithRest, type z_ParseContext as ParseContext, type z_ParseInput as ParseInput, type z_ParseParams as ParseParams, type z_ParsePath as ParsePath, type z_ParsePathComponent as ParsePathComponent, type z_ParseResult as ParseResult, type z_ParseReturnType as ParseReturnType, z_ParseStatus as ParseStatus, type z_PassthroughType as PassthroughType, type z_PreprocessEffect as PreprocessEffect, type z_Primitive as Primitive, type z_ProcessedCreateParams as ProcessedCreateParams, type z_RawCreateParams as RawCreateParams, type z_RecordType as RecordType, type z_Refinement as Refinement, type z_RefinementCtx as RefinementCtx, type z_RefinementEffect as RefinementEffect, type z_SafeParseError as SafeParseError, type z_SafeParseReturnType as SafeParseReturnType, type z_SafeParseSuccess as SafeParseSuccess, type z_Scalars as Scalars, ZodType as Schema, type z_SomeZodObject as SomeZodObject, type z_StringValidation as StringValidation, type z_SuperRefinement as SuperRefinement, type z_SyncParseReturnType as SyncParseReturnType, type z_TransformEffect as TransformEffect, type z_TypeOf as TypeOf, type z_UnknownKeysParam as UnknownKeysParam, type z_Values as Values, type z_Writeable as Writeable, z_ZodAny as ZodAny, type z_ZodAnyDef as ZodAnyDef, z_ZodArray as ZodArray, type z_ZodArrayDef as ZodArrayDef, z_ZodBigInt as ZodBigInt, type z_ZodBigIntCheck as ZodBigIntCheck, type z_ZodBigIntDef as ZodBigIntDef, z_ZodBoolean as ZodBoolean, type z_ZodBooleanDef as ZodBooleanDef, z_ZodBranded as ZodBranded, type z_ZodBrandedDef as ZodBrandedDef, z_ZodCatch as ZodCatch, type z_ZodCatchDef as ZodCatchDef, type z_ZodCustomIssue as ZodCustomIssue, z_ZodDate as ZodDate, type z_ZodDateCheck as ZodDateCheck, type z_ZodDateDef as ZodDateDef, z_ZodDefault as ZodDefault, type z_ZodDefaultDef as ZodDefaultDef, z_ZodDiscriminatedUnion as ZodDiscriminatedUnion, type z_ZodDiscriminatedUnionDef as ZodDiscriminatedUnionDef, type z_ZodDiscriminatedUnionOption as ZodDiscriminatedUnionOption, z_ZodEffects as ZodEffects, type z_ZodEffectsDef as ZodEffectsDef, z_ZodEnum as ZodEnum, type z_ZodEnumDef as ZodEnumDef, z_ZodError as ZodError, type z_ZodErrorMap as ZodErrorMap, type z_ZodFirstPartySchemaTypes as ZodFirstPartySchemaTypes, z_ZodFirstPartyTypeKind as ZodFirstPartyTypeKind, type z_ZodFormattedError as ZodFormattedError, z_ZodFunction as ZodFunction, type z_ZodFunctionDef as ZodFunctionDef, z_ZodIntersection as ZodIntersection, type z_ZodIntersectionDef as ZodIntersectionDef, type z_ZodInvalidArgumentsIssue as ZodInvalidArgumentsIssue, type z_ZodInvalidDateIssue as ZodInvalidDateIssue, type z_ZodInvalidEnumValueIssue as ZodInvalidEnumValueIssue, type z_ZodInvalidIntersectionTypesIssue as ZodInvalidIntersectionTypesIssue, type z_ZodInvalidLiteralIssue as ZodInvalidLiteralIssue, type z_ZodInvalidReturnTypeIssue as ZodInvalidReturnTypeIssue, type z_ZodInvalidStringIssue as ZodInvalidStringIssue, type z_ZodInvalidTypeIssue as ZodInvalidTypeIssue, type z_ZodInvalidUnionDiscriminatorIssue as ZodInvalidUnionDiscriminatorIssue, type z_ZodInvalidUnionIssue as ZodInvalidUnionIssue, type z_ZodIssue as ZodIssue, type z_ZodIssueBase as ZodIssueBase, type z_ZodIssueCode as ZodIssueCode, type z_ZodIssueOptionalMessage as ZodIssueOptionalMessage, z_ZodLazy as ZodLazy, type z_ZodLazyDef as ZodLazyDef, z_ZodLiteral as ZodLiteral, type z_ZodLiteralDef as ZodLiteralDef, z_ZodMap as ZodMap, type z_ZodMapDef as ZodMapDef, z_ZodNaN as ZodNaN, type z_ZodNaNDef as ZodNaNDef, z_ZodNativeEnum as ZodNativeEnum, type z_ZodNativeEnumDef as ZodNativeEnumDef, z_ZodNever as ZodNever, type z_ZodNeverDef as ZodNeverDef, type z_ZodNonEmptyArray as ZodNonEmptyArray, type z_ZodNotFiniteIssue as ZodNotFiniteIssue, type z_ZodNotMultipleOfIssue as ZodNotMultipleOfIssue, z_ZodNull as ZodNull, type z_ZodNullDef as ZodNullDef, z_ZodNullable as ZodNullable, type z_ZodNullableDef as ZodNullableDef, type z_ZodNullableType as ZodNullableType, z_ZodNumber as ZodNumber, type z_ZodNumberCheck as ZodNumberCheck, type z_ZodNumberDef as ZodNumberDef, z_ZodObject as ZodObject, type z_ZodObjectDef as ZodObjectDef, z_ZodOptional as ZodOptional, type z_ZodOptionalDef as ZodOptionalDef, type z_ZodOptionalType as ZodOptionalType, type z_ZodParsedType as ZodParsedType, z_ZodPipeline as ZodPipeline, type z_ZodPipelineDef as ZodPipelineDef, z_ZodPromise as ZodPromise, type z_ZodPromiseDef as ZodPromiseDef, type z_ZodRawShape as ZodRawShape, z_ZodReadonly as ZodReadonly, type z_ZodReadonlyDef as ZodReadonlyDef, z_ZodRecord as ZodRecord, type z_ZodRecordDef as ZodRecordDef, ZodType as ZodSchema, z_ZodSet as ZodSet, type z_ZodSetDef as ZodSetDef, z_ZodString as ZodString, type z_ZodStringCheck as ZodStringCheck, type z_ZodStringDef as ZodStringDef, z_ZodSymbol as ZodSymbol, type z_ZodSymbolDef as ZodSymbolDef, type z_ZodTooBigIssue as ZodTooBigIssue, type z_ZodTooSmallIssue as ZodTooSmallIssue, ZodEffects as ZodTransformer, z_ZodTuple as ZodTuple, type z_ZodTupleDef as ZodTupleDef, type z_ZodTupleItems as ZodTupleItems, z_ZodType as ZodType, type z_ZodTypeAny as ZodTypeAny, type z_ZodTypeDef as ZodTypeDef, z_ZodUndefined as ZodUndefined, type z_ZodUndefinedDef as ZodUndefinedDef, z_ZodUnion as ZodUnion, type z_ZodUnionDef as ZodUnionDef, type z_ZodUnionOptions as ZodUnionOptions, z_ZodUnknown as ZodUnknown, type z_ZodUnknownDef as ZodUnknownDef, type z_ZodUnrecognizedKeysIssue as ZodUnrecognizedKeysIssue, z_ZodVoid as ZodVoid, type z_ZodVoidDef as ZodVoidDef, z_addIssueToContext as addIssueToContext, anyType as any, arrayType as array, type z_arrayOutputType as arrayOutputType, type z_baseObjectInputType as baseObjectInputType, type z_baseObjectOutputType as baseObjectOutputType, bigIntType as bigint, booleanType as boolean, z_coerce as coerce, z_custom as custom, dateType as date, z_datetimeRegex as datetimeRegex, errorMap as defaultErrorMap, type z_deoptional as deoptional, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, z_getErrorMap as getErrorMap, z_getParsedType as getParsedType, type TypeOf as infer, type z_inferFlattenedErrors as inferFlattenedErrors, type z_inferFormattedError as inferFormattedError, type z_input as input, instanceOfType as instanceof, intersectionType as intersection, z_isAborted as isAborted, z_isAsync as isAsync, z_isDirty as isDirty, z_isValid as isValid, z_late as late, lazyType as lazy, literalType as literal, z_makeIssue as makeIssue, mapType as map, type z_mergeTypes as mergeTypes, nanType as nan, nativeEnumType as nativeEnum, neverType as never, type z_noUnrecognized as noUnrecognized, nullType as null, nullableType as nullable, numberType as number, objectType as object, type z_objectInputType as objectInputType, type z_objectOutputType as objectOutputType, z_objectUtil as objectUtil, z_oboolean as oboolean, z_onumber as onumber, optionalType as optional, z_ostring as ostring, type z_output as output, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, z_quotelessJson as quotelessJson, recordType as record, setType as set, z_setErrorMap as setErrorMap, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, type z_typeToFlattenedError as typeToFlattenedError, type z_typecast as typecast, undefinedType as undefined, unionType as union, unknownType as unknown, z_util as util, voidType as void };
1731
1731
  }
@@ -30,7 +30,7 @@ import { StatsPrinter } from "./stats/StatsPrinter";
30
30
  import { type AssetInfo } from "./util/AssetInfo";
31
31
  import type { InputFileSystem } from "./util/fs";
32
32
  import type Hash from "./util/hash";
33
- export { type AssetInfo } from "./util/AssetInfo";
33
+ export type { AssetInfo } from "./util/AssetInfo";
34
34
  export type Assets = Record<string, Source>;
35
35
  export interface Asset {
36
36
  name: string;
@@ -271,7 +271,9 @@ export declare class Compilation {
271
271
  */
272
272
  __internal__pushDiagnostics(diagnostics: ExternalObject<"Diagnostic[]">): void;
273
273
  get errors(): RspackError[];
274
+ set errors(errors: RspackError[]);
274
275
  get warnings(): RspackError[];
276
+ set warnings(warnings: RspackError[]);
275
277
  getPath(filename: Filename, data?: PathData): string;
276
278
  getPathWithInfo(filename: Filename, data?: PathData): binding.PathWithInfo;
277
279
  getAssetPath(filename: Filename, data?: PathData): string;
@@ -377,32 +379,19 @@ export declare class Compilation {
377
379
  static PROCESS_ASSETS_STAGE_REPORT: number;
378
380
  }
379
381
  export type EntryData = binding.JsEntryData;
380
- /**
381
- * Copied from `lib.es2015.iterable.d.ts` in TS 5.6 for compatibility
382
- * 1. In 5.6 and after, `IterableIterator` cannot be assigned to 'MapIterator'
383
- * 2. Before 5.6, Cannot find name 'MapIterator'
384
- * @see https://devblogs.microsoft.com/typescript/announcing-typescript-5-6/#iterator-helper-methods
385
- */
386
- interface IteratorObject<T, TReturn = unknown, TNext = unknown> extends Iterator<T, TReturn, TNext> {
387
- [Symbol.iterator](): IteratorObject<T, TReturn, TNext>;
388
- }
389
- type BuiltinIteratorReturn = any;
390
- interface MapIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
391
- [Symbol.iterator](): MapIterator<T>;
392
- }
393
382
  export declare class Entries implements Map<string, EntryData> {
394
383
  #private;
395
384
  constructor(data: binding.JsEntries);
396
385
  clear(): void;
397
386
  forEach(callback: (value: binding.JsEntryData, key: string, map: Map<string, binding.JsEntryData>) => void, thisArg?: any): void;
398
387
  get size(): number;
399
- entries(): MapIterator<[string, binding.JsEntryData]>;
400
- values(): MapIterator<binding.JsEntryData>;
401
- [Symbol.iterator](): MapIterator<[string, binding.JsEntryData]>;
388
+ entries(): ReturnType<Map<string, EntryData>["entries"]>;
389
+ values(): ReturnType<Map<string, EntryData>["values"]>;
390
+ [Symbol.iterator](): ReturnType<Map<string, EntryData>["entries"]>;
402
391
  get [Symbol.toStringTag](): string;
403
392
  has(key: string): boolean;
404
393
  set(key: string, value: EntryData): this;
405
394
  delete(key: string): boolean;
406
395
  get(key: string): EntryData | undefined;
407
- keys(): MapIterator<string>;
396
+ keys(): ReturnType<Map<string, EntryData>["keys"]>;
408
397
  }
@@ -1,8 +1,10 @@
1
- import type { DependenciesBlockDTO } from "@rspack/binding";
1
+ import type { JsDependenciesBlock } from "@rspack/binding";
2
2
  import { Dependency } from "./Dependency";
3
3
  export declare class DependenciesBlock {
4
4
  #private;
5
- constructor(binding: DependenciesBlockDTO);
6
- get dependencies(): Dependency[];
7
- get blocks(): DependenciesBlock[];
5
+ readonly dependencies: Dependency[];
6
+ readonly blocks: DependenciesBlock[];
7
+ static __from_binding(binding: JsDependenciesBlock): DependenciesBlock;
8
+ static __to_binding(block: DependenciesBlock): JsDependenciesBlock;
9
+ private constructor();
8
10
  }
@@ -1,12 +1,17 @@
1
- import type { ThreadsafeNodeFS } from "@rspack/binding";
2
- import { type OutputFileSystem } from "./util/fs";
1
+ import type { NodeFsStats, ThreadsafeNodeFS } from "@rspack/binding";
2
+ import { type IStats, type OutputFileSystem } from "./util/fs";
3
3
  declare class ThreadsafeWritableNodeFS implements ThreadsafeNodeFS {
4
4
  writeFile: (name: string, content: Buffer) => Promise<void> | void;
5
5
  removeFile: (name: string) => Promise<void> | void;
6
6
  mkdir: (name: string) => Promise<void> | void;
7
7
  mkdirp: (name: string) => Promise<string | void> | string | void;
8
8
  removeDirAll: (name: string) => Promise<string | void> | string | void;
9
+ readDir: (name: string) => Promise<string[] | void> | string[] | void;
10
+ readFile: (name: string) => Promise<Buffer | string | void> | Buffer | string | void;
11
+ stat: (name: string) => Promise<NodeFsStats | void> | NodeFsStats | void;
12
+ lstat: (name: string) => Promise<NodeFsStats | void> | NodeFsStats | void;
9
13
  constructor(fs?: OutputFileSystem);
10
14
  static __to_binding(fs?: OutputFileSystem): ThreadsafeWritableNodeFS;
15
+ static __to_binding_stat(stat: IStats): NodeFsStats;
11
16
  }
12
17
  export { ThreadsafeWritableNodeFS };
package/dist/Module.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import type { JsCodegenerationResult, JsContextModuleFactoryAfterResolveData, JsContextModuleFactoryBeforeResolveData, JsCreateData, JsFactoryMeta, JsModule, ModuleDTO } from "@rspack/binding";
1
+ import type { JsCodegenerationResult, JsContextModuleFactoryAfterResolveData, JsContextModuleFactoryBeforeResolveData, JsCreateData, JsFactoryMeta } from "@rspack/binding";
2
+ import { JsModule } from "@rspack/binding";
2
3
  import type { Source } from "../compiled/webpack-sources";
3
4
  import type { Compilation } from "./Compilation";
4
5
  import { DependenciesBlock } from "./DependenciesBlock";
@@ -51,32 +52,34 @@ export declare class ContextModuleFactoryAfterResolveData {
51
52
  export type ContextModuleFactoryAfterResolveResult = false | ContextModuleFactoryAfterResolveData;
52
53
  export declare class Module {
53
54
  #private;
54
- context?: Readonly<string>;
55
- resource?: Readonly<string>;
56
- request?: Readonly<string>;
57
- userRequest?: Readonly<string>;
58
- rawRequest?: Readonly<string>;
59
- type: string;
60
- layer: null | string;
61
- factoryMeta?: Readonly<JsFactoryMeta>;
55
+ readonly context?: string;
56
+ readonly resource?: string;
57
+ readonly request?: string;
58
+ userRequest?: string;
59
+ readonly rawRequest?: string;
60
+ readonly type: string;
61
+ readonly layer: null | string;
62
+ readonly factoryMeta?: JsFactoryMeta;
62
63
  /**
63
64
  * Records the dynamically added fields for Module on the JavaScript side.
64
65
  * These fields are generally used within a plugin, so they do not need to be passed back to the Rust side.
65
66
  * @see {@link Compilation#customModules}
66
67
  */
67
- buildInfo: Record<string, any>;
68
+ readonly buildInfo: Record<string, any>;
68
69
  /**
69
70
  * Records the dynamically added fields for Module on the JavaScript side.
70
71
  * These fields are generally used within a plugin, so they do not need to be passed back to the Rust side.
71
72
  * @see {@link Compilation#customModules}
72
73
  */
73
- buildMeta: Record<string, any>;
74
- static __from_binding(module: JsModule | ModuleDTO, compilation?: Compilation): Module;
75
- constructor(module: JsModule | ModuleDTO, compilation?: Compilation);
74
+ readonly buildMeta: Record<string, any>;
75
+ readonly modules: Module[] | undefined;
76
+ readonly blocks: DependenciesBlock[];
77
+ readonly useSourceMap: boolean;
78
+ static __from_binding(binding: JsModule, compilation?: Compilation): Module;
79
+ constructor(module: JsModule, compilation?: Compilation);
76
80
  originalSource(): Source | null;
77
81
  identifier(): string;
78
82
  nameForCondition(): string | null;
79
- get blocks(): DependenciesBlock[];
80
83
  size(type?: string): number;
81
84
  }
82
85
  export declare class CodeGenerationResult {