@rspack/binding 1.7.2 → 2.0.0-alpha.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.
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
@@ -1399,7 +1399,6 @@ export interface JsStatsModuleCommonAttributes {
1399
1399
  failed?: boolean
1400
1400
  errors?: number
1401
1401
  warnings?: number
1402
- profile?: JsStatsModuleProfile
1403
1402
  chunks?: Array<string>
1404
1403
  assets?: Array<string>
1405
1404
  reasons?: Array<JsStatsModuleReason>
@@ -1824,11 +1823,17 @@ export interface RawCacheGroupOptions {
1824
1823
  usedExports?: boolean
1825
1824
  }
1826
1825
 
1827
- export interface RawCacheOptions {
1828
- type: string
1826
+ export interface RawCacheOptionsMemory {
1829
1827
  maxGenerations?: number
1830
1828
  }
1831
1829
 
1830
+ export interface RawCacheOptionsPersistent {
1831
+ buildDependencies?: Array<string>
1832
+ version?: string
1833
+ snapshot?: RawSnapshotOptions
1834
+ storage?: RawStorageOptions
1835
+ }
1836
+
1832
1837
  export interface RawCircularDependencyRspackPluginOptions {
1833
1838
  failOnError?: boolean
1834
1839
  exclude?: RegExp
@@ -2096,22 +2101,22 @@ export interface RawEntryDynamicResult {
2096
2101
  }
2097
2102
 
2098
2103
  export interface RawEnvironment {
2099
- const?: boolean
2100
- methodShorthand?: boolean
2101
- arrowFunction?: boolean
2102
- nodePrefixForCoreModules?: boolean
2103
- asyncFunction?: boolean
2104
- bigIntLiteral?: boolean
2105
- destructuring?: boolean
2106
- document?: boolean
2107
- dynamicImport?: boolean
2108
- forOf?: boolean
2109
- globalThis?: boolean
2110
- module?: boolean
2111
- optionalChaining?: boolean
2112
- templateLiteral?: boolean
2113
- dynamicImportInWorker?: boolean
2114
- importMetaDirnameAndFilename?: boolean
2104
+ const: boolean
2105
+ methodShorthand: boolean
2106
+ arrowFunction: boolean
2107
+ nodePrefixForCoreModules: boolean
2108
+ asyncFunction: boolean
2109
+ bigIntLiteral: boolean
2110
+ destructuring: boolean
2111
+ document: boolean
2112
+ dynamicImport: boolean
2113
+ forOf: boolean
2114
+ globalThis: boolean
2115
+ module: boolean
2116
+ optionalChaining: boolean
2117
+ templateLiteral: boolean
2118
+ dynamicImportInWorker: boolean
2119
+ importMetaDirnameAndFilename: boolean
2115
2120
  }
2116
2121
 
2117
2122
  export interface RawEsmLibraryPlugin {
@@ -2124,28 +2129,10 @@ export interface RawEvalDevToolModulePluginOptions {
2124
2129
  sourceUrlComment?: string
2125
2130
  }
2126
2131
 
2127
- export interface RawExperimentCacheOptionsPersistent {
2128
- buildDependencies?: Array<string>
2129
- version?: string
2130
- snapshot?: RawExperimentSnapshotOptions
2131
- storage?: RawStorageOptions
2132
- }
2133
-
2134
2132
  export interface RawExperiments {
2135
- topLevelAwait: boolean
2136
- incremental?: false | { [key: string]: boolean }
2137
- rspackFuture?: RawRspackFuture
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>
2133
+ useInputFileSystem?: false | Array<RegExp>
2134
+ css?: boolean
2135
+ deferImport: boolean
2149
2136
  }
2150
2137
 
2151
2138
  export interface RawExposeOptions {
@@ -2242,7 +2229,6 @@ export interface RawHtmlRspackPluginOptions {
2242
2229
  chunks?: Array<string>
2243
2230
  excludeChunks?: Array<string>
2244
2231
  chunksSortMode: "auto" | "manual"
2245
- sri?: "sha256" | "sha384" | "sha512"
2246
2232
  minify?: boolean
2247
2233
  title?: string
2248
2234
  favicon?: string
@@ -2419,10 +2405,9 @@ export interface RawLightningCssBrowsers {
2419
2405
 
2420
2406
  export interface RawLightningCssMinimizerOptions {
2421
2407
  errorRecovery: boolean
2422
- targets?: Array<string>
2408
+ targets?: string[] | RawLightningCssBrowsers
2423
2409
  include?: number
2424
2410
  exclude?: number
2425
- draft?: RawDraft
2426
2411
  drafts?: RawDraft
2427
2412
  nonStandard?: RawNonStandard
2428
2413
  pseudoClasses?: RawLightningCssPseudoClasses
@@ -2477,8 +2462,13 @@ export interface RawModuleFederationManifestPluginOptions {
2477
2462
  buildInfo?: RawStatsBuildInfo
2478
2463
  }
2479
2464
 
2465
+ export interface RawModuleFederationRuntimeExperimentsOptions {
2466
+ asyncStartup?: boolean
2467
+ }
2468
+
2480
2469
  export interface RawModuleFederationRuntimePluginOptions {
2481
2470
  entryRuntime?: string | undefined
2471
+ experiments?: RawModuleFederationRuntimeExperimentsOptions
2482
2472
  }
2483
2473
 
2484
2474
  export interface RawModuleFilenameTemplateFnCtx {
@@ -2604,14 +2594,14 @@ export interface RawOptions {
2604
2594
  module: RawModuleOptions
2605
2595
  optimization: RawOptimizationOptions
2606
2596
  stats: RawStatsOptions
2607
- cache: RawCacheOptions
2597
+ cache: boolean | { type: "memory" } | ({ type: "persistent" } & RawCacheOptionsPersistent)
2608
2598
  experiments: RawExperiments
2609
- node?: RawNodeOption
2610
- profile: boolean
2611
- amd?: string
2612
- bail: boolean
2613
- __references: Record<string, any>
2614
- __virtual_files?: Array<JsVirtualFile>
2599
+ incremental?: false | { [key: string]: boolean }
2600
+ node?: RawNodeOption
2601
+ amd?: string
2602
+ bail: boolean
2603
+ __references: Record<string, any>
2604
+ __virtual_files?: Array<JsVirtualFile>
2615
2605
  }
2616
2606
 
2617
2607
  export interface RawOutputOptions {
@@ -2643,7 +2633,6 @@ export interface RawOutputOptions {
2643
2633
  module: boolean
2644
2634
  chunkLoading: string | false
2645
2635
  chunkLoadTimeout: number
2646
- charset: boolean
2647
2636
  enabledChunkLoadingTypes?: Array<string>
2648
2637
  trustedTypes?: RawTrustedTypes
2649
2638
  sourceMapFilename: string
@@ -2788,10 +2777,6 @@ export interface RawRslibPluginOptions {
2788
2777
  forceNodeShims?: boolean
2789
2778
  }
2790
2779
 
2791
- export interface RawRspackFuture {
2792
-
2793
- }
2794
-
2795
2780
  export interface RawRstestPluginOptions {
2796
2781
  injectModulePathName: boolean
2797
2782
  importMetaPathName: boolean
@@ -2838,6 +2823,12 @@ export interface RawSizeLimitsPluginOptions {
2838
2823
  maxEntrypointSize?: number
2839
2824
  }
2840
2825
 
2826
+ export interface RawSnapshotOptions {
2827
+ immutablePaths: Array<string|RegExp>
2828
+ unmanagedPaths: Array<string|RegExp>
2829
+ managedPaths: Array<string|RegExp>
2830
+ }
2831
+
2841
2832
  export interface RawSplitChunkSizes {
2842
2833
  sizes: Record<string, number>
2843
2834
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/binding",
3
- "version": "1.7.2",
3
+ "version": "2.0.0-alpha.0",
4
4
  "license": "MIT",
5
5
  "description": "Node binding for rspack",
6
6
  "main": "binding.js",
@@ -21,7 +21,7 @@
21
21
  "devDependencies": {
22
22
  "@napi-rs/cli": "3.0.4",
23
23
  "@napi-rs/wasm-runtime": "1.0.7",
24
- "emnapi": "^1.7.1",
24
+ "emnapi": "^1.8.1",
25
25
  "typescript": "^5.9.3"
26
26
  },
27
27
  "napi": {
@@ -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-darwin-arm64": "1.7.2",
55
- "@rspack/binding-win32-arm64-msvc": "1.7.2",
56
- "@rspack/binding-linux-arm64-gnu": "1.7.2",
57
- "@rspack/binding-wasm32-wasi": "1.7.2",
58
- "@rspack/binding-win32-ia32-msvc": "1.7.2",
59
- "@rspack/binding-linux-arm64-musl": "1.7.2",
60
- "@rspack/binding-darwin-x64": "1.7.2",
61
- "@rspack/binding-win32-x64-msvc": "1.7.2",
62
- "@rspack/binding-linux-x64-musl": "1.7.2",
63
- "@rspack/binding-linux-x64-gnu": "1.7.2"
53
+ "@rspack/binding-win32-arm64-msvc": "2.0.0-alpha.0",
54
+ "@rspack/binding-linux-arm64-musl": "2.0.0-alpha.0",
55
+ "@rspack/binding-win32-ia32-msvc": "2.0.0-alpha.0",
56
+ "@rspack/binding-darwin-x64": "2.0.0-alpha.0",
57
+ "@rspack/binding-wasm32-wasi": "2.0.0-alpha.0",
58
+ "@rspack/binding-linux-x64-gnu": "2.0.0-alpha.0",
59
+ "@rspack/binding-linux-arm64-gnu": "2.0.0-alpha.0",
60
+ "@rspack/binding-darwin-arm64": "2.0.0-alpha.0",
61
+ "@rspack/binding-linux-x64-musl": "2.0.0-alpha.0",
62
+ "@rspack/binding-win32-x64-msvc": "2.0.0-alpha.0"
64
63
  },
65
64
  "scripts": {
66
65
  "build:dev": "node scripts/build.js",