@rspack/binding 2.0.0-rc.0 → 2.0.0-rc.2
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 +26 -13
- package/package.json +19 -18
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',
|
|
@@ -726,7 +732,7 @@ export interface JsBeforeModuleIdsArg {
|
|
|
726
732
|
}
|
|
727
733
|
|
|
728
734
|
export interface JsBeforeModuleIdsResult {
|
|
729
|
-
assignments: Record<string, string>
|
|
735
|
+
assignments: Record<string, string | number>
|
|
730
736
|
}
|
|
731
737
|
|
|
732
738
|
export interface JsBuildMeta {
|
|
@@ -734,15 +740,11 @@ export interface JsBuildMeta {
|
|
|
734
740
|
hasTopLevelAwait?: boolean
|
|
735
741
|
esm?: boolean
|
|
736
742
|
exportsType?: undefined | 'unset' | 'default' | 'namespace' | 'flagged' | 'dynamic'
|
|
737
|
-
defaultObject?: undefined | 'false' | 'redirect' |
|
|
743
|
+
defaultObject?: undefined | 'false' | 'redirect' | 'redirect-warn'
|
|
738
744
|
sideEffectFree?: boolean
|
|
739
745
|
exportsFinalName?: Array<[string, string]> | undefined
|
|
740
746
|
}
|
|
741
747
|
|
|
742
|
-
export interface JsBuildMetaDefaultObjectRedirectWarn {
|
|
743
|
-
redirectWarn: JsDefaultObjectRedirectWarnObject
|
|
744
|
-
}
|
|
745
|
-
|
|
746
748
|
export interface JsBuildTimeExecutionOption {
|
|
747
749
|
publicPath?: string
|
|
748
750
|
baseUri?: string
|
|
@@ -804,10 +806,6 @@ export interface JsCreateScriptData {
|
|
|
804
806
|
chunk: Chunk
|
|
805
807
|
}
|
|
806
808
|
|
|
807
|
-
export interface JsDefaultObjectRedirectWarnObject {
|
|
808
|
-
ignore: boolean
|
|
809
|
-
}
|
|
810
|
-
|
|
811
809
|
export interface JsDiagnostic {
|
|
812
810
|
message: string
|
|
813
811
|
help?: string
|
|
@@ -1887,6 +1885,7 @@ export interface RawCacheGroupOptions {
|
|
|
1887
1885
|
minChunks?: number
|
|
1888
1886
|
minSize?: number | RawSplitChunkSizes
|
|
1889
1887
|
minSizeReduction?: number | RawSplitChunkSizes
|
|
1888
|
+
enforceSizeThreshold?: number | RawSplitChunkSizes
|
|
1890
1889
|
maxSize?: number | RawSplitChunkSizes
|
|
1891
1890
|
maxAsyncSize?: number | RawSplitChunkSizes
|
|
1892
1891
|
maxInitialSize?: number | RawSplitChunkSizes
|
|
@@ -2234,6 +2233,7 @@ export interface RawExperiments {
|
|
|
2234
2233
|
useInputFileSystem?: false | Array<RegExp>
|
|
2235
2234
|
css?: boolean
|
|
2236
2235
|
deferImport: boolean
|
|
2236
|
+
pureFunctions: boolean
|
|
2237
2237
|
}
|
|
2238
2238
|
|
|
2239
2239
|
export interface RawExposeOptions {
|
|
@@ -2308,6 +2308,13 @@ export interface RawGeneratorOptions {
|
|
|
2308
2308
|
json?: RawJsonGeneratorOptions
|
|
2309
2309
|
}
|
|
2310
2310
|
|
|
2311
|
+
export interface RawHashedModuleIdsPluginOptions {
|
|
2312
|
+
context?: string
|
|
2313
|
+
hashFunction?: string
|
|
2314
|
+
hashDigest?: string
|
|
2315
|
+
hashDigestLength?: number
|
|
2316
|
+
}
|
|
2317
|
+
|
|
2311
2318
|
export interface RawHtmlRspackPluginBaseOptions {
|
|
2312
2319
|
href?: string
|
|
2313
2320
|
target?: "_self" | "_blank" | "_parent" | "_top"
|
|
@@ -2469,6 +2476,12 @@ jsx?: boolean
|
|
|
2469
2476
|
* @experimental
|
|
2470
2477
|
*/
|
|
2471
2478
|
importMetaResolve?: boolean
|
|
2479
|
+
/**
|
|
2480
|
+
* Flag top-level exported functions as side-effect-free for pure-function-based tree shaking.
|
|
2481
|
+
* This option is experimental in Rspack only and subject to change or be removed anytime.
|
|
2482
|
+
* @experimental
|
|
2483
|
+
*/
|
|
2484
|
+
pureFunctions?: Array<string>
|
|
2472
2485
|
}
|
|
2473
2486
|
|
|
2474
2487
|
export interface RawJsonGeneratorOptions {
|
|
@@ -2894,10 +2907,10 @@ export interface RawRslibPluginOptions {
|
|
|
2894
2907
|
*/
|
|
2895
2908
|
forceNodeShims?: boolean
|
|
2896
2909
|
/**
|
|
2897
|
-
*
|
|
2910
|
+
* Auto downgrade module external type to node-commonjs for CJS require of node builtins
|
|
2898
2911
|
* @default `false`
|
|
2899
2912
|
*/
|
|
2900
|
-
|
|
2913
|
+
autoCjsNodeBuiltin?: boolean
|
|
2901
2914
|
}
|
|
2902
2915
|
|
|
2903
2916
|
export interface RawRstestPluginOptions {
|
|
@@ -2988,7 +3001,7 @@ export interface RawSplitChunksOptions {
|
|
|
2988
3001
|
hidePathInfo?: boolean
|
|
2989
3002
|
minSize?: number | RawSplitChunkSizes
|
|
2990
3003
|
minSizeReduction?: number | RawSplitChunkSizes
|
|
2991
|
-
enforceSizeThreshold?: number
|
|
3004
|
+
enforceSizeThreshold?: number | RawSplitChunkSizes
|
|
2992
3005
|
minRemainingSize?: number | RawSplitChunkSizes
|
|
2993
3006
|
maxSize?: number | RawSplitChunkSizes
|
|
2994
3007
|
maxAsyncSize?: number | RawSplitChunkSizes
|
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.2",
|
|
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.
|
|
24
|
-
"@napi-rs/cli": "3.6.
|
|
25
|
-
"@napi-rs/wasm-runtime": "1.1.
|
|
26
|
-
"@types/node": "^20.19.
|
|
27
|
-
"emnapi": "1.9.
|
|
22
|
+
"@emnapi/core": "1.9.2",
|
|
23
|
+
"@emnapi/runtime": "1.9.2",
|
|
24
|
+
"@napi-rs/cli": "3.6.1",
|
|
25
|
+
"@napi-rs/wasm-runtime": "1.1.3",
|
|
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-
|
|
58
|
-
"@rspack/binding-linux-arm64-gnu": "2.0.0-rc.
|
|
59
|
-
"@rspack/binding-
|
|
60
|
-
"@rspack/binding-
|
|
61
|
-
"@rspack/binding-
|
|
62
|
-
"@rspack/binding-
|
|
63
|
-
"@rspack/binding-
|
|
64
|
-
"@rspack/binding-
|
|
65
|
-
"@rspack/binding-linux-x64-
|
|
66
|
-
"@rspack/binding-linux-x64-
|
|
57
|
+
"@rspack/binding-win32-arm64-msvc": "2.0.0-rc.2",
|
|
58
|
+
"@rspack/binding-linux-arm64-gnu": "2.0.0-rc.2",
|
|
59
|
+
"@rspack/binding-linux-arm64-musl": "2.0.0-rc.2",
|
|
60
|
+
"@rspack/binding-win32-ia32-msvc": "2.0.0-rc.2",
|
|
61
|
+
"@rspack/binding-wasm32-wasi": "2.0.0-rc.2",
|
|
62
|
+
"@rspack/binding-darwin-arm64": "2.0.0-rc.2",
|
|
63
|
+
"@rspack/binding-darwin-x64": "2.0.0-rc.2",
|
|
64
|
+
"@rspack/binding-win32-x64-msvc": "2.0.0-rc.2",
|
|
65
|
+
"@rspack/binding-linux-x64-musl": "2.0.0-rc.2",
|
|
66
|
+
"@rspack/binding-linux-x64-gnu": "2.0.0-rc.2"
|
|
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
|
}
|