@rspack-debug/binding 2.0.0-beta.0 → 2.0.0-beta.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.
Files changed (2) hide show
  1. package/napi-binding.d.ts +98 -34
  2. package/package.json +10 -10
package/napi-binding.d.ts CHANGED
@@ -548,10 +548,13 @@ export declare enum BuiltinPluginName {
548
548
  SplitChunksPlugin = 'SplitChunksPlugin',
549
549
  RemoveDuplicateModulesPlugin = 'RemoveDuplicateModulesPlugin',
550
550
  ShareRuntimePlugin = 'ShareRuntimePlugin',
551
+ SharedUsedExportsOptimizerPlugin = 'SharedUsedExportsOptimizerPlugin',
551
552
  ContainerPlugin = 'ContainerPlugin',
552
553
  ContainerReferencePlugin = 'ContainerReferencePlugin',
553
554
  ProvideSharedPlugin = 'ProvideSharedPlugin',
554
555
  ConsumeSharedPlugin = 'ConsumeSharedPlugin',
556
+ CollectSharedEntryPlugin = 'CollectSharedEntryPlugin',
557
+ SharedContainerPlugin = 'SharedContainerPlugin',
555
558
  ModuleFederationRuntimePlugin = 'ModuleFederationRuntimePlugin',
556
559
  ModuleFederationManifestPlugin = 'ModuleFederationManifestPlugin',
557
560
  NamedModuleIdsPlugin = 'NamedModuleIdsPlugin',
@@ -717,6 +720,14 @@ export interface JsBeforeEmitData {
717
720
  uid?: number
718
721
  }
719
722
 
723
+ export interface JsBeforeModuleIdsArg {
724
+ modules: Array<JsModuleForIds>
725
+ }
726
+
727
+ export interface JsBeforeModuleIdsResult {
728
+ assignments: Record<string, string>
729
+ }
730
+
720
731
  export interface JsBuildMeta {
721
732
  strictEsmModule?: boolean
722
733
  hasTopLevelAwait?: boolean
@@ -980,6 +991,10 @@ export interface JsModuleDescriptor {
980
991
  id?: string | number | null
981
992
  }
982
993
 
994
+ export interface JsModuleForIds {
995
+ identifier: string
996
+ }
997
+
983
998
  export interface JsNormalModuleFactoryCreateModuleArgs {
984
999
  dependencyType: string
985
1000
  rawRequest: string
@@ -1112,6 +1127,11 @@ export interface JsRsdoctorExportInfo {
1112
1127
  sideEffects: Array<number>
1113
1128
  }
1114
1129
 
1130
+ export interface JsRsdoctorJsonModuleSize {
1131
+ identifier: string
1132
+ size: number
1133
+ }
1134
+
1115
1135
  export interface JsRsdoctorModule {
1116
1136
  ukey: number
1117
1137
  identifier: string
@@ -1160,6 +1180,7 @@ export interface JsRsdoctorModuleOriginalSource {
1160
1180
 
1161
1181
  export interface JsRsdoctorModuleSourcesPatch {
1162
1182
  moduleOriginalSources: Array<JsRsdoctorModuleOriginalSource>
1183
+ jsonModuleSizes: Array<JsRsdoctorJsonModuleSize>
1163
1184
  }
1164
1185
 
1165
1186
  export interface JsRsdoctorSideEffect {
@@ -1852,6 +1873,7 @@ export interface RawCacheOptionsPersistent {
1852
1873
  snapshot?: RawSnapshotOptions
1853
1874
  storage?: RawStorageOptions
1854
1875
  portable?: boolean
1876
+ readonly?: boolean
1855
1877
  }
1856
1878
 
1857
1879
  export interface RawCircularDependencyRspackPluginOptions {
@@ -1864,6 +1886,11 @@ export interface RawCircularDependencyRspackPluginOptions {
1864
1886
  onEnd?: () => void
1865
1887
  }
1866
1888
 
1889
+ export interface RawCollectShareEntryPluginOptions {
1890
+ consumes: Array<RawConsumeOptions>
1891
+ filename?: string
1892
+ }
1893
+
1867
1894
  export interface RawCompilerPlatform {
1868
1895
  web?: boolean | null
1869
1896
  browser?: boolean | null
@@ -1884,6 +1911,7 @@ export interface RawConsumeOptions {
1884
1911
  strictVersion: boolean
1885
1912
  singleton: boolean
1886
1913
  eager: boolean
1914
+ treeShakingMode?: string
1887
1915
  }
1888
1916
 
1889
1917
  export interface RawConsumeSharedPluginOptions {
@@ -2034,6 +2062,7 @@ export interface RawCssAutoGeneratorOptions {
2034
2062
  export interface RawCssAutoParserOptions {
2035
2063
  namedExports?: boolean
2036
2064
  url?: boolean
2065
+ resolveImport?: boolean | ((context: { url: string, media: string | undefined, resourcePath: string, supports: string | undefined, layer: string | undefined }) => boolean)
2037
2066
  }
2038
2067
 
2039
2068
  export interface RawCssChunkingPluginOptions {
@@ -2060,6 +2089,14 @@ export interface RawCssGeneratorOptions {
2060
2089
  esModule?: boolean
2061
2090
  }
2062
2091
 
2092
+ export interface RawCssImportContext {
2093
+ url: string
2094
+ media?: string
2095
+ resourcePath: string
2096
+ supports?: string
2097
+ layer?: string
2098
+ }
2099
+
2063
2100
  export interface RawCssModuleGeneratorOptions {
2064
2101
  exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only"
2065
2102
  exportsOnly?: boolean
@@ -2070,11 +2107,13 @@ export interface RawCssModuleGeneratorOptions {
2070
2107
  export interface RawCssModuleParserOptions {
2071
2108
  namedExports?: boolean
2072
2109
  url?: boolean
2110
+ resolveImport?: boolean | ((context: { url: string, media: string | undefined, resourcePath: string, supports: string | undefined, layer: string | undefined }) => boolean)
2073
2111
  }
2074
2112
 
2075
2113
  export interface RawCssParserOptions {
2076
2114
  namedExports?: boolean
2077
2115
  url?: boolean
2116
+ resolveImport?: boolean | ((context: { url: string, media: string | undefined, resourcePath: string, supports: string | undefined, layer: string | undefined }) => boolean)
2078
2117
  }
2079
2118
 
2080
2119
  export interface RawDllEntryPluginOptions {
@@ -2339,7 +2378,6 @@ export interface RawJavascriptParserOptions {
2339
2378
  exportsPresence?: string
2340
2379
  importExportsPresence?: string
2341
2380
  reexportExportsPresence?: string
2342
- strictExportPresence?: boolean
2343
2381
  worker?: Array<string>
2344
2382
  overrideStrict?: string
2345
2383
  importMeta?: boolean
@@ -2601,6 +2639,12 @@ export interface RawOptimizationOptions {
2601
2639
  avoidEntryIife: boolean
2602
2640
  }
2603
2641
 
2642
+ export interface RawOptimizeSharedConfig {
2643
+ shareKey: string
2644
+ treeShaking: boolean
2645
+ usedExports?: Array<string>
2646
+ }
2647
+
2604
2648
  export interface RawOptions {
2605
2649
  name?: string
2606
2650
  mode?: undefined | 'production' | 'development' | 'none'
@@ -2700,6 +2744,7 @@ export interface RawProvideOptions {
2700
2744
  singleton?: boolean
2701
2745
  requiredVersion?: string | false | undefined
2702
2746
  strictVersion?: boolean
2747
+ treeShakingMode?: string
2703
2748
  }
2704
2749
 
2705
2750
  export interface RawRelated {
@@ -2834,6 +2879,21 @@ export interface RawRuntimeChunkOptions {
2834
2879
  name: string | ((entrypoint: { name: string }) => string)
2835
2880
  }
2836
2881
 
2882
+ export interface RawSharedContainerPluginOptions {
2883
+ name: string
2884
+ request: string
2885
+ version: string
2886
+ fileName?: string
2887
+ library: JsLibraryOptions
2888
+ }
2889
+
2890
+ export interface RawSharedUsedExportsOptimizerPluginOptions {
2891
+ shared: Array<RawOptimizeSharedConfig>
2892
+ injectTreeShakingUsedExports?: boolean
2893
+ manifestFileName?: string
2894
+ statsFileName?: string
2895
+ }
2896
+
2837
2897
  export interface RawSizeLimitsPluginOptions {
2838
2898
  assetFilter?: (assetFilename: string) => boolean
2839
2899
  hints?: "error" | "warning"
@@ -2877,6 +2937,8 @@ export interface RawSplitChunksOptions {
2877
2937
  export interface RawStatsBuildInfo {
2878
2938
  buildVersion: string
2879
2939
  buildName?: string
2940
+ target?: Array<string>
2941
+ plugins?: Array<string>
2880
2942
  }
2881
2943
 
2882
2944
  export interface RawStatsOptions {
@@ -2966,39 +3028,40 @@ export declare enum RegisterJsTapKind {
2966
3028
  CompilationAfterOptimizeModules = 14,
2967
3029
  CompilationOptimizeTree = 15,
2968
3030
  CompilationOptimizeChunkModules = 16,
2969
- CompilationAdditionalTreeRuntimeRequirements = 17,
2970
- CompilationRuntimeRequirementInTree = 18,
2971
- CompilationRuntimeModule = 19,
2972
- CompilationChunkHash = 20,
2973
- CompilationChunkAsset = 21,
2974
- CompilationProcessAssets = 22,
2975
- CompilationAfterProcessAssets = 23,
2976
- CompilationSeal = 24,
2977
- CompilationAfterSeal = 25,
2978
- NormalModuleFactoryBeforeResolve = 26,
2979
- NormalModuleFactoryFactorize = 27,
2980
- NormalModuleFactoryResolve = 28,
2981
- NormalModuleFactoryAfterResolve = 29,
2982
- NormalModuleFactoryCreateModule = 30,
2983
- NormalModuleFactoryResolveForScheme = 31,
2984
- ContextModuleFactoryBeforeResolve = 32,
2985
- ContextModuleFactoryAfterResolve = 33,
2986
- JavascriptModulesChunkHash = 34,
2987
- HtmlPluginBeforeAssetTagGeneration = 35,
2988
- HtmlPluginAlterAssetTags = 36,
2989
- HtmlPluginAlterAssetTagGroups = 37,
2990
- HtmlPluginAfterTemplateExecution = 38,
2991
- HtmlPluginBeforeEmit = 39,
2992
- HtmlPluginAfterEmit = 40,
2993
- RuntimePluginCreateScript = 41,
2994
- RuntimePluginCreateLink = 42,
2995
- RuntimePluginLinkPreload = 43,
2996
- RuntimePluginLinkPrefetch = 44,
2997
- RsdoctorPluginModuleGraph = 45,
2998
- RsdoctorPluginChunkGraph = 46,
2999
- RsdoctorPluginModuleIds = 47,
3000
- RsdoctorPluginModuleSources = 48,
3001
- RsdoctorPluginAssets = 49
3031
+ CompilationBeforeModuleIds = 17,
3032
+ CompilationAdditionalTreeRuntimeRequirements = 18,
3033
+ CompilationRuntimeRequirementInTree = 19,
3034
+ CompilationRuntimeModule = 20,
3035
+ CompilationChunkHash = 21,
3036
+ CompilationChunkAsset = 22,
3037
+ CompilationProcessAssets = 23,
3038
+ CompilationAfterProcessAssets = 24,
3039
+ CompilationSeal = 25,
3040
+ CompilationAfterSeal = 26,
3041
+ NormalModuleFactoryBeforeResolve = 27,
3042
+ NormalModuleFactoryFactorize = 28,
3043
+ NormalModuleFactoryResolve = 29,
3044
+ NormalModuleFactoryAfterResolve = 30,
3045
+ NormalModuleFactoryCreateModule = 31,
3046
+ NormalModuleFactoryResolveForScheme = 32,
3047
+ ContextModuleFactoryBeforeResolve = 33,
3048
+ ContextModuleFactoryAfterResolve = 34,
3049
+ JavascriptModulesChunkHash = 35,
3050
+ HtmlPluginBeforeAssetTagGeneration = 36,
3051
+ HtmlPluginAlterAssetTags = 37,
3052
+ HtmlPluginAlterAssetTagGroups = 38,
3053
+ HtmlPluginAfterTemplateExecution = 39,
3054
+ HtmlPluginBeforeEmit = 40,
3055
+ HtmlPluginAfterEmit = 41,
3056
+ RuntimePluginCreateScript = 42,
3057
+ RuntimePluginCreateLink = 43,
3058
+ RuntimePluginLinkPreload = 44,
3059
+ RuntimePluginLinkPrefetch = 45,
3060
+ RsdoctorPluginModuleGraph = 46,
3061
+ RsdoctorPluginChunkGraph = 47,
3062
+ RsdoctorPluginModuleIds = 48,
3063
+ RsdoctorPluginModuleSources = 49,
3064
+ RsdoctorPluginAssets = 50
3002
3065
  }
3003
3066
 
3004
3067
  export interface RegisterJsTaps {
@@ -3022,6 +3085,7 @@ export interface RegisterJsTaps {
3022
3085
  registerCompilationAfterOptimizeModulesTaps: (stages: Array<number>) => Array<{ function: (() => void); stage: number; }>
3023
3086
  registerCompilationOptimizeTreeTaps: (stages: Array<number>) => Array<{ function: (() => Promise<void>); stage: number; }>
3024
3087
  registerCompilationOptimizeChunkModulesTaps: (stages: Array<number>) => Array<{ function: (() => Promise<boolean | undefined>); stage: number; }>
3088
+ registerCompilationBeforeModuleIdsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsBeforeModuleIdsArg) => JsBeforeModuleIdsResult); stage: number; }>
3025
3089
  registerCompilationChunkHashTaps: (stages: Array<number>) => Array<{ function: ((arg: Chunk) => Buffer); stage: number; }>
3026
3090
  registerCompilationChunkAssetTaps: (stages: Array<number>) => Array<{ function: ((arg: JsChunkAssetArgs) => void); stage: number; }>
3027
3091
  registerCompilationProcessAssetsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsCompilation) => Promise<void>); stage: number; }>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-debug/binding",
3
- "version": "2.0.0-beta.0",
3
+ "version": "2.0.0-beta.1",
4
4
  "license": "MIT",
5
5
  "description": "Node binding for rspack",
6
6
  "main": "binding.js",
@@ -50,15 +50,15 @@
50
50
  }
51
51
  },
52
52
  "optionalDependencies": {
53
- "@rspack/binding-darwin-arm64": "npm:@rspack-debug/binding-darwin-arm64@2.0.0-beta.0",
54
- "@rspack/binding-linux-arm64-musl": "npm:@rspack-debug/binding-linux-arm64-musl@2.0.0-beta.0",
55
- "@rspack/binding-linux-arm64-gnu": "npm:@rspack-debug/binding-linux-arm64-gnu@2.0.0-beta.0",
56
- "@rspack/binding-win32-arm64-msvc": "npm:@rspack-debug/binding-win32-arm64-msvc@2.0.0-beta.0",
57
- "@rspack/binding-win32-ia32-msvc": "npm:@rspack-debug/binding-win32-ia32-msvc@2.0.0-beta.0",
58
- "@rspack/binding-win32-x64-msvc": "npm:@rspack-debug/binding-win32-x64-msvc@2.0.0-beta.0",
59
- "@rspack/binding-darwin-x64": "npm:@rspack-debug/binding-darwin-x64@2.0.0-beta.0",
60
- "@rspack/binding-linux-x64-gnu": "npm:@rspack-debug/binding-linux-x64-gnu@2.0.0-beta.0",
61
- "@rspack/binding-linux-x64-musl": "npm:@rspack-debug/binding-linux-x64-musl@2.0.0-beta.0"
53
+ "@rspack/binding-darwin-arm64": "npm:@rspack-debug/binding-darwin-arm64@2.0.0-beta.1",
54
+ "@rspack/binding-linux-arm64-gnu": "npm:@rspack-debug/binding-linux-arm64-gnu@2.0.0-beta.1",
55
+ "@rspack/binding-win32-arm64-msvc": "npm:@rspack-debug/binding-win32-arm64-msvc@2.0.0-beta.1",
56
+ "@rspack/binding-win32-ia32-msvc": "npm:@rspack-debug/binding-win32-ia32-msvc@2.0.0-beta.1",
57
+ "@rspack/binding-linux-arm64-musl": "npm:@rspack-debug/binding-linux-arm64-musl@2.0.0-beta.1",
58
+ "@rspack/binding-darwin-x64": "npm:@rspack-debug/binding-darwin-x64@2.0.0-beta.1",
59
+ "@rspack/binding-win32-x64-msvc": "npm:@rspack-debug/binding-win32-x64-msvc@2.0.0-beta.1",
60
+ "@rspack/binding-linux-x64-musl": "npm:@rspack-debug/binding-linux-x64-musl@2.0.0-beta.1",
61
+ "@rspack/binding-linux-x64-gnu": "npm:@rspack-debug/binding-linux-x64-gnu@2.0.0-beta.1"
62
62
  },
63
63
  "scripts": {
64
64
  "build:dev": "node scripts/build.js",