@rspack/binding 2.0.1 → 2.0.3

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 +32 -14
  2. package/package.json +12 -12
package/napi-binding.d.ts CHANGED
@@ -122,8 +122,8 @@ export declare class AsyncDependenciesBlock {
122
122
 
123
123
  export declare class Chunk {
124
124
  get name(): string | undefined
125
- get id(): string | undefined
126
- get ids(): Array<string>
125
+ get id(): string | number | undefined
126
+ get ids(): Array<string | number>
127
127
  get idNameHints(): Array<string>
128
128
  get filenameTemplate(): string | undefined
129
129
  get cssFilenameTemplate(): string | undefined
@@ -216,6 +216,7 @@ export declare class Dependency {
216
216
  get type(): string
217
217
  get category(): string
218
218
  get request(): string | undefined
219
+ get attributes(): Record<string, string> | undefined
219
220
  get critical(): boolean
220
221
  set critical(val: boolean)
221
222
  get ids(): Array<string> | undefined
@@ -741,7 +742,6 @@ export interface JsBuildMeta {
741
742
  exportsType?: undefined | 'unset' | 'default' | 'namespace' | 'flagged' | 'dynamic'
742
743
  defaultObject?: undefined | 'false' | 'redirect' | 'redirect-warn'
743
744
  sideEffectFree?: boolean
744
- exportsFinalName?: Array<[string, string]> | undefined
745
745
  }
746
746
 
747
747
  export interface JsBuildTimeExecutionOption {
@@ -1055,9 +1055,15 @@ export interface JsRscClientPluginOptions {
1055
1055
  coordinator: JsCoordinator
1056
1056
  }
1057
1057
 
1058
+ export interface JsRscCssLinkOptions {
1059
+ precedence?: string | boolean
1060
+ props?: Record<string, string>
1061
+ }
1062
+
1058
1063
  export interface JsRscServerPluginOptions {
1059
1064
  coordinator: JsCoordinator
1060
- onServerComponentChanges?: (() => void) | undefined | null
1065
+ cssLink?: JsRscCssLinkOptions | undefined | null
1066
+ onServerComponentChanges?: (() => void | Promise<void>) | undefined | null
1061
1067
  onManifest?: ((arg: string) => Promise<undefined>) | undefined | null
1062
1068
  }
1063
1069
 
@@ -1321,10 +1327,10 @@ export interface JsStatsAsset {
1321
1327
  emitted: boolean
1322
1328
  chunkNames: Array<string>
1323
1329
  chunkIdHints: Array<string>
1324
- chunks: Array<string | undefined | null>
1330
+ chunks: Array<string | number | undefined | null>
1325
1331
  auxiliaryChunkNames: Array<string>
1326
1332
  auxiliaryChunkIdHints: Array<string>
1327
- auxiliaryChunks: Array<string | undefined | null>
1333
+ auxiliaryChunks: Array<string | number | undefined | null>
1328
1334
  }
1329
1335
 
1330
1336
  export interface JsStatsAssetInfo {
@@ -1361,17 +1367,17 @@ export interface JsStatsChunk {
1361
1367
  type: string
1362
1368
  files: Array<string>
1363
1369
  auxiliaryFiles: Array<string>
1364
- id?: string
1370
+ id?: string | number | undefined
1365
1371
  idHints: Array<string>
1366
1372
  hash?: string
1367
1373
  entry: boolean
1368
1374
  initial: boolean
1369
1375
  names: Array<string>
1370
1376
  size: number
1371
- parents?: Array<string>
1372
- children?: Array<string>
1373
- siblings?: Array<string>
1374
- childrenByOrder: Record<string, Array<string>>
1377
+ parents?: Array<string | number> | undefined
1378
+ children?: Array<string | number> | undefined
1379
+ siblings?: Array<string | number> | undefined
1380
+ childrenByOrder: Record<string, Array<string | number>>
1375
1381
  runtime: Array<string>
1376
1382
  reason?: string
1377
1383
  rendered: boolean
@@ -1382,7 +1388,7 @@ export interface JsStatsChunk {
1382
1388
 
1383
1389
  export interface JsStatsChunkGroup {
1384
1390
  name: string
1385
- chunks: Array<string>
1391
+ chunks: Array<string | number>
1386
1392
  assets: Array<JsStatsChunkGroupAsset>
1387
1393
  assetsSize: number
1388
1394
  auxiliaryAssets?: Array<JsStatsChunkGroupAsset>
@@ -1471,7 +1477,7 @@ export interface JsStatsModuleCommonAttributes {
1471
1477
  failed?: boolean
1472
1478
  errors?: number
1473
1479
  warnings?: number
1474
- chunks?: Array<string>
1480
+ chunks?: Array<string | number> | undefined
1475
1481
  assets?: Array<string>
1476
1482
  reasons?: Array<JsStatsModuleReason>
1477
1483
  providedExports?: Array<string>
@@ -2910,6 +2916,12 @@ export interface RawRslibPluginOptions {
2910
2916
  * @default `false`
2911
2917
  */
2912
2918
  autoCjsNodeBuiltin?: boolean
2919
+ /** Emit isolated declaration files for modules transformed by `builtin:swc-loader` */
2920
+ emitDts?: RawSwcEmitDtsOptions
2921
+ }
2922
+
2923
+ export interface RawRstestDynamicImportOriginOptions {
2924
+ functionName?: string
2913
2925
  }
2914
2926
 
2915
2927
  export interface RawRstestPluginOptions {
@@ -2919,6 +2931,7 @@ export interface RawRstestPluginOptions {
2919
2931
  manualMockRoot: string
2920
2932
  preserveNewUrl?: Array<string>
2921
2933
  globals?: boolean
2934
+ injectDynamicImportOrigin?: boolean | { functionName?: string }
2922
2935
  }
2923
2936
 
2924
2937
  export interface RawRuleSetCondition {
@@ -3029,6 +3042,11 @@ export interface RawSubresourceIntegrityPluginOptions {
3029
3042
  htmlPlugin: "JavaScript" | "Native" | "Disabled"
3030
3043
  }
3031
3044
 
3045
+ export interface RawSwcEmitDtsOptions {
3046
+ rootDir: string
3047
+ declarationDir: string
3048
+ }
3049
+
3032
3050
  export interface RawSwcJsMinimizerOptions {
3033
3051
  ecma: any
3034
3052
  compress: any
@@ -3284,7 +3302,7 @@ export interface TsconfigOptions {
3284
3302
  */
3285
3303
  configFile: string
3286
3304
  /**
3287
- * Support for Typescript Project References.
3305
+ * Support for TypeScript Project References.
3288
3306
  *
3289
3307
  * * `'auto'`: use the `references` field from tsconfig of `config_file`.
3290
3308
  * * `string[]`: manually provided relative or absolute path.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/binding",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "license": "MIT",
5
5
  "description": "Node binding for rspack",
6
6
  "main": "binding.js",
@@ -23,7 +23,7 @@
23
23
  "@emnapi/runtime": "1.10.0",
24
24
  "@napi-rs/cli": "3.6.2",
25
25
  "@napi-rs/wasm-runtime": "1.1.4",
26
- "@types/node": "^20.19.39",
26
+ "@types/node": "^20.19.40",
27
27
  "emnapi": "1.10.0",
28
28
  "typescript": "^6.0.3"
29
29
  },
@@ -54,16 +54,16 @@
54
54
  }
55
55
  },
56
56
  "optionalDependencies": {
57
- "@rspack/binding-win32-arm64-msvc": "2.0.1",
58
- "@rspack/binding-linux-arm64-gnu": "2.0.1",
59
- "@rspack/binding-wasm32-wasi": "2.0.1",
60
- "@rspack/binding-darwin-arm64": "2.0.1",
61
- "@rspack/binding-win32-ia32-msvc": "2.0.1",
62
- "@rspack/binding-darwin-x64": "2.0.1",
63
- "@rspack/binding-win32-x64-msvc": "2.0.1",
64
- "@rspack/binding-linux-x64-gnu": "2.0.1",
65
- "@rspack/binding-linux-arm64-musl": "2.0.1",
66
- "@rspack/binding-linux-x64-musl": "2.0.1"
57
+ "@rspack/binding-win32-arm64-msvc": "2.0.3",
58
+ "@rspack/binding-darwin-arm64": "2.0.3",
59
+ "@rspack/binding-linux-arm64-gnu": "2.0.3",
60
+ "@rspack/binding-wasm32-wasi": "2.0.3",
61
+ "@rspack/binding-linux-arm64-musl": "2.0.3",
62
+ "@rspack/binding-win32-ia32-msvc": "2.0.3",
63
+ "@rspack/binding-darwin-x64": "2.0.3",
64
+ "@rspack/binding-win32-x64-msvc": "2.0.3",
65
+ "@rspack/binding-linux-x64-musl": "2.0.3",
66
+ "@rspack/binding-linux-x64-gnu": "2.0.3"
67
67
  },
68
68
  "scripts": {
69
69
  "build:dev": "node scripts/build.js",