Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 66 additions & 86 deletions .github/workflows/ci.yaml

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged && cargo fmt --all
yarn lint-staged && cargo fmt --all
22 changes: 22 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"arrowParens": "always",
"printWidth": 120,
"semi": false,
"singleQuote": true,
"trailingComma": "all",
"ignorePatterns": [
"target",
"node_modules",
"lib",
".yarn",
"yarn.lock",
"packages/*/*.wasi.cjs",
"packages/*/index.js",
"packages/*/browser.js",
"packages/*/wasi-worker*",
"packages/*/index.d.ts",
"packages/*/binding.js",
"packages/*/binding.d.ts"
]
}
4 changes: 2 additions & 2 deletions .taplo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ exclude = ["node_modules/**/*.toml"]
# https://taplo.tamasfe.dev/configuration/formatter-options.html
[formatting]
align_entries = true
column_width = 180
column_width = 180
indent_tables = true
reorder_keys = true
reorder_keys = true
382 changes: 191 additions & 191 deletions .yarn/releases/yarn-4.11.0.cjs → .yarn/releases/yarn-4.12.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ nodeLinker: node-modules

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

yarnPath: .yarn/releases/yarn-4.11.0.cjs
yarnPath: .yarn/releases/yarn-4.12.0.cjs
60 changes: 34 additions & 26 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
[workspace]
members = ["./crates/alloc", "./packages/argon2", "./packages/bcrypt", "./packages/crc32", "./packages/jieba", "./packages/jsonwebtoken", "./packages/xxhash"]
members = [
"./crates/alloc",
"./packages/argon2",
"./packages/bcrypt",
"./packages/crc32",
"./packages/jieba",
"./packages/jsonwebtoken",
"./packages/xxhash",
]
resolver = "2"

[workspace.dependencies]
argon2 = { version = "0.5", features = ["rand"] }
base64 = { version = "0.22" }
bcrypt = "0.17"
blowfish = { version = "0.9", features = ["bcrypt"] }
crc32c = { version = "0.6" }
crc32fast = { version = "1.4", features = ["nightly"] }
global_alloc = { path = "./crates/alloc" }
indexmap = { version = "2", features = ["serde"] }
jieba-rs = { version = "0.8", default-features = false, features = ["tfidf", "textrank"] }
jsonwebtoken = { version = "9" }
mimalloc = "0.1"
napi = { version = "3.0.0-alpha", default-features = false, features = ["napi3"] }
napi-build = "2"
napi-derive = { version = "3.0.0-alpha", default-features = false, features = ["type-def"] }
once_cell = "1"
quickcheck = "1.0"
rand = "0.9"
rand_core = { version = "0.9", features = ["getrandom"] }
serde = "1.0"
serde_json = "1.0"
xxhash-rust = { version = "0.8", features = ["xxh32", "const_xxh32", "xxh64", "const_xxh64", "xxh3", "const_xxh3"] }
[workspace.dependencies]
argon2 = { version = "=0.6.0-rc.5", default-features = false, features = ["alloc", "getrandom", "zeroize"] }
base64 = { version = "0.22" }
bcrypt = "0.17"
blowfish = { version = "0.9", features = ["bcrypt"] }
crc32c = { version = "0.6" }
crc32fast = { version = "1.4", features = ["nightly"] }
global_alloc = { path = "./crates/alloc" }
indexmap = { version = "2", features = ["serde"] }
jieba-rs = { version = "0.8", default-features = false, features = ["tfidf", "textrank"] }
jsonwebtoken = { version = "10", features = ["rust_crypto"] }
mimalloc-safe = "0.1"
napi = { version = "3.0.0-alpha", default-features = false, features = ["napi3"] }
napi-build = "2"
napi-derive = { version = "3.0.0-alpha", default-features = false, features = ["type-def"] }
once_cell = "1"
quickcheck = "1.0"
rand = "0.9"
rand_core = { version = "0.9", features = ["os_rng"] }
serde = "1.0"
serde_json = "1.0"
xxhash-rust = { version = "0.8", features = ["xxh32", "const_xxh32", "xxh64", "const_xxh64", "xxh3", "const_xxh3"] }
[profile.release]
codegen-units = 1
lto = true
codegen-units = 1
lto = true
overflow-checks = false
strip = 'symbols'
strip = 'symbols'
12 changes: 6 additions & 6 deletions crates/alloc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
edition = "2021"
name = "global_alloc"
edition = "2024"
name = "global_alloc"
version = "0.1.0"

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

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

[target.'cfg(target_os = "linux")'.dependencies]
mimalloc = { workspace = true, features = ["local_dynamic_tls"] }
[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
mimalloc-safe = { workspace = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] }
2 changes: 1 addition & 1 deletion crates/alloc/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#[cfg(not(target_family = "wasm"))]
#[global_allocator]
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
static ALLOC: mimalloc_safe::MiMalloc = mimalloc_safe::MiMalloc;
30 changes: 15 additions & 15 deletions depracted/deno-lint/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
[package]
authors = ["LongYinan <[email protected]>"]
edition = "2021"
name = "deno-lint"
edition = "2024"
name = "deno-lint"
version = "0.1.0"

[lib]
crate-type = ["cdylib"]

[dependencies]
annotate-snippets = { version = "0.12" }
anyhow = "1"
deno_ast = "=0.51.0"
deno_lint = "=0.81.0"
env_logger = "0.11"
global_alloc = { path = "../../crates/alloc" }
globwalk = "0.9"
ignore = "0.4"
miette = { version = "7", features = ["fancy-no-backtrace"] }
napi = { version = "2", default-features = false, features = ["napi3"] }
napi-derive = { version = "2" }
serde = "1"
serde_json = "1"
url = "2.5"
anyhow = "1"
deno_ast = "=0.51.0"
deno_lint = "=0.81.0"
env_logger = "0.11"
global_alloc = { path = "../../crates/alloc" }
globwalk = "0.9"
ignore = "0.4"
miette = { version = "7", features = ["fancy-no-backtrace"] }
napi = { version = "2", default-features = false, features = ["napi3"] }
napi-derive = { version = "2" }
serde = "1"
serde_json = "1"
url = "2.5"

[build-dependencies]
napi-build = "2"
8 changes: 6 additions & 2 deletions depracted/deno-lint/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ class LintCommand extends Command {

private readonly cwd = Option.String({ required: false })

private readonly configPath = Option.String('-c,--config', { required: false })
private readonly configPath = Option.String('-c,--config', {
required: false,
})

private readonly checkOnly = Option.Boolean('--check-only', { required: false })
private readonly checkOnly = Option.Boolean('--check-only', {
required: false,
})

execute() {
const hasError = denolint(this.cwd ?? __dirname, this.configPath ?? '.denolint.json')
Expand Down
46 changes: 23 additions & 23 deletions depracted/deno-lint/npm/android-arm-eabi/package.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
{
"name": "@node-rs/deno-lint-android-arm-eabi",
"version": "1.20.4",
"cpu": [
"arm"
],
"main": "deno-lint.android-arm-eabi.node",
"files": [
"deno-lint.android-arm-eabi.node"
],
"description": "Deno lint binding for Node.js",
"keywords": [
"Deno",
"Lint",
"ESLint",
"node-rs",
"napi",
"Lint",
"N-API",
"Rust",
"napi-rs"
"napi",
"napi-rs",
"node-rs"
],
"author": "LongYinan <[email protected]>",
"homepage": "https://github.com/napi-rs/node-rs",
"license": "MIT",
"engines": {
"node": ">= 10"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
"bugs": {
"url": "https://github.com/napi-rs/node-rs/issues"
},
"license": "MIT",
"author": "LongYinan <[email protected]>",
"repository": {
"type": "git",
"url": "git+https://github.com/napi-rs/node-rs.git"
},
"bugs": {
"url": "https://github.com/napi-rs/node-rs/issues"
},
"files": [
"deno-lint.android-arm-eabi.node"
],
"os": [
"android"
]
],
"cpu": [
"arm"
],
"main": "deno-lint.android-arm-eabi.node",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"engines": {
"node": ">= 10"
}
}
46 changes: 23 additions & 23 deletions depracted/deno-lint/npm/android-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
{
"name": "@node-rs/deno-lint-android-arm64",
"version": "1.20.4",
"cpu": [
"arm64"
],
"main": "deno-lint.android-arm64.node",
"files": [
"deno-lint.android-arm64.node"
],
"description": "Deno lint binding for Node.js",
"keywords": [
"Deno",
"Lint",
"ESLint",
"node-rs",
"napi",
"Lint",
"N-API",
"Rust",
"napi-rs"
"napi",
"napi-rs",
"node-rs"
],
"author": "LongYinan <[email protected]>",
"homepage": "https://github.com/napi-rs/node-rs",
"license": "MIT",
"engines": {
"node": ">= 10"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
"bugs": {
"url": "https://github.com/napi-rs/node-rs/issues"
},
"license": "MIT",
"author": "LongYinan <[email protected]>",
"repository": {
"type": "git",
"url": "git+https://github.com/napi-rs/node-rs.git"
},
"bugs": {
"url": "https://github.com/napi-rs/node-rs/issues"
},
"files": [
"deno-lint.android-arm64.node"
],
"os": [
"android"
]
],
"cpu": [
"arm64"
],
"main": "deno-lint.android-arm64.node",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"engines": {
"node": ">= 10"
}
}
46 changes: 23 additions & 23 deletions depracted/deno-lint/npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
{
"name": "@node-rs/deno-lint-darwin-arm64",
"version": "1.20.4",
"cpu": [
"arm64"
],
"main": "deno-lint.darwin-arm64.node",
"files": [
"deno-lint.darwin-arm64.node"
],
"description": "Deno lint binding for Node.js",
"keywords": [
"Deno",
"Lint",
"ESLint",
"node-rs",
"napi",
"Lint",
"N-API",
"Rust",
"napi-rs"
"napi",
"napi-rs",
"node-rs"
],
"author": "LongYinan <[email protected]>",
"homepage": "https://github.com/napi-rs/node-rs",
"license": "MIT",
"engines": {
"node": ">= 10"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
"bugs": {
"url": "https://github.com/napi-rs/node-rs/issues"
},
"license": "MIT",
"author": "LongYinan <[email protected]>",
"repository": {
"type": "git",
"url": "git+https://github.com/napi-rs/node-rs.git"
},
"bugs": {
"url": "https://github.com/napi-rs/node-rs/issues"
},
"files": [
"deno-lint.darwin-arm64.node"
],
"os": [
"darwin"
]
],
"cpu": [
"arm64"
],
"main": "deno-lint.darwin-arm64.node",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"engines": {
"node": ">= 10"
}
}
Loading