@rspack/binding 0.0.15 → 0.0.17

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 +25 -1
  2. package/package.json +5 -5
package/binding.d.ts CHANGED
@@ -96,7 +96,7 @@ export interface RawBuiltins {
96
96
  decorator?: RawDecoratorOptions
97
97
  }
98
98
  export interface RawCacheOptions {
99
- cacheType: string
99
+ type: string
100
100
  maxGenerations: number
101
101
  maxAge: number
102
102
  profile: boolean
@@ -179,6 +179,27 @@ export interface RawModuleOptions {
179
179
  rules: Array<RawModuleRule>
180
180
  parser?: RawParserOptions
181
181
  }
182
+ export interface JsLoaderContext {
183
+ content: Buffer
184
+ additionalData?: Buffer
185
+ sourceMap?: Buffer
186
+ resource: string
187
+ resourcePath: string
188
+ resourceQuery?: string
189
+ resourceFragment?: string
190
+ cacheable: boolean
191
+ buildDependencies: Array<string>
192
+ }
193
+ export interface JsLoaderResult {
194
+ content: Buffer
195
+ buildDependencies: Array<string>
196
+ sourceMap?: Buffer
197
+ additionalData?: Buffer
198
+ cacheable: boolean
199
+ }
200
+ export interface RawNodeOption {
201
+ dirname?: string
202
+ }
182
203
  export interface RawOptimizationOptions {
183
204
  splitChunks?: RawSplitChunksOptions
184
205
  moduleIds?: string
@@ -247,6 +268,7 @@ export interface RawOptions {
247
268
  snapshot?: RawSnapshotOptions
248
269
  cache?: RawCacheOptions
249
270
  experiments?: RawExperiments
271
+ node?: RawNodeOption
250
272
  }
251
273
  export interface JsAssetInfoRelated {
252
274
  sourceMap?: string
@@ -371,6 +393,8 @@ export class JsCompilation {
371
393
  deleteAsset(filename: string): void
372
394
  get assets(): Record<string, JsCompatSource>
373
395
  get entrypoints(): Record<string, JsChunkGroup>
396
+ get hash(): string
397
+ pushDiagnostic(severity: "error" | "warning", title: string, message: string): void
374
398
  }
375
399
  export class Rspack {
376
400
  constructor(options: RawOptions, jsHooks?: JsHooks | undefined | null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/binding",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "description": "Node binding for rspack",
5
5
  "main": "binding.js",
6
6
  "types": "binding.d.ts",
@@ -20,14 +20,14 @@
20
20
  "npm-run-all": "4.1.5"
21
21
  },
22
22
  "optionalDependencies": {
23
- "@rspack/binding-darwin-arm64": "^0.0.15",
24
- "@rspack/binding-linux-x64-gnu": "^0.0.15",
25
- "@rspack/binding-darwin-x64": "^0.0.15"
23
+ "@rspack/binding-darwin-arm64": "^0.0.17",
24
+ "@rspack/binding-linux-x64-gnu": "^0.0.17",
25
+ "@rspack/binding-darwin-x64": "^0.0.17"
26
26
  },
27
27
  "scripts": {
28
28
  "build:debug": "napi build --platform --js false --dts binding.d.ts --config napirs.rc.json",
29
29
  "build:debug:x64": "napi build --platform --js false --dts binding.d.ts --config napirs.rc.json --target x86_64-apple-darwin",
30
- "build:release:all": "run-p build:release build:release:x64 build:release:linux",
30
+ "build:release:all": "run-p build:release build:release:x64 build:release:linux && pnpm move-binding",
31
31
  "build:release": "napi build --release --platform --js false --dts binding.d.ts --config napirs.rc.json",
32
32
  "build:release:x64": "napi build --release --platform --js false --dts binding.d.ts --config napirs.rc.json --target x86_64-apple-darwin",
33
33
  "build:release:linux": "napi build --release --platform --js false --dts binding.d.ts --config napirs.rc.json --zig --target x86_64-unknown-linux-gnu --zig-abi-suffix=2.17",