@rspack/binding 1.3.4 → 1.3.6
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 +1 -2
- package/binding.d.ts +31 -21
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<picture>
|
|
2
|
-
<
|
|
3
|
-
<img alt="Rspack Banner" src="https://assets.rspack.dev/rspack/rspack-banner-plain-light.png">
|
|
2
|
+
<img alt="Rspack Banner" src="https://assets.rspack.dev/rspack/rspack-banner.png">
|
|
4
3
|
</picture>
|
|
5
4
|
|
|
6
5
|
# @rspack/binding
|
package/binding.d.ts
CHANGED
|
@@ -12,14 +12,18 @@ export type AssetInfo = KnownAssetInfo & Record<string, any>;
|
|
|
12
12
|
|
|
13
13
|
export const MODULE_IDENTIFIER_SYMBOL: unique symbol;
|
|
14
14
|
|
|
15
|
+
export const COMPILATION_HOOKS_MAP_SYMBOL: unique symbol;
|
|
16
|
+
|
|
15
17
|
export interface Module {
|
|
16
18
|
[MODULE_IDENTIFIER_SYMBOL]: string;
|
|
17
19
|
readonly type: string;
|
|
18
20
|
get context(): string | undefined;
|
|
19
21
|
get layer(): string | undefined;
|
|
20
|
-
get factoryMeta(): JsFactoryMeta
|
|
22
|
+
get factoryMeta(): JsFactoryMeta
|
|
23
|
+
set factoryMeta(factoryMeta: JsFactoryMeta);
|
|
21
24
|
get useSourceMap(): boolean;
|
|
22
25
|
get useSimpleSourceMap(): boolean;
|
|
26
|
+
get _readableIdentifier(): string;
|
|
23
27
|
buildInfo: Record<string, any>;
|
|
24
28
|
buildMeta: Record<string, any>;
|
|
25
29
|
}
|
|
@@ -32,15 +36,14 @@ interface NormalModuleConstructor {
|
|
|
32
36
|
export var NormalModule: NormalModuleConstructor;
|
|
33
37
|
|
|
34
38
|
export interface NormalModule extends Module {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
get
|
|
42
|
-
|
|
43
|
-
set matchResource(val: string | undefined)
|
|
39
|
+
readonly resource: string;
|
|
40
|
+
readonly request: string;
|
|
41
|
+
readonly userRequest: string;
|
|
42
|
+
readonly rawRequest: string;
|
|
43
|
+
readonly resourceResolveData: JsResourceData | undefined;
|
|
44
|
+
readonly loaders: ReadonlyArray<JsLoaderItem>;
|
|
45
|
+
get matchResource(): string | undefined;
|
|
46
|
+
set matchResource(val: string | undefined);
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
export interface ConcatenatedModule extends Module {
|
|
@@ -50,6 +53,7 @@ export interface ContextModule extends Module {
|
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
export interface ExternalModule extends Module {
|
|
56
|
+
readonly userRequest: string;
|
|
53
57
|
}
|
|
54
58
|
/* -- banner.d.ts end -- */
|
|
55
59
|
|
|
@@ -66,6 +70,12 @@ export declare class AsyncDependenciesBlock {
|
|
|
66
70
|
get blocks(): AsyncDependenciesBlock[]
|
|
67
71
|
}
|
|
68
72
|
|
|
73
|
+
export declare class Chunks {
|
|
74
|
+
get size(): number
|
|
75
|
+
_values(): JsChunk[]
|
|
76
|
+
_has(chunk: JsChunk): boolean
|
|
77
|
+
}
|
|
78
|
+
|
|
69
79
|
export declare class ConcatenatedModule {
|
|
70
80
|
get modules(): Module[]
|
|
71
81
|
_originalSource(): JsCompatSource | undefined
|
|
@@ -74,7 +84,7 @@ export declare class ConcatenatedModule {
|
|
|
74
84
|
get dependencies(): Dependency[]
|
|
75
85
|
size(ty?: string | undefined | null): number
|
|
76
86
|
libIdent(options: JsLibIdentOptions): string | null
|
|
77
|
-
_emitFile(filename: string, source: JsCompatSource,
|
|
87
|
+
_emitFile(filename: string, source: JsCompatSource, assetInfo?: AssetInfo | undefined | null): void
|
|
78
88
|
}
|
|
79
89
|
|
|
80
90
|
export declare class ContextModule {
|
|
@@ -84,7 +94,7 @@ export declare class ContextModule {
|
|
|
84
94
|
get dependencies(): Dependency[]
|
|
85
95
|
size(ty?: string | undefined | null): number
|
|
86
96
|
libIdent(options: JsLibIdentOptions): string | null
|
|
87
|
-
_emitFile(filename: string, source: JsCompatSource,
|
|
97
|
+
_emitFile(filename: string, source: JsCompatSource, assetInfo?: AssetInfo | undefined | null): void
|
|
88
98
|
}
|
|
89
99
|
|
|
90
100
|
export declare class Dependency {
|
|
@@ -131,15 +141,13 @@ export declare class EntryOptionsDto {
|
|
|
131
141
|
export type EntryOptionsDTO = EntryOptionsDto
|
|
132
142
|
|
|
133
143
|
export declare class ExternalModule {
|
|
134
|
-
get userRequest(): string
|
|
135
|
-
set userRequest(val: string)
|
|
136
144
|
_originalSource(): JsCompatSource | undefined
|
|
137
145
|
nameForCondition(): string | undefined
|
|
138
146
|
get blocks(): AsyncDependenciesBlock[]
|
|
139
147
|
get dependencies(): Dependency[]
|
|
140
148
|
size(ty?: string | undefined | null): number
|
|
141
149
|
libIdent(options: JsLibIdentOptions): string | null
|
|
142
|
-
_emitFile(filename: string, source: JsCompatSource,
|
|
150
|
+
_emitFile(filename: string, source: JsCompatSource, assetInfo?: AssetInfo | undefined | null): void
|
|
143
151
|
}
|
|
144
152
|
|
|
145
153
|
export declare class JsChunk {
|
|
@@ -201,7 +209,7 @@ export declare class JsCompilation {
|
|
|
201
209
|
get modules(): Array<Module>
|
|
202
210
|
get builtModules(): Array<Module>
|
|
203
211
|
getOptimizationBailout(): Array<JsStatsOptimizationBailout>
|
|
204
|
-
|
|
212
|
+
get chunks(): Chunks
|
|
205
213
|
getNamedChunkKeys(): Array<string>
|
|
206
214
|
getNamedChunk(name: string): JsChunk | null
|
|
207
215
|
getNamedChunkGroupKeys(): Array<string>
|
|
@@ -210,7 +218,7 @@ export declare class JsCompilation {
|
|
|
210
218
|
deleteAssetSource(name: string): void
|
|
211
219
|
getAssetFilenames(): Array<string>
|
|
212
220
|
hasAsset(name: string): boolean
|
|
213
|
-
emitAsset(filename: string, source: JsCompatSource,
|
|
221
|
+
emitAsset(filename: string, source: JsCompatSource, assetInfo?: AssetInfo | undefined | null): void
|
|
214
222
|
deleteAsset(filename: string): void
|
|
215
223
|
renameAsset(filename: string, newName: string): void
|
|
216
224
|
get entrypoints(): JsChunkGroup[]
|
|
@@ -253,6 +261,7 @@ export declare class JsCompiler {
|
|
|
253
261
|
build(callback: (err: null | Error) => void): void
|
|
254
262
|
/** Rebuild with the given option passed to the constructor */
|
|
255
263
|
rebuild(changed_files: string[], removed_files: string[], callback: (err: null | Error) => void): void
|
|
264
|
+
close(): Promise<void>
|
|
256
265
|
}
|
|
257
266
|
|
|
258
267
|
export declare class JsContextModuleFactoryAfterResolveData {
|
|
@@ -352,7 +361,7 @@ export declare class Module {
|
|
|
352
361
|
get dependencies(): Dependency[]
|
|
353
362
|
size(ty?: string | undefined | null): number
|
|
354
363
|
libIdent(options: JsLibIdentOptions): string | null
|
|
355
|
-
_emitFile(filename: string, source: JsCompatSource,
|
|
364
|
+
_emitFile(filename: string, source: JsCompatSource, assetInfo?: AssetInfo | undefined | null): void
|
|
356
365
|
}
|
|
357
366
|
|
|
358
367
|
export declare class ModuleGraphConnection {
|
|
@@ -974,6 +983,7 @@ export interface JsRsdoctorModule {
|
|
|
974
983
|
modules: Array<number>
|
|
975
984
|
belongModules: Array<number>
|
|
976
985
|
chunks: Array<number>
|
|
986
|
+
issuerPath: Array<number>
|
|
977
987
|
}
|
|
978
988
|
|
|
979
989
|
export interface JsRsdoctorModuleGraph {
|
|
@@ -2222,7 +2232,7 @@ export interface RawResolveOptions {
|
|
|
2222
2232
|
importsFields?: Array<string>
|
|
2223
2233
|
extensionAlias?: Record<string, Array<string>>
|
|
2224
2234
|
aliasFields?: Array<string>
|
|
2225
|
-
restrictions?:
|
|
2235
|
+
restrictions?: (string | RegExp)[]
|
|
2226
2236
|
roots?: Array<string>
|
|
2227
2237
|
pnp?: boolean
|
|
2228
2238
|
}
|
|
@@ -2247,7 +2257,7 @@ export interface RawResolveOptionsWithDependencyType {
|
|
|
2247
2257
|
importsFields?: Array<string>
|
|
2248
2258
|
extensionAlias?: Record<string, Array<string>>
|
|
2249
2259
|
aliasFields?: Array<string>
|
|
2250
|
-
restrictions?:
|
|
2260
|
+
restrictions?: (string | RegExp)[]
|
|
2251
2261
|
roots?: Array<string>
|
|
2252
2262
|
dependencyCategory?: string
|
|
2253
2263
|
resolveToContext?: boolean
|
|
@@ -2404,7 +2414,7 @@ export interface RawTrustedTypes {
|
|
|
2404
2414
|
* Author Donny/강동윤
|
|
2405
2415
|
* Copyright (c)
|
|
2406
2416
|
*/
|
|
2407
|
-
export declare function registerGlobalTrace(filter: string, layer: "chrome" | "logger"
|
|
2417
|
+
export declare function registerGlobalTrace(filter: string, layer: "chrome" | "logger" , output: string): void
|
|
2408
2418
|
|
|
2409
2419
|
export declare enum RegisterJsTapKind {
|
|
2410
2420
|
CompilerThisCompilation = 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/binding",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node binding for rspack",
|
|
6
6
|
"main": "binding.js",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"bugs": "https://github.com/web-infra-dev/rspack/issues",
|
|
18
18
|
"repository": "web-infra-dev/rspack",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@napi-rs/cli": "3.0.0-alpha.
|
|
21
|
-
"@napi-rs/wasm-runtime": "^0.2.
|
|
22
|
-
"emnapi": "^1.4.
|
|
20
|
+
"@napi-rs/cli": "3.0.0-alpha.78",
|
|
21
|
+
"@napi-rs/wasm-runtime": "^0.2.9",
|
|
22
|
+
"emnapi": "^1.4.3",
|
|
23
23
|
"typescript": "^5.7.3",
|
|
24
|
-
"@emnapi/core": "^1.4.
|
|
24
|
+
"@emnapi/core": "^1.4.3"
|
|
25
25
|
},
|
|
26
26
|
"napi": {
|
|
27
27
|
"binaryName": "rspack",
|
|
@@ -48,15 +48,15 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"optionalDependencies": {
|
|
51
|
-
"@rspack/binding-darwin-arm64": "1.3.
|
|
52
|
-
"@rspack/binding-win32-arm64-msvc": "1.3.
|
|
53
|
-
"@rspack/binding-linux-arm64-musl": "1.3.
|
|
54
|
-
"@rspack/binding-linux-arm64-gnu": "1.3.
|
|
55
|
-
"@rspack/binding-
|
|
56
|
-
"@rspack/binding-win32-
|
|
57
|
-
"@rspack/binding-
|
|
58
|
-
"@rspack/binding-
|
|
59
|
-
"@rspack/binding-linux-x64-musl": "1.3.
|
|
51
|
+
"@rspack/binding-darwin-arm64": "1.3.6",
|
|
52
|
+
"@rspack/binding-win32-arm64-msvc": "1.3.6",
|
|
53
|
+
"@rspack/binding-linux-arm64-musl": "1.3.6",
|
|
54
|
+
"@rspack/binding-linux-arm64-gnu": "1.3.6",
|
|
55
|
+
"@rspack/binding-win32-ia32-msvc": "1.3.6",
|
|
56
|
+
"@rspack/binding-win32-x64-msvc": "1.3.6",
|
|
57
|
+
"@rspack/binding-linux-x64-gnu": "1.3.6",
|
|
58
|
+
"@rspack/binding-darwin-x64": "1.3.6",
|
|
59
|
+
"@rspack/binding-linux-x64-musl": "1.3.6"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build:dev": "node scripts/build.js",
|