@rspack/binding 2.0.0-rc.0 → 2.0.0-rc.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/napi-binding.d.ts +22 -2
- package/package.json +17 -16
package/napi-binding.d.ts
CHANGED
|
@@ -25,6 +25,10 @@ export const COMMIT_CUSTOM_FIELDS_SYMBOL: unique symbol;
|
|
|
25
25
|
|
|
26
26
|
export const RUST_ERROR_SYMBOL: unique symbol;
|
|
27
27
|
|
|
28
|
+
export const CIRCULAR_CONNECTION_SYMBOL: unique symbol;
|
|
29
|
+
export const TRANSITIVE_ONLY_SYMBOL: unique symbol;
|
|
30
|
+
export type ConnectionState = boolean | typeof CIRCULAR_CONNECTION_SYMBOL | typeof TRANSITIVE_ONLY_SYMBOL;
|
|
31
|
+
|
|
28
32
|
interface KnownBuildInfo {
|
|
29
33
|
[BUILD_INFO_ASSETS_SYMBOL]: Assets,
|
|
30
34
|
[BUILD_INFO_FILE_DEPENDENCIES_SYMBOL]: string[],
|
|
@@ -452,6 +456,7 @@ export declare class ModuleGraphConnection {
|
|
|
452
456
|
get module(): Module | null
|
|
453
457
|
get resolvedModule(): Module | null
|
|
454
458
|
get originModule(): Module | null
|
|
459
|
+
getActiveState(runtime: string | string[] | undefined): ConnectionState
|
|
455
460
|
}
|
|
456
461
|
|
|
457
462
|
export declare class NativeWatcher {
|
|
@@ -561,6 +566,7 @@ export declare enum BuiltinPluginName {
|
|
|
561
566
|
NamedModuleIdsPlugin = 'NamedModuleIdsPlugin',
|
|
562
567
|
NaturalModuleIdsPlugin = 'NaturalModuleIdsPlugin',
|
|
563
568
|
DeterministicModuleIdsPlugin = 'DeterministicModuleIdsPlugin',
|
|
569
|
+
HashedModuleIdsPlugin = 'HashedModuleIdsPlugin',
|
|
564
570
|
NaturalChunkIdsPlugin = 'NaturalChunkIdsPlugin',
|
|
565
571
|
NamedChunkIdsPlugin = 'NamedChunkIdsPlugin',
|
|
566
572
|
DeterministicChunkIdsPlugin = 'DeterministicChunkIdsPlugin',
|
|
@@ -2234,6 +2240,7 @@ export interface RawExperiments {
|
|
|
2234
2240
|
useInputFileSystem?: false | Array<RegExp>
|
|
2235
2241
|
css?: boolean
|
|
2236
2242
|
deferImport: boolean
|
|
2243
|
+
pureFunctions: boolean
|
|
2237
2244
|
}
|
|
2238
2245
|
|
|
2239
2246
|
export interface RawExposeOptions {
|
|
@@ -2308,6 +2315,13 @@ export interface RawGeneratorOptions {
|
|
|
2308
2315
|
json?: RawJsonGeneratorOptions
|
|
2309
2316
|
}
|
|
2310
2317
|
|
|
2318
|
+
export interface RawHashedModuleIdsPluginOptions {
|
|
2319
|
+
context?: string
|
|
2320
|
+
hashFunction?: string
|
|
2321
|
+
hashDigest?: string
|
|
2322
|
+
hashDigestLength?: number
|
|
2323
|
+
}
|
|
2324
|
+
|
|
2311
2325
|
export interface RawHtmlRspackPluginBaseOptions {
|
|
2312
2326
|
href?: string
|
|
2313
2327
|
target?: "_self" | "_blank" | "_parent" | "_top"
|
|
@@ -2469,6 +2483,12 @@ jsx?: boolean
|
|
|
2469
2483
|
* @experimental
|
|
2470
2484
|
*/
|
|
2471
2485
|
importMetaResolve?: boolean
|
|
2486
|
+
/**
|
|
2487
|
+
* Flag top-level exported functions as side-effect-free for pure-function-based tree shaking.
|
|
2488
|
+
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
2489
|
+
* @experimental
|
|
2490
|
+
*/
|
|
2491
|
+
pureFunctions?: Array<string>
|
|
2472
2492
|
}
|
|
2473
2493
|
|
|
2474
2494
|
export interface RawJsonGeneratorOptions {
|
|
@@ -2894,10 +2914,10 @@ export interface RawRslibPluginOptions {
|
|
|
2894
2914
|
*/
|
|
2895
2915
|
forceNodeShims?: boolean
|
|
2896
2916
|
/**
|
|
2897
|
-
*
|
|
2917
|
+
* Auto downgrade module external type to node-commonjs for CJS require of node builtins
|
|
2898
2918
|
* @default `false`
|
|
2899
2919
|
*/
|
|
2900
|
-
|
|
2920
|
+
autoCjsNodeBuiltin?: boolean
|
|
2901
2921
|
}
|
|
2902
2922
|
|
|
2903
2923
|
export interface RawRstestPluginOptions {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/binding",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node binding for rspack",
|
|
6
6
|
"main": "binding.js",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"bugs": "https://github.com/web-infra-dev/rspack/issues",
|
|
20
20
|
"repository": "web-infra-dev/rspack",
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@emnapi/core": "1.9.
|
|
23
|
-
"@emnapi/runtime": "1.9.
|
|
22
|
+
"@emnapi/core": "1.9.2",
|
|
23
|
+
"@emnapi/runtime": "1.9.2",
|
|
24
24
|
"@napi-rs/cli": "3.6.0",
|
|
25
25
|
"@napi-rs/wasm-runtime": "1.1.2",
|
|
26
|
-
"@types/node": "^20.19.
|
|
27
|
-
"emnapi": "1.9.
|
|
26
|
+
"@types/node": "^20.19.39",
|
|
27
|
+
"emnapi": "1.9.2",
|
|
28
28
|
"typescript": "^6.0.2"
|
|
29
29
|
},
|
|
30
30
|
"napi": {
|
|
@@ -54,16 +54,16 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"optionalDependencies": {
|
|
57
|
-
"@rspack/binding-darwin-arm64": "2.0.0-rc.
|
|
58
|
-
"@rspack/binding-linux-arm64-gnu": "2.0.0-rc.
|
|
59
|
-
"@rspack/binding-win32-
|
|
60
|
-
"@rspack/binding-linux-arm64-musl": "2.0.0-rc.
|
|
61
|
-
"@rspack/binding-win32-
|
|
62
|
-
"@rspack/binding-wasm32-wasi": "2.0.0-rc.
|
|
63
|
-
"@rspack/binding-win32-x64-msvc": "2.0.0-rc.
|
|
64
|
-
"@rspack/binding-darwin-x64": "2.0.0-rc.
|
|
65
|
-
"@rspack/binding-linux-x64-
|
|
66
|
-
"@rspack/binding-linux-x64-
|
|
57
|
+
"@rspack/binding-darwin-arm64": "2.0.0-rc.1",
|
|
58
|
+
"@rspack/binding-linux-arm64-gnu": "2.0.0-rc.1",
|
|
59
|
+
"@rspack/binding-win32-arm64-msvc": "2.0.0-rc.1",
|
|
60
|
+
"@rspack/binding-linux-arm64-musl": "2.0.0-rc.1",
|
|
61
|
+
"@rspack/binding-win32-ia32-msvc": "2.0.0-rc.1",
|
|
62
|
+
"@rspack/binding-wasm32-wasi": "2.0.0-rc.1",
|
|
63
|
+
"@rspack/binding-win32-x64-msvc": "2.0.0-rc.1",
|
|
64
|
+
"@rspack/binding-darwin-x64": "2.0.0-rc.1",
|
|
65
|
+
"@rspack/binding-linux-x64-musl": "2.0.0-rc.1",
|
|
66
|
+
"@rspack/binding-linux-x64-gnu": "2.0.0-rc.1"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build:dev": "node scripts/build.js",
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"build:dev:browser": "DISABLE_PLUGIN=1 RUST_TARGET=wasm32-wasip1-threads RSPACK_TARGET_BROWSER=1 node scripts/build.js",
|
|
77
77
|
"build:release:browser": "DISABLE_PLUGIN=1 RUST_TARGET=wasm32-wasip1-threads RSPACK_TARGET_BROWSER=1 node scripts/build.js --profile release-wasi",
|
|
78
78
|
"move-binding": "node scripts/move-binding",
|
|
79
|
-
"test": "tsc -p tsconfig.type-test.json"
|
|
79
|
+
"test": "tsc -p tsconfig.type-test.json",
|
|
80
|
+
"wasm-add-external-debug": "node scripts/add-external-debug-info.js rspack.wasm32-wasi.wasm rspack.wasm32-wasi.debug.wasm"
|
|
80
81
|
}
|
|
81
82
|
}
|