@parcel/rust
Advanced tools
Comparing version 2.12.1-nightly.3142 to 2.13.0
@@ -1,3 +0,1 @@ | ||
/* global WebAssembly, crypto */ | ||
const {Environment, napi} = require('napi-wasm'); | ||
@@ -4,0 +2,0 @@ |
@@ -10,13 +10,12 @@ /* tslint:disable */ | ||
} | ||
export function findAncestorFile(filenames: Array<string>, from: string, root: string): string | null | ||
export function findFirstFile(names: Array<string>): string | null | ||
export function findNodeModule(module: string, from: string): string | null | ||
export function hashString(s: string): string | ||
export function hashBuffer(buf: Buffer): string | ||
export function optimizeImage(kind: string, buf: Buffer): Buffer | ||
export declare function findAncestorFile(filenames: Array<string>, from: string, root: string): string | null | ||
export declare function findFirstFile(names: Array<string>): string | null | ||
export declare function findNodeModule(module: string, from: string): string | null | ||
export declare function hashString(s: string): string | ||
export declare function hashBuffer(buf: Buffer): string | ||
export declare function optimizeImage(kind: string, buf: Buffer): Buffer | ||
export interface JsFileSystemOptions { | ||
canonicalize: (...args: any[]) => any | ||
read: (...args: any[]) => any | ||
isFile: (...args: any[]) => any | ||
isDir: (...args: any[]) => any | ||
readLink: (...args: any[]) => any | ||
kind: (...args: any[]) => any | ||
includeNodeModules?: NapiSideEffectsVariants | ||
@@ -65,5 +64,5 @@ } | ||
} | ||
export function transform(opts: object): unknown | ||
export function transformAsync(opts: object): object | ||
export class Hash { | ||
export declare function transform(opts: object): unknown | ||
export declare function transformAsync(opts: object): object | ||
export declare class Hash { | ||
constructor() | ||
@@ -74,3 +73,3 @@ writeString(s: string): void | ||
} | ||
export class Resolver { | ||
export declare class Resolver { | ||
constructor(projectRoot: string, options: FileSystem) | ||
@@ -77,0 +76,0 @@ resolve(options: ResolveOptions): ResolveResult |
35
index.js
@@ -227,13 +227,28 @@ /* tslint:disable */ | ||
case 'arm': | ||
localFileExisted = existsSync( | ||
join(__dirname, 'parcel-node-bindings.linux-arm-gnueabihf.node') | ||
) | ||
try { | ||
if (localFileExisted) { | ||
nativeBinding = require('./parcel-node-bindings.linux-arm-gnueabihf.node') | ||
} else { | ||
nativeBinding = require('@parcel/rust-linux-arm-gnueabihf') | ||
if (isMusl()) { | ||
localFileExisted = existsSync( | ||
join(__dirname, 'parcel-node-bindings.linux-arm-musleabihf.node') | ||
) | ||
try { | ||
if (localFileExisted) { | ||
nativeBinding = require('./parcel-node-bindings.linux-arm-musleabihf.node') | ||
} else { | ||
nativeBinding = require('@parcel/rust-linux-arm-musleabihf') | ||
} | ||
} catch (e) { | ||
loadError = e | ||
} | ||
} catch (e) { | ||
loadError = e | ||
} else { | ||
localFileExisted = existsSync( | ||
join(__dirname, 'parcel-node-bindings.linux-arm-gnueabihf.node') | ||
) | ||
try { | ||
if (localFileExisted) { | ||
nativeBinding = require('./parcel-node-bindings.linux-arm-gnueabihf.node') | ||
} else { | ||
nativeBinding = require('@parcel/rust-linux-arm-gnueabihf') | ||
} | ||
} catch (e) { | ||
loadError = e | ||
} | ||
} | ||
@@ -240,0 +255,0 @@ break |
{ | ||
"name": "@parcel/rust", | ||
"version": "2.12.1-nightly.3142+40c370f09", | ||
"version": "2.13.0", | ||
"license": "MIT", | ||
@@ -22,3 +22,3 @@ "publishConfig": { | ||
"engines": { | ||
"node": ">= 12.0.0" | ||
"node": ">= 16.0.0" | ||
}, | ||
@@ -35,6 +35,7 @@ "files": [ | ||
"@napi-rs/cli": "^2.15.2", | ||
"napi-wasm": "^1.0.1" | ||
"napi-wasm": "^1.1.2" | ||
}, | ||
"scripts": { | ||
"build": "napi build --platform --cargo-cwd ../../../crates/node-bindings", | ||
"build-canary": "napi build --platform --profile canary --cargo-cwd ../../../crates/node-bindings", | ||
"build-release": "napi build --platform --release --cargo-cwd ../../../crates/node-bindings", | ||
@@ -44,3 +45,3 @@ "wasm:build": "cargo build -p parcel-node-bindings --target wasm32-unknown-unknown && cp ../../../target/wasm32-unknown-unknown/debug/parcel_node_bindings.wasm .", | ||
}, | ||
"gitHead": "40c370f09a1c4b7eee5a6ad2b1b74fb95a04f389" | ||
"gitHead": "a53f8f3ba1025c7ea8653e9719e0a61ef9717079" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
226657103
438
1
10