mirror of
https://github.com/loro-dev/loro.git
synced 2024-11-28 01:06:50 +00:00
chore: bump rust crates version
This commit is contained in:
parent
227d1aad2c
commit
a38cf178d1
11 changed files with 228 additions and 95 deletions
164
Cargo.lock
generated
164
Cargo.lock
generated
|
@ -140,7 +140,7 @@ dependencies = [
|
|||
"arbitrary",
|
||||
"enum-as-inner 0.5.1",
|
||||
"flate2",
|
||||
"loro-common 0.16.2",
|
||||
"loro-common 0.16.10",
|
||||
"rand",
|
||||
"serde_json",
|
||||
]
|
||||
|
@ -607,7 +607,7 @@ dependencies = [
|
|||
"criterion 0.4.0",
|
||||
"ctor 0.2.6",
|
||||
"flate2",
|
||||
"loro 0.16.2",
|
||||
"loro 0.16.10",
|
||||
"serde_json",
|
||||
"tabled 0.15.0",
|
||||
"tracing",
|
||||
|
@ -660,8 +660,8 @@ dependencies = [
|
|||
"enum_dispatch",
|
||||
"fxhash",
|
||||
"itertools 0.12.1",
|
||||
"loro 0.16.10",
|
||||
"loro 0.16.2",
|
||||
"loro 0.16.2 (git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761)",
|
||||
"rand",
|
||||
"serde_json",
|
||||
"tabled 0.10.0",
|
||||
|
@ -982,6 +982,19 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "loro"
|
||||
version = "0.16.2"
|
||||
source = "git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761#90470658435ec4c62b5af59ebb82fe9e1f5aa761"
|
||||
dependencies = [
|
||||
"either",
|
||||
"enum-as-inner 0.6.0",
|
||||
"generic-btree",
|
||||
"loro-delta 0.16.2",
|
||||
"loro-internal 0.16.2",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "loro"
|
||||
version = "0.16.10"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"ctor 0.2.6",
|
||||
|
@ -989,34 +1002,37 @@ dependencies = [
|
|||
"either",
|
||||
"enum-as-inner 0.6.0",
|
||||
"generic-btree",
|
||||
"loro-delta 0.16.2",
|
||||
"loro-internal 0.16.2",
|
||||
"loro-delta 0.16.10",
|
||||
"loro-internal 0.16.10",
|
||||
"serde_json",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "loro"
|
||||
version = "0.16.2"
|
||||
source = "git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761#90470658435ec4c62b5af59ebb82fe9e1f5aa761"
|
||||
dependencies = [
|
||||
"either",
|
||||
"enum-as-inner 0.6.0",
|
||||
"generic-btree",
|
||||
"loro-delta 0.16.2 (git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761)",
|
||||
"loro-internal 0.16.2 (git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761)",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "loro-common"
|
||||
version = "0.16.2"
|
||||
source = "git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761#90470658435ec4c62b5af59ebb82fe9e1f5aa761"
|
||||
dependencies = [
|
||||
"arbitrary",
|
||||
"enum-as-inner 0.6.0",
|
||||
"fxhash",
|
||||
"loro-rle 0.16.2",
|
||||
"nonmax",
|
||||
"serde",
|
||||
"serde_columnar",
|
||||
"string_cache",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "loro-common"
|
||||
version = "0.16.10"
|
||||
dependencies = [
|
||||
"arbitrary",
|
||||
"enum-as-inner 0.6.0",
|
||||
"fxhash",
|
||||
"js-sys",
|
||||
"loro-rle 0.16.2",
|
||||
"loro-rle 0.16.10",
|
||||
"nonmax",
|
||||
"serde",
|
||||
"serde_columnar",
|
||||
|
@ -1026,24 +1042,20 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "loro-common"
|
||||
name = "loro-delta"
|
||||
version = "0.16.2"
|
||||
source = "git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761#90470658435ec4c62b5af59ebb82fe9e1f5aa761"
|
||||
dependencies = [
|
||||
"arbitrary",
|
||||
"enum-as-inner 0.6.0",
|
||||
"fxhash",
|
||||
"loro-rle 0.16.2 (git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761)",
|
||||
"nonmax",
|
||||
"serde",
|
||||
"serde_columnar",
|
||||
"string_cache",
|
||||
"thiserror",
|
||||
"arrayvec",
|
||||
"enum-as-inner 0.5.1",
|
||||
"generic-btree",
|
||||
"heapless 0.8.0",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "loro-delta"
|
||||
version = "0.16.2"
|
||||
version = "0.16.10"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"color-backtrace",
|
||||
|
@ -1058,20 +1070,43 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "loro-delta"
|
||||
name = "loro-internal"
|
||||
version = "0.16.2"
|
||||
source = "git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761#90470658435ec4c62b5af59ebb82fe9e1f5aa761"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"append-only-bytes",
|
||||
"arref",
|
||||
"either",
|
||||
"enum-as-inner 0.5.1",
|
||||
"enum_dispatch",
|
||||
"fxhash",
|
||||
"generic-btree",
|
||||
"heapless 0.8.0",
|
||||
"getrandom",
|
||||
"im",
|
||||
"itertools 0.12.1",
|
||||
"leb128",
|
||||
"loro-common 0.16.2",
|
||||
"loro-delta 0.16.2",
|
||||
"loro-rle 0.16.2",
|
||||
"loro_fractional_index 0.16.2",
|
||||
"md5",
|
||||
"num",
|
||||
"num-derive",
|
||||
"num-traits",
|
||||
"once_cell",
|
||||
"postcard",
|
||||
"rand",
|
||||
"serde",
|
||||
"serde_columnar",
|
||||
"serde_json",
|
||||
"smallvec",
|
||||
"thiserror",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "loro-internal"
|
||||
version = "0.16.2"
|
||||
version = "0.16.10"
|
||||
dependencies = [
|
||||
"append-only-bytes",
|
||||
"arbitrary",
|
||||
|
@ -1093,10 +1128,10 @@ dependencies = [
|
|||
"itertools 0.12.1",
|
||||
"js-sys",
|
||||
"leb128",
|
||||
"loro-common 0.16.2",
|
||||
"loro-delta 0.16.2",
|
||||
"loro-rle 0.16.2",
|
||||
"loro_fractional_index 0.16.2",
|
||||
"loro-common 0.16.10",
|
||||
"loro-delta 0.16.10",
|
||||
"loro-rle 0.16.10",
|
||||
"loro_fractional_index 0.16.10",
|
||||
"md5",
|
||||
"miniz_oxide 0.7.1",
|
||||
"num",
|
||||
|
@ -1121,43 +1156,21 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "loro-internal"
|
||||
name = "loro-rle"
|
||||
version = "0.16.2"
|
||||
source = "git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761#90470658435ec4c62b5af59ebb82fe9e1f5aa761"
|
||||
dependencies = [
|
||||
"append-only-bytes",
|
||||
"arref",
|
||||
"either",
|
||||
"enum-as-inner 0.5.1",
|
||||
"enum_dispatch",
|
||||
"enum-as-inner 0.6.0",
|
||||
"fxhash",
|
||||
"generic-btree",
|
||||
"getrandom",
|
||||
"im",
|
||||
"itertools 0.12.1",
|
||||
"leb128",
|
||||
"loro-common 0.16.2 (git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761)",
|
||||
"loro-delta 0.16.2 (git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761)",
|
||||
"loro-rle 0.16.2 (git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761)",
|
||||
"loro_fractional_index 0.16.2 (git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761)",
|
||||
"md5",
|
||||
"num",
|
||||
"num-derive",
|
||||
"num-traits",
|
||||
"once_cell",
|
||||
"postcard",
|
||||
"rand",
|
||||
"serde",
|
||||
"serde_columnar",
|
||||
"serde_json",
|
||||
"smallvec",
|
||||
"thiserror",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "loro-rle"
|
||||
version = "0.16.2"
|
||||
version = "0.16.10"
|
||||
dependencies = [
|
||||
"append-only-bytes",
|
||||
"arref",
|
||||
|
@ -1172,19 +1185,6 @@ dependencies = [
|
|||
"static_assertions",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "loro-rle"
|
||||
version = "0.16.2"
|
||||
source = "git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761#90470658435ec4c62b5af59ebb82fe9e1f5aa761"
|
||||
dependencies = [
|
||||
"append-only-bytes",
|
||||
"arref",
|
||||
"enum-as-inner 0.6.0",
|
||||
"fxhash",
|
||||
"num",
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "loro-thunderdome"
|
||||
version = "0.6.2"
|
||||
|
@ -1198,8 +1198,8 @@ dependencies = [
|
|||
"console_error_panic_hook",
|
||||
"getrandom",
|
||||
"js-sys",
|
||||
"loro-internal 0.16.2",
|
||||
"loro-rle 0.16.2",
|
||||
"loro-internal 0.16.10",
|
||||
"loro-rle 0.16.10",
|
||||
"serde",
|
||||
"serde-wasm-bindgen 0.6.5",
|
||||
"serde_json",
|
||||
|
@ -1212,9 +1212,8 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "loro_fractional_index"
|
||||
version = "0.16.2"
|
||||
source = "git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761#90470658435ec4c62b5af59ebb82fe9e1f5aa761"
|
||||
dependencies = [
|
||||
"criterion 0.5.1",
|
||||
"fractional_index",
|
||||
"imbl",
|
||||
"rand",
|
||||
"serde",
|
||||
|
@ -1223,9 +1222,10 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "loro_fractional_index"
|
||||
version = "0.16.2"
|
||||
source = "git+https://github.com/loro-dev/loro.git?rev=90470658435ec4c62b5af59ebb82fe9e1f5aa761#90470658435ec4c62b5af59ebb82fe9e1f5aa761"
|
||||
version = "0.16.10"
|
||||
dependencies = [
|
||||
"criterion 0.5.1",
|
||||
"fractional_index",
|
||||
"imbl",
|
||||
"rand",
|
||||
"serde",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "loro-delta"
|
||||
version = "0.16.2"
|
||||
version = "0.16.10"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
description = "Loro internal library. It's used as a delta between two versions of text or lists. It's also an efficient Rope."
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "loro_fractional_index"
|
||||
version = "0.16.2"
|
||||
version = "0.16.10"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
description = "Fraction index for Loro. Fork and modified from jamsocket/fractional_index"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "loro-common"
|
||||
version = "0.16.2"
|
||||
version = "0.16.10"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
description = "Common types and functions for Loro. This is an internal lib of Loro."
|
||||
|
@ -14,7 +14,7 @@ keywords = ["crdt", "local-first"]
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
rle = { path = "../rle", version = "0.16.2", package = "loro-rle" }
|
||||
rle = { path = "../rle", version = "0.16.10", package = "loro-rle" }
|
||||
serde = { workspace = true }
|
||||
thiserror = "1.0.43"
|
||||
wasm-bindgen = { version = "=0.2.92", optional = true }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "loro-internal"
|
||||
version = "0.16.2"
|
||||
version = "0.16.10"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
description = "Loro internal library. Do not use it directly as it's not stable."
|
||||
|
@ -15,12 +15,12 @@ keywords = ["crdt", "local-first"]
|
|||
|
||||
[dependencies]
|
||||
smallvec = { workspace = true }
|
||||
loro-delta = { path = "../delta", version = "0.16.2", package = "loro-delta" }
|
||||
rle = { path = "../rle", version = "0.16.2", package = "loro-rle" }
|
||||
loro-common = { path = "../loro-common", version = "0.16.2" }
|
||||
loro-delta = { path = "../delta", version = "0.16.10", package = "loro-delta" }
|
||||
rle = { path = "../rle", version = "0.16.10", package = "loro-rle" }
|
||||
loro-common = { path = "../loro-common", version = "0.16.10" }
|
||||
fractional_index = { path = "../fractional_index", features = [
|
||||
"serde",
|
||||
], version = "0.16.2", package = "loro_fractional_index" }
|
||||
], version = "0.16.10", package = "loro_fractional_index" }
|
||||
postcard = "1"
|
||||
fxhash = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "loro"
|
||||
version = "0.16.2"
|
||||
version = "0.16.10"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
documentation = "https://docs.rs/loro/"
|
||||
|
@ -14,8 +14,8 @@ keywords = ["crdt", "local-first"]
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
loro-internal = { path = "../loro-internal", version = "0.16.2" }
|
||||
delta = { path = "../delta", package = "loro-delta", version = "0.16.2" }
|
||||
loro-internal = { path = "../loro-internal", version = "0.16.10" }
|
||||
delta = { path = "../delta", package = "loro-delta", version = "0.16.10" }
|
||||
generic-btree = { version = "^0.10.5" }
|
||||
enum-as-inner = "0.6.0"
|
||||
either = "1.9.0"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "loro-rle"
|
||||
version = "0.16.2"
|
||||
version = "0.16.10"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
description = "A internal library of loro for storing and manipulating run-length encoded data. Do not use it directly."
|
||||
|
|
3
scripts/.vscode/settings.json
vendored
Normal file
3
scripts/.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"deno.enable": true
|
||||
}
|
86
scripts/bump-rust-crates.ts
Normal file
86
scripts/bump-rust-crates.ts
Normal file
|
@ -0,0 +1,86 @@
|
|||
import { parse as parseToml, stringify as stringifyToml } from "@std/toml";
|
||||
import { walk } from "@std/fs/";
|
||||
|
||||
const CRATES = {
|
||||
"loro": "loro",
|
||||
"loro-internal": "loro-internal",
|
||||
"loro-common": "loro-common",
|
||||
"rle": "loro-rle",
|
||||
"delta": "loro-delta",
|
||||
"fractional_index": "loro_fractional_index",
|
||||
};
|
||||
|
||||
async function updateCargoToml(filePath: string, targetVersion: string) {
|
||||
let content = await Deno.readTextFile(filePath);
|
||||
const crates = Object.values(CRATES);
|
||||
|
||||
// Update package version
|
||||
content = content.replace(
|
||||
/^\s*version\s*=\s*"[^"]*"/m,
|
||||
`version = "${targetVersion}"`,
|
||||
);
|
||||
|
||||
// Update dependencies
|
||||
const depRegex = new RegExp(
|
||||
`^(\\s*)(${
|
||||
crates.join("|")
|
||||
})\\s*=\\s*(?:("\\S+"|\\{[^}]*version\\s*=\\s*)("[^"]*"))`,
|
||||
"gm",
|
||||
);
|
||||
content = content.replace(depRegex, `$1$2 = $3"${targetVersion}"`);
|
||||
|
||||
// Handle package rename cases and path+version cases
|
||||
for (const [oldName, newName] of Object.entries(CRATES)) {
|
||||
const packageRegex = new RegExp(
|
||||
`^(\\s*${oldName}\\s*=\\s*\\{[^}]*(?:package\\s*=\\s*"${newName}")?[^}]*version\\s*=\\s*)("[^"]*")`,
|
||||
"gm",
|
||||
);
|
||||
content = content.replace(
|
||||
packageRegex,
|
||||
`$1"${targetVersion}"`,
|
||||
);
|
||||
}
|
||||
|
||||
// Write updated content back to file
|
||||
await Deno.writeTextFile(filePath, content);
|
||||
console.log(`Updated ${filePath}`);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const targetVersion = Deno.args[0];
|
||||
if (!targetVersion) {
|
||||
console.error("Please provide a target version as an argument.");
|
||||
Deno.exit(1);
|
||||
}
|
||||
|
||||
for (const [key, _] of Object.entries(CRATES)) {
|
||||
const cargoTomlPath = `../crates/${key}/Cargo.toml`;
|
||||
try {
|
||||
await updateCargoToml(cargoTomlPath, targetVersion);
|
||||
} catch (error) {
|
||||
console.error(`Error updating ${cargoTomlPath}:`, error);
|
||||
}
|
||||
}
|
||||
|
||||
const crates = Object.values(CRATES);
|
||||
// Update dependencies in all Cargo.toml files
|
||||
for await (const entry of walk("../crates", { exts: [".toml"] })) {
|
||||
if (entry.name === "Cargo.toml") {
|
||||
if (
|
||||
crates.every((x) => !entry.path.includes("crates/" + x + "/"))
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
await updateCargoToml(entry.path, targetVersion);
|
||||
} catch (error) {
|
||||
console.error(`Error updating ${entry.path}:`, error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (import.meta.main) {
|
||||
main();
|
||||
}
|
6
scripts/deno.json
Normal file
6
scripts/deno.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"imports": {
|
||||
"@std/fs": "jsr:@std/fs@^1.0.2",
|
||||
"@std/toml": "jsr:@std/toml@^1.0.1"
|
||||
}
|
||||
}
|
38
scripts/deno.lock
Normal file
38
scripts/deno.lock
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"version": "3",
|
||||
"packages": {
|
||||
"specifiers": {
|
||||
"jsr:@std/collections@^1.0.5": "jsr:@std/collections@1.0.5",
|
||||
"jsr:@std/fs@^1.0.2": "jsr:@std/fs@1.0.2",
|
||||
"jsr:@std/path@^1.0.3": "jsr:@std/path@1.0.3",
|
||||
"jsr:@std/toml@^1.0.1": "jsr:@std/toml@1.0.1"
|
||||
},
|
||||
"jsr": {
|
||||
"@std/collections@1.0.5": {
|
||||
"integrity": "ab9eac23b57a0c0b89ba45134e61561f69f3d001f37235a248ed40be260c0c10"
|
||||
},
|
||||
"@std/fs@1.0.2": {
|
||||
"integrity": "af57555c7a224a6f147d5cced5404692974f7a628ced8eda67e0d22d92d474ec",
|
||||
"dependencies": [
|
||||
"jsr:@std/path@^1.0.3"
|
||||
]
|
||||
},
|
||||
"@std/path@1.0.3": {
|
||||
"integrity": "cd89d014ce7eb3742f2147b990f6753ee51d95276bfc211bc50c860c1bc7df6f"
|
||||
},
|
||||
"@std/toml@1.0.1": {
|
||||
"integrity": "b55b407159930f338d384b1f8fd317c8e8a35e27ebb8946155f49e3a158d16c4",
|
||||
"dependencies": [
|
||||
"jsr:@std/collections@^1.0.5"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"remote": {},
|
||||
"workspace": {
|
||||
"dependencies": [
|
||||
"jsr:@std/fs@^1.0.2",
|
||||
"jsr:@std/toml@^1.0.1"
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue