Skip to content

Commit d85d35a

Browse files
fengmk2claudeBrooooooklyn
authored
fix(deps): upgrade napi-rs/cli and fix build errors (#1048)
--------- Co-authored-by: Claude Opus 4.5 <[email protected]> Co-authored-by: LongYinan <[email protected]>
1 parent 53f50e8 commit d85d35a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+6177
-4336
lines changed

.github/workflows/ci.yaml

Lines changed: 66 additions & 86 deletions
Large diffs are not rendered by default.

.husky/pre-commit

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
4-
yarn lint-staged && cargo fmt --all
1+
yarn lint-staged && cargo fmt --all

.oxfmtrc.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"arrowParens": "always",
4+
"printWidth": 120,
5+
"semi": false,
6+
"singleQuote": true,
7+
"trailingComma": "all",
8+
"ignorePatterns": [
9+
"target",
10+
"node_modules",
11+
"lib",
12+
".yarn",
13+
"yarn.lock",
14+
"packages/*/*.wasi.cjs",
15+
"packages/*/index.js",
16+
"packages/*/browser.js",
17+
"packages/*/wasi-worker*",
18+
"packages/*/index.d.ts",
19+
"packages/*/binding.js",
20+
"packages/*/binding.d.ts"
21+
]
22+
}

.taplo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ exclude = ["node_modules/**/*.toml"]
33
# https://taplo.tamasfe.dev/configuration/formatter-options.html
44
[formatting]
55
align_entries = true
6-
column_width = 180
6+
column_width = 180
77
indent_tables = true
8-
reorder_keys = true
8+
reorder_keys = true
Lines changed: 191 additions & 191 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ nodeLinker: node-modules
22

33
npmRegistryServer: 'https://registry.npmjs.org/'
44

5-
yarnPath: .yarn/releases/yarn-4.11.0.cjs
5+
yarnPath: .yarn/releases/yarn-4.12.0.cjs

Cargo.toml

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,39 @@
11
[workspace]
2-
members = ["./crates/alloc", "./packages/argon2", "./packages/bcrypt", "./packages/crc32", "./packages/jieba", "./packages/jsonwebtoken", "./packages/xxhash"]
2+
members = [
3+
"./crates/alloc",
4+
"./packages/argon2",
5+
"./packages/bcrypt",
6+
"./packages/crc32",
7+
"./packages/jieba",
8+
"./packages/jsonwebtoken",
9+
"./packages/xxhash",
10+
]
311
resolver = "2"
412

5-
[workspace.dependencies]
6-
argon2 = { version = "0.5", features = ["rand"] }
7-
base64 = { version = "0.22" }
8-
bcrypt = "0.17"
9-
blowfish = { version = "0.9", features = ["bcrypt"] }
10-
crc32c = { version = "0.6" }
11-
crc32fast = { version = "1.4", features = ["nightly"] }
12-
global_alloc = { path = "./crates/alloc" }
13-
indexmap = { version = "2", features = ["serde"] }
14-
jieba-rs = { version = "0.8", default-features = false, features = ["tfidf", "textrank"] }
15-
jsonwebtoken = { version = "9" }
16-
mimalloc = "0.1"
17-
napi = { version = "3.0.0-alpha", default-features = false, features = ["napi3"] }
18-
napi-build = "2"
19-
napi-derive = { version = "3.0.0-alpha", default-features = false, features = ["type-def"] }
20-
once_cell = "1"
21-
quickcheck = "1.0"
22-
rand = "0.9"
23-
rand_core = { version = "0.9", features = ["getrandom"] }
24-
serde = "1.0"
25-
serde_json = "1.0"
26-
xxhash-rust = { version = "0.8", features = ["xxh32", "const_xxh32", "xxh64", "const_xxh64", "xxh3", "const_xxh3"] }
13+
[workspace.dependencies]
14+
argon2 = { version = "=0.6.0-rc.5", default-features = false, features = ["alloc", "getrandom", "zeroize"] }
15+
base64 = { version = "0.22" }
16+
bcrypt = "0.17"
17+
blowfish = { version = "0.9", features = ["bcrypt"] }
18+
crc32c = { version = "0.6" }
19+
crc32fast = { version = "1.4", features = ["nightly"] }
20+
global_alloc = { path = "./crates/alloc" }
21+
indexmap = { version = "2", features = ["serde"] }
22+
jieba-rs = { version = "0.8", default-features = false, features = ["tfidf", "textrank"] }
23+
jsonwebtoken = { version = "10", features = ["rust_crypto"] }
24+
mimalloc-safe = "0.1"
25+
napi = { version = "3.0.0-alpha", default-features = false, features = ["napi3"] }
26+
napi-build = "2"
27+
napi-derive = { version = "3.0.0-alpha", default-features = false, features = ["type-def"] }
28+
once_cell = "1"
29+
quickcheck = "1.0"
30+
rand = "0.9"
31+
rand_core = { version = "0.9", features = ["os_rng"] }
32+
serde = "1.0"
33+
serde_json = "1.0"
34+
xxhash-rust = { version = "0.8", features = ["xxh32", "const_xxh32", "xxh64", "const_xxh64", "xxh3", "const_xxh3"] }
2735
[profile.release]
28-
codegen-units = 1
29-
lto = true
36+
codegen-units = 1
37+
lto = true
3038
overflow-checks = false
31-
strip = 'symbols'
39+
strip = 'symbols'

crates/alloc/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
2-
edition = "2021"
3-
name = "global_alloc"
2+
edition = "2024"
3+
name = "global_alloc"
44
version = "0.1.0"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

8-
[target.'cfg(all(not(target_os = "linux"), not(target_family = "wasm")))'.dependencies]
9-
mimalloc = { workspace = true }
8+
[target.'cfg(all(not(target_os = "linux"), not(target_os = "freebsd"), not(target_family = "wasm")))'.dependencies]
9+
mimalloc-safe = { workspace = true, features = ["skip_collect_on_exit"] }
1010

11-
[target.'cfg(target_os = "linux")'.dependencies]
12-
mimalloc = { workspace = true, features = ["local_dynamic_tls"] }
11+
[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
12+
mimalloc-safe = { workspace = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] }

crates/alloc/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#[cfg(not(target_family = "wasm"))]
22
#[global_allocator]
3-
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
3+
static ALLOC: mimalloc_safe::MiMalloc = mimalloc_safe::MiMalloc;

depracted/deno-lint/Cargo.toml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
[package]
22
authors = ["LongYinan <[email protected]>"]
3-
edition = "2021"
4-
name = "deno-lint"
3+
edition = "2024"
4+
name = "deno-lint"
55
version = "0.1.0"
66

77
[lib]
88
crate-type = ["cdylib"]
99

1010
[dependencies]
1111
annotate-snippets = { version = "0.12" }
12-
anyhow = "1"
13-
deno_ast = "=0.51.0"
14-
deno_lint = "=0.81.0"
15-
env_logger = "0.11"
16-
global_alloc = { path = "../../crates/alloc" }
17-
globwalk = "0.9"
18-
ignore = "0.4"
19-
miette = { version = "7", features = ["fancy-no-backtrace"] }
20-
napi = { version = "2", default-features = false, features = ["napi3"] }
21-
napi-derive = { version = "2" }
22-
serde = "1"
23-
serde_json = "1"
24-
url = "2.5"
12+
anyhow = "1"
13+
deno_ast = "=0.51.0"
14+
deno_lint = "=0.81.0"
15+
env_logger = "0.11"
16+
global_alloc = { path = "../../crates/alloc" }
17+
globwalk = "0.9"
18+
ignore = "0.4"
19+
miette = { version = "7", features = ["fancy-no-backtrace"] }
20+
napi = { version = "2", default-features = false, features = ["napi3"] }
21+
napi-derive = { version = "2" }
22+
serde = "1"
23+
serde_json = "1"
24+
url = "2.5"
2525

2626
[build-dependencies]
2727
napi-build = "2"

0 commit comments

Comments
 (0)