From 117e4ce153be3e7e8fe26b6885a4850acf15e253 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Sun, 25 Feb 2024 15:25:42 +0800 Subject: [PATCH] fix(napi-derive): wrong dependency condition (#1980) --- crates/backend/Cargo.toml | 7 ++----- examples/napi/__tests__/worker.cjs | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/backend/Cargo.toml b/crates/backend/Cargo.toml index 5ed26cf3..6f136894 100644 --- a/crates/backend/Cargo.toml +++ b/crates/backend/Cargo.toml @@ -15,10 +15,11 @@ independent = true [features] noop = [] strict = [] -type-def = ["regex", "once_cell", "semver"] +type-def = ["regex", "semver"] [dependencies] convert_case = "0.6" +once_cell = "1" proc-macro2 = "1" quote = "1" syn = { version = "2", features = ["fold", "full", "extra-traits"] } @@ -27,10 +28,6 @@ syn = { version = "2", features = ["fold", "full", "extra-traits"] } optional = true version = "1" -[dependencies.once_cell] -optional = true -version = "1" - [dependencies.semver] optional = true version = "1" diff --git a/examples/napi/__tests__/worker.cjs b/examples/napi/__tests__/worker.cjs index 4c97f3cd..0dbb2451 100644 --- a/examples/napi/__tests__/worker.cjs +++ b/examples/napi/__tests__/worker.cjs @@ -41,7 +41,7 @@ import('../index.js') break case 'constructor': let ellie - for (let i = 0; i < (isWasiTest ? 10 : 10000); i++) { + for (let i = 0; i < (isWasiTest ? 10 : 1000); i++) { ellie = new native.Animal(native.Kind.Cat, 'Ellie') } parentPort.postMessage(ellie.name)