@rspack/binding 0.3.8 → 0.3.9
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 +23 -31
- package/package.json +6 -10
package/binding.d.ts
CHANGED
|
@@ -131,6 +131,8 @@ export const enum BuiltinPluginName {
|
|
|
131
131
|
ArrayPushCallbackChunkFormatPlugin = 'ArrayPushCallbackChunkFormatPlugin',
|
|
132
132
|
ModuleChunkFormatPlugin = 'ModuleChunkFormatPlugin',
|
|
133
133
|
HotModuleReplacementPlugin = 'HotModuleReplacementPlugin',
|
|
134
|
+
LimitChunkCountPlugin = 'LimitChunkCountPlugin',
|
|
135
|
+
WebWorkerTemplatePlugin = 'WebWorkerTemplatePlugin',
|
|
134
136
|
HttpExternalsRspackPlugin = 'HttpExternalsRspackPlugin',
|
|
135
137
|
CopyRspackPlugin = 'CopyRspackPlugin',
|
|
136
138
|
HtmlRspackPlugin = 'HtmlRspackPlugin',
|
|
@@ -275,30 +277,29 @@ export interface JsLoaderContext {
|
|
|
275
277
|
assetFilenames: Array<string>
|
|
276
278
|
currentLoader: string
|
|
277
279
|
isPitching: boolean
|
|
280
|
+
/**
|
|
281
|
+
* Loader index from JS.
|
|
282
|
+
* If loaders are dispatched by JS loader runner,
|
|
283
|
+
* then, this field is correspondence with loader index in JS side.
|
|
284
|
+
* It is useful when loader dispatched on JS side has an builtin loader, for example: builtin:swc-loader,
|
|
285
|
+
* Then this field will be used as an hack to test whether it should return an AST or string.
|
|
286
|
+
*/
|
|
287
|
+
loaderIndexFromJs?: number
|
|
288
|
+
/**
|
|
289
|
+
* Internal additional data, contains more than `String`
|
|
290
|
+
* @internal
|
|
291
|
+
*/
|
|
292
|
+
additionalDataExternal: ExternalObject<AdditionalData>
|
|
278
293
|
/**
|
|
279
294
|
* Internal loader context
|
|
280
295
|
* @internal
|
|
281
296
|
*/
|
|
282
|
-
|
|
297
|
+
contextExternal: ExternalObject<LoaderRunnerContext>
|
|
283
298
|
/**
|
|
284
299
|
* Internal loader diagnostic
|
|
285
300
|
* @internal
|
|
286
301
|
*/
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
export interface JsLoaderResult {
|
|
291
|
-
/** Content in pitching stage can be empty */
|
|
292
|
-
content?: Buffer
|
|
293
|
-
fileDependencies: Array<string>
|
|
294
|
-
contextDependencies: Array<string>
|
|
295
|
-
missingDependencies: Array<string>
|
|
296
|
-
buildDependencies: Array<string>
|
|
297
|
-
sourceMap?: Buffer
|
|
298
|
-
additionalData?: Buffer
|
|
299
|
-
cacheable: boolean
|
|
300
|
-
/** Used to instruct how rust loaders should execute */
|
|
301
|
-
isPitching: boolean
|
|
302
|
+
diagnosticsExternal: ExternalObject<Array<Diagnostic>>
|
|
302
303
|
}
|
|
303
304
|
|
|
304
305
|
export interface JsModule {
|
|
@@ -442,13 +443,6 @@ export interface JsStatsWarning {
|
|
|
442
443
|
formatted: string
|
|
443
444
|
}
|
|
444
445
|
|
|
445
|
-
export interface NodeFS {
|
|
446
|
-
writeFile: (...args: any[]) => any
|
|
447
|
-
removeFile: (...args: any[]) => any
|
|
448
|
-
mkdir: (...args: any[]) => any
|
|
449
|
-
mkdirp: (...args: any[]) => any
|
|
450
|
-
}
|
|
451
|
-
|
|
452
446
|
export interface PathData {
|
|
453
447
|
filename?: string
|
|
454
448
|
hash?: string
|
|
@@ -780,6 +774,12 @@ export interface RawLibraryOptions {
|
|
|
780
774
|
auxiliaryComment?: RawLibraryAuxiliaryComment
|
|
781
775
|
}
|
|
782
776
|
|
|
777
|
+
export interface RawLimitChunkCountPluginOptions {
|
|
778
|
+
chunkOverhead?: number
|
|
779
|
+
entryChunkMultiplicator?: number
|
|
780
|
+
maxChunks: number
|
|
781
|
+
}
|
|
782
|
+
|
|
783
783
|
export interface RawModuleOptions {
|
|
784
784
|
rules: Array<RawModuleRule>
|
|
785
785
|
parser?: Record<string, RawParserOptions>
|
|
@@ -1093,11 +1093,3 @@ export function registerGlobalTrace(filter: string, layer: "chrome" | "logger",
|
|
|
1093
1093
|
/** Builtin loader runner */
|
|
1094
1094
|
export function runBuiltinLoader(builtin: string, options: string | undefined | null, loaderContext: JsLoaderContext): Promise<JsLoaderContext>
|
|
1095
1095
|
|
|
1096
|
-
export interface ThreadsafeNodeFS {
|
|
1097
|
-
writeFile: (...args: any[]) => any
|
|
1098
|
-
removeFile: (...args: any[]) => any
|
|
1099
|
-
mkdir: (...args: any[]) => any
|
|
1100
|
-
mkdirp: (...args: any[]) => any
|
|
1101
|
-
removeDirAll: (...args: any[]) => any
|
|
1102
|
-
}
|
|
1103
|
-
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/binding",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node binding for rspack",
|
|
6
6
|
"main": "binding.js",
|
|
@@ -22,15 +22,11 @@
|
|
|
22
22
|
"binaryName": "rspack"
|
|
23
23
|
},
|
|
24
24
|
"optionalDependencies": {
|
|
25
|
-
"@rspack/binding-darwin-arm64": "0.3.
|
|
26
|
-
"@rspack/binding-win32-arm64-msvc": "0.3.
|
|
27
|
-
"@rspack/binding-
|
|
28
|
-
"@rspack/binding-
|
|
29
|
-
"@rspack/binding-win32-
|
|
30
|
-
"@rspack/binding-darwin-x64": "0.3.8",
|
|
31
|
-
"@rspack/binding-win32-x64-msvc": "0.3.8",
|
|
32
|
-
"@rspack/binding-linux-x64-gnu": "0.3.8",
|
|
33
|
-
"@rspack/binding-linux-x64-musl": "0.3.8"
|
|
25
|
+
"@rspack/binding-darwin-arm64": "0.3.9",
|
|
26
|
+
"@rspack/binding-win32-arm64-msvc": "0.3.9",
|
|
27
|
+
"@rspack/binding-win32-ia32-msvc": "0.3.9",
|
|
28
|
+
"@rspack/binding-darwin-x64": "0.3.9",
|
|
29
|
+
"@rspack/binding-win32-x64-msvc": "0.3.9"
|
|
34
30
|
},
|
|
35
31
|
"scripts": {
|
|
36
32
|
"build:debug": "node scripts/build.js",
|