@rspack/binding 1.4.7-alpha.0 → 1.4.7

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 +28 -11
  2. package/package.json +15 -15
package/binding.d.ts CHANGED
@@ -441,6 +441,25 @@ export declare class ModuleGraphConnection {
441
441
  get originModule(): Module | null
442
442
  }
443
443
 
444
+ export declare class NativeWatcher {
445
+ constructor(options: NativeWatcherOptions)
446
+ watch(files: [Array<string>, Array<string>], directories: [Array<string>, Array<string>], missing: [Array<string>, Array<string>], callback: (err: Error | null, result: NativeWatchResult) => void, callbackUndelayed: (path: string) => void): void
447
+ /**
448
+ * # Safety
449
+ *
450
+ * This function is unsafe because it uses `&mut self` to call the watcher asynchronously.
451
+ * It's important to ensure that the watcher is not used in any other places before this function is finished.
452
+ * You must ensure that the watcher not call watch, close or pause in the same time, otherwise it may lead to undefined behavior.
453
+ */
454
+ close(): Promise<void>
455
+ pause(): void
456
+ }
457
+
458
+ export declare class NativeWatchResult {
459
+ changedFiles: Array<string>
460
+ removedFiles: Array<string>
461
+ }
462
+
444
463
 
445
464
  export declare class RawExternalItemFnCtx {
446
465
  data(): RawExternalItemFnCtxData
@@ -919,7 +938,7 @@ export interface JsLoaderContext {
919
938
  content: null | Buffer
920
939
  additionalData?: any
921
940
  __internal__parseMeta: Record<string, string>
922
- sourceMap?: SourceMap
941
+ sourceMap?: Buffer
923
942
  cacheable: boolean
924
943
  fileDependencies: Array<string>
925
944
  contextDependencies: Array<string>
@@ -1487,6 +1506,14 @@ export declare function minify(source: string, options: string): Promise<Transfo
1487
1506
 
1488
1507
  export declare function minifySync(source: string, options: string): TransformOutput
1489
1508
 
1509
+ export interface NativeWatcherOptions {
1510
+ followSymlinks?: boolean
1511
+ pollInterval?: number
1512
+ aggregateTimeout?: number
1513
+ /** A function that will be called with the path of a file or directory that is ignored. */
1514
+ ignored?: (path: string) => boolean
1515
+ }
1516
+
1490
1517
  export interface NodeFsStats {
1491
1518
  isFile: boolean
1492
1519
  isDirectory: boolean
@@ -2723,16 +2750,6 @@ export interface RegisterJsTaps {
2723
2750
  registerRsdoctorPluginAssetsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsRsdoctorAssetPatch) => Promise<boolean | undefined>); stage: number; }>
2724
2751
  }
2725
2752
 
2726
- export interface SourceMap {
2727
- file?: string
2728
- sources?: Array<string | undefined | null>
2729
- sourceRoot?: string
2730
- sourcesContent?: Array<string | undefined | null>
2731
- names?: Array<string | undefined | null>
2732
- mappings?: string
2733
- debugId?: string
2734
- }
2735
-
2736
2753
  export interface SourceMapDevToolPluginOptions {
2737
2754
  append?: (false | null) | string | Function
2738
2755
  columns?: boolean
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/binding",
3
- "version": "1.4.7-alpha.0",
3
+ "version": "1.4.7",
4
4
  "license": "MIT",
5
5
  "description": "Node binding for rspack",
6
6
  "main": "binding.js",
@@ -17,11 +17,11 @@
17
17
  "bugs": "https://github.com/web-infra-dev/rspack/issues",
18
18
  "repository": "web-infra-dev/rspack",
19
19
  "devDependencies": {
20
- "@napi-rs/cli": "3.0.0-alpha.88",
21
- "@napi-rs/wasm-runtime": "^0.2.11",
22
- "emnapi": "^1.4.3",
20
+ "@napi-rs/cli": "3.0.0-alpha.95",
21
+ "@napi-rs/wasm-runtime": "^0.2.12",
22
+ "emnapi": "^1.4.4",
23
23
  "typescript": "^5.8.3",
24
- "@emnapi/core": "^1.4.3"
24
+ "@emnapi/core": "^1.4.4"
25
25
  },
26
26
  "napi": {
27
27
  "binaryName": "rspack",
@@ -47,16 +47,16 @@
47
47
  }
48
48
  },
49
49
  "optionalDependencies": {
50
- "@rspack/binding-darwin-arm64": "1.4.7-alpha.0",
51
- "@rspack/binding-linux-arm64-gnu": "1.4.7-alpha.0",
52
- "@rspack/binding-linux-arm64-musl": "1.4.7-alpha.0",
53
- "@rspack/binding-win32-ia32-msvc": "1.4.7-alpha.0",
54
- "@rspack/binding-win32-arm64-msvc": "1.4.7-alpha.0",
55
- "@rspack/binding-wasm32-wasi": "1.4.7-alpha.0",
56
- "@rspack/binding-darwin-x64": "1.4.7-alpha.0",
57
- "@rspack/binding-win32-x64-msvc": "1.4.7-alpha.0",
58
- "@rspack/binding-linux-x64-gnu": "1.4.7-alpha.0",
59
- "@rspack/binding-linux-x64-musl": "1.4.7-alpha.0"
50
+ "@rspack/binding-win32-arm64-msvc": "1.4.7",
51
+ "@rspack/binding-darwin-arm64": "1.4.7",
52
+ "@rspack/binding-linux-arm64-gnu": "1.4.7",
53
+ "@rspack/binding-linux-arm64-musl": "1.4.7",
54
+ "@rspack/binding-win32-ia32-msvc": "1.4.7",
55
+ "@rspack/binding-wasm32-wasi": "1.4.7",
56
+ "@rspack/binding-darwin-x64": "1.4.7",
57
+ "@rspack/binding-win32-x64-msvc": "1.4.7",
58
+ "@rspack/binding-linux-x64-gnu": "1.4.7",
59
+ "@rspack/binding-linux-x64-musl": "1.4.7"
60
60
  },
61
61
  "scripts": {
62
62
  "build:dev": "node scripts/build.js",