@parcel/rust 2.12.1-canary.3288 → 2.12.1-canary.3290

Sign up to get free protection for your applications and to get access to all the features.
package/index.d.ts CHANGED
@@ -50,10 +50,9 @@ export interface ParcelNapiOptions {
50
50
  threads?: number
51
51
  nodeWorkers?: number
52
52
  fs?: object
53
- rpc: (...args: any[]) => any
54
53
  tracingOptions?: ParcelTracingOptions
55
54
  }
56
- export function workerCallback(callback: (...args: any[]) => any): void
55
+ export function registerWorker(worker: object): void
57
56
  export interface JsFileSystemOptions {
58
57
  canonicalize: (...args: any[]) => any
59
58
  read: (...args: any[]) => any
@@ -118,7 +117,6 @@ export class ParcelNapi {
118
117
  testingTempFsReadToString(path: string): Promise<string>
119
118
  testingTempFsIsFile(path: string): Promise<boolean>
120
119
  testingTempFsIsDir(path: string): Promise<boolean>
121
- testingRpcPing(): Promise<void>
122
120
  }
123
121
  export class Resolver {
124
122
  constructor(projectRoot: string, options: FileSystem)
package/index.js CHANGED
@@ -310,7 +310,7 @@ if (!nativeBinding) {
310
310
  throw new Error(`Failed to load native binding`)
311
311
  }
312
312
 
313
- const { initSentry, closeSentry, findAncestorFile, findFirstFile, findNodeModule, hashString, hashBuffer, Hash, optimizeImage, ParcelNapi, workerCallback, Resolver, testingRunParcelJsTransformerPlugin, transform, transformAsync } = nativeBinding
313
+ const { initSentry, closeSentry, findAncestorFile, findFirstFile, findNodeModule, hashString, hashBuffer, Hash, optimizeImage, ParcelNapi, registerWorker, Resolver, testingRunParcelJsTransformerPlugin, transform, transformAsync } = nativeBinding
314
314
 
315
315
  module.exports.initSentry = initSentry
316
316
  module.exports.closeSentry = closeSentry
@@ -322,7 +322,7 @@ module.exports.hashBuffer = hashBuffer
322
322
  module.exports.Hash = Hash
323
323
  module.exports.optimizeImage = optimizeImage
324
324
  module.exports.ParcelNapi = ParcelNapi
325
- module.exports.workerCallback = workerCallback
325
+ module.exports.registerWorker = registerWorker
326
326
  module.exports.Resolver = Resolver
327
327
  module.exports.testingRunParcelJsTransformerPlugin = testingRunParcelJsTransformerPlugin
328
328
  module.exports.transform = transform
package/index.js.flow CHANGED
@@ -16,12 +16,10 @@ export interface ConfigRequest {
16
16
  }
17
17
  export interface RequestOptions {}
18
18
 
19
- export type RpcCallback = (error: any, id: number, data: any, done: (value: {| Ok: any |} | {| Err: any |}) => any) => any | Promise<any>;
20
-
21
19
  export interface ParcelNapiOptions {
22
- fs?: ParcelFileSystem;
20
+ threads?: number;
23
21
  nodeWorkers?: number;
24
- rpc?: RpcCallback;
22
+ fs?: ParcelFileSystem;
25
23
  }
26
24
 
27
25
  declare export class ParcelNapi {
@@ -35,7 +33,7 @@ declare export class ParcelNapi {
35
33
  testingRpcPing(): void;
36
34
  }
37
35
 
38
- declare export function workerCallback(callback: RpcCallback): void
36
+ declare export function registerWorker(worker: any): void
39
37
 
40
38
  declare export function initSentry(): void;
41
39
  declare export function closeSentry(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcel/rust",
3
- "version": "2.12.1-canary.3288+d1e3eeef5",
3
+ "version": "2.12.1-canary.3290+b4fcf7098",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -40,5 +40,5 @@
40
40
  "wasm:build": "cargo build -p parcel-node-bindings --target wasm32-unknown-unknown && cp ../../../target/wasm32-unknown-unknown/debug/parcel_node_bindings.wasm .",
41
41
  "wasm:build-release": "CARGO_PROFILE_RELEASE_LTO=true cargo build -p parcel-node-bindings --target wasm32-unknown-unknown --release && wasm-opt --strip-debug -O ../../../target/wasm32-unknown-unknown/release/parcel_node_bindings.wasm -o parcel_node_bindings.wasm"
42
42
  },
43
- "gitHead": "d1e3eeef5073552aceb77ff9bad734044676d0fb"
43
+ "gitHead": "b4fcf70989fab71bcc965bbe41c94a71901c78d9"
44
44
  }