@rspack/binding 0.4.0 → 0.4.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/binding.d.ts +100 -8
- package/package.json +10 -10
package/binding.d.ts
CHANGED
|
@@ -96,11 +96,13 @@ export class Rspack {
|
|
|
96
96
|
unsafe_drop(): void
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
export function
|
|
99
|
+
export function __chunk_group_inner_get_chunk_group(ukey: number, compilation: JsCompilation): JsChunkGroup
|
|
100
100
|
|
|
101
|
-
export function
|
|
101
|
+
export function __chunk_inner_can_be_initial(jsChunkUkey: number, compilation: JsCompilation): boolean
|
|
102
102
|
|
|
103
|
-
export function
|
|
103
|
+
export function __chunk_inner_has_runtime(jsChunkUkey: number, compilation: JsCompilation): boolean
|
|
104
|
+
|
|
105
|
+
export function __chunk_inner_is_only_initial(jsChunkUkey: number, compilation: JsCompilation): boolean
|
|
104
106
|
|
|
105
107
|
export interface AfterResolveData {
|
|
106
108
|
request: string
|
|
@@ -139,6 +141,14 @@ export const enum BuiltinPluginName {
|
|
|
139
141
|
HotModuleReplacementPlugin = 'HotModuleReplacementPlugin',
|
|
140
142
|
LimitChunkCountPlugin = 'LimitChunkCountPlugin',
|
|
141
143
|
WebWorkerTemplatePlugin = 'WebWorkerTemplatePlugin',
|
|
144
|
+
MergeDuplicateChunksPlugin = 'MergeDuplicateChunksPlugin',
|
|
145
|
+
SplitChunksPlugin = 'SplitChunksPlugin',
|
|
146
|
+
OldSplitChunksPlugin = 'OldSplitChunksPlugin',
|
|
147
|
+
ContainerPlugin = 'ContainerPlugin',
|
|
148
|
+
ContainerReferencePlugin = 'ContainerReferencePlugin',
|
|
149
|
+
ModuleFederationRuntimePlugin = 'ModuleFederationRuntimePlugin',
|
|
150
|
+
ProvideSharedPlugin = 'ProvideSharedPlugin',
|
|
151
|
+
ConsumeSharedPlugin = 'ConsumeSharedPlugin',
|
|
142
152
|
HttpExternalsRspackPlugin = 'HttpExternalsRspackPlugin',
|
|
143
153
|
CopyRspackPlugin = 'CopyRspackPlugin',
|
|
144
154
|
HtmlRspackPlugin = 'HtmlRspackPlugin',
|
|
@@ -205,6 +215,7 @@ export interface JsAssetInfoRelated {
|
|
|
205
215
|
|
|
206
216
|
export interface JsChunk {
|
|
207
217
|
__inner_ukey: number
|
|
218
|
+
__inner_groups: Array<number>
|
|
208
219
|
name?: string
|
|
209
220
|
id?: string
|
|
210
221
|
ids: Array<string>
|
|
@@ -226,7 +237,18 @@ export interface JsChunkAssetArgs {
|
|
|
226
237
|
}
|
|
227
238
|
|
|
228
239
|
export interface JsChunkGroup {
|
|
240
|
+
__inner_parents: Array<number>
|
|
229
241
|
chunks: Array<JsChunk>
|
|
242
|
+
index?: number
|
|
243
|
+
name?: string
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export interface JsCodegenerationResult {
|
|
247
|
+
sources: Record<string, string>
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export interface JsCodegenerationResults {
|
|
251
|
+
map: Record<string, Record<string, JsCodegenerationResult>>
|
|
230
252
|
}
|
|
231
253
|
|
|
232
254
|
export interface JsCompatSource {
|
|
@@ -238,6 +260,12 @@ export interface JsCompatSource {
|
|
|
238
260
|
map?: Buffer
|
|
239
261
|
}
|
|
240
262
|
|
|
263
|
+
export interface JsExecuteModuleArg {
|
|
264
|
+
entry: string
|
|
265
|
+
runtimeModules: Array<string>
|
|
266
|
+
codegenResults: JsCodegenerationResults
|
|
267
|
+
}
|
|
268
|
+
|
|
241
269
|
export interface JsHooks {
|
|
242
270
|
processAssetsStageAdditional: (...args: any[]) => any
|
|
243
271
|
processAssetsStagePreProcess: (...args: any[]) => any
|
|
@@ -259,11 +287,12 @@ export interface JsHooks {
|
|
|
259
287
|
thisCompilation: (...args: any[]) => any
|
|
260
288
|
emit: (...args: any[]) => any
|
|
261
289
|
assetEmitted: (...args: any[]) => any
|
|
290
|
+
shouldEmit: (...args: any[]) => any
|
|
262
291
|
afterEmit: (...args: any[]) => any
|
|
263
292
|
make: (...args: any[]) => any
|
|
264
293
|
optimizeModules: (...args: any[]) => any
|
|
265
294
|
optimizeTree: (...args: any[]) => any
|
|
266
|
-
|
|
295
|
+
optimizeChunkModules: (...args: any[]) => any
|
|
267
296
|
beforeCompile: (...args: any[]) => any
|
|
268
297
|
afterCompile: (...args: any[]) => any
|
|
269
298
|
finishModules: (...args: any[]) => any
|
|
@@ -276,6 +305,7 @@ export interface JsHooks {
|
|
|
276
305
|
chunkAsset: (...args: any[]) => any
|
|
277
306
|
succeedModule: (...args: any[]) => any
|
|
278
307
|
stillValidModule: (...args: any[]) => any
|
|
308
|
+
executeModule: (...args: any[]) => any
|
|
279
309
|
}
|
|
280
310
|
|
|
281
311
|
export interface JsLoaderContext {
|
|
@@ -324,6 +354,7 @@ export interface JsModule {
|
|
|
324
354
|
originalSource?: JsCompatSource
|
|
325
355
|
resource?: string
|
|
326
356
|
moduleIdentifier: string
|
|
357
|
+
nameForCondition?: string
|
|
327
358
|
}
|
|
328
359
|
|
|
329
360
|
export interface JsResolveForSchemeInput {
|
|
@@ -553,7 +584,7 @@ export interface RawBuiltins {
|
|
|
553
584
|
export interface RawCacheGroupOptions {
|
|
554
585
|
key: string
|
|
555
586
|
priority?: number
|
|
556
|
-
test?: RegExp | string
|
|
587
|
+
test?: RegExp | string | Function
|
|
557
588
|
idHint?: string
|
|
558
589
|
/** What kind of chunks should be selected. */
|
|
559
590
|
chunks?: RegExp | 'async' | 'initial' | 'all'
|
|
@@ -563,11 +594,15 @@ export interface RawCacheGroupOptions {
|
|
|
563
594
|
maxSize?: number
|
|
564
595
|
maxAsyncSize?: number
|
|
565
596
|
maxInitialSize?: number
|
|
566
|
-
name?: string
|
|
597
|
+
name?: string | false | Function
|
|
567
598
|
reuseExistingChunk?: boolean
|
|
568
599
|
enforce?: boolean
|
|
569
600
|
}
|
|
570
601
|
|
|
602
|
+
export interface RawCacheGroupTestCtx {
|
|
603
|
+
module: JsModule
|
|
604
|
+
}
|
|
605
|
+
|
|
571
606
|
export interface RawCacheOptions {
|
|
572
607
|
type: string
|
|
573
608
|
maxGenerations: number
|
|
@@ -580,6 +615,38 @@ export interface RawCacheOptions {
|
|
|
580
615
|
version: string
|
|
581
616
|
}
|
|
582
617
|
|
|
618
|
+
export interface RawChunkOptionNameCtx {
|
|
619
|
+
module: JsModule
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
export interface RawConsumeOptions {
|
|
623
|
+
key: string
|
|
624
|
+
import?: string
|
|
625
|
+
importResolved?: string
|
|
626
|
+
shareKey: string
|
|
627
|
+
shareScope: string
|
|
628
|
+
requiredVersion?: string | false | undefined
|
|
629
|
+
packageName?: string
|
|
630
|
+
strictVersion: boolean
|
|
631
|
+
singleton: boolean
|
|
632
|
+
eager: boolean
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
export interface RawContainerPluginOptions {
|
|
636
|
+
name: string
|
|
637
|
+
shareScope: string
|
|
638
|
+
library: RawLibraryOptions
|
|
639
|
+
runtime?: string
|
|
640
|
+
filename?: string
|
|
641
|
+
exposes: Array<RawExposeOptions>
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
export interface RawContainerReferencePluginOptions {
|
|
645
|
+
remoteType: string
|
|
646
|
+
remotes: Array<RawRemoteOptions>
|
|
647
|
+
shareScope?: string
|
|
648
|
+
}
|
|
649
|
+
|
|
583
650
|
export interface RawCopyGlobOptions {
|
|
584
651
|
caseSensitiveMatch?: boolean
|
|
585
652
|
dot?: boolean
|
|
@@ -654,6 +721,12 @@ export interface RawExperiments {
|
|
|
654
721
|
rspackFuture: RawRspackFuture
|
|
655
722
|
}
|
|
656
723
|
|
|
724
|
+
export interface RawExposeOptions {
|
|
725
|
+
key: string
|
|
726
|
+
name?: string
|
|
727
|
+
import: Array<string>
|
|
728
|
+
}
|
|
729
|
+
|
|
657
730
|
export interface RawExternalItemFnCtx {
|
|
658
731
|
request: string
|
|
659
732
|
context: string
|
|
@@ -951,6 +1024,14 @@ export interface RawProgressPluginOptions {
|
|
|
951
1024
|
profile: boolean
|
|
952
1025
|
}
|
|
953
1026
|
|
|
1027
|
+
export interface RawProvideOptions {
|
|
1028
|
+
key: string
|
|
1029
|
+
shareKey: string
|
|
1030
|
+
shareScope: string
|
|
1031
|
+
version?: string | false | undefined
|
|
1032
|
+
eager: boolean
|
|
1033
|
+
}
|
|
1034
|
+
|
|
954
1035
|
export interface RawReactOptions {
|
|
955
1036
|
runtime?: "automatic" | "classic"
|
|
956
1037
|
importSource?: string
|
|
@@ -963,6 +1044,11 @@ export interface RawReactOptions {
|
|
|
963
1044
|
refresh?: boolean
|
|
964
1045
|
}
|
|
965
1046
|
|
|
1047
|
+
export interface RawRegexMatcher {
|
|
1048
|
+
source: string
|
|
1049
|
+
flags: string
|
|
1050
|
+
}
|
|
1051
|
+
|
|
966
1052
|
export interface RawRelated {
|
|
967
1053
|
sourceMap?: string
|
|
968
1054
|
}
|
|
@@ -972,6 +1058,12 @@ export interface RawRelayConfig {
|
|
|
972
1058
|
language: 'javascript' | 'typescript' | 'flow'
|
|
973
1059
|
}
|
|
974
1060
|
|
|
1061
|
+
export interface RawRemoteOptions {
|
|
1062
|
+
key: string
|
|
1063
|
+
external: Array<string>
|
|
1064
|
+
shareScope: string
|
|
1065
|
+
}
|
|
1066
|
+
|
|
975
1067
|
export interface RawResolveOptions {
|
|
976
1068
|
preferRelative?: boolean
|
|
977
1069
|
extensions?: Array<string>
|
|
@@ -1005,7 +1097,7 @@ export interface RawRspackFuture {
|
|
|
1005
1097
|
export interface RawRuleSetCondition {
|
|
1006
1098
|
type: "string" | "regexp" | "logical" | "array" | "function"
|
|
1007
1099
|
stringMatcher?: string
|
|
1008
|
-
regexpMatcher?:
|
|
1100
|
+
regexpMatcher?: RawRegexMatcher
|
|
1009
1101
|
logicalMatcher?: Array<RawRuleSetLogicalConditions>
|
|
1010
1102
|
arrayMatcher?: Array<RawRuleSetCondition>
|
|
1011
1103
|
funcMatcher?: (value: string) => boolean
|
|
@@ -1029,7 +1121,7 @@ export interface RawSnapshotStrategy {
|
|
|
1029
1121
|
|
|
1030
1122
|
export interface RawSplitChunksOptions {
|
|
1031
1123
|
fallbackCacheGroup?: RawFallbackCacheGroupOptions
|
|
1032
|
-
name?: string
|
|
1124
|
+
name?: string | false | Function
|
|
1033
1125
|
cacheGroups?: Array<RawCacheGroupOptions>
|
|
1034
1126
|
/** What kind of chunks should be selected. */
|
|
1035
1127
|
chunks?: RegExp | 'async' | 'initial' | 'all'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/binding",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node binding for rspack",
|
|
6
6
|
"main": "binding.js",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"binaryName": "rspack"
|
|
23
23
|
},
|
|
24
24
|
"optionalDependencies": {
|
|
25
|
-
"@rspack/binding-darwin-arm64": "0.4.
|
|
26
|
-
"@rspack/binding-win32-arm64-msvc": "0.4.
|
|
27
|
-
"@rspack/binding-linux-arm64-
|
|
28
|
-
"@rspack/binding-linux-arm64-
|
|
29
|
-
"@rspack/binding-
|
|
30
|
-
"@rspack/binding-
|
|
31
|
-
"@rspack/binding-win32-x64-msvc": "0.4.
|
|
32
|
-
"@rspack/binding-linux-x64-gnu": "0.4.
|
|
33
|
-
"@rspack/binding-linux-x64-musl": "0.4.
|
|
25
|
+
"@rspack/binding-darwin-arm64": "0.4.1",
|
|
26
|
+
"@rspack/binding-win32-arm64-msvc": "0.4.1",
|
|
27
|
+
"@rspack/binding-linux-arm64-musl": "0.4.1",
|
|
28
|
+
"@rspack/binding-linux-arm64-gnu": "0.4.1",
|
|
29
|
+
"@rspack/binding-win32-ia32-msvc": "0.4.1",
|
|
30
|
+
"@rspack/binding-darwin-x64": "0.4.1",
|
|
31
|
+
"@rspack/binding-win32-x64-msvc": "0.4.1",
|
|
32
|
+
"@rspack/binding-linux-x64-gnu": "0.4.1",
|
|
33
|
+
"@rspack/binding-linux-x64-musl": "0.4.1"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build:debug": "node scripts/build.js",
|