@rspack/binding 1.3.7 → 1.3.8

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 +22 -1
  2. package/package.json +11 -11
package/binding.d.ts CHANGED
@@ -607,6 +607,7 @@ export interface JsChunkAssetArgs {
607
607
  export interface JsChunkGroupOrigin {
608
608
  module?: Module | undefined
609
609
  request?: string
610
+ loc?: string | JsRealDependencyLocation
610
611
  }
611
612
 
612
613
  export interface JsChunkOptionNameCtx {
@@ -623,7 +624,7 @@ export interface JsChunkOptionNameCtx {
623
624
  * - If a string, keep the files under this path
624
625
  */
625
626
  export interface JsCleanOptions {
626
- keep?: string
627
+ keep?: string | RegExp | ((path: string) => boolean)
627
628
  }
628
629
 
629
630
  export interface JsCodegenerationResult {
@@ -883,6 +884,11 @@ export interface JsPathDataChunkLike {
883
884
  id?: string
884
885
  }
885
886
 
887
+ export interface JsRealDependencyLocation {
888
+ start: JsSourcePosition
889
+ end?: JsSourcePosition
890
+ }
891
+
886
892
  export interface JsResolveArgs {
887
893
  request: string
888
894
  context: string
@@ -1106,6 +1112,11 @@ export interface JsRuntimeRequirementInTreeResult {
1106
1112
  allRuntimeRequirements: JsRuntimeGlobals
1107
1113
  }
1108
1114
 
1115
+ export interface JsSourcePosition {
1116
+ line: number
1117
+ column: number
1118
+ }
1119
+
1109
1120
  export interface JsStatsAsset {
1110
1121
  type: string
1111
1122
  name: string
@@ -1398,6 +1409,8 @@ export interface KnownAssetInfo {
1398
1409
  isOverSizeLimit?: boolean
1399
1410
  }
1400
1411
 
1412
+ export declare function minify(source: string, options: string): Promise<TransformOutput>
1413
+
1401
1414
  export interface NodeFsStats {
1402
1415
  isFile: boolean
1403
1416
  isDirectory: boolean
@@ -1847,6 +1860,7 @@ export interface RawIgnorePluginOptions {
1847
1860
  }
1848
1861
 
1849
1862
  export interface RawIncremental {
1863
+ silent: boolean
1850
1864
  make: boolean
1851
1865
  inferAsyncModules: boolean
1852
1866
  providedExports: boolean
@@ -2557,3 +2571,10 @@ export interface ThreadsafeNodeFS {
2557
2571
  readUntil: (fd: number, code: number, position: number) => Promise<Buffer | void>
2558
2572
  readToEnd: (fd: number, position: number) => Promise<Buffer | void>
2559
2573
  }
2574
+
2575
+ export declare function transform(source: string, options: string): Promise<TransformOutput>
2576
+
2577
+ export interface TransformOutput {
2578
+ code: string
2579
+ map?: string
2580
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/binding",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "license": "MIT",
5
5
  "description": "Node binding for rspack",
6
6
  "main": "binding.js",
@@ -20,7 +20,7 @@
20
20
  "@napi-rs/cli": "3.0.0-alpha.78",
21
21
  "@napi-rs/wasm-runtime": "^0.2.9",
22
22
  "emnapi": "^1.4.3",
23
- "typescript": "^5.7.3",
23
+ "typescript": "^5.8.3",
24
24
  "@emnapi/core": "^1.4.3"
25
25
  },
26
26
  "napi": {
@@ -48,15 +48,15 @@
48
48
  }
49
49
  },
50
50
  "optionalDependencies": {
51
- "@rspack/binding-darwin-arm64": "1.3.7",
52
- "@rspack/binding-linux-arm64-gnu": "1.3.7",
53
- "@rspack/binding-win32-arm64-msvc": "1.3.7",
54
- "@rspack/binding-darwin-x64": "1.3.7",
55
- "@rspack/binding-linux-arm64-musl": "1.3.7",
56
- "@rspack/binding-win32-ia32-msvc": "1.3.7",
57
- "@rspack/binding-win32-x64-msvc": "1.3.7",
58
- "@rspack/binding-linux-x64-gnu": "1.3.7",
59
- "@rspack/binding-linux-x64-musl": "1.3.7"
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"
60
60
  },
61
61
  "scripts": {
62
62
  "build:dev": "node scripts/build.js",