@rspack/binding 1.3.8 → 1.3.10

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 +29 -2
  2. package/package.json +10 -10
package/binding.d.ts CHANGED
@@ -76,6 +76,14 @@ export declare class Chunks {
76
76
  _has(chunk: JsChunk): boolean
77
77
  }
78
78
 
79
+ export declare class CodeGenerationResult {
80
+ get sources(): Sources
81
+ }
82
+
83
+ export declare class CodeGenerationResults {
84
+ get(module: Module, runtime: string | string[] | undefined): CodeGenerationResult
85
+ }
86
+
79
87
  export declare class ConcatenatedModule {
80
88
  get rootModule(): Module
81
89
  get modules(): Module[]
@@ -177,6 +185,7 @@ export declare class JsChunk {
177
185
  }
178
186
 
179
187
  export declare class JsChunkGraph {
188
+ hasChunkEntryDependentChunks(chunk: JsChunk): boolean
180
189
  getChunkModules(chunk: JsChunk): Module[]
181
190
  getChunkEntryModules(chunk: JsChunk): Module[]
182
191
  getNumberOfEntryModules(chunk: JsChunk): number
@@ -253,7 +262,9 @@ export declare class JsCompilation {
253
262
  addRuntimeModule(chunk: JsChunk, runtimeModule: JsAddingRuntimeModule): void
254
263
  get moduleGraph(): JsModuleGraph
255
264
  get chunkGraph(): JsChunkGraph
265
+ addEntry(args: [string, EntryDependency, JsEntryOptions | undefined][], callback: (errMsg: Error | null, results: [string | null, Module][]) => void): void
256
266
  addInclude(args: [string, EntryDependency, JsEntryOptions | undefined][], callback: (errMsg: Error | null, results: [string | null, Module][]) => void): void
267
+ get codeGenerationResults(): CodeGenerationResults
257
268
  }
258
269
 
259
270
  export declare class JsCompiler {
@@ -351,8 +362,6 @@ export declare class JsResolverFactory {
351
362
 
352
363
  export declare class JsStats {
353
364
  toJson(jsOptions: JsStatsOptions): JsStatsCompilation
354
- hasWarnings(): boolean
355
- hasErrors(): boolean
356
365
  getLogging(acceptedTypes: number): Array<JsStatsLogging>
357
366
  }
358
367
 
@@ -379,6 +388,10 @@ export declare class RawExternalItemFnCtx {
379
388
  getResolver(): JsResolver
380
389
  }
381
390
 
391
+ export declare class Sources {
392
+ _get(sourceType: string): JsCompatSourceOwned | null
393
+ }
394
+
382
395
  export interface BuiltinPlugin {
383
396
  name: BuiltinPluginName
384
397
  options: unknown
@@ -500,6 +513,7 @@ export interface JsAdditionalTreeRuntimeRequirementsResult {
500
513
  export interface JsAfterEmitData {
501
514
  outputName: string
502
515
  compilationId: number
516
+ uid?: number
503
517
  }
504
518
 
505
519
  export interface JsAfterResolveData {
@@ -519,6 +533,7 @@ export interface JsAfterTemplateExecutionData {
519
533
  bodyTags: Array<JsHtmlPluginTag>
520
534
  outputName: string
521
535
  compilationId: number
536
+ uid?: number
522
537
  }
523
538
 
524
539
  export interface JsAlterAssetTagGroupsData {
@@ -527,6 +542,7 @@ export interface JsAlterAssetTagGroupsData {
527
542
  publicPath: string
528
543
  outputName: string
529
544
  compilationId: number
545
+ uid?: number
530
546
  }
531
547
 
532
548
  export interface JsAlterAssetTagsData {
@@ -534,6 +550,7 @@ export interface JsAlterAssetTagsData {
534
550
  outputName: string
535
551
  publicPath: string
536
552
  compilationId: number
553
+ uid?: number
537
554
  }
538
555
 
539
556
  export interface JsAsset {
@@ -561,12 +578,14 @@ export interface JsBeforeAssetTagGenerationData {
561
578
  assets: JsHtmlPluginAssets
562
579
  outputName: string
563
580
  compilationId: number
581
+ uid?: number
564
582
  }
565
583
 
566
584
  export interface JsBeforeEmitData {
567
585
  html: string
568
586
  outputName: string
569
587
  compilationId: number
588
+ uid?: number
570
589
  }
571
590
 
572
591
  export interface JsBeforeResolveArgs {
@@ -1358,6 +1377,7 @@ export interface JsStatsSize {
1358
1377
 
1359
1378
  export interface JsStatsWarning {
1360
1379
  moduleDescriptor?: JsModuleDescriptor
1380
+ name?: string
1361
1381
  message: string
1362
1382
  chunkName?: string
1363
1383
  chunkEntry?: boolean
@@ -1449,10 +1469,12 @@ export interface RawAssetGeneratorOptions {
1449
1469
  publicPath?: "auto" | JsFilename
1450
1470
  dataUrl?: RawAssetGeneratorDataUrlOptions | ((source: Buffer, context: RawAssetGeneratorDataUrlFnCtx) => string)
1451
1471
  importMode?: "url" | "preserve"
1472
+ binary?: boolean
1452
1473
  }
1453
1474
 
1454
1475
  export interface RawAssetInlineGeneratorOptions {
1455
1476
  dataUrl?: RawAssetGeneratorDataUrlOptions | ((source: Buffer, context: RawAssetGeneratorDataUrlFnCtx) => string)
1477
+ binary?: boolean
1456
1478
  }
1457
1479
 
1458
1480
  export interface RawAssetParserDataUrl {
@@ -1474,6 +1496,7 @@ export interface RawAssetResourceGeneratorOptions {
1474
1496
  outputPath?: JsFilename
1475
1497
  publicPath?: "auto" | JsFilename
1476
1498
  importMode?: "url" | "preserve"
1499
+ binary?: boolean
1477
1500
  }
1478
1501
 
1479
1502
  export interface RawBannerPluginOptions {
@@ -1616,6 +1639,7 @@ export interface RawCssAutoGeneratorOptions {
1616
1639
 
1617
1640
  export interface RawCssAutoParserOptions {
1618
1641
  namedExports?: boolean
1642
+ url?: boolean
1619
1643
  }
1620
1644
 
1621
1645
  export interface RawCssExtractPluginOption {
@@ -1644,10 +1668,12 @@ export interface RawCssModuleGeneratorOptions {
1644
1668
 
1645
1669
  export interface RawCssModuleParserOptions {
1646
1670
  namedExports?: boolean
1671
+ url?: boolean
1647
1672
  }
1648
1673
 
1649
1674
  export interface RawCssParserOptions {
1650
1675
  namedExports?: boolean
1676
+ url?: boolean
1651
1677
  }
1652
1678
 
1653
1679
  export interface RawDllEntryPluginOptions {
@@ -1838,6 +1864,7 @@ export interface RawHtmlRspackPluginOptions {
1838
1864
  meta?: Record<string, Record<string, string>>
1839
1865
  hash?: boolean
1840
1866
  base?: RawHtmlRspackPluginBaseOptions
1867
+ uid?: number
1841
1868
  }
1842
1869
 
1843
1870
  export interface RawHttpExternalsRspackPluginOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/binding",
3
- "version": "1.3.8",
3
+ "version": "1.3.10",
4
4
  "license": "MIT",
5
5
  "description": "Node binding for rspack",
6
6
  "main": "binding.js",
@@ -48,15 +48,15 @@
48
48
  }
49
49
  },
50
50
  "optionalDependencies": {
51
- "@rspack/binding-darwin-arm64": "1.3.8",
52
- "@rspack/binding-win32-arm64-msvc": "1.3.8",
53
- "@rspack/binding-linux-arm64-gnu": "1.3.8",
54
- "@rspack/binding-linux-arm64-musl": "1.3.8",
55
- "@rspack/binding-darwin-x64": "1.3.8",
56
- "@rspack/binding-win32-x64-msvc": "1.3.8",
57
- "@rspack/binding-win32-ia32-msvc": "1.3.8",
58
- "@rspack/binding-linux-x64-gnu": "1.3.8",
59
- "@rspack/binding-linux-x64-musl": "1.3.8"
51
+ "@rspack/binding-darwin-arm64": "1.3.10",
52
+ "@rspack/binding-win32-arm64-msvc": "1.3.10",
53
+ "@rspack/binding-linux-arm64-gnu": "1.3.10",
54
+ "@rspack/binding-win32-ia32-msvc": "1.3.10",
55
+ "@rspack/binding-darwin-x64": "1.3.10",
56
+ "@rspack/binding-win32-x64-msvc": "1.3.10",
57
+ "@rspack/binding-linux-arm64-musl": "1.3.10",
58
+ "@rspack/binding-linux-x64-gnu": "1.3.10",
59
+ "@rspack/binding-linux-x64-musl": "1.3.10"
60
60
  },
61
61
  "scripts": {
62
62
  "build:dev": "node scripts/build.js",