mirror of
https://github.com/loro-dev/loro.git
synced 2024-11-24 04:09:42 +00:00
fix: upgrade wasm-bindgen to fix str free err (#353)
* fix: upgrade wasm-bindgen to fix str free err * chore: fix ci
This commit is contained in:
parent
7e20c17f00
commit
0660b1a1be
9 changed files with 22 additions and 16 deletions
2
.github/workflows/release_wasm.yml
vendored
2
.github/workflows/release_wasm.yml
vendored
|
@ -40,7 +40,7 @@ jobs:
|
|||
- run: rustup target add wasm32-unknown-unknown
|
||||
- uses: jetli/wasm-bindgen-action@v0.2.0
|
||||
with:
|
||||
version: "0.2.90"
|
||||
version: "0.2.92"
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Build WASM release-build
|
||||
run: pnpm release-wasm
|
||||
|
|
2
.github/workflows/rust.yml
vendored
2
.github/workflows/rust.yml
vendored
|
@ -38,7 +38,7 @@ jobs:
|
|||
- run: rustup target add wasm32-unknown-unknown
|
||||
- uses: jetli/wasm-bindgen-action@v0.2.0
|
||||
with:
|
||||
version: "0.2.90"
|
||||
version: "0.2.92"
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
3. **Node**: Install from the Node.js website.
|
||||
4. **pnpm**: Run `npm i -g pnpm` for global installation.
|
||||
5. **Rust Target**: Add with `rustup target add wasm32-unknown-unknown`.
|
||||
6. **wasm-bindgen-cli**: Install version 0.2.90 via `cargo install wasm-bindgen-cli --version 0.2.90`.
|
||||
6. **wasm-bindgen-cli**: Install version 0.2.92 via `cargo install wasm-bindgen-cli --version 0.2.92`.
|
||||
6. **wasm-opt**: Install using `cargo install wasm-opt --locked`.
|
||||
7. **wasm-snip**: Install using `cargo install wasm-snip`.
|
||||
8. **cargo-nextest**: Install using `cargo install cargo-nextest --locked`.
|
||||
|
|
20
Cargo.lock
generated
20
Cargo.lock
generated
|
@ -2190,9 +2190,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.90"
|
||||
version = "0.2.92"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406"
|
||||
checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"wasm-bindgen-macro",
|
||||
|
@ -2200,9 +2200,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-backend"
|
||||
version = "0.2.90"
|
||||
version = "0.2.92"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd"
|
||||
checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"log",
|
||||
|
@ -2237,9 +2237,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.90"
|
||||
version = "0.2.92"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999"
|
||||
checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726"
|
||||
dependencies = [
|
||||
"quote 1.0.35",
|
||||
"wasm-bindgen-macro-support",
|
||||
|
@ -2247,9 +2247,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.90"
|
||||
version = "0.2.92"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7"
|
||||
checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.75",
|
||||
"quote 1.0.35",
|
||||
|
@ -2260,9 +2260,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.90"
|
||||
version = "0.2.92"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b"
|
||||
checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"
|
||||
|
||||
[[package]]
|
||||
name = "web-sys"
|
||||
|
|
|
@ -16,7 +16,7 @@ keywords = ["crdt", "local-first"]
|
|||
rle = { path = "../rle", version = "0.5.1", package = "loro-rle" }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
thiserror = "1.0.43"
|
||||
wasm-bindgen = { version = "=0.2.90", optional = true }
|
||||
wasm-bindgen = { version = "=0.2.92", optional = true }
|
||||
fxhash = "0.2.1"
|
||||
enum-as-inner = "0.6.0"
|
||||
string_cache = "0.8"
|
||||
|
|
|
@ -28,7 +28,7 @@ num = "0.4.0"
|
|||
rand = { version = "0.8.5" }
|
||||
arbitrary = { version = "1", optional = true }
|
||||
tabled = { version = "0.10.0", optional = true }
|
||||
wasm-bindgen = { version = "=0.2.90", optional = true }
|
||||
wasm-bindgen = { version = "=0.2.92", optional = true }
|
||||
serde-wasm-bindgen = { version = "0.5.0", optional = true }
|
||||
js-sys = { version = "0.3.60", optional = true }
|
||||
serde_json = { version = "1" }
|
||||
|
|
|
@ -11,7 +11,7 @@ crate-type = ["cdylib", "rlib"]
|
|||
[dependencies]
|
||||
js-sys = "0.3.60"
|
||||
loro-internal = { path = "../loro-internal", features = ["wasm"] }
|
||||
wasm-bindgen = "=0.2.90"
|
||||
wasm-bindgen = "=0.2.92"
|
||||
serde-wasm-bindgen = { version = "0.5.0" }
|
||||
wasm-bindgen-derive = "0.2.1"
|
||||
console_error_panic_hook = { version = "0.1.6", optional = true }
|
||||
|
|
|
@ -280,4 +280,10 @@ describe("richtext", () => {
|
|||
const ans = doc.getCursorPos(pos3!);
|
||||
expect(ans.offset).toBe(3);
|
||||
});
|
||||
|
||||
it("Insert cursed str", () => {
|
||||
const doc = new Loro();
|
||||
const text = doc.getText("text");
|
||||
text.insert(0, `“aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa`);
|
||||
});
|
||||
});
|
||||
|
|
0
loro-js/tests/text.ts
Normal file
0
loro-js/tests/text.ts
Normal file
Loading…
Reference in a new issue