@parcel/rust 2.12.1-canary.3200 → 2.12.1-canary.3202
Sign up to get free protection for your applications and to get access to all the features.
- package/index.d.ts +32 -0
- package/index.js +2 -1
- package/index.js.flow +21 -13
- 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
@@ -9,6 +9,38 @@ export interface JsMacroError {
|
|
9
9
|
}
|
10
10
|
export function initSentry(): void
|
11
11
|
export function closeSentry(): void
|
12
|
+
export interface ConfigKeyChange {
|
13
|
+
filePath: ProjectPath
|
14
|
+
configKey: string
|
15
|
+
}
|
16
|
+
export interface InternalFileCreateInvalidation {
|
17
|
+
filePath?: ProjectPath
|
18
|
+
glob?: InternalGlob
|
19
|
+
fileName?: string
|
20
|
+
aboveFilePath?: ProjectPath
|
21
|
+
}
|
22
|
+
export interface ConfigRequest {
|
23
|
+
id: string
|
24
|
+
invalidateOnFileChange: Array<ProjectPath>
|
25
|
+
invalidateOnConfigKeyChange: Array<ConfigKeyChange>
|
26
|
+
invalidateOnFileCreate: Array<InternalFileCreateInvalidation>
|
27
|
+
invalidateOnEnvChange: Array<string>
|
28
|
+
invalidateOnOptionChange: Array<string>
|
29
|
+
invalidateOnStartup: boolean
|
30
|
+
invalidateOnBuild: boolean
|
31
|
+
}
|
32
|
+
export interface RequestOptions {
|
33
|
+
|
34
|
+
}
|
35
|
+
/**
|
36
|
+
* JavaScript API for running a config request.
|
37
|
+
* At the moment the request fields themselves will be copied on call.
|
38
|
+
*
|
39
|
+
* This is not efficient but can be worked around when it becomes an issue.
|
40
|
+
*
|
41
|
+
* This should have exhaustive unit-tests on `packages/core/core/test/requests/ConfigRequest.test.js`.
|
42
|
+
*/
|
43
|
+
export function napiRunConfigRequest(configRequest: ConfigRequest, api: object, options: object): void
|
12
44
|
export function findAncestorFile(filenames: Array<string>, from: string, root: string): string | null
|
13
45
|
export function findFirstFile(names: Array<string>): string | null
|
14
46
|
export function findNodeModule(module: string, from: string): string | null
|
package/index.js
CHANGED
@@ -295,10 +295,11 @@ if (!nativeBinding) {
|
|
295
295
|
throw new Error(`Failed to load native binding`)
|
296
296
|
}
|
297
297
|
|
298
|
-
const { initSentry, closeSentry, findAncestorFile, findFirstFile, findNodeModule, hashString, hashBuffer, Hash, optimizeImage, Resolver, transform, transformAsync } = nativeBinding
|
298
|
+
const { initSentry, closeSentry, napiRunConfigRequest, findAncestorFile, findFirstFile, findNodeModule, hashString, hashBuffer, Hash, optimizeImage, Resolver, transform, transformAsync } = nativeBinding
|
299
299
|
|
300
300
|
module.exports.initSentry = initSentry
|
301
301
|
module.exports.closeSentry = closeSentry
|
302
|
+
module.exports.napiRunConfigRequest = napiRunConfigRequest
|
302
303
|
module.exports.findAncestorFile = findAncestorFile
|
303
304
|
module.exports.findFirstFile = findFirstFile
|
304
305
|
module.exports.findNodeModule = findNodeModule
|
package/index.js.flow
CHANGED
@@ -3,21 +3,29 @@ import type {FileCreateInvalidation} from '@parcel/types';
|
|
3
3
|
|
4
4
|
declare export var init: void | (() => void);
|
5
5
|
|
6
|
+
export type ProjectPath = any;
|
7
|
+
export interface ConfigRequest {
|
8
|
+
id: string,
|
9
|
+
invalidateOnFileChange: Array<ProjectPath>,
|
10
|
+
invalidateOnConfigKeyChange: Array<any>,
|
11
|
+
invalidateOnFileCreate: Array<any>,
|
12
|
+
invalidateOnEnvChange: Array<string>,
|
13
|
+
invalidateOnOptionChange: Array<string>,
|
14
|
+
invalidateOnStartup: boolean,
|
15
|
+
invalidateOnBuild: boolean,
|
16
|
+
}
|
17
|
+
export interface RequestOptions {
|
18
|
+
}
|
19
|
+
|
6
20
|
declare export function initSentry(): void;
|
7
21
|
declare export function closeSentry(): void;
|
8
|
-
declare export function
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
): string
|
13
|
-
declare export function
|
14
|
-
declare export function
|
15
|
-
module: string,
|
16
|
-
from: string,
|
17
|
-
): string | null;
|
18
|
-
declare export function hashString(s: string): string;
|
19
|
-
declare export function hashBuffer(buf: Buffer): string;
|
20
|
-
declare export function optimizeImage(kind: string, buf: Buffer): Buffer;
|
22
|
+
declare export function napiRunConfigRequest(configRequest: ConfigRequest, api: any, options: any): void
|
23
|
+
declare export function findAncestorFile(filenames: Array<string>, from: string, root: string): string | null
|
24
|
+
declare export function findFirstFile(names: Array<string>): string | null
|
25
|
+
declare export function findNodeModule(module: string, from: string): string | null
|
26
|
+
declare export function hashString(s: string): string
|
27
|
+
declare export function hashBuffer(buf: Buffer): string
|
28
|
+
declare export function optimizeImage(kind: string, buf: Buffer): Buffer
|
21
29
|
export interface JsFileSystemOptions {
|
22
30
|
canonicalize: string => string;
|
23
31
|
read: string => Buffer;
|
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.3202+20c4a9bc4",
|
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": "20c4a9bc48d053fed198eba126eee2b7dfe693d2"
|
44
44
|
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|