@rspack/binding 0.5.3 → 0.5.4

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.
Files changed (2) hide show
  1. package/binding.d.ts +21 -5
  2. package/package.json +10 -10
package/binding.d.ts CHANGED
@@ -61,7 +61,7 @@ export class JsStats {
61
61
  }
62
62
 
63
63
  export class Rspack {
64
- constructor(options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, jsHooks: JsHooks | undefined | null, outputFilesystem: ThreadsafeNodeFS, jsLoaderRunner: (...args: any[]) => any)
64
+ constructor(options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, jsHooks: JsHooks, compilerHooks: Array<JsHook>, outputFilesystem: ThreadsafeNodeFS, jsLoaderRunner: (...args: any[]) => any)
65
65
  unsafe_set_disabled_hooks(hooks: Array<string>): void
66
66
  /**
67
67
  * Build with the given option passed to the constructor
@@ -139,7 +139,7 @@ export interface BuiltinPlugin {
139
139
  canInherentFromParent?: boolean
140
140
  }
141
141
 
142
- export const enum BuiltinPluginName {
142
+ export enum BuiltinPluginName {
143
143
  DefinePlugin = 'DefinePlugin',
144
144
  ProvidePlugin = 'ProvidePlugin',
145
145
  BannerPlugin = 'BannerPlugin',
@@ -184,10 +184,12 @@ export const enum BuiltinPluginName {
184
184
  AssetModulesPlugin = 'AssetModulesPlugin',
185
185
  SourceMapDevToolPlugin = 'SourceMapDevToolPlugin',
186
186
  EvalSourceMapDevToolPlugin = 'EvalSourceMapDevToolPlugin',
187
+ EvalDevToolModulePlugin = 'EvalDevToolModulePlugin',
187
188
  SideEffectsFlagPlugin = 'SideEffectsFlagPlugin',
188
189
  FlagDependencyExportsPlugin = 'FlagDependencyExportsPlugin',
189
190
  FlagDependencyUsagePlugin = 'FlagDependencyUsagePlugin',
190
191
  MangleExportsPlugin = 'MangleExportsPlugin',
192
+ ModuleConcatenationPlugin = 'ModuleConcatenationPlugin',
191
193
  HttpExternalsRspackPlugin = 'HttpExternalsRspackPlugin',
192
194
  CopyRspackPlugin = 'CopyRspackPlugin',
193
195
  HtmlRspackPlugin = 'HtmlRspackPlugin',
@@ -323,6 +325,11 @@ export interface JsExecuteModuleResult {
323
325
  id: number
324
326
  }
325
327
 
328
+ export interface JsHook {
329
+ type: JsHookType
330
+ function: (...args: any[]) => any
331
+ }
332
+
326
333
  export interface JsHooks {
327
334
  processAssetsStageAdditional: (...args: any[]) => any
328
335
  processAssetsStagePreProcess: (...args: any[]) => any
@@ -341,7 +348,6 @@ export interface JsHooks {
341
348
  processAssetsStageAnalyse: (...args: any[]) => any
342
349
  processAssetsStageReport: (...args: any[]) => any
343
350
  afterProcessAssets: (...args: any[]) => any
344
- compilation: (...args: any[]) => any
345
351
  thisCompilation: (...args: any[]) => any
346
352
  emit: (...args: any[]) => any
347
353
  assetEmitted: (...args: any[]) => any
@@ -369,6 +375,10 @@ export interface JsHooks {
369
375
  runtimeModule: (...args: any[]) => any
370
376
  }
371
377
 
378
+ export enum JsHookType {
379
+ CompilerCompilation = 'CompilerCompilation'
380
+ }
381
+
372
382
  export interface JsLoaderContext {
373
383
  /** Content maybe empty in pitching stage */
374
384
  content?: Buffer
@@ -789,6 +799,12 @@ export interface RawEntryPluginOptions {
789
799
  options: RawEntryOptions
790
800
  }
791
801
 
802
+ export interface RawEvalDevToolModulePluginOptions {
803
+ namespace?: string
804
+ moduleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string)
805
+ sourceUrlComment?: string
806
+ }
807
+
792
808
  export interface RawExperiments {
793
809
  newSplitChunks: boolean
794
810
  topLevelAwait: boolean
@@ -1207,11 +1223,11 @@ export interface RawSnapshotStrategy {
1207
1223
  export interface RawSourceMapDevToolPluginOptions {
1208
1224
  append?: (false | null) | string | Function
1209
1225
  columns?: boolean
1210
- fallbackModuleFilenameTemplate?: string | Function
1226
+ fallbackModuleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string)
1211
1227
  fileContext?: string
1212
1228
  filename?: (false | null) | string
1213
1229
  module?: boolean
1214
- moduleFilenameTemplate?: string | Function
1230
+ moduleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string)
1215
1231
  namespace?: string
1216
1232
  noSources?: boolean
1217
1233
  publicPath?: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/binding",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
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.3",
26
- "@rspack/binding-linux-arm64-gnu": "0.5.3",
27
- "@rspack/binding-win32-arm64-msvc": "0.5.3",
28
- "@rspack/binding-linux-arm64-musl": "0.5.3",
29
- "@rspack/binding-win32-ia32-msvc": "0.5.3",
30
- "@rspack/binding-darwin-x64": "0.5.3",
31
- "@rspack/binding-win32-x64-msvc": "0.5.3",
32
- "@rspack/binding-linux-x64-gnu": "0.5.3",
33
- "@rspack/binding-linux-x64-musl": "0.5.3"
25
+ "@rspack/binding-darwin-arm64": "0.5.4",
26
+ "@rspack/binding-win32-arm64-msvc": "0.5.4",
27
+ "@rspack/binding-linux-arm64-musl": "0.5.4",
28
+ "@rspack/binding-linux-arm64-gnu": "0.5.4",
29
+ "@rspack/binding-win32-ia32-msvc": "0.5.4",
30
+ "@rspack/binding-darwin-x64": "0.5.4",
31
+ "@rspack/binding-win32-x64-msvc": "0.5.4",
32
+ "@rspack/binding-linux-x64-gnu": "0.5.4",
33
+ "@rspack/binding-linux-x64-musl": "0.5.4"
34
34
  },
35
35
  "scripts": {
36
36
  "build:debug": "node scripts/build.js",