chore: use workspace dependencies (#6964)

This commit is contained in:
Brooooooklyn 2024-05-16 09:49:23 +00:00
parent bf43ba3d6b
commit 6d5d09bb74
No known key found for this signature in database
GPG Key ID: 30B1140CE1C07C99
9 changed files with 73 additions and 90 deletions

View File

@ -1,9 +1,7 @@
exclude = ["node_modules/**/*.toml"] include = ["./*.toml", "./packages/**/*.toml"]
[[rule]] [formatting]
keys = ["dependencies", "*-dependencies"] align_entries = true
column_width = 180
[rule.formatting] reorder_arrays = true
align_entries = true reorder_keys = true
indent_tables = true
reorder_keys = true

14
Cargo.lock generated
View File

@ -1008,19 +1008,17 @@ dependencies = [
[[package]] [[package]]
name = "napi" name = "napi"
version = "2.16.6" version = "3.0.0-alpha.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfc300228808a0e6aea5a58115c82889240bcf8dab16fc25ad675b33e454b368" checksum = "99d38fbf4cbfd7d2785d153f4dcce374d515d3dabd688504dd9093f8135829d0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bitflags 2.5.0", "bitflags 2.5.0",
"chrono", "chrono",
"ctor", "ctor",
"napi-derive",
"napi-sys", "napi-sys",
"once_cell", "once_cell",
"serde", "serde",
"serde_json",
"tokio", "tokio",
] ]
@ -1032,9 +1030,9 @@ checksum = "e1c0f5d67ee408a4685b61f5ab7e58605c8ae3f2b4189f0127d804ff13d5560a"
[[package]] [[package]]
name = "napi-derive" name = "napi-derive"
version = "2.16.4" version = "3.0.0-alpha.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4bb613535cde46cff231e53cd819c1694a32d48946bc2dda6b41174ace52ac08" checksum = "c230c813bfd4d6c7aafead3c075b37f0cf7fecb38be8f4cf5cfcee0b2c273ad0"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"convert_case", "convert_case",
@ -1046,9 +1044,9 @@ dependencies = [
[[package]] [[package]]
name = "napi-derive-backend" name = "napi-derive-backend"
version = "1.0.66" version = "2.0.0-alpha.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da041b19246ab4240998774e987fd9a7d92cc7406b91b5eddb6691e81feac044" checksum = "4370cc24c2e58d0f3393527b282eb00f1158b304248f549e1ec81bd2927db5fe"
dependencies = [ dependencies = [
"convert_case", "convert_case",
"once_cell", "once_cell",

View File

@ -1,19 +1,34 @@
[workspace] [workspace]
members = ["./packages/backend/native", "./packages/frontend/native", "./packages/frontend/native/schema"]
resolver = "2" resolver = "2"
members = [
"./packages/frontend/native",
"./packages/frontend/native/schema",
"./packages/backend/native",
]
[workspace.dependencies] [workspace.dependencies]
mimalloc = "0.1" anyhow = "1"
chrono = "0.4"
dotenv = "0.15"
file-format = { version = "0.25", features = ["reader"] }
mimalloc = "0.1"
napi = { version = "3.0.0-alpha.1", features = ["async", "chrono_date", "error_anyhow", "napi9", "serde"] }
napi-build = { version = "2" }
napi-derive = { version = "3.0.0-alpha.1" }
notify = { version = "6", features = ["serde"] }
once_cell = "1"
parking_lot = "0.12"
rand = "0.8"
serde = "1"
serde_json = "1"
sha3 = "0.10"
sqlx = { version = "0.7", default-features = false, features = ["chrono", "macros", "migrate", "runtime-tokio", "sqlite", "tls-rustls"] }
tiktoken-rs = "0.5"
tokio = "1.37"
uuid = "1.8"
y-octo = { git = "https://github.com/y-crdt/y-octo.git", branch = "main" }
[profile.dev.package.sqlx-macros] [profile.dev.package.sqlx-macros]
opt-level = 3 opt-level = 3
[profile.release] [profile.release]
lto = true
codegen-units = 1 codegen-units = 1
opt-level = 3 lto = true
strip = "symbols" opt-level = 3
strip = "symbols"

View File

@ -1,23 +1,20 @@
[package] [package]
name = "affine_server_native"
version = "1.0.0"
edition = "2021" edition = "2021"
name = "affine_server_native"
version = "1.0.0"
[lib] [lib]
crate-type = ["cdylib"] crate-type = ["cdylib"]
[dependencies] [dependencies]
chrono = "0.4" chrono = { workspace = true }
file-format = { version = "0.25", features = ["reader"] } file-format = { workspace = true }
napi = { version = "2", default-features = false, features = [ napi = { workspace = true }
"napi6", napi-derive = { workspace = true }
"async", rand = { workspace = true }
] } sha3 = { workspace = true }
napi-derive = { version = "2", features = ["type-def"] } tiktoken-rs = { workspace = true }
rand = "0.8" y-octo = { workspace = true }
sha3 = "0.10"
tiktoken-rs = "0.5.9"
y-octo = { git = "https://github.com/y-crdt/y-octo.git", branch = "main" }
[target.'cfg(not(target_os = "linux"))'.dependencies] [target.'cfg(not(target_os = "linux"))'.dependencies]
mimalloc = { workspace = true } mimalloc = { workspace = true }
@ -29,4 +26,4 @@ mimalloc = { workspace = true, features = ["local_dynamic_tls"] }
tokio = "1" tokio = "1"
[build-dependencies] [build-dependencies]
napi-build = "2" napi-build = { workspace = true }

View File

@ -1,6 +1,6 @@
[package] [package]
edition = "2021" edition = "2021"
name = "affine_native" name = "affine_native"
version = "0.0.0" version = "0.0.0"
[lib] [lib]
@ -8,49 +8,24 @@ crate-type = ["cdylib"]
[dependencies] [dependencies]
affine_schema = { path = "./schema" } affine_schema = { path = "./schema" }
anyhow = "1" anyhow = { workspace = true }
chrono = "0.4" chrono = { workspace = true }
napi = { version = "2", default-features = false, features = [ napi = { workspace = true }
"napi5", napi-derive = { workspace = true }
"tokio_rt", notify = { workspace = true, features = ["serde"] }
"serde-json", once_cell = { workspace = true }
"error_anyhow", parking_lot = { workspace = true }
"chrono_date", rand = { workspace = true }
] } serde = { workspace = true }
napi-derive = "2" serde_json = { workspace = true }
notify = { version = "6", features = ["serde"] } sha3 = { workspace = true }
once_cell = "1" sqlx = { workspace = true, default-features = false, features = ["chrono", "macros", "migrate", "runtime-tokio", "sqlite", "tls-rustls"] }
parking_lot = "0.12" tokio = { workspace = true, features = ["full"] }
rand = "0.8" uuid = { workspace = true, features = ["fast-rng", "serde", "v4"] }
serde = "1"
serde_json = "1"
sha3 = "0.10"
sqlx = { version = "0.7.4", default-features = false, features = [
"sqlite",
"migrate",
"runtime-tokio",
"tls-rustls",
"chrono",
"macros",
] }
tokio = { version = "1", features = ["full"] }
uuid = { version = "1", default-features = false, features = [
"serde",
"v4",
"fast-rng",
] }
[build-dependencies] [build-dependencies]
affine_schema = { path = "./schema" } affine_schema = { path = "./schema" }
dotenv = "0.15" dotenv = { workspace = true }
napi-build = "2" napi-build = { workspace = true }
sqlx = { version = "0.7.4", default-features = false, features = [ sqlx = { workspace = true, default-features = false, features = ["chrono", "json", "macros", "migrate", "runtime-tokio", "sqlite", "tls-rustls"] }
"sqlite", tokio = { workspace = true, features = ["full"] }
"runtime-tokio",
"tls-rustls",
"chrono",
"macros",
"migrate",
"json",
] }
tokio = { version = "1", features = ["full"] }

View File

@ -1,4 +1,4 @@
[package] [package]
edition = "2021" edition = "2021"
name = "affine_schema" name = "affine_schema"
version = "0.0.0" version = "0.0.0"

View File

@ -1,10 +1,10 @@
max_width = 100 max_width = 100
hard_tabs = false
tab_spaces = 2 tab_spaces = 2
hard_tabs = false
format_strings = true format_strings = true
wrap_comments = true wrap_comments = true
group_imports = "StdExternalCrate"
imports_granularity = "Crate" imports_granularity = "Crate"
group_imports = "StdExternalCrate"

View File

@ -1,3 +1,3 @@
name = "workers"
main = "./src/index.ts"
compatibility_date = "2023-07-11" compatibility_date = "2023-07-11"
main = "./src/index.ts"
name = "workers"