@parcel/rust 2.12.1-nightly.3142 → 2.13.1-canary.3372
Sign up to get free protection for your applications and to get access to all the features.
- package/browser.js +0 -2
- package/index.d.ts +12 -13
- package/index.js +25 -10
- package/index.js.flow +15 -9
- package/package.json +5 -4
- 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/browser.js
CHANGED
package/index.d.ts
CHANGED
@@ -7,17 +7,16 @@ export interface JsMacroError {
|
|
7
7
|
kind: number
|
8
8
|
message: string
|
9
9
|
}
|
10
|
-
export function findAncestorFile(filenames: Array<string>, from: string, root: string): string | null
|
11
|
-
export function findFirstFile(names: Array<string>): string | null
|
12
|
-
export function findNodeModule(module: string, from: string): string | null
|
13
|
-
export function hashString(s: string): string
|
14
|
-
export function hashBuffer(buf: Buffer): string
|
15
|
-
export function optimizeImage(kind: string, buf: Buffer): Buffer
|
10
|
+
export declare function findAncestorFile(filenames: Array<string>, from: string, root: string): string | null
|
11
|
+
export declare function findFirstFile(names: Array<string>): string | null
|
12
|
+
export declare function findNodeModule(module: string, from: string): string | null
|
13
|
+
export declare function hashString(s: string): string
|
14
|
+
export declare function hashBuffer(buf: Buffer): string
|
15
|
+
export declare function optimizeImage(kind: string, buf: Buffer): Buffer
|
16
16
|
export interface JsFileSystemOptions {
|
17
|
-
canonicalize: (...args: any[]) => any
|
18
17
|
read: (...args: any[]) => any
|
19
|
-
|
20
|
-
|
18
|
+
readLink: (...args: any[]) => any
|
19
|
+
kind: (...args: any[]) => any
|
21
20
|
includeNodeModules?: NapiSideEffectsVariants
|
22
21
|
}
|
23
22
|
export interface FileSystem {
|
@@ -61,15 +60,15 @@ export interface JsInvalidations {
|
|
61
60
|
invalidateOnFileCreate: Array<FilePathCreateInvalidation | FileNameCreateInvalidation | GlobCreateInvalidation>
|
62
61
|
invalidateOnStartup: boolean
|
63
62
|
}
|
64
|
-
export function transform(opts: object): unknown
|
65
|
-
export function transformAsync(opts: object): object
|
66
|
-
export class Hash {
|
63
|
+
export declare function transform(opts: object): unknown
|
64
|
+
export declare function transformAsync(opts: object): object
|
65
|
+
export declare class Hash {
|
67
66
|
constructor()
|
68
67
|
writeString(s: string): void
|
69
68
|
writeBuffer(buf: Buffer): void
|
70
69
|
finish(): string
|
71
70
|
}
|
72
|
-
export class Resolver {
|
71
|
+
export declare class Resolver {
|
73
72
|
constructor(projectRoot: string, options: FileSystem)
|
74
73
|
resolve(options: ResolveOptions): ResolveResult
|
75
74
|
resolveAsync(): object
|
package/index.js
CHANGED
@@ -224,17 +224,32 @@ switch (platform) {
|
|
224
224
|
}
|
225
225
|
break
|
226
226
|
case 'arm':
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
227
|
+
if (isMusl()) {
|
228
|
+
localFileExisted = existsSync(
|
229
|
+
join(__dirname, 'parcel-node-bindings.linux-arm-musleabihf.node')
|
230
|
+
)
|
231
|
+
try {
|
232
|
+
if (localFileExisted) {
|
233
|
+
nativeBinding = require('./parcel-node-bindings.linux-arm-musleabihf.node')
|
234
|
+
} else {
|
235
|
+
nativeBinding = require('@parcel/rust-linux-arm-musleabihf')
|
236
|
+
}
|
237
|
+
} catch (e) {
|
238
|
+
loadError = e
|
239
|
+
}
|
240
|
+
} else {
|
241
|
+
localFileExisted = existsSync(
|
242
|
+
join(__dirname, 'parcel-node-bindings.linux-arm-gnueabihf.node')
|
243
|
+
)
|
244
|
+
try {
|
245
|
+
if (localFileExisted) {
|
246
|
+
nativeBinding = require('./parcel-node-bindings.linux-arm-gnueabihf.node')
|
247
|
+
} else {
|
248
|
+
nativeBinding = require('@parcel/rust-linux-arm-gnueabihf')
|
249
|
+
}
|
250
|
+
} catch (e) {
|
251
|
+
loadError = e
|
235
252
|
}
|
236
|
-
} catch (e) {
|
237
|
-
loadError = e
|
238
253
|
}
|
239
254
|
break
|
240
255
|
case 'riscv64':
|
package/index.js.flow
CHANGED
@@ -3,17 +3,23 @@ import type {FileCreateInvalidation} from '@parcel/types';
|
|
3
3
|
|
4
4
|
declare export var init: void | (() => void);
|
5
5
|
|
6
|
-
declare export function findAncestorFile(
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
declare export function
|
6
|
+
declare export function findAncestorFile(
|
7
|
+
filenames: Array<string>,
|
8
|
+
from: string,
|
9
|
+
root: string,
|
10
|
+
): string | null;
|
11
|
+
declare export function findFirstFile(names: Array<string>): string | null;
|
12
|
+
declare export function findNodeModule(
|
13
|
+
module: string,
|
14
|
+
from: string,
|
15
|
+
): string | null;
|
16
|
+
declare export function hashString(s: string): string;
|
17
|
+
declare export function hashBuffer(buf: Buffer): string;
|
18
|
+
declare export function optimizeImage(kind: string, buf: Buffer): Buffer;
|
12
19
|
export interface JsFileSystemOptions {
|
13
|
-
|
20
|
+
readLink: string => string;
|
14
21
|
read: string => Buffer;
|
15
|
-
|
16
|
-
isDir: string => boolean;
|
22
|
+
kind: string => number;
|
17
23
|
includeNodeModules?: boolean | Array<string> | {|[string]: boolean|};
|
18
24
|
}
|
19
25
|
export interface FileSystem {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@parcel/rust",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.13.1-canary.3372+a53f8f3ba",
|
4
4
|
"license": "MIT",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -19,7 +19,7 @@
|
|
19
19
|
"name": "parcel-node-bindings"
|
20
20
|
},
|
21
21
|
"engines": {
|
22
|
-
"node": ">=
|
22
|
+
"node": ">= 16.0.0"
|
23
23
|
},
|
24
24
|
"files": [
|
25
25
|
"browser.js",
|
@@ -31,13 +31,14 @@
|
|
31
31
|
],
|
32
32
|
"devDependencies": {
|
33
33
|
"@napi-rs/cli": "^2.15.2",
|
34
|
-
"napi-wasm": "^1.
|
34
|
+
"napi-wasm": "^1.1.2"
|
35
35
|
},
|
36
36
|
"scripts": {
|
37
37
|
"build": "napi build --platform --cargo-cwd ../../../crates/node-bindings",
|
38
|
+
"build-canary": "napi build --platform --profile canary --cargo-cwd ../../../crates/node-bindings",
|
38
39
|
"build-release": "napi build --platform --release --cargo-cwd ../../../crates/node-bindings",
|
39
40
|
"wasm:build": "cargo build -p parcel-node-bindings --target wasm32-unknown-unknown && cp ../../../target/wasm32-unknown-unknown/debug/parcel_node_bindings.wasm .",
|
40
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"
|
41
42
|
},
|
42
|
-
"gitHead": "
|
43
|
+
"gitHead": "a53f8f3ba1025c7ea8653e9719e0a61ef9717079"
|
43
44
|
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|