@parcel/rust 2.12.1-canary.3304 → 2.12.1-canary.3306
Sign up to get free protection for your applications and to get access to all the features.
- package/index.d.ts +5 -6
- package/index.js.flow +36 -18
- package/package.json +2 -2
- package/parcel-node-bindings.darwin-arm64.node +0 -0
- package/parcel-node-bindings.darwin-x64.node +0 -0
- package/parcel-node-bindings.linux-arm-gnueabihf.node +0 -0
- package/parcel-node-bindings.linux-arm64-gnu.node +0 -0
- package/parcel-node-bindings.linux-arm64-musl.node +0 -0
- package/parcel-node-bindings.linux-x64-gnu.node +0 -0
- package/parcel-node-bindings.linux-x64-musl.node +0 -0
- package/parcel-node-bindings.win32-x64-msvc.node +0 -0
package/index.d.ts
CHANGED
@@ -47,9 +47,11 @@ export interface ParcelNapiBuildResult {
|
|
47
47
|
|
48
48
|
}
|
49
49
|
export interface ParcelNapiOptions {
|
50
|
-
threads?: number
|
51
|
-
nodeWorkers?: number
|
52
50
|
fs?: object
|
51
|
+
nodeWorkers?: number
|
52
|
+
options: object
|
53
|
+
packageManager?: object
|
54
|
+
threads?: number
|
53
55
|
tracingOptions?: ParcelTracingOptions
|
54
56
|
}
|
55
57
|
export function registerWorker(worker: object): void
|
@@ -112,11 +114,8 @@ export class Hash {
|
|
112
114
|
}
|
113
115
|
export class ParcelNapi {
|
114
116
|
nodeWorkerCount: number
|
115
|
-
constructor(
|
117
|
+
constructor(napiOptions: ParcelNapiOptions)
|
116
118
|
build(options: ParcelNapiBuildOptions): object
|
117
|
-
testingTempFsReadToString(path: string): Promise<string>
|
118
|
-
testingTempFsIsFile(path: string): Promise<boolean>
|
119
|
-
testingTempFsIsDir(path: string): Promise<boolean>
|
120
119
|
}
|
121
120
|
export class Resolver {
|
122
121
|
constructor(projectRoot: string, options: FileSystem)
|
package/index.js.flow
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
// @flow
|
2
|
-
import type {
|
2
|
+
import type {
|
3
|
+
Encoding,
|
4
|
+
FileCreateInvalidation,
|
5
|
+
FilePath,
|
6
|
+
InitialParcelOptions,
|
7
|
+
PackageManager,
|
8
|
+
FileSystem as ParcelFileSystem,
|
9
|
+
} from '@parcel/types';
|
3
10
|
|
4
11
|
declare export var init: void | (() => void);
|
5
12
|
|
@@ -16,16 +23,37 @@ export interface ConfigRequest {
|
|
16
23
|
}
|
17
24
|
export interface RequestOptions {}
|
18
25
|
|
19
|
-
export interface
|
20
|
-
|
21
|
-
|
22
|
-
|
26
|
+
export interface FileSystem {
|
27
|
+
canonicalize(path: FilePath): FilePath;
|
28
|
+
cwd(): FilePath;
|
29
|
+
isDir(path: FilePath): boolean;
|
30
|
+
isFile(path: FilePath): boolean;
|
31
|
+
readFile(path: FilePath, encoding?: Encoding): string;
|
23
32
|
}
|
24
33
|
|
34
|
+
export type ParcelNapiOptions = {|
|
35
|
+
fs?: FileSystem,
|
36
|
+
nodeWorkers?: number,
|
37
|
+
options: {|
|
38
|
+
corePath?: string,
|
39
|
+
// TODO Use Omit when available in flow >0.210.0
|
40
|
+
...$Diff<
|
41
|
+
InitialParcelOptions,
|
42
|
+
{|
|
43
|
+
inputFS: InitialParcelOptions['inputFS'],
|
44
|
+
outputFS: InitialParcelOptions['outputFS'],
|
45
|
+
packageManager: InitialParcelOptions['packageManager'],
|
46
|
+
|},
|
47
|
+
>,
|
48
|
+
|},
|
49
|
+
packageManager?: PackageManager,
|
50
|
+
threads?: number,
|
51
|
+
|};
|
52
|
+
|
25
53
|
declare export class ParcelNapi {
|
26
|
-
nodeWorkerCount: number
|
54
|
+
nodeWorkerCount: number;
|
27
55
|
constructor(options: ParcelNapiOptions): ParcelNapi;
|
28
|
-
build(
|
56
|
+
build(): Promise<void>;
|
29
57
|
static defaultThreadCount(): number;
|
30
58
|
testingTempFsReadToString(path: string): string;
|
31
59
|
testingTempFsIsDir(path: string): boolean;
|
@@ -33,7 +61,7 @@ declare export class ParcelNapi {
|
|
33
61
|
testingRpcPing(): void;
|
34
62
|
}
|
35
63
|
|
36
|
-
declare export function registerWorker(worker: any): void
|
64
|
+
declare export function registerWorker(worker: any): void;
|
37
65
|
|
38
66
|
declare export function initSentry(): void;
|
39
67
|
declare export function closeSentry(): void;
|
@@ -62,16 +90,6 @@ export interface JsFileSystemOptions {
|
|
62
90
|
isDir: string => boolean;
|
63
91
|
includeNodeModules?: boolean | Array<string> | {|[string]: boolean|};
|
64
92
|
}
|
65
|
-
export interface FileSystem {
|
66
|
-
fs?: JsFileSystemOptions;
|
67
|
-
includeNodeModules?: boolean | Array<string> | {|[string]: boolean|};
|
68
|
-
conditions?: number;
|
69
|
-
moduleDirResolver?: (...args: any[]) => any;
|
70
|
-
mode: number;
|
71
|
-
entries?: number;
|
72
|
-
extensions?: Array<string>;
|
73
|
-
packageExports: boolean;
|
74
|
-
}
|
75
93
|
export interface ResolveOptions {
|
76
94
|
filename: string;
|
77
95
|
specifierType: string;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@parcel/rust",
|
3
|
-
"version": "2.12.1-canary.
|
3
|
+
"version": "2.12.1-canary.3306+3668e97e9",
|
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": "
|
43
|
+
"gitHead": "3668e97e921d5a241659087207ae02c2e8f84d44"
|
44
44
|
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|