@parcel/rust
Advanced tools
Comparing version 2.12.1-canary.3345 to 2.12.1-canary.3350
100
index.d.ts
@@ -16,40 +16,2 @@ /* tslint:disable */ | ||
export function optimizeImage(kind: string, buf: Buffer): Buffer | ||
export function initializeMonitoring(): void | ||
export function closeMonitoring(): void | ||
export interface ParcelNapiBuildOptions { | ||
registerWorker: (...args: any[]) => any | ||
} | ||
export interface ParcelNapiBuildResult { | ||
} | ||
export interface ParcelNapiOptions { | ||
fs?: object | ||
nodeWorkers?: number | ||
options: object | ||
packageManager?: object | ||
threads?: number | ||
} | ||
/** | ||
* This function is run in the Nodejs worker context upon initialization | ||
* to notify the main thread that a Nodejs worker thread has started | ||
* | ||
* A Rust channel is transferred to the worker via JavaScript `worker.postMessage`. | ||
* The worker then calls `register_worker`, supplying it with an object containing | ||
* callbacks. | ||
* | ||
* The callbacks are later called from the main thread to send work to the worker. | ||
* | ||
* |-------------| --- Init channel ----> |-------------------| | ||
* | Main Thread | | Worker Thread (n) | | ||
* |-------------| <-- Worker wrapper --- |-------------------| | ||
* | ||
* **Later During Build** | ||
* | ||
* -- Resolver.resolve --> | ||
* <- DependencyResult --- | ||
* | ||
* -- Transf.transform --> | ||
* <--- Array<Asset> ----- | ||
*/ | ||
export function registerWorker(channel: JsTransferable, worker: object): void | ||
export interface JsFileSystemOptions { | ||
@@ -103,50 +65,2 @@ canonicalize: (...args: any[]) => any | ||
} | ||
export interface JsFileSystemOptionsOld { | ||
canonicalize: (...args: any[]) => any | ||
read: (...args: any[]) => any | ||
isFile: (...args: any[]) => any | ||
isDir: (...args: any[]) => any | ||
includeNodeModules?: NapiSideEffectsVariants | ||
} | ||
export interface FileSystemOld { | ||
fs?: JsFileSystemOptionsOld | ||
includeNodeModules?: NapiSideEffectsVariants | ||
conditions?: number | ||
moduleDirResolver?: (...args: any[]) => any | ||
mode: number | ||
entries?: number | ||
extensions?: Array<string> | ||
packageExports: boolean | ||
typescript?: boolean | ||
} | ||
export interface ResolveOptionsOld { | ||
filename: string | ||
specifierType: string | ||
parent: string | ||
packageConditions?: Array<string> | ||
} | ||
export interface FilePathCreateInvalidationOld { | ||
filePath: string | ||
} | ||
export interface FileNameCreateInvalidationOld { | ||
fileName: string | ||
aboveFilePath: string | ||
} | ||
export interface GlobCreateInvalidationOld { | ||
glob: string | ||
} | ||
export interface ResolveResultOld { | ||
resolution: unknown | ||
invalidateOnFileChange: Array<string> | ||
invalidateOnFileCreate: Array<FilePathCreateInvalidationOld | FileNameCreateInvalidationOld | GlobCreateInvalidationOld> | ||
query?: string | ||
sideEffects: boolean | ||
error: unknown | ||
moduleType: number | ||
} | ||
export interface JsInvalidationsOld { | ||
invalidateOnFileChange: Array<string> | ||
invalidateOnFileCreate: Array<FilePathCreateInvalidationOld | FileNameCreateInvalidationOld | GlobCreateInvalidationOld> | ||
invalidateOnStartup: boolean | ||
} | ||
export function transform(opts: object): unknown | ||
@@ -160,8 +74,2 @@ export function transformAsync(opts: object): object | ||
} | ||
export class ParcelNapi { | ||
nodeWorkerCount: number | ||
constructor(napiOptions: ParcelNapiOptions) | ||
build(options: ParcelNapiBuildOptions): object | ||
buildAssetGraph(options: ParcelNapiBuildOptions): object | ||
} | ||
export class Resolver { | ||
@@ -175,9 +83,1 @@ constructor(projectRoot: string, options: FileSystem) | ||
} | ||
export class ResolverOld { | ||
constructor(projectRoot: string, options: FileSystemOld) | ||
resolve(options: ResolveOptionsOld): ResolveResultOld | ||
resolveAsync(): object | ||
resolveAsync(options: ResolveOptionsOld): object | ||
getInvalidations(path: string): JsInvalidationsOld | ||
getInvalidations(path: string): JsInvalidationsOld | ||
} |
@@ -313,3 +313,3 @@ /* tslint:disable */ | ||
const { findAncestorFile, findFirstFile, findNodeModule, hashString, hashBuffer, Hash, optimizeImage, initializeMonitoring, closeMonitoring, ParcelNapi, registerWorker, Resolver, ResolverOld, transform, transformAsync } = nativeBinding | ||
const { findAncestorFile, findFirstFile, findNodeModule, hashString, hashBuffer, Hash, optimizeImage, Resolver, transform, transformAsync } = nativeBinding | ||
@@ -323,9 +323,4 @@ module.exports.findAncestorFile = findAncestorFile | ||
module.exports.optimizeImage = optimizeImage | ||
module.exports.initializeMonitoring = initializeMonitoring | ||
module.exports.closeMonitoring = closeMonitoring | ||
module.exports.ParcelNapi = ParcelNapi | ||
module.exports.registerWorker = registerWorker | ||
module.exports.Resolver = Resolver | ||
module.exports.ResolverOld = ResolverOld | ||
module.exports.transform = transform | ||
module.exports.transformAsync = transformAsync |
{ | ||
"name": "@parcel/rust", | ||
"version": "2.12.1-canary.3345+9c95c1b9b", | ||
"version": "2.12.1-canary.3350+5ecb1316c", | ||
"license": "MIT", | ||
@@ -34,7 +34,7 @@ "publishConfig": { | ||
"@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 --features canary --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 +44,3 @@ "wasm:build": "cargo build -p parcel-node-bindings --target wasm32-unknown-unknown && cp ../../../target/wasm32-unknown-unknown/debug/parcel_node_bindings.wasm .", | ||
}, | ||
"gitHead": "9c95c1b9ba961142e8aab79378be988afe3ed624" | ||
"gitHead": "5ecb1316c23d22b89bd3e2fbb44137761cecfc70" | ||
} |
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
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
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
218331657
440