fix(napi-derive): wrong dependency condition (#1980)

This commit is contained in:
LongYinan 2024-02-25 15:25:42 +08:00 committed by GitHub
parent 8ca1967bd8
commit 117e4ce153
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 6 deletions

View file

@ -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"

View file

@ -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)