@rspack/binding 1.0.0-beta.3 → 1.0.0-beta.4
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 +66 -13
- package/package.json +10 -10
package/binding.d.ts
CHANGED
|
@@ -19,15 +19,38 @@ export class ExternalObject<T> {
|
|
|
19
19
|
[K: symbol]: T
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
export class DependenciesBlockDto {
|
|
23
|
+
get dependencies(): Array<DependencyDto>
|
|
24
|
+
get blocks(): Array<DependenciesBlockDto>
|
|
25
|
+
}
|
|
26
|
+
export type DependenciesBlockDTO = DependenciesBlockDto
|
|
27
|
+
|
|
28
|
+
export class DependenciesDto {
|
|
29
|
+
get fileDependencies(): Array<string>
|
|
30
|
+
get addedFileDependencies(): Array<string>
|
|
31
|
+
get removedFileDependencies(): Array<string>
|
|
32
|
+
get contextDependencies(): Array<string>
|
|
33
|
+
get addedContextDependencies(): Array<string>
|
|
34
|
+
get removedContextDependencies(): Array<string>
|
|
35
|
+
get missingDependencies(): Array<string>
|
|
36
|
+
get addedMissingDependencies(): Array<string>
|
|
37
|
+
get removedMissingDependencies(): Array<string>
|
|
38
|
+
get buildDependencies(): Array<string>
|
|
39
|
+
get addedBuildDependencies(): Array<string>
|
|
40
|
+
get removedBuildDependencies(): Array<string>
|
|
41
|
+
}
|
|
42
|
+
export type DependenciesDTO = DependenciesDto
|
|
43
|
+
|
|
22
44
|
export class DependencyDto {
|
|
23
45
|
get type(): string
|
|
24
46
|
get category(): string
|
|
47
|
+
get request(): string | undefined
|
|
25
48
|
}
|
|
26
49
|
export type DependencyDTO = DependencyDto
|
|
27
50
|
|
|
28
51
|
export class EntryDataDto {
|
|
29
|
-
get dependencies(): Array<
|
|
30
|
-
get includeDependencies(): Array<
|
|
52
|
+
get dependencies(): Array<DependencyDTO>
|
|
53
|
+
get includeDependencies(): Array<DependencyDTO>
|
|
31
54
|
get options(): EntryOptionsDto
|
|
32
55
|
}
|
|
33
56
|
export type EntryDataDTO = EntryDataDto
|
|
@@ -57,7 +80,7 @@ export class JsCompilation {
|
|
|
57
80
|
getAssets(): Readonly<JsAsset>[]
|
|
58
81
|
getAsset(name: string): JsAsset | null
|
|
59
82
|
getAssetSource(name: string): JsCompatSource | null
|
|
60
|
-
|
|
83
|
+
get modules(): Array<ModuleDTO>
|
|
61
84
|
getOptimizationBailout(): Array<JsStatsOptimizationBailout>
|
|
62
85
|
getChunks(): Array<JsChunk>
|
|
63
86
|
getNamedChunkKeys(): Array<string>
|
|
@@ -75,10 +98,7 @@ export class JsCompilation {
|
|
|
75
98
|
get entrypoints(): Record<string, JsChunkGroup>
|
|
76
99
|
get chunkGroups(): Array<JsChunkGroup>
|
|
77
100
|
get hash(): string | null
|
|
78
|
-
|
|
79
|
-
getContextDependencies(): Array<string>
|
|
80
|
-
getMissingDependencies(): Array<string>
|
|
81
|
-
getBuildDependencies(): Array<string>
|
|
101
|
+
dependencies(): DependenciesDto
|
|
82
102
|
pushDiagnostic(diagnostic: JsDiagnostic): void
|
|
83
103
|
spliceDiagnostic(start: number, end: number, replaceWith: Array<JsDiagnostic>): void
|
|
84
104
|
pushNativeDiagnostics(diagnostics: ExternalObject<'Diagnostic[]'>): void
|
|
@@ -126,6 +146,23 @@ export class JsStats {
|
|
|
126
146
|
getLogging(acceptedTypes: number): Array<JsStatsLogging>
|
|
127
147
|
}
|
|
128
148
|
|
|
149
|
+
export class ModuleDto {
|
|
150
|
+
get context(): string | undefined
|
|
151
|
+
get originalSource(): JsCompatSource | undefined
|
|
152
|
+
get resource(): string | undefined
|
|
153
|
+
get moduleIdentifier(): string
|
|
154
|
+
get nameForCondition(): string | undefined
|
|
155
|
+
get request(): string | undefined
|
|
156
|
+
get userRequest(): string | undefined
|
|
157
|
+
get rawRequest(): string | undefined
|
|
158
|
+
get factoryMeta(): JsFactoryMeta | undefined
|
|
159
|
+
get type(): string
|
|
160
|
+
get layer(): string | undefined
|
|
161
|
+
get blocks(): Array<DependenciesBlockDto>
|
|
162
|
+
size(ty?: string | undefined | null): number
|
|
163
|
+
}
|
|
164
|
+
export type ModuleDTO = ModuleDto
|
|
165
|
+
|
|
129
166
|
export class Rspack {
|
|
130
167
|
constructor(options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, resolverFactoryReference: JsResolverFactory)
|
|
131
168
|
setNonSkippableRegisters(kinds: Array<RegisterJsTapKind>): void
|
|
@@ -309,6 +346,8 @@ export interface JsAssetInfo {
|
|
|
309
346
|
* Related: packages/rspack/src/Compilation.ts
|
|
310
347
|
*/
|
|
311
348
|
extras: Record<string, any>
|
|
349
|
+
/** whether this asset is over the size limit */
|
|
350
|
+
isOverSizeLimit?: boolean
|
|
312
351
|
}
|
|
313
352
|
|
|
314
353
|
export interface JsAssetInfoRelated {
|
|
@@ -326,6 +365,10 @@ export interface JsBuildTimeExecutionOption {
|
|
|
326
365
|
baseUri?: string
|
|
327
366
|
}
|
|
328
367
|
|
|
368
|
+
export interface JsCacheGroupTestCtx {
|
|
369
|
+
module: ModuleDTO
|
|
370
|
+
}
|
|
371
|
+
|
|
329
372
|
export interface JsChunk {
|
|
330
373
|
__inner_ukey: number
|
|
331
374
|
__inner_groups: Array<number>
|
|
@@ -406,8 +449,8 @@ export interface JsDiagnostic {
|
|
|
406
449
|
}
|
|
407
450
|
|
|
408
451
|
export interface JsEntryData {
|
|
409
|
-
dependencies: Array<
|
|
410
|
-
includeDependencies: Array<
|
|
452
|
+
dependencies: Array<DependencyDTO>
|
|
453
|
+
includeDependencies: Array<DependencyDTO>
|
|
411
454
|
options: JsEntryOptions
|
|
412
455
|
}
|
|
413
456
|
|
|
@@ -641,6 +684,7 @@ export interface JsStatsAssetInfo {
|
|
|
641
684
|
contenthash: Array<string>
|
|
642
685
|
fullhash: Array<string>
|
|
643
686
|
related: Array<JsStatsAssetInfoRelated>
|
|
687
|
+
isOverSizeLimit?: boolean
|
|
644
688
|
}
|
|
645
689
|
|
|
646
690
|
export interface JsStatsAssetInfoRelated {
|
|
@@ -653,6 +697,11 @@ export interface JsStatsAssetsByChunkName {
|
|
|
653
697
|
files: Array<string>
|
|
654
698
|
}
|
|
655
699
|
|
|
700
|
+
export interface JsStatsChildGroupChildAssets {
|
|
701
|
+
preload?: Array<string>
|
|
702
|
+
prefetch?: Array<string>
|
|
703
|
+
}
|
|
704
|
+
|
|
656
705
|
export interface JsStatsChunk {
|
|
657
706
|
type: string
|
|
658
707
|
files: Array<string>
|
|
@@ -683,7 +732,9 @@ export interface JsStatsChunkGroup {
|
|
|
683
732
|
assetsSize: number
|
|
684
733
|
auxiliaryAssets?: Array<JsStatsChunkGroupAsset>
|
|
685
734
|
auxiliaryAssetsSize?: number
|
|
735
|
+
isOverSizeLimit?: boolean
|
|
686
736
|
children?: JsStatsChunkGroupChildren
|
|
737
|
+
childAssets?: JsStatsChildGroupChildAssets
|
|
687
738
|
}
|
|
688
739
|
|
|
689
740
|
export interface JsStatsChunkGroupAsset {
|
|
@@ -789,6 +840,8 @@ export interface JsStatsModuleProfile {
|
|
|
789
840
|
|
|
790
841
|
export interface JsStatsModuleReason {
|
|
791
842
|
moduleDescriptor?: JsModuleDescriptor
|
|
843
|
+
resolvedModuleDescriptor?: JsModuleDescriptor
|
|
844
|
+
moduleChunks?: number
|
|
792
845
|
type?: string
|
|
793
846
|
userRequest?: string
|
|
794
847
|
}
|
|
@@ -950,13 +1003,12 @@ export interface RawCacheGroupOptions {
|
|
|
950
1003
|
maxSize?: number | RawSplitChunkSizes
|
|
951
1004
|
maxAsyncSize?: number | RawSplitChunkSizes
|
|
952
1005
|
maxInitialSize?: number | RawSplitChunkSizes
|
|
1006
|
+
maxAsyncRequests?: number
|
|
1007
|
+
maxInitialRequests?: number
|
|
953
1008
|
name?: string | false | Function
|
|
954
1009
|
reuseExistingChunk?: boolean
|
|
955
1010
|
enforce?: boolean
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
export interface RawCacheGroupTestCtx {
|
|
959
|
-
module: JsModule
|
|
1011
|
+
usedExports?: boolean
|
|
960
1012
|
}
|
|
961
1013
|
|
|
962
1014
|
export interface RawCacheOptions {
|
|
@@ -1637,6 +1689,7 @@ export interface RawSplitChunksOptions {
|
|
|
1637
1689
|
cacheGroups?: Array<RawCacheGroupOptions>
|
|
1638
1690
|
/** What kind of chunks should be selected. */
|
|
1639
1691
|
chunks?: RegExp | 'async' | 'initial' | 'all' | Function
|
|
1692
|
+
usedExports?: boolean
|
|
1640
1693
|
automaticNameDelimiter?: string
|
|
1641
1694
|
maxAsyncRequests?: number
|
|
1642
1695
|
maxInitialRequests?: number
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/binding",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node binding for rspack",
|
|
6
6
|
"main": "binding.js",
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
"binaryName": "rspack"
|
|
25
25
|
},
|
|
26
26
|
"optionalDependencies": {
|
|
27
|
-
"@rspack/binding-
|
|
28
|
-
"@rspack/binding-win32-arm64-msvc": "1.0.0-beta.
|
|
29
|
-
"@rspack/binding-
|
|
30
|
-
"@rspack/binding-
|
|
31
|
-
"@rspack/binding-
|
|
32
|
-
"@rspack/binding-
|
|
33
|
-
"@rspack/binding-
|
|
34
|
-
"@rspack/binding-linux-x64-gnu": "1.0.0-beta.
|
|
35
|
-
"@rspack/binding-linux-x64-musl": "1.0.0-beta.
|
|
27
|
+
"@rspack/binding-darwin-arm64": "1.0.0-beta.4",
|
|
28
|
+
"@rspack/binding-win32-arm64-msvc": "1.0.0-beta.4",
|
|
29
|
+
"@rspack/binding-linux-arm64-gnu": "1.0.0-beta.4",
|
|
30
|
+
"@rspack/binding-win32-ia32-msvc": "1.0.0-beta.4",
|
|
31
|
+
"@rspack/binding-darwin-x64": "1.0.0-beta.4",
|
|
32
|
+
"@rspack/binding-linux-arm64-musl": "1.0.0-beta.4",
|
|
33
|
+
"@rspack/binding-win32-x64-msvc": "1.0.0-beta.4",
|
|
34
|
+
"@rspack/binding-linux-x64-gnu": "1.0.0-beta.4",
|
|
35
|
+
"@rspack/binding-linux-x64-musl": "1.0.0-beta.4"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build:debug": "node scripts/build.js",
|