@rspack/binding 1.7.3 → 2.0.0-alpha.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/README.md +4 -0
- package/napi-binding.d.ts +70 -62
- package/package.json +12 -13
package/README.md
CHANGED
|
@@ -12,6 +12,10 @@ Private node binding crate for rspack.
|
|
|
12
12
|
|
|
13
13
|
See [https://rspack.rs](https://rspack.rs) for details.
|
|
14
14
|
|
|
15
|
+
## Update Wasm binding
|
|
16
|
+
|
|
17
|
+
The generation of `rspack.wasi-browser.js` and `rspack.wasi.js` is disabled by default because `@napi/cli` produces unstable output for these files. To update the Wasm bindings, add `wasm32-wasip1-threads` to the `napi.targets` field in `package.json` before building the project.
|
|
18
|
+
|
|
15
19
|
## License
|
|
16
20
|
|
|
17
21
|
Rspack is [MIT licensed](https://github.com/web-infra-dev/rspack/blob/main/LICENSE).
|
package/napi-binding.d.ts
CHANGED
|
@@ -95,6 +95,8 @@ export interface JsSource {
|
|
|
95
95
|
source: string | Buffer
|
|
96
96
|
map?: string
|
|
97
97
|
}
|
|
98
|
+
|
|
99
|
+
export type CompilerId = void;
|
|
98
100
|
/* -- banner.d.ts end -- */
|
|
99
101
|
|
|
100
102
|
/* -- napi-rs generated below -- */
|
|
@@ -213,6 +215,7 @@ export declare class Dependency {
|
|
|
213
215
|
get critical(): boolean
|
|
214
216
|
set critical(val: boolean)
|
|
215
217
|
get ids(): Array<string> | undefined
|
|
218
|
+
get loc(): DependencyLocation | null
|
|
216
219
|
}
|
|
217
220
|
|
|
218
221
|
export declare class Diagnostics {
|
|
@@ -334,6 +337,7 @@ export declare class JsCompiler {
|
|
|
334
337
|
rebuild(changed_files: string[], removed_files: string[], callback: (err: null | Error) => void): void
|
|
335
338
|
close(): Promise<void>
|
|
336
339
|
getVirtualFileStore(): VirtualFileStore | null
|
|
340
|
+
getCompilerId(): ExternalObject<CompilerId>
|
|
337
341
|
}
|
|
338
342
|
|
|
339
343
|
export declare class JsContextModuleFactoryAfterResolveData {
|
|
@@ -361,6 +365,10 @@ export declare class JsContextModuleFactoryBeforeResolveData {
|
|
|
361
365
|
set recursive(recursive: boolean)
|
|
362
366
|
}
|
|
363
367
|
|
|
368
|
+
export declare class JsCoordinator {
|
|
369
|
+
constructor(getServerCompilerIdJsFn: () => ExternalObject<CompilerId>)
|
|
370
|
+
}
|
|
371
|
+
|
|
364
372
|
export declare class JsDependencies {
|
|
365
373
|
get fileDependencies(): Array<string>
|
|
366
374
|
get addedFileDependencies(): Array<string>
|
|
@@ -602,7 +610,9 @@ export declare enum BuiltinPluginName {
|
|
|
602
610
|
LazyCompilationPlugin = 'LazyCompilationPlugin',
|
|
603
611
|
ModuleInfoHeaderPlugin = 'ModuleInfoHeaderPlugin',
|
|
604
612
|
HttpUriPlugin = 'HttpUriPlugin',
|
|
605
|
-
CssChunkingPlugin = 'CssChunkingPlugin'
|
|
613
|
+
CssChunkingPlugin = 'CssChunkingPlugin',
|
|
614
|
+
RscServerPlugin = 'RscServerPlugin',
|
|
615
|
+
RscClientPlugin = 'RscClientPlugin'
|
|
606
616
|
}
|
|
607
617
|
|
|
608
618
|
export declare function cleanupGlobalTrace(): void
|
|
@@ -1028,6 +1038,15 @@ export interface JsResourceData {
|
|
|
1028
1038
|
descriptionFilePath?: string
|
|
1029
1039
|
}
|
|
1030
1040
|
|
|
1041
|
+
export interface JsRscClientPluginOptions {
|
|
1042
|
+
coordinator: JsCoordinator
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
export interface JsRscServerPluginOptions {
|
|
1046
|
+
coordinator: JsCoordinator
|
|
1047
|
+
onServerComponentChanges?: (() => void) | undefined | null
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1031
1050
|
export interface JsRsdoctorAsset {
|
|
1032
1051
|
ukey: number
|
|
1033
1052
|
path: string
|
|
@@ -1399,7 +1418,6 @@ export interface JsStatsModuleCommonAttributes {
|
|
|
1399
1418
|
failed?: boolean
|
|
1400
1419
|
errors?: number
|
|
1401
1420
|
warnings?: number
|
|
1402
|
-
profile?: JsStatsModuleProfile
|
|
1403
1421
|
chunks?: Array<string>
|
|
1404
1422
|
assets?: Array<string>
|
|
1405
1423
|
reasons?: Array<JsStatsModuleReason>
|
|
@@ -1824,11 +1842,17 @@ export interface RawCacheGroupOptions {
|
|
|
1824
1842
|
usedExports?: boolean
|
|
1825
1843
|
}
|
|
1826
1844
|
|
|
1827
|
-
export interface
|
|
1828
|
-
type: string
|
|
1845
|
+
export interface RawCacheOptionsMemory {
|
|
1829
1846
|
maxGenerations?: number
|
|
1830
1847
|
}
|
|
1831
1848
|
|
|
1849
|
+
export interface RawCacheOptionsPersistent {
|
|
1850
|
+
buildDependencies?: Array<string>
|
|
1851
|
+
version?: string
|
|
1852
|
+
snapshot?: RawSnapshotOptions
|
|
1853
|
+
storage?: RawStorageOptions
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1832
1856
|
export interface RawCircularDependencyRspackPluginOptions {
|
|
1833
1857
|
failOnError?: boolean
|
|
1834
1858
|
exclude?: RegExp
|
|
@@ -2096,22 +2120,22 @@ export interface RawEntryDynamicResult {
|
|
|
2096
2120
|
}
|
|
2097
2121
|
|
|
2098
2122
|
export interface RawEnvironment {
|
|
2099
|
-
const
|
|
2100
|
-
methodShorthand
|
|
2101
|
-
arrowFunction
|
|
2102
|
-
nodePrefixForCoreModules
|
|
2103
|
-
asyncFunction
|
|
2104
|
-
bigIntLiteral
|
|
2105
|
-
destructuring
|
|
2106
|
-
document
|
|
2107
|
-
dynamicImport
|
|
2108
|
-
forOf
|
|
2109
|
-
globalThis
|
|
2110
|
-
module
|
|
2111
|
-
optionalChaining
|
|
2112
|
-
templateLiteral
|
|
2113
|
-
dynamicImportInWorker
|
|
2114
|
-
importMetaDirnameAndFilename
|
|
2123
|
+
const: boolean
|
|
2124
|
+
methodShorthand: boolean
|
|
2125
|
+
arrowFunction: boolean
|
|
2126
|
+
nodePrefixForCoreModules: boolean
|
|
2127
|
+
asyncFunction: boolean
|
|
2128
|
+
bigIntLiteral: boolean
|
|
2129
|
+
destructuring: boolean
|
|
2130
|
+
document: boolean
|
|
2131
|
+
dynamicImport: boolean
|
|
2132
|
+
forOf: boolean
|
|
2133
|
+
globalThis: boolean
|
|
2134
|
+
module: boolean
|
|
2135
|
+
optionalChaining: boolean
|
|
2136
|
+
templateLiteral: boolean
|
|
2137
|
+
dynamicImportInWorker: boolean
|
|
2138
|
+
importMetaDirnameAndFilename: boolean
|
|
2115
2139
|
}
|
|
2116
2140
|
|
|
2117
2141
|
export interface RawEsmLibraryPlugin {
|
|
@@ -2124,28 +2148,10 @@ export interface RawEvalDevToolModulePluginOptions {
|
|
|
2124
2148
|
sourceUrlComment?: string
|
|
2125
2149
|
}
|
|
2126
2150
|
|
|
2127
|
-
export interface RawExperimentCacheOptionsPersistent {
|
|
2128
|
-
buildDependencies?: Array<string>
|
|
2129
|
-
version?: string
|
|
2130
|
-
snapshot?: RawExperimentSnapshotOptions
|
|
2131
|
-
storage?: RawStorageOptions
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
2151
|
export interface RawExperiments {
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
cache: boolean | { type: "persistent" } & RawExperimentCacheOptionsPersistent | { type: "memory" }
|
|
2139
|
-
useInputFileSystem?: false | Array<RegExp>
|
|
2140
|
-
css?: boolean
|
|
2141
|
-
lazyBarrel: boolean
|
|
2142
|
-
deferImport: boolean
|
|
2143
|
-
}
|
|
2144
|
-
|
|
2145
|
-
export interface RawExperimentSnapshotOptions {
|
|
2146
|
-
immutablePaths: Array<string|RegExp>
|
|
2147
|
-
unmanagedPaths: Array<string|RegExp>
|
|
2148
|
-
managedPaths: Array<string|RegExp>
|
|
2152
|
+
useInputFileSystem?: false | Array<RegExp>
|
|
2153
|
+
css?: boolean
|
|
2154
|
+
deferImport: boolean
|
|
2149
2155
|
}
|
|
2150
2156
|
|
|
2151
2157
|
export interface RawExposeOptions {
|
|
@@ -2242,7 +2248,6 @@ export interface RawHtmlRspackPluginOptions {
|
|
|
2242
2248
|
chunks?: Array<string>
|
|
2243
2249
|
excludeChunks?: Array<string>
|
|
2244
2250
|
chunksSortMode: "auto" | "manual"
|
|
2245
|
-
sri?: "sha256" | "sha384" | "sha512"
|
|
2246
2251
|
minify?: boolean
|
|
2247
2252
|
title?: string
|
|
2248
2253
|
favicon?: string
|
|
@@ -2273,11 +2278,9 @@ export interface RawIgnorePluginOptions {
|
|
|
2273
2278
|
|
|
2274
2279
|
export interface RawIncremental {
|
|
2275
2280
|
silent: boolean
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
dependenciesDiagnostics: boolean
|
|
2280
|
-
sideEffects: boolean
|
|
2281
|
+
buildModuleGraph: boolean
|
|
2282
|
+
finishModules: boolean
|
|
2283
|
+
optimizeDependencies: boolean
|
|
2281
2284
|
buildChunkGraph: boolean
|
|
2282
2285
|
moduleIds: boolean
|
|
2283
2286
|
chunkIds: boolean
|
|
@@ -2286,7 +2289,7 @@ export interface RawIncremental {
|
|
|
2286
2289
|
modulesRuntimeRequirements: boolean
|
|
2287
2290
|
chunksRuntimeRequirements: boolean
|
|
2288
2291
|
chunksHashes: boolean
|
|
2289
|
-
|
|
2292
|
+
chunkAsset: boolean
|
|
2290
2293
|
emitAssets: boolean
|
|
2291
2294
|
}
|
|
2292
2295
|
|
|
@@ -2419,10 +2422,9 @@ export interface RawLightningCssBrowsers {
|
|
|
2419
2422
|
|
|
2420
2423
|
export interface RawLightningCssMinimizerOptions {
|
|
2421
2424
|
errorRecovery: boolean
|
|
2422
|
-
targets?:
|
|
2425
|
+
targets?: string[] | RawLightningCssBrowsers
|
|
2423
2426
|
include?: number
|
|
2424
2427
|
exclude?: number
|
|
2425
|
-
draft?: RawDraft
|
|
2426
2428
|
drafts?: RawDraft
|
|
2427
2429
|
nonStandard?: RawNonStandard
|
|
2428
2430
|
pseudoClasses?: RawLightningCssPseudoClasses
|
|
@@ -2477,8 +2479,13 @@ export interface RawModuleFederationManifestPluginOptions {
|
|
|
2477
2479
|
buildInfo?: RawStatsBuildInfo
|
|
2478
2480
|
}
|
|
2479
2481
|
|
|
2482
|
+
export interface RawModuleFederationRuntimeExperimentsOptions {
|
|
2483
|
+
asyncStartup?: boolean
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2480
2486
|
export interface RawModuleFederationRuntimePluginOptions {
|
|
2481
2487
|
entryRuntime?: string | undefined
|
|
2488
|
+
experiments?: RawModuleFederationRuntimeExperimentsOptions
|
|
2482
2489
|
}
|
|
2483
2490
|
|
|
2484
2491
|
export interface RawModuleFilenameTemplateFnCtx {
|
|
@@ -2604,14 +2611,14 @@ export interface RawOptions {
|
|
|
2604
2611
|
module: RawModuleOptions
|
|
2605
2612
|
optimization: RawOptimizationOptions
|
|
2606
2613
|
stats: RawStatsOptions
|
|
2607
|
-
cache:
|
|
2614
|
+
cache: boolean | { type: "memory" } | ({ type: "persistent" } & RawCacheOptionsPersistent)
|
|
2608
2615
|
experiments: RawExperiments
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2616
|
+
incremental?: false | { [key: string]: boolean }
|
|
2617
|
+
node?: RawNodeOption
|
|
2618
|
+
amd?: string
|
|
2619
|
+
bail: boolean
|
|
2620
|
+
__references: Record<string, any>
|
|
2621
|
+
__virtual_files?: Array<JsVirtualFile>
|
|
2615
2622
|
}
|
|
2616
2623
|
|
|
2617
2624
|
export interface RawOutputOptions {
|
|
@@ -2643,7 +2650,6 @@ export interface RawOutputOptions {
|
|
|
2643
2650
|
module: boolean
|
|
2644
2651
|
chunkLoading: string | false
|
|
2645
2652
|
chunkLoadTimeout: number
|
|
2646
|
-
charset: boolean
|
|
2647
2653
|
enabledChunkLoadingTypes?: Array<string>
|
|
2648
2654
|
trustedTypes?: RawTrustedTypes
|
|
2649
2655
|
sourceMapFilename: string
|
|
@@ -2788,10 +2794,6 @@ export interface RawRslibPluginOptions {
|
|
|
2788
2794
|
forceNodeShims?: boolean
|
|
2789
2795
|
}
|
|
2790
2796
|
|
|
2791
|
-
export interface RawRspackFuture {
|
|
2792
|
-
|
|
2793
|
-
}
|
|
2794
|
-
|
|
2795
2797
|
export interface RawRstestPluginOptions {
|
|
2796
2798
|
injectModulePathName: boolean
|
|
2797
2799
|
importMetaPathName: boolean
|
|
@@ -2838,6 +2840,12 @@ export interface RawSizeLimitsPluginOptions {
|
|
|
2838
2840
|
maxEntrypointSize?: number
|
|
2839
2841
|
}
|
|
2840
2842
|
|
|
2843
|
+
export interface RawSnapshotOptions {
|
|
2844
|
+
immutablePaths: Array<string|RegExp>
|
|
2845
|
+
unmanagedPaths: Array<string|RegExp>
|
|
2846
|
+
managedPaths: Array<string|RegExp>
|
|
2847
|
+
}
|
|
2848
|
+
|
|
2841
2849
|
export interface RawSplitChunkSizes {
|
|
2842
2850
|
sizes: Record<string, number>
|
|
2843
2851
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/binding",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node binding for rspack",
|
|
6
6
|
"main": "binding.js",
|
|
@@ -38,8 +38,7 @@
|
|
|
38
38
|
"aarch64-unknown-linux-gnu",
|
|
39
39
|
"aarch64-apple-darwin",
|
|
40
40
|
"aarch64-unknown-linux-musl",
|
|
41
|
-
"aarch64-pc-windows-msvc"
|
|
42
|
-
"wasm32-wasip1-threads"
|
|
41
|
+
"aarch64-pc-windows-msvc"
|
|
43
42
|
],
|
|
44
43
|
"wasm": {
|
|
45
44
|
"initialMemory": 16384,
|
|
@@ -51,16 +50,16 @@
|
|
|
51
50
|
}
|
|
52
51
|
},
|
|
53
52
|
"optionalDependencies": {
|
|
54
|
-
"@rspack/binding-
|
|
55
|
-
"@rspack/binding-
|
|
56
|
-
"@rspack/binding-linux-arm64-gnu": "
|
|
57
|
-
"@rspack/binding-win32-ia32-msvc": "
|
|
58
|
-
"@rspack/binding-
|
|
59
|
-
"@rspack/binding-wasm32-wasi": "
|
|
60
|
-
"@rspack/binding-darwin-x64": "
|
|
61
|
-
"@rspack/binding-win32-x64-msvc": "
|
|
62
|
-
"@rspack/binding-linux-x64-gnu": "
|
|
63
|
-
"@rspack/binding-linux-x64-musl": "
|
|
53
|
+
"@rspack/binding-linux-arm64-musl": "2.0.0-alpha.1",
|
|
54
|
+
"@rspack/binding-darwin-arm64": "2.0.0-alpha.1",
|
|
55
|
+
"@rspack/binding-linux-arm64-gnu": "2.0.0-alpha.1",
|
|
56
|
+
"@rspack/binding-win32-ia32-msvc": "2.0.0-alpha.1",
|
|
57
|
+
"@rspack/binding-win32-arm64-msvc": "2.0.0-alpha.1",
|
|
58
|
+
"@rspack/binding-wasm32-wasi": "2.0.0-alpha.1",
|
|
59
|
+
"@rspack/binding-darwin-x64": "2.0.0-alpha.1",
|
|
60
|
+
"@rspack/binding-win32-x64-msvc": "2.0.0-alpha.1",
|
|
61
|
+
"@rspack/binding-linux-x64-gnu": "2.0.0-alpha.1",
|
|
62
|
+
"@rspack/binding-linux-x64-musl": "2.0.0-alpha.1"
|
|
64
63
|
},
|
|
65
64
|
"scripts": {
|
|
66
65
|
"build:dev": "node scripts/build.js",
|