@rspack/binding 0.5.5 → 0.5.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/binding.d.ts +13 -11
- package/package.json +10 -10
package/binding.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export class JsCompilation {
|
|
|
27
27
|
hasAsset(name: string): boolean
|
|
28
28
|
emitAsset(filename: string, source: JsCompatSource, assetInfo: JsAssetInfo): void
|
|
29
29
|
deleteAsset(filename: string): void
|
|
30
|
+
renameAsset(filename: string, newName: string): void
|
|
30
31
|
get entrypoints(): Record<string, JsChunkGroup>
|
|
31
32
|
get hash(): string | null
|
|
32
33
|
getFileDependencies(): Array<string>
|
|
@@ -61,7 +62,7 @@ export class JsStats {
|
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
export class Rspack {
|
|
64
|
-
constructor(options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, jsHooks: JsHooks,
|
|
65
|
+
constructor(options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, jsHooks: JsHooks, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, jsLoaderRunner: (...args: any[]) => any)
|
|
65
66
|
unsafe_set_disabled_hooks(hooks: Array<string>): void
|
|
66
67
|
/**
|
|
67
68
|
* Build with the given option passed to the constructor
|
|
@@ -325,11 +326,6 @@ export interface JsExecuteModuleResult {
|
|
|
325
326
|
id: number
|
|
326
327
|
}
|
|
327
328
|
|
|
328
|
-
export interface JsHook {
|
|
329
|
-
type: JsHookType
|
|
330
|
-
function: (...args: any[]) => any
|
|
331
|
-
}
|
|
332
|
-
|
|
333
329
|
export interface JsHooks {
|
|
334
330
|
processAssetsStageAdditional: (...args: any[]) => any
|
|
335
331
|
processAssetsStagePreProcess: (...args: any[]) => any
|
|
@@ -365,6 +361,7 @@ export interface JsHooks {
|
|
|
365
361
|
beforeResolve: (...args: any[]) => any
|
|
366
362
|
afterResolve: (...args: any[]) => any
|
|
367
363
|
contextModuleFactoryBeforeResolve: (...args: any[]) => any
|
|
364
|
+
contextModuleFactoryAfterResolve: (...args: any[]) => any
|
|
368
365
|
normalModuleFactoryCreateModule: (...args: any[]) => any
|
|
369
366
|
normalModuleFactoryResolveForScheme: (...args: any[]) => any
|
|
370
367
|
chunkAsset: (...args: any[]) => any
|
|
@@ -374,11 +371,6 @@ export interface JsHooks {
|
|
|
374
371
|
runtimeModule: (...args: any[]) => any
|
|
375
372
|
}
|
|
376
373
|
|
|
377
|
-
export enum JsHookType {
|
|
378
|
-
CompilerCompilation = 'CompilerCompilation',
|
|
379
|
-
CompilerMake = 'CompilerMake'
|
|
380
|
-
}
|
|
381
|
-
|
|
382
374
|
export interface JsLoaderContext {
|
|
383
375
|
/** Content maybe empty in pitching stage */
|
|
384
376
|
content?: Buffer
|
|
@@ -587,6 +579,11 @@ export interface JsStatsWarning {
|
|
|
587
579
|
moduleId?: string
|
|
588
580
|
}
|
|
589
581
|
|
|
582
|
+
export interface JsTap {
|
|
583
|
+
function: (...args: any[]) => any
|
|
584
|
+
stage: number
|
|
585
|
+
}
|
|
586
|
+
|
|
590
587
|
export interface NodeFS {
|
|
591
588
|
writeFile: (...args: any[]) => any
|
|
592
589
|
removeFile: (...args: any[]) => any
|
|
@@ -1293,6 +1290,11 @@ export interface RawTrustedTypes {
|
|
|
1293
1290
|
*/
|
|
1294
1291
|
export function registerGlobalTrace(filter: string, layer: "chrome" | "logger", output: string): void
|
|
1295
1292
|
|
|
1293
|
+
export interface RegisterJsTaps {
|
|
1294
|
+
registerCompilerCompilationTaps: (...args: any[]) => any
|
|
1295
|
+
registerCompilerMakeTaps: (...args: any[]) => any
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1296
1298
|
/** Builtin loader runner */
|
|
1297
1299
|
export function runBuiltinLoader(builtin: string, options: string | undefined | null, loaderContext: JsLoaderContext): Promise<JsLoaderContext>
|
|
1298
1300
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/binding",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node binding for rspack",
|
|
6
6
|
"main": "binding.js",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"binaryName": "rspack"
|
|
23
23
|
},
|
|
24
24
|
"optionalDependencies": {
|
|
25
|
-
"@rspack/binding-darwin-arm64": "0.5.
|
|
26
|
-
"@rspack/binding-
|
|
27
|
-
"@rspack/binding-
|
|
28
|
-
"@rspack/binding-
|
|
29
|
-
"@rspack/binding-
|
|
30
|
-
"@rspack/binding-
|
|
31
|
-
"@rspack/binding-win32-x64-msvc": "0.5.
|
|
32
|
-
"@rspack/binding-linux-x64-
|
|
33
|
-
"@rspack/binding-linux-x64-
|
|
25
|
+
"@rspack/binding-darwin-arm64": "0.5.6",
|
|
26
|
+
"@rspack/binding-win32-arm64-msvc": "0.5.6",
|
|
27
|
+
"@rspack/binding-linux-arm64-gnu": "0.5.6",
|
|
28
|
+
"@rspack/binding-win32-ia32-msvc": "0.5.6",
|
|
29
|
+
"@rspack/binding-linux-arm64-musl": "0.5.6",
|
|
30
|
+
"@rspack/binding-darwin-x64": "0.5.6",
|
|
31
|
+
"@rspack/binding-win32-x64-msvc": "0.5.6",
|
|
32
|
+
"@rspack/binding-linux-x64-gnu": "0.5.6",
|
|
33
|
+
"@rspack/binding-linux-x64-musl": "0.5.6"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build:debug": "node scripts/build.js",
|