diff --git a/.changeset/config.json b/.changeset/config.json index 291458ffd..abb48075e 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -3,12 +3,7 @@ "changelog": "@changesets/changelog-git", "commit": false, "fixed": [], - "linked": [ - [ - "loro-wasm", - "loro-crdt" - ] - ], + "linked": [], "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", diff --git a/.changeset/wise-balloons-sniff.md b/.changeset/wise-balloons-sniff.md new file mode 100644 index 000000000..2fd90628a --- /dev/null +++ b/.changeset/wise-balloons-sniff.md @@ -0,0 +1,5 @@ +--- +"loro-crdt": patch +--- + +Merge two js packages diff --git a/crates/loro-wasm/.npmignore b/crates/loro-wasm/.npmignore index 877e36488..d5bf4e580 100644 --- a/crates/loro-wasm/.npmignore +++ b/crates/loro-wasm/.npmignore @@ -11,9 +11,9 @@ src/ wasm-size/ web-test/ pkg/ -web/ scripts/ .cargo/ -CHANGELOG.md Cargo.toml deno.lock +rollup.config.mjs +tsconfig.json diff --git a/crates/loro-wasm/CHANGELOG.md b/crates/loro-wasm/CHANGELOG.md index 703847cad..569adcc0c 100644 --- a/crates/loro-wasm/CHANGELOG.md +++ b/crates/loro-wasm/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## 1.0.8-alpha.3 + +### Patch Changes + +- Fix build for bundler + +## 1.0.8-alpha.2 + +### Patch Changes + +- Fix build script for web target + +## 1.0.8-alpha.1 + +### Patch Changes + +- Include the build for web + +## 1.0.8-alpha.0 + +### Patch Changes + +- Refactor simplify js binding + ## 1.0.7 ### Patch Changes diff --git a/crates/loro-wasm/README.md b/crates/loro-wasm/README.md index 2a6cc838b..6ba43dbab 100644 --- a/crates/loro-wasm/README.md +++ b/crates/loro-wasm/README.md @@ -38,11 +38,11 @@

-https://github.com/loro-dev/loro/assets/18425020/fe246c47-a120-44b3-91d4-1e7232a5b4ac +

+ ✨ Loro 1.0 is out! Read the announcement. +

-Loro is a [CRDTs(Conflict-free Replicated Data Types)](https://crdt.tech/) library that makes building [local-first apps][local-first] easier. It is currently available for JavaScript (via WASM) and Rust developers. - -Explore our vision in our blog: [**✨ Reimagine State Management with CRDTs**](https://loro.dev/blog/loro-now-open-source). +Loro is a [CRDTs(Conflict-free Replicated Data Types)](https://crdt.tech/) library that makes building [local-first apps][local-first] easier. It is currently available for JavaScript (via WASM) and Rust developers. # Features @@ -65,10 +65,13 @@ Explore our vision in our blog: [**✨ Reimagine State Management with CRDTs**]( **Advanced Features in Loro** -- 📖 Preserve Editing History in a [Replayable Event Graph](https://loro.dev/docs/advanced/replayable_event_graph) - ⏱️ Fast [Time Travel](https://loro.dev/docs/tutorial/time_travel) Through History +- 🏛️ [Version Control with Real-Time Collaboration](https://loro.dev/blog/v1.0#version-control) +- 📦 [Shallow Snapshot](https://loro.dev/docs/advanced/shallow_snapshot) that Works like Git Shallow Clone + -https://github.com/loro-dev/loro/assets/18425020/ec2d20a3-3d8c-4483-a601-b200243c9792 +> In this example, we demonstrate importing an entire Loro codebase into a Loro-powered +> version controller, preserving the complete Git DAG history while enabling fast version switching. # Example @@ -76,48 +79,50 @@ https://github.com/loro-dev/loro/assets/18425020/ec2d20a3-3d8c-4483-a601-b200243 ```ts import { expect, test } from 'vitest'; -import { Loro, LoroList } from 'loro-crdt'; - -/** - * Demonstrates synchronization of two documents with two rounds of exchanges. - */ -// Initialize document A -const docA = new Loro(); -const listA: LoroList = docA.getList('list'); -listA.insert(0, 'A'); -listA.insert(1, 'B'); -listA.insert(2, 'C'); - -// Export the state of document A as a byte array -const bytes: Uint8Array = docA.exportFrom(); - -// Simulate sending `bytes` across the network to another peer, B -const docB = new Loro(); -// Peer B imports the updates from A -docB.import(bytes); - -// Verify that B's state matches A's state -expect(docB.toJSON()).toStrictEqual({ - list: ['A', 'B', 'C'], -}); - -// Get the current operation log version of document B -const version = docB.oplogVersion(); - -// Simulate editing at B: delete item 'B' -const listB: LoroList = docB.getList('list'); -listB.delete(1, 1); - -// Export the updates from B since the last synchronization point -const bytesB: Uint8Array = docB.exportFrom(version); - -// Simulate sending `bytesB` back across the network to A -// A imports the updates from B -docA.import(bytesB); - -// Verify that the list at A now matches the list at B after merging -expect(docA.toJSON()).toStrictEqual({ - list: ['A', 'C'], +import { LoroDoc, LoroList } from 'loro-crdt'; + +test('sync example', () => { + /** + * Demonstrates synchronization of two documents with two rounds of exchanges. + */ + // Initialize document A + const docA = new LoroDoc(); + const listA: LoroList = docA.getList('list'); + listA.insert(0, 'A'); + listA.insert(1, 'B'); + listA.insert(2, 'C'); + + // Export the state of document A as a byte array + const bytes: Uint8Array = docA.export({ mode: 'update' }); + + // Simulate sending `bytes` across the network to another peer, B + const docB = new LoroDoc(); + // Peer B imports the updates from A + docB.import(bytes); + + // Verify that B's state matches A's state + expect(docB.toJSON()).toStrictEqual({ + list: ['A', 'B', 'C'], + }); + + // Get the current operation log version of document B + const version = docB.oplogVersion(); + + // Simulate editing at B: delete item 'B' + const listB: LoroList = docB.getList('list'); + listB.delete(1, 1); + + // Export the updates from B since the last synchronization point + const bytesB: Uint8Array = docB.export({ mode: 'update', from: version }); + + // Simulate sending `bytesB` back across the network to A + // A imports the updates from B + docA.import(bytesB); + + // Verify that the list at A now matches the list at B after merging + expect(docA.toJSON()).toStrictEqual({ + list: ['A', 'C'], + }); }); ``` @@ -126,9 +131,9 @@ expect(docA.toJSON()).toStrictEqual({ Loro draws inspiration from the innovative work of the following projects and individuals: - [Ink & Switch](https://inkandswitch.com/): The principles of Local-first Software have greatly influenced this project. The [Peritext](https://www.inkandswitch.com/peritext/) project has also shaped our approach to rich text CRDTs. -- [Diamond-types](https://github.com/josephg/diamond-types): The [Replayable Event Graph (REG)](https://loro.dev/docs/advanced/replayable_event_graph) algorithm from @josephg has been adapted to reduce the computation and space usage of CRDTs. +- [Diamond-types](https://github.com/josephg/diamond-types): The [Event Graph Walker (Eg-walker)](https://loro.dev/docs/advanced/event_graph_walker) algorithm from @josephg has been adapted to reduce the computation and space usage of CRDTs. - [Automerge](https://github.com/automerge/automerge): Their use of columnar encoding for CRDTs has informed our strategies for efficient data encoding. -- [Yjs](https://github.com/yjs/yjs): We have incorporated a similar algorithm for effectively merging collaborative editing operations, thanks to their pioneering works. +- [Yjs](https://github.com/yjs/yjs): We have incorporated a similar algorithm for effectively merging collaborative editing operations, thanks to their pioneering work. - [Matthew Weidner](https://mattweidner.com/): His work on the [Fugue](https://arxiv.org/abs/2305.00583) algorithm has been invaluable, enhancing our text editing capabilities. - [Martin Kleppmann](https://martin.kleppmann.com/): His work on CRDTs has significantly influenced our comprehension of the field. diff --git a/crates/loro-wasm/deno.lock b/crates/loro-wasm/deno.lock index 68ca1b3ed..a572ca8f8 100644 --- a/crates/loro-wasm/deno.lock +++ b/crates/loro-wasm/deno.lock @@ -1,8 +1,9 @@ { - "version": "3", + "version": "4", "redirects": { "https://deno.land/std/archive/mod.ts": "https://deno.land/std@0.224.0/archive/mod.ts", "https://deno.land/std/encoding/base64.ts": "https://deno.land/std@0.224.0/encoding/base64.ts", + "https://deno.land/std/fs/mod.ts": "https://deno.land/std@0.224.0/fs/mod.ts", "https://x.nest.land/std@0.73.0/path/mod.ts": "https://lra6z45nakk5lnu3yjchp7tftsdnwwikwr65ocha5eojfnlgu4sa.arweave.net/XEHs860CldW2m8JEd_5lnIbbWQq0fdcI4OkckrVmpyQ/path/mod.ts" }, "remote": { @@ -100,11 +101,73 @@ "https://deno.land/std@0.224.0/bytes/copy.ts": "08d85062240a7223e6ec4e2af193ad1a50c59a43f0d86ac3a7b16f3e0d77c028", "https://deno.land/std@0.224.0/encoding/_util.ts": "beacef316c1255da9bc8e95afb1fa56ed69baef919c88dc06ae6cb7a6103d376", "https://deno.land/std@0.224.0/encoding/base64.ts": "dd59695391584c8ffc5a296ba82bcdba6dd8a84d41a6a539fbee8e5075286eaf", + "https://deno.land/std@0.224.0/fs/_create_walk_entry.ts": "5d9d2aaec05bcf09a06748b1684224d33eba7a4de24cf4cf5599991ca6b5b412", + "https://deno.land/std@0.224.0/fs/_get_file_info_type.ts": "da7bec18a7661dba360a1db475b826b18977582ce6fc9b25f3d4ee0403fe8cbd", + "https://deno.land/std@0.224.0/fs/_is_same_path.ts": "709c95868345fea051c58b9e96af95cff94e6ae98dfcff2b66dee0c212c4221f", + "https://deno.land/std@0.224.0/fs/_is_subdir.ts": "c68b309d46cc8568ed83c000f608a61bbdba0943b7524e7a30f9e450cf67eecd", + "https://deno.land/std@0.224.0/fs/_to_path_string.ts": "29bfc9c6c112254961d75cbf6ba814d6de5349767818eb93090cecfa9665591e", + "https://deno.land/std@0.224.0/fs/copy.ts": "7ab12a16adb65d155d4943c88081ca16ce3b0b5acada64c1ce93800653678039", + "https://deno.land/std@0.224.0/fs/empty_dir.ts": "e400e96e1d2c8c558a5a1712063bd43939e00619c1d1cc29959babc6f1639418", + "https://deno.land/std@0.224.0/fs/ensure_dir.ts": "51a6279016c65d2985f8803c848e2888e206d1b510686a509fa7cc34ce59d29f", + "https://deno.land/std@0.224.0/fs/ensure_file.ts": "67608cf550529f3d4aa1f8b6b36bf817bdc40b14487bf8f60e61cbf68f507cf3", + "https://deno.land/std@0.224.0/fs/ensure_link.ts": "5c98503ebfa9cc05e2f2efaa30e91e60b4dd5b43ebbda82f435c0a5c6e3ffa01", + "https://deno.land/std@0.224.0/fs/ensure_symlink.ts": "cafe904cebacb9a761977d6dbf5e3af938be946a723bb394080b9a52714fafe4", + "https://deno.land/std@0.224.0/fs/eol.ts": "18c4ac009d0318504c285879eb7f47942643f13619e0ff070a0edc59353306bd", + "https://deno.land/std@0.224.0/fs/exists.ts": "3d38cb7dcbca3cf313be343a7b8af18a87bddb4b5ca1bd2314be12d06533b50f", + "https://deno.land/std@0.224.0/fs/expand_glob.ts": "2e428d90acc6676b2aa7b5c78ef48f30641b13f1fe658e7976c9064fb4b05309", + "https://deno.land/std@0.224.0/fs/mod.ts": "c25e6802cbf27f3050f60b26b00c2d8dba1cb7fcdafe34c66006a7473b7b34d4", + "https://deno.land/std@0.224.0/fs/move.ts": "ca205d848908d7f217353bc5c623627b1333490b8b5d3ef4cab600a700c9bd8f", + "https://deno.land/std@0.224.0/fs/walk.ts": "cddf87d2705c0163bff5d7767291f05b0f46ba10b8b28f227c3849cace08d303", "https://deno.land/std@0.224.0/io/_constants.ts": "3c7ad4695832e6e4a32e35f218c70376b62bc78621ef069a4a0a3d55739f8856", "https://deno.land/std@0.224.0/io/buf_reader.ts": "aa6d589e567c964c8ba1f582648f3feac45e88ab2e3d2cc2c9f84fd73c05d051", "https://deno.land/std@0.224.0/io/buffer.ts": "4d1f805f350433e418002accec798bc6c33ce18f614afa65f987c202d7b2234e", "https://deno.land/std@0.224.0/io/multi_reader.ts": "dd8f06d50adec0e1befb92a1d354fcf28733a4b1669b23bf534ace161ce61b1c", "https://deno.land/std@0.224.0/io/read_all.ts": "876c1cb20adea15349c72afc86cecd3573335845ae778967aefb5e55fe5a8a4a", + "https://deno.land/std@0.224.0/path/_common/assert_path.ts": "dbdd757a465b690b2cc72fc5fb7698c51507dec6bfafce4ca500c46b76ff7bd8", + "https://deno.land/std@0.224.0/path/_common/basename.ts": "569744855bc8445f3a56087fd2aed56bdad39da971a8d92b138c9913aecc5fa2", + "https://deno.land/std@0.224.0/path/_common/constants.ts": "dc5f8057159f4b48cd304eb3027e42f1148cf4df1fb4240774d3492b5d12ac0c", + "https://deno.land/std@0.224.0/path/_common/dirname.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", + "https://deno.land/std@0.224.0/path/_common/from_file_url.ts": "d672bdeebc11bf80e99bf266f886c70963107bdd31134c4e249eef51133ceccf", + "https://deno.land/std@0.224.0/path/_common/glob_to_reg_exp.ts": "6cac16d5c2dc23af7d66348a7ce430e5de4e70b0eede074bdbcf4903f4374d8d", + "https://deno.land/std@0.224.0/path/_common/normalize.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", + "https://deno.land/std@0.224.0/path/_common/normalize_string.ts": "33edef773c2a8e242761f731adeb2bd6d683e9c69e4e3d0092985bede74f4ac3", + "https://deno.land/std@0.224.0/path/_common/strip_trailing_separators.ts": "7024a93447efcdcfeaa9339a98fa63ef9d53de363f1fbe9858970f1bba02655a", + "https://deno.land/std@0.224.0/path/_os.ts": "8fb9b90fb6b753bd8c77cfd8a33c2ff6c5f5bc185f50de8ca4ac6a05710b2c15", + "https://deno.land/std@0.224.0/path/basename.ts": "7ee495c2d1ee516ffff48fb9a93267ba928b5a3486b550be73071bc14f8cc63e", + "https://deno.land/std@0.224.0/path/constants.ts": "0c206169ca104938ede9da48ac952de288f23343304a1c3cb6ec7625e7325f36", + "https://deno.land/std@0.224.0/path/dirname.ts": "85bd955bf31d62c9aafdd7ff561c4b5fb587d11a9a5a45e2b01aedffa4238a7c", + "https://deno.land/std@0.224.0/path/from_file_url.ts": "911833ae4fd10a1c84f6271f36151ab785955849117dc48c6e43b929504ee069", + "https://deno.land/std@0.224.0/path/glob_to_regexp.ts": "7f30f0a21439cadfdae1be1bf370880b415e676097fda584a63ce319053b5972", + "https://deno.land/std@0.224.0/path/is_absolute.ts": "4791afc8bfd0c87f0526eaa616b0d16e7b3ab6a65b62942e50eac68de4ef67d7", + "https://deno.land/std@0.224.0/path/is_glob.ts": "a65f6195d3058c3050ab905705891b412ff942a292bcbaa1a807a74439a14141", + "https://deno.land/std@0.224.0/path/join.ts": "ae2ec5ca44c7e84a235fd532e4a0116bfb1f2368b394db1c4fb75e3c0f26a33a", + "https://deno.land/std@0.224.0/path/join_globs.ts": "5b3bf248b93247194f94fa6947b612ab9d3abd571ca8386cf7789038545e54a0", + "https://deno.land/std@0.224.0/path/normalize.ts": "4155743ccceeed319b350c1e62e931600272fad8ad00c417b91df093867a8352", + "https://deno.land/std@0.224.0/path/posix/_util.ts": "1e3937da30f080bfc99fe45d7ed23c47dd8585c5e473b2d771380d3a6937cf9d", + "https://deno.land/std@0.224.0/path/posix/basename.ts": "d2fa5fbbb1c5a3ab8b9326458a8d4ceac77580961b3739cd5bfd1d3541a3e5f0", + "https://deno.land/std@0.224.0/path/posix/constants.ts": "93481efb98cdffa4c719c22a0182b994e5a6aed3047e1962f6c2c75b7592bef1", + "https://deno.land/std@0.224.0/path/posix/dirname.ts": "76cd348ffe92345711409f88d4d8561d8645353ac215c8e9c80140069bf42f00", + "https://deno.land/std@0.224.0/path/posix/from_file_url.ts": "951aee3a2c46fd0ed488899d024c6352b59154c70552e90885ed0c2ab699bc40", + "https://deno.land/std@0.224.0/path/posix/glob_to_regexp.ts": "76f012fcdb22c04b633f536c0b9644d100861bea36e9da56a94b9c589a742e8f", + "https://deno.land/std@0.224.0/path/posix/is_absolute.ts": "cebe561ad0ae294f0ce0365a1879dcfca8abd872821519b4fcc8d8967f888ede", + "https://deno.land/std@0.224.0/path/posix/join.ts": "7fc2cb3716aa1b863e990baf30b101d768db479e70b7313b4866a088db016f63", + "https://deno.land/std@0.224.0/path/posix/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", + "https://deno.land/std@0.224.0/path/posix/normalize.ts": "baeb49816a8299f90a0237d214cef46f00ba3e95c0d2ceb74205a6a584b58a91", + "https://deno.land/std@0.224.0/path/posix/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", + "https://deno.land/std@0.224.0/path/posix/resolve.ts": "08b699cfeee10cb6857ccab38fa4b2ec703b0ea33e8e69964f29d02a2d5257cf", + "https://deno.land/std@0.224.0/path/resolve.ts": "a6f977bdb4272e79d8d0ed4333e3d71367cc3926acf15ac271f1d059c8494d8d", + "https://deno.land/std@0.224.0/path/windows/_util.ts": "d5f47363e5293fced22c984550d5e70e98e266cc3f31769e1710511803d04808", + "https://deno.land/std@0.224.0/path/windows/basename.ts": "6bbc57bac9df2cec43288c8c5334919418d784243a00bc10de67d392ab36d660", + "https://deno.land/std@0.224.0/path/windows/constants.ts": "5afaac0a1f67b68b0a380a4ef391bf59feb55856aa8c60dfc01bd3b6abb813f5", + "https://deno.land/std@0.224.0/path/windows/dirname.ts": "33e421be5a5558a1346a48e74c330b8e560be7424ed7684ea03c12c21b627bc9", + "https://deno.land/std@0.224.0/path/windows/from_file_url.ts": "ced2d587b6dff18f963f269d745c4a599cf82b0c4007356bd957cb4cb52efc01", + "https://deno.land/std@0.224.0/path/windows/glob_to_regexp.ts": "e45f1f89bf3fc36f94ab7b3b9d0026729829fabc486c77f414caebef3b7304f8", + "https://deno.land/std@0.224.0/path/windows/is_absolute.ts": "4a8f6853f8598cf91a835f41abed42112cebab09478b072e4beb00ec81f8ca8a", + "https://deno.land/std@0.224.0/path/windows/join.ts": "8d03530ab89195185103b7da9dfc6327af13eabdcd44c7c63e42e27808f50ecf", + "https://deno.land/std@0.224.0/path/windows/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", + "https://deno.land/std@0.224.0/path/windows/normalize.ts": "78126170ab917f0ca355a9af9e65ad6bfa5be14d574c5fb09bb1920f52577780", + "https://deno.land/std@0.224.0/path/windows/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", + "https://deno.land/std@0.224.0/path/windows/resolve.ts": "8dae1dadfed9d46ff46cc337c9525c0c7d959fb400a6308f34595c45bdca1972", "https://deno.land/x/compress@v0.4.5/deps.ts": "096395daebc7ed8a18f0484e4ffcc3a7f70e50946735f7df9611a7fcfd8272cc", "https://deno.land/x/compress@v0.4.5/gzip/gzip.ts": "4bf22e9cd3368332928324dd9443ef72cabd05e9234e5a37dd7b3517d50e945e", "https://deno.land/x/compress@v0.4.5/gzip/gzip_file.ts": "b044ec0df4266c084baa033a4ab5394882e44a86d09d5616636467dcb39c671d", @@ -147,8 +210,25 @@ "workspace": { "packageJson": { "dependencies": [ + "npm:@rollup/plugin-alias@^5.1.1", + "npm:@rollup/plugin-node-resolve@^15.0.1", + "npm:@rollup/plugin-typescript@^12.1.1", + "npm:@typescript-eslint/parser@^6.2.0", + "npm:@vitest/ui@^1.0.4", + "npm:esbuild@~0.18.20", + "npm:eslint@^8.46.0", + "npm:loro-crdt@0.16.0", + "npm:loro-crdt@1.0.0-alpha.4", + "npm:prettier@3", + "npm:rollup-plugin-dts@^5.3.0", + "npm:rollup-plugin-esbuild@5", + "npm:rollup@^3.20.1", + "npm:tslib@^2.8.0", + "npm:typescript@^5.6.3", "npm:vite-plugin-top-level-await@^1.2.2", - "npm:vite-plugin-wasm@^3.1.0" + "npm:vite-plugin-wasm@^3.1.0", + "npm:vite@^4.2.1", + "npm:vitest@^1.4.0" ] } } diff --git a/crates/loro-wasm/deno_tests/.vscode/settings.json b/crates/loro-wasm/deno_tests/.vscode/settings.json new file mode 100644 index 000000000..f7f606b33 --- /dev/null +++ b/crates/loro-wasm/deno_tests/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "deno.enable": true +} diff --git a/crates/loro-wasm/deno_tests/basic.test.ts b/crates/loro-wasm/deno_tests/basic.test.ts new file mode 100644 index 000000000..58ea81ef9 --- /dev/null +++ b/crates/loro-wasm/deno_tests/basic.test.ts @@ -0,0 +1,10 @@ +import init, { initSync, LoroDoc } from "../web/loro_wasm.js"; +import { expect } from "npm:expect"; + +await init(); + +Deno.test("basic", () => { + const doc = new LoroDoc(); + doc.getText("text").insert(0, "Hello, world!"); + expect(doc.getText("text").toString()).toBe("Hello, world!"); +}); diff --git a/crates/loro-wasm/deno_tests/deno.json b/crates/loro-wasm/deno_tests/deno.json new file mode 100644 index 000000000..c86cf8693 --- /dev/null +++ b/crates/loro-wasm/deno_tests/deno.json @@ -0,0 +1,3 @@ +{ + "nodeModulesDir": "auto" +} diff --git a/crates/loro-wasm/deno_tests/deno.lock b/crates/loro-wasm/deno_tests/deno.lock new file mode 100644 index 000000000..5c010fee3 --- /dev/null +++ b/crates/loro-wasm/deno_tests/deno.lock @@ -0,0 +1,240 @@ +{ + "version": "4", + "specifiers": { + "npm:expect@*": "29.7.0" + }, + "npm": { + "@babel/code-frame@7.26.0": { + "integrity": "sha512-INCKxTtbXtcNbUZ3YXutwMpEleqttcswhAdee7dhuoVrD2cnuc3PqtERBtxkX5nziX9vnBL8WXmSGwv8CuPV6g==", + "dependencies": [ + "@babel/helper-validator-identifier", + "js-tokens", + "picocolors" + ] + }, + "@babel/helper-validator-identifier@7.25.9": { + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==" + }, + "@jest/expect-utils@29.7.0": { + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dependencies": [ + "jest-get-type" + ] + }, + "@jest/schemas@29.6.3": { + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dependencies": [ + "@sinclair/typebox" + ] + }, + "@jest/types@29.6.3": { + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dependencies": [ + "@jest/schemas", + "@types/istanbul-lib-coverage", + "@types/istanbul-reports", + "@types/node", + "@types/yargs", + "chalk" + ] + }, + "@sinclair/typebox@0.27.8": { + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==" + }, + "@types/istanbul-lib-coverage@2.0.6": { + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==" + }, + "@types/istanbul-lib-report@3.0.3": { + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dependencies": [ + "@types/istanbul-lib-coverage" + ] + }, + "@types/istanbul-reports@3.0.4": { + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dependencies": [ + "@types/istanbul-lib-report" + ] + }, + "@types/node@22.5.4": { + "integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==", + "dependencies": [ + "undici-types" + ] + }, + "@types/stack-utils@2.0.3": { + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==" + }, + "@types/yargs-parser@21.0.3": { + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==" + }, + "@types/yargs@17.0.33": { + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "dependencies": [ + "@types/yargs-parser" + ] + }, + "ansi-styles@4.3.0": { + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": [ + "color-convert" + ] + }, + "ansi-styles@5.2.0": { + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==" + }, + "braces@3.0.3": { + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dependencies": [ + "fill-range" + ] + }, + "chalk@4.1.2": { + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": [ + "ansi-styles@4.3.0", + "supports-color" + ] + }, + "ci-info@3.9.0": { + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==" + }, + "color-convert@2.0.1": { + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": [ + "color-name" + ] + }, + "color-name@1.1.4": { + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "diff-sequences@29.6.3": { + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==" + }, + "escape-string-regexp@2.0.0": { + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==" + }, + "expect@29.7.0": { + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dependencies": [ + "@jest/expect-utils", + "jest-get-type", + "jest-matcher-utils", + "jest-message-util", + "jest-util" + ] + }, + "fill-range@7.1.1": { + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dependencies": [ + "to-regex-range" + ] + }, + "graceful-fs@4.2.11": { + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "has-flag@4.0.0": { + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "is-number@7.0.0": { + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "jest-diff@29.7.0": { + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dependencies": [ + "chalk", + "diff-sequences", + "jest-get-type", + "pretty-format" + ] + }, + "jest-get-type@29.6.3": { + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==" + }, + "jest-matcher-utils@29.7.0": { + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dependencies": [ + "chalk", + "jest-diff", + "jest-get-type", + "pretty-format" + ] + }, + "jest-message-util@29.7.0": { + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dependencies": [ + "@babel/code-frame", + "@jest/types", + "@types/stack-utils", + "chalk", + "graceful-fs", + "micromatch", + "pretty-format", + "slash", + "stack-utils" + ] + }, + "jest-util@29.7.0": { + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dependencies": [ + "@jest/types", + "@types/node", + "chalk", + "ci-info", + "graceful-fs", + "picomatch" + ] + }, + "js-tokens@4.0.0": { + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "micromatch@4.0.8": { + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dependencies": [ + "braces", + "picomatch" + ] + }, + "picocolors@1.1.1": { + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" + }, + "picomatch@2.3.1": { + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + }, + "pretty-format@29.7.0": { + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dependencies": [ + "@jest/schemas", + "ansi-styles@5.2.0", + "react-is" + ] + }, + "react-is@18.3.1": { + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" + }, + "slash@3.0.0": { + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + }, + "stack-utils@2.0.6": { + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dependencies": [ + "escape-string-regexp" + ] + }, + "supports-color@7.2.0": { + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": [ + "has-flag" + ] + }, + "to-regex-range@5.0.1": { + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": [ + "is-number" + ] + }, + "undici-types@6.19.8": { + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + } + } +} diff --git a/crates/loro-wasm/index.ts b/crates/loro-wasm/index.ts new file mode 100644 index 000000000..16392841b --- /dev/null +++ b/crates/loro-wasm/index.ts @@ -0,0 +1,215 @@ +export * from "loro-wasm"; +export type * from "loro-wasm"; +import { + AwarenessWasm, + PeerID, + Container, + ContainerID, + ContainerType, + LoroCounter, + LoroDoc, + LoroList, + LoroMap, + LoroText, + LoroTree, + OpId, + Value, + AwarenessListener, +} from "loro-wasm"; + +/** + * @deprecated Please use LoroDoc + */ +export class Loro extends LoroDoc { } + +const CONTAINER_TYPES = [ + "Map", + "Text", + "List", + "Tree", + "MovableList", + "Counter", +]; + +export function isContainerId(s: string): s is ContainerID { + return s.startsWith("cid:"); +} + +/** Whether the value is a container. + * + * # Example + * + * ```ts + * const doc = new LoroDoc(); + * const map = doc.getMap("map"); + * const list = doc.getList("list"); + * const text = doc.getText("text"); + * isContainer(map); // true + * isContainer(list); // true + * isContainer(text); // true + * isContainer(123); // false + * isContainer("123"); // false + * isContainer({}); // false + * ``` + */ +export function isContainer(value: any): value is Container { + if (typeof value !== "object" || value == null) { + return false; + } + + const p = Object.getPrototypeOf(value); + if (p == null || typeof p !== "object" || typeof p["kind"] !== "function") { + return false; + } + + return CONTAINER_TYPES.includes(value.kind()); +} + + +/** Get the type of a value that may be a container. + * + * # Example + * + * ```ts + * const doc = new LoroDoc(); + * const map = doc.getMap("map"); + * const list = doc.getList("list"); + * const text = doc.getText("text"); + * getType(map); // "Map" + * getType(list); // "List" + * getType(text); // "Text" + * getType(123); // "Json" + * getType("123"); // "Json" + * getType({}); // "Json" + * ``` + */ +export function getType( + value: T, +): T extends LoroText ? "Text" + : T extends LoroMap ? "Map" + : T extends LoroTree ? "Tree" + : T extends LoroList ? "List" + : T extends LoroCounter ? "Counter" + : "Json" { + if (isContainer(value)) { + return value.kind() as unknown as any; + } + + return "Json" as any; +} + + +export function newContainerID(id: OpId, type: ContainerType): ContainerID { + return `cid:${id.counter}@${id.peer}:${type}`; +} + +export function newRootContainerID( + name: string, + type: ContainerType, +): ContainerID { + return `cid:root-${name}:${type}`; +} + + + +/** + * Awareness is a structure that allows to track the ephemeral state of the peers. + * + * If we don't receive a state update from a peer within the timeout, we will remove their state. + * The timeout is in milliseconds. This can be used to handle the off-line state of a peer. + */ +export class Awareness { + inner: AwarenessWasm; + private peer: PeerID; + private timer: number | undefined; + private timeout: number; + private listeners: Set = new Set(); + constructor(peer: PeerID, timeout: number = 30000) { + this.inner = new AwarenessWasm(peer, timeout); + this.peer = peer; + this.timeout = timeout; + } + + apply(bytes: Uint8Array, origin = "remote") { + const { updated, added } = this.inner.apply(bytes); + this.listeners.forEach((listener) => { + listener({ updated, added, removed: [] }, origin); + }); + + this.startTimerIfNotEmpty(); + } + + setLocalState(state: T) { + const wasEmpty = this.inner.getState(this.peer) == null; + this.inner.setLocalState(state); + if (wasEmpty) { + this.listeners.forEach((listener) => { + listener( + { updated: [], added: [this.inner.peer()], removed: [] }, + "local", + ); + }); + } else { + this.listeners.forEach((listener) => { + listener( + { updated: [this.inner.peer()], added: [], removed: [] }, + "local", + ); + }); + } + + this.startTimerIfNotEmpty(); + } + + getLocalState(): T | undefined { + return this.inner.getState(this.peer); + } + + getAllStates(): Record { + return this.inner.getAllStates(); + } + + encode(peers: PeerID[]): Uint8Array { + return this.inner.encode(peers); + } + + encodeAll(): Uint8Array { + return this.inner.encodeAll(); + } + + addListener(listener: AwarenessListener) { + this.listeners.add(listener); + } + + removeListener(listener: AwarenessListener) { + this.listeners.delete(listener); + } + + peers(): PeerID[] { + return this.inner.peers(); + } + + destroy() { + clearInterval(this.timer); + this.listeners.clear(); + } + + private startTimerIfNotEmpty() { + if (this.inner.isEmpty() || this.timer != null) { + return; + } + + this.timer = setInterval(() => { + const removed = this.inner.removeOutdated(); + if (removed.length > 0) { + this.listeners.forEach((listener) => { + listener({ updated: [], added: [], removed }, "timeout"); + }); + } + if (this.inner.isEmpty()) { + clearInterval(this.timer); + this.timer = undefined; + } + }, this.timeout / 2) as unknown as number; + } +} diff --git a/crates/loro-wasm/package-lock.json b/crates/loro-wasm/package-lock.json deleted file mode 100644 index 782eb2048..000000000 --- a/crates/loro-wasm/package-lock.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "loro-wasm", - "version": "0.4.1", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "loro-wasm", - "version": "0.4.1", - "license": "ISC", - "devDependencies": { - "vite-plugin-top-level-await": "^1.2.2", - "vite-plugin-wasm": "^3.1.0" - } - }, - "../../node_modules/.pnpm/vite-plugin-top-level-await@1.3.0_vite@4.5.0/node_modules/vite-plugin-top-level-await": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/plugin-virtual": "^3.0.1", - "@swc/core": "^1.3.10", - "uuid": "^9.0.0" - }, - "devDependencies": { - "@types/jest": "^29.2.0", - "@types/uuid": "^9.0.0", - "cz-conventional-changelog": "^3.3.0", - "esbuild": "^0.15.12", - "jest": "^29.2.1", - "jest-extended": "^3.1.0", - "prettier": "^2.7.1", - "ts-jest": "^29.0.3", - "typescript": "^4.8.4", - "vite": "^3.1.8" - }, - "peerDependencies": { - "vite": ">=2.8" - } - }, - "../../node_modules/.pnpm/vite-plugin-wasm@3.2.2_vite@4.5.0/node_modules/vite-plugin-wasm": { - "version": "3.2.2", - "dev": true, - "license": "MIT", - "devDependencies": { - "@babel/preset-env": "^7.20.2", - "@jest/types": "^28.1.3", - "@jsona/openapi": "^0.2.5", - "@syntect/wasm": "^0.0.4", - "@types/express": "^4.17.13", - "@types/jest": "^28.1.5", - "cross-env": "^7.0.3", - "cz-conventional-changelog": "^3.3.0", - "esbuild": "^0.15.12", - "express": "^4.18.1", - "jest": "^28.1.3", - "jest-extended": "^3.0.1", - "playwright": "^1.23.3", - "prettier": "^2.7.1", - "terser": "^5.14.2", - "ts-jest": "^28.0.7", - "typescript": "^4.7.4", - "vite": "^4.1.4", - "wait-port": "^1.0.4" - }, - "peerDependencies": { - "vite": "^2 || ^3 || ^4" - } - }, - "node_modules/vite-plugin-top-level-await": { - "resolved": "../../node_modules/.pnpm/vite-plugin-top-level-await@1.3.0_vite@4.5.0/node_modules/vite-plugin-top-level-await", - "link": true - }, - "node_modules/vite-plugin-wasm": { - "resolved": "../../node_modules/.pnpm/vite-plugin-wasm@3.2.2_vite@4.5.0/node_modules/vite-plugin-wasm", - "link": true - } - } -} diff --git a/crates/loro-wasm/package.json b/crates/loro-wasm/package.json index 47b12e06f..ae73233d0 100644 --- a/crates/loro-wasm/package.json +++ b/crates/loro-wasm/package.json @@ -1,6 +1,6 @@ { - "name": "loro-wasm", - "version": "1.0.7", + "name": "loro-crdt", + "version": "1.0.8-alpha.3", "description": "Loro CRDTs is a high-performance CRDT framework that makes your app state synchronized, collaborative and maintainable effortlessly.", "keywords": [ "crdt", @@ -14,17 +14,45 @@ "type": "git", "url": "git+https://github.com/loro-dev/loro.git" }, - "main": "nodejs/loro_wasm.js", - "module": "bundler/loro_wasm.js", + "main": "nodejs/index.js", + "module": "bundler/index.js", + "types": "bundler/index.d.ts", + "files": [ + "./bundler", + "./nodejs", + "./web", + "CHANGELOG.md", + "README.md", + "LICENSE", + "package.json" + ], "scripts": { - "release": "deno run -A ./scripts/build.ts release", - "dev": "deno run -A ./scripts/build.ts dev" + "build-dev": "deno run -A ./scripts/build.ts dev && rollup -c && deno run -A ./scripts/post-rollup.ts && npm run test", + "build-release": "deno run -A ./scripts/build.ts release && rollup -c && deno run -A ./scripts/post-rollup.ts && npm run test", + "test": "node --expose-gc ./node_modules/vitest/vitest.mjs run && npx tsc --noEmit && cd ./deno_tests && deno test -A" }, "homepage": "https://loro.dev", "author": "", "license": "MIT", "devDependencies": { + "@rollup/plugin-alias": "^5.1.1", + "@rollup/plugin-node-resolve": "^15.0.1", + "@rollup/plugin-typescript": "^12.1.1", + "rollup": "^3.20.1", + "tslib": "^2.8.0", + "typescript": "^5.6.3", "vite-plugin-top-level-await": "^1.2.2", - "vite-plugin-wasm": "^3.1.0" + "vite-plugin-wasm": "^3.1.0", + "@typescript-eslint/parser": "^6.2.0", + "@vitest/ui": "^1.0.4", + "esbuild": "^0.18.20", + "eslint": "^8.46.0", + "loro-crdt-old": "npm:loro-crdt@=0.16.0", + "loro-crdt-alpha-4": "npm:loro-crdt@=1.0.0-alpha.4", + "prettier": "^3.0.0", + "rollup-plugin-dts": "^5.3.0", + "rollup-plugin-esbuild": "^5.0.0", + "vite": "^4.2.1", + "vitest": "^1.4.0" } } diff --git a/crates/loro-wasm/rollup.config.mjs b/crates/loro-wasm/rollup.config.mjs new file mode 100644 index 000000000..74acff32d --- /dev/null +++ b/crates/loro-wasm/rollup.config.mjs @@ -0,0 +1,38 @@ +import typescript from '@rollup/plugin-typescript'; +import { nodeResolve } from '@rollup/plugin-node-resolve'; +const createConfig = (format, tsTarget, outputDir) => ({ + input: { + 'index': 'index.ts', + }, + output: { + dir: outputDir, + format: format, + sourcemap: true, + entryFileNames: '[name].js', + }, + plugins: [ + typescript({ + tsconfig: 'tsconfig.json', + compilerOptions: { + target: tsTarget, + declaration: true, + outDir: outputDir, + }, + exclude: ['tests/**/*'] + }), + nodeResolve() + ], + external: [/loro_wasm/] +}); + +// Create different bundle configurations +export default [ + // CommonJS for Node.js + createConfig('cjs', 'ES2020', 'nodejs'), + + // ESM for Web + createConfig('es', 'ES2020', 'web'), + + // ESM for bundler + createConfig('es', 'ES2020', 'bundler'), +]; diff --git a/crates/loro-wasm/scripts/build.ts b/crates/loro-wasm/scripts/build.ts index 4bfa77e9d..6153709b6 100644 --- a/crates/loro-wasm/scripts/build.ts +++ b/crates/loro-wasm/scripts/build.ts @@ -12,7 +12,7 @@ if (Deno.args[0] == "release") { profile = "release"; profileDir = "release"; } -const TARGETS = ["bundler", "nodejs"]; +const TARGETS = ["bundler", "nodejs", "web"]; const startTime = performance.now(); const LoroWasmDir = path.resolve(__dirname, ".."); diff --git a/crates/loro-wasm/scripts/post-rollup.ts b/crates/loro-wasm/scripts/post-rollup.ts new file mode 100644 index 000000000..5fbd86636 --- /dev/null +++ b/crates/loro-wasm/scripts/post-rollup.ts @@ -0,0 +1,57 @@ +import { walk } from "https://deno.land/std/fs/mod.ts"; + +const DIRS_TO_SCAN = ["./nodejs", "./bundler", "./web"]; +const FILES_TO_PROCESS = ["index.js", "index.d.ts"]; + +async function replaceInFile(filePath: string) { + try { + let content = await Deno.readTextFile(filePath); + + // Replace various import/require patterns for 'loro-wasm' + const isWebIndexJs = filePath.includes("web") && filePath.endsWith("index.js"); + const target = isWebIndexJs ? "./loro_wasm.js" : "./loro_wasm"; + + content = content.replace( + /from ["']loro-wasm["']/g, + `from "${target}"` + ); + content = content.replace( + /require\(["']loro-wasm["']\)/g, + `require("${target}")` + ); + content = content.replace( + /import\(["']loro-wasm["']\)/g, + `import("${target}")` + ); + + if (isWebIndexJs) { + content = `export { default } from "./loro_wasm.js";\n${content}`; + } + + await Deno.writeTextFile(filePath, content); + console.log(`✓ Processed: ${filePath}`); + } catch (error) { + console.error(`Error processing ${filePath}:`, error); + } +} + +async function main() { + for (const dir of DIRS_TO_SCAN) { + try { + for await (const entry of walk(dir, { + includeDirs: false, + match: [/index\.(js|d\.ts)$/], + })) { + if (FILES_TO_PROCESS.includes(entry.name)) { + await replaceInFile(entry.path); + } + } + } catch (error) { + console.error(`Error scanning directory ${dir}:`, error); + } + } +} + +if (import.meta.main) { + main(); +} diff --git a/crates/loro-wasm/src/lib.rs b/crates/loro-wasm/src/lib.rs index 5e3cae591..f510cfd1f 100644 --- a/crates/loro-wasm/src/lib.rs +++ b/crates/loro-wasm/src/lib.rs @@ -1354,6 +1354,7 @@ impl LoroDoc { /// sub(); /// ``` // TODO: convert event and event sub config + #[wasm_bindgen(skip_typescript)] pub fn subscribe(&self, f: js_sys::Function) -> JsValue { let observer = observer::Observer::new(f); let doc = self.0.clone(); @@ -2060,6 +2061,7 @@ impl LoroText { /// - `doc.checkout(version)` is called. /// /// returns a subscription callback, which can be used to unsubscribe. + #[wasm_bindgen(skip_typescript)] pub fn subscribe(&self, f: js_sys::Function) -> JsResult { let observer = observer::Observer::new(f); let doc = self @@ -2419,6 +2421,7 @@ impl LoroMap { /// map.set("foo", "bar"); /// doc.commit(); /// ``` + #[wasm_bindgen(skip_typescript)] pub fn subscribe(&self, f: js_sys::Function) -> JsResult { let observer = observer::Observer::new(f); let doc = self @@ -2696,6 +2699,7 @@ impl LoroList { /// list.insert(0, 100); /// doc.commit(); /// ``` + #[wasm_bindgen(skip_typescript)] pub fn subscribe(&self, f: js_sys::Function) -> JsResult { let observer = observer::Observer::new(f); let doc = self @@ -3016,6 +3020,7 @@ impl LoroMovableList { /// list.insert(0, 100); /// doc.commit(); /// ``` + #[wasm_bindgen(skip_typescript)] pub fn subscribe(&self, f: js_sys::Function) -> JsResult { let observer = observer::Observer::new(f); let loro = self @@ -3707,6 +3712,7 @@ impl LoroTree { /// const node = root.createNode(); /// doc.commit(); /// ``` + #[wasm_bindgen(skip_typescript)] pub fn subscribe(&self, f: js_sys::Function) -> JsResult { let observer = observer::Observer::new(f); let doc = self @@ -4889,4 +4895,540 @@ export type ImportStatus = { success: Map, pending: Map | null } + +export type Frontiers = OpId[]; + +/** + * Represents a path to identify the exact location of an event's target. + * The path is composed of numbers (e.g., indices of a list container) strings + * (e.g., keys of a map container) and TreeID (the node of a tree container), + * indicating the absolute position of the event's source within a loro document. + */ +export type Path = (number | string | TreeID)[]; + +/** + * A batch of events that created by a single `import`/`transaction`/`checkout`. + * + * @prop by - How the event is triggered. + * @prop origin - (Optional) Provides information about the origin of the event. + * @prop diff - Contains the differential information related to the event. + * @prop target - Identifies the container ID of the event's target. + * @prop path - Specifies the absolute path of the event's emitter, which can be an index of a list container or a key of a map container. + */ +export interface LoroEventBatch { + /** + * How the event is triggered. + * + * - `local`: The event is triggered by a local transaction. + * - `import`: The event is triggered by an import operation. + * - `checkout`: The event is triggered by a checkout operation. + */ + by: "local" | "import" | "checkout"; + origin?: string; + /** + * The container ID of the current event receiver. + * It's undefined if the subscriber is on the root document. + */ + currentTarget?: ContainerID; + events: LoroEvent[]; +} + +/** + * The concrete event of Loro. + */ +export interface LoroEvent { + /** + * The container ID of the event's target. + */ + target: ContainerID; + diff: Diff; + /** + * The absolute path of the event's emitter, which can be an index of a list container or a key of a map container. + */ + path: Path; +} + +export type ListDiff = { + type: "list"; + diff: Delta<(Value | Container)[]>[]; +}; + +export type TextDiff = { + type: "text"; + diff: Delta[]; +}; + +export type MapDiff = { + type: "map"; + updated: Record; +}; + +export type TreeDiffItem = + | { + target: TreeID; + action: "create"; + parent: TreeID | undefined; + index: number; + fractionalIndex: string; + } + | { + target: TreeID; + action: "delete"; + oldParent: TreeID | undefined; + oldIndex: number; + } + | { + target: TreeID; + action: "move"; + parent: TreeID | undefined; + index: number; + fractionalIndex: string; + oldParent: TreeID | undefined; + oldIndex: number; + }; + +export type TreeDiff = { + type: "tree"; + diff: TreeDiffItem[]; +}; + +export type CounterDiff = { + type: "counter"; + increment: number; +}; + +export type Diff = ListDiff | TextDiff | MapDiff | TreeDiff | CounterDiff; +export type Subscription = () => void; +type NonNullableType = Exclude; +export type AwarenessListener = ( + arg: { updated: PeerID[]; added: PeerID[]; removed: PeerID[] }, + origin: "local" | "timeout" | "remote" | string, +) => void; + + +interface Listener { + (event: LoroEventBatch): void; +} + +interface LoroDoc { + subscribe(listener: Listener): Subscription; +} + +interface UndoManager { + /** + * Set the callback function that is called when an undo/redo step is pushed. + * The function can return a meta data value that will be attached to the given stack item. + * + * @param listener - The callback function. + */ + setOnPush(listener?: UndoConfig["onPush"]): void; + /** + * Set the callback function that is called when an undo/redo step is popped. + * The function will have a meta data value that was attached to the given stack item when `onPush` was called. + * + * @param listener - The callback function. + */ + setOnPop(listener?: UndoConfig["onPop"]): void; +} +interface LoroDoc = Record> { + /** + * Get a LoroMap by container id + * + * The object returned is a new js object each time because it need to cross + * the WASM boundary. + * + * @example + * ```ts + * import { LoroDoc } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const map = doc.getMap("map"); + * ``` + */ + getMap(name: Key): T[Key] extends LoroMap ? T[Key] : LoroMap; + /** + * Get a LoroList by container id + * + * The object returned is a new js object each time because it need to cross + * the WASM boundary. + * + * @example + * ```ts + * import { LoroDoc } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const list = doc.getList("list"); + * ``` + */ + getList(name: Key): T[Key] extends LoroList ? T[Key] : LoroList; + /** + * Get a LoroMovableList by container id + * + * The object returned is a new js object each time because it need to cross + * the WASM boundary. + * + * @example + * ```ts + * import { LoroDoc } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const list = doc.getList("list"); + * ``` + */ + getMovableList(name: Key): T[Key] extends LoroMovableList ? T[Key] : LoroMovableList; + /** + * Get a LoroTree by container id + * + * The object returned is a new js object each time because it need to cross + * the WASM boundary. + * + * @example + * ```ts + * import { LoroDoc } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const tree = doc.getTree("tree"); + * ``` + */ + getTree(name: Key): T[Key] extends LoroTree ? T[Key] : LoroTree; + getText(key: string | ContainerID): LoroText; +} +interface LoroList { + new(): LoroList; + /** + * Get elements of the list. If the value is a child container, the corresponding + * `Container` will be returned. + * + * @example + * ```ts + * import { LoroDoc, LoroText } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const list = doc.getList("list"); + * list.insert(0, 100); + * list.insert(1, "foo"); + * list.insert(2, true); + * list.insertContainer(3, new LoroText()); + * console.log(list.value); // [100, "foo", true, LoroText]; + * ``` + */ + toArray(): T[]; + /** + * Insert a container at the index. + * + * @example + * ```ts + * import { LoroDoc, LoroText } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const list = doc.getList("list"); + * list.insert(0, 100); + * const text = list.insertContainer(1, new LoroText()); + * text.insert(0, "Hello"); + * console.log(list.toJSON()); // [100, "Hello"]; + * ``` + */ + insertContainer(pos: number, child: C): T extends C ? T : C; + /** + * Get the value at the index. If the value is a container, the corresponding handler will be returned. + * + * @example + * ```ts + * import { LoroDoc } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const list = doc.getList("list"); + * list.insert(0, 100); + * console.log(list.get(0)); // 100 + * console.log(list.get(1)); // undefined + * ``` + */ + get(index: number): T; + /** + * Insert a value at index. + * + * @example + * ```ts + * import { LoroDoc } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const list = doc.getList("list"); + * list.insert(0, 100); + * list.insert(1, "foo"); + * list.insert(2, true); + * console.log(list.value); // [100, "foo", true]; + * ``` + */ + insert(pos: number, value: Exclude): void; + delete(pos: number, len: number): void; + push(value: Exclude): void; + subscribe(listener: Listener): Subscription; + getAttached(): undefined | LoroList; +} +interface LoroMovableList { + new(): LoroMovableList; + /** + * Get elements of the list. If the value is a child container, the corresponding + * `Container` will be returned. + * + * @example + * ```ts + * import { LoroDoc, LoroText } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const list = doc.getMovableList("list"); + * list.insert(0, 100); + * list.insert(1, "foo"); + * list.insert(2, true); + * list.insertContainer(3, new LoroText()); + * console.log(list.value); // [100, "foo", true, LoroText]; + * ``` + */ + toArray(): T[]; + /** + * Insert a container at the index. + * + * @example + * ```ts + * import { LoroDoc, LoroText } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const list = doc.getMovableList("list"); + * list.insert(0, 100); + * const text = list.insertContainer(1, new LoroText()); + * text.insert(0, "Hello"); + * console.log(list.toJSON()); // [100, "Hello"]; + * ``` + */ + insertContainer(pos: number, child: C): T extends C ? T : C; + /** + * Get the value at the index. If the value is a container, the corresponding handler will be returned. + * + * @example + * ```ts + * import { LoroDoc } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const list = doc.getMovableList("list"); + * list.insert(0, 100); + * console.log(list.get(0)); // 100 + * console.log(list.get(1)); // undefined + * ``` + */ + get(index: number): T; + /** + * Insert a value at index. + * + * @example + * ```ts + * import { LoroDoc } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const list = doc.getMovableList("list"); + * list.insert(0, 100); + * list.insert(1, "foo"); + * list.insert(2, true); + * console.log(list.value); // [100, "foo", true]; + * ``` + */ + insert(pos: number, value: Exclude): void; + delete(pos: number, len: number): void; + push(value: Exclude): void; + subscribe(listener: Listener): Subscription; + getAttached(): undefined | LoroMovableList; + /** + * Set the value at the given position. + * + * It's different from `delete` + `insert` that it will replace the value at the position. + * + * For example, if you have a list `[1, 2, 3]`, and you call `set(1, 100)`, the list will be `[1, 100, 3]`. + * If concurrently someone call `set(1, 200)`, the list will be `[1, 200, 3]` or `[1, 100, 3]`. + * + * But if you use `delete` + `insert` to simulate the set operation, they may create redundant operations + * and the final result will be `[1, 100, 200, 3]` or `[1, 200, 100, 3]`. + * + * @example + * ```ts + * import { LoroDoc } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const list = doc.getMovableList("list"); + * list.insert(0, 100); + * list.insert(1, "foo"); + * list.insert(2, true); + * list.set(1, "bar"); + * console.log(list.value); // [100, "bar", true]; + * ``` + */ + set(pos: number, value: Exclude): void; + /** + * Set a container at the index. + * + * @example + * ```ts + * import { LoroDoc, LoroText } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const list = doc.getMovableList("list"); + * list.insert(0, 100); + * const text = list.setContainer(0, new LoroText()); + * text.insert(0, "Hello"); + * console.log(list.toJSON()); // ["Hello"]; + * ``` + */ + setContainer(pos: number, child: C): T extends C ? T : C; +} +interface LoroMap = Record> { + new(): LoroMap; + /** + * Get the value of the key. If the value is a child container, the corresponding + * `Container` will be returned. + * + * The object returned is a new js object each time because it need to cross + * + * @example + * ```ts + * import { LoroDoc } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const map = doc.getMap("map"); + * map.set("foo", "bar"); + * const bar = map.get("foo"); + * ``` + */ + getOrCreateContainer(key: string, child: C): C; + /** + * Set the key with a container. + * + * @example + * ```ts + * import { LoroDoc, LoroText, LoroList } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const map = doc.getMap("map"); + * map.set("foo", "bar"); + * const text = map.setContainer("text", new LoroText()); + * const list = map.setContainer("list", new LoroList()); + * ``` + */ + setContainer(key: Key, child: C): NonNullableType extends C ? NonNullableType : C; + /** + * Get the value of the key. If the value is a child container, the corresponding + * `Container` will be returned. + * + * The object/value returned is a new js object/value each time because it need to cross + * the WASM boundary. + * + * @example + * ```ts + * import { LoroDoc } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const map = doc.getMap("map"); + * map.set("foo", "bar"); + * const bar = map.get("foo"); + * ``` + */ + get(key: Key): T[Key]; + /** + * Set the key with the value. + * + * If the value of the key is exist, the old value will be updated. + * + * @example + * ```ts + * import { LoroDoc } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const map = doc.getMap("map"); + * map.set("foo", "bar"); + * map.set("foo", "baz"); + * ``` + */ + set(key: Key, value: Exclude): void; + delete(key: string): void; + subscribe(listener: Listener): Subscription; +} +interface LoroText { + new(): LoroText; + insert(pos: number, text: string): void; + delete(pos: number, len: number): void; + subscribe(listener: Listener): Subscription; +} +interface LoroTree = Record> { + new(): LoroTree; + /** + * Create a new tree node as the child of parent and return a `LoroTreeNode` instance. + * If the parent is undefined, the tree node will be a root node. + * + * If the index is not provided, the new node will be appended to the end. + * + * @example + * ```ts + * import { LoroDoc } from "loro-crdt"; + * + * const doc = new LoroDoc(); + * const tree = doc.getTree("tree"); + * const root = tree.createNode(); + * const node = tree.createNode(undefined, 0); + * + * // undefined + * // / \ + * // node root + * ``` + */ + createNode(parent?: TreeID, index?: number): LoroTreeNode; + move(target: TreeID, parent?: TreeID, index?: number): void; + delete(target: TreeID): void; + has(target: TreeID): boolean; + /** + * Get LoroTreeNode by the TreeID. + */ + getNodeByID(target: TreeID): LoroTreeNode; + subscribe(listener: Listener): Subscription; +} +interface LoroTreeNode = Record> { + /** + * Get the associated metadata map container of a tree node. + */ + readonly data: LoroMap; + /** + * Create a new node as the child of the current node and + * return an instance of `LoroTreeNode`. + * + * If the index is not provided, the new node will be appended to the end. + * + * @example + * ```typescript + * import { LoroDoc } from "loro-crdt"; + * + * let doc = new LoroDoc(); + * let tree = doc.getTree("tree"); + * let root = tree.createNode(); + * let node = root.createNode(); + * let node2 = root.createNode(0); + * // root + * // / \ + * // node2 node + * ``` + */ + createNode(index?: number): LoroTreeNode; + move(parent?: LoroTreeNode, index?: number): void; + parent(): LoroTreeNode | undefined; + /** + * Get the children of this node. + * + * The objects returned are new js objects each time because they need to cross + * the WASM boundary. + */ + children(): Array> | undefined; +} +interface AwarenessWasm { + getState(peer: PeerID): T | undefined; + getTimestamp(peer: PeerID): number | undefined; + getAllStates(): Record; + setLocalState(value: T): void; + removeOutdated(): PeerID[]; +} + "#; diff --git a/loro-js/tests/awareness.test.ts b/crates/loro-wasm/tests/awareness.test.ts similarity index 97% rename from loro-js/tests/awareness.test.ts rename to crates/loro-wasm/tests/awareness.test.ts index a5a792c4f..55b09b18b 100644 --- a/loro-js/tests/awareness.test.ts +++ b/crates/loro-wasm/tests/awareness.test.ts @@ -5,8 +5,8 @@ import { Cursor, PeerID, setDebug, -} from "../src/index"; -import { AwarenessListener } from "../src/awareness"; +} from "../bundler/index"; +import { AwarenessListener } from "../bundler/index"; describe("Awareness", () => { it("setLocalRecord", () => { diff --git a/loro-js/tests/basic.test.ts b/crates/loro-wasm/tests/basic.test.ts similarity index 99% rename from loro-js/tests/basic.test.ts rename to crates/loro-wasm/tests/basic.test.ts index be80e1e47..52c0a9936 100644 --- a/loro-js/tests/basic.test.ts +++ b/crates/loro-wasm/tests/basic.test.ts @@ -15,8 +15,7 @@ import { Frontiers, encodeFrontiers, decodeFrontiers, -} from "../src"; -import { m } from "vitest/dist/reporters-yx5ZTtEV"; +} from "../bundler/index"; it("basic example", () => { const doc = new LoroDoc(); @@ -654,4 +653,4 @@ it("json path", () => { const result = doc.JSONPath(path); expect(result.length).toBe(1); expect(result).toStrictEqual(["1984"]) -}) \ No newline at end of file +}) diff --git a/loro-js/tests/checkout.test.ts b/crates/loro-wasm/tests/checkout.test.ts similarity index 98% rename from loro-js/tests/checkout.test.ts rename to crates/loro-wasm/tests/checkout.test.ts index 44f002fa7..fdbce06d3 100644 --- a/loro-js/tests/checkout.test.ts +++ b/crates/loro-wasm/tests/checkout.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { LoroDoc } from "../src"; +import { LoroDoc } from "../bundler/index"; describe("Checkout", () => { it("simple checkout", async () => { diff --git a/loro-js/tests/compatibility.test.ts b/crates/loro-wasm/tests/compatibility.test.ts similarity index 95% rename from loro-js/tests/compatibility.test.ts rename to crates/loro-wasm/tests/compatibility.test.ts index de9e92617..2d79f75d5 100644 --- a/loro-js/tests/compatibility.test.ts +++ b/crates/loro-wasm/tests/compatibility.test.ts @@ -10,7 +10,7 @@ import { LoroText, MapDiff, TextDiff, -} from "../src"; +} from "../bundler/index"; import * as OLD from "loro-crdt-old"; @@ -29,12 +29,14 @@ describe("compatibility", () => { // t.createNode(node.id, 0); const bytes = docA.exportFrom(); + // @ts-ignore const docB = new OLD.Loro(); docB.import(bytes); expect(docA.toJSON()).toStrictEqual(docB.toJSON()); }); it("basic forward compatibility on exportSnapshot", () => { + // @ts-ignore const docA = new Loro(); docA.getText("text").insert(0, "123"); docA.getMap("map").set("key", 123); @@ -46,12 +48,14 @@ describe("compatibility", () => { // t.createNode(node.id, 0); const bytes = docA.exportSnapshot(); + // @ts-ignore const docB = new OLD.Loro(); docB.import(bytes); expect(docA.toJSON()).toStrictEqual(docB.toJSON()); }); it("basic backward compatibility on exportSnapshot", () => { + // @ts-ignore const docA = new OLD.Loro(); docA.getText("text").insert(0, "123"); docA.getMap("map").set("key", 123); @@ -69,13 +73,14 @@ describe("compatibility", () => { }); it("basic backward compatibility on exportSnapshot", () => { + // @ts-ignore const docA = new OLD.Loro(); docA.getText("text").insert(0, "123"); docA.getMap("map").set("key", 123); docA.getMap("map").set("key", "123"); docA.getList("list").insert(0, 1); docA.getList("list").insert(0, "1"); - + // const t = docA.getTree("tree"); // const node = t.createNode(); // t.createNode(node.id); diff --git a/loro-js/tests/counter.test.ts b/crates/loro-wasm/tests/counter.test.ts similarity index 94% rename from loro-js/tests/counter.test.ts rename to crates/loro-wasm/tests/counter.test.ts index 5eb961d8f..cbf92254c 100644 --- a/loro-js/tests/counter.test.ts +++ b/crates/loro-wasm/tests/counter.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { CounterDiff, LoroDoc } from "../src"; +import { CounterDiff, LoroDoc } from "../bundler/index"; function oneMs(): Promise { return new Promise((r) => setTimeout(r)); @@ -15,13 +15,13 @@ describe("counter", () => { expect(counter.value).toBe(2); }); - it("encode", async () => { + it("encode", async () => { const doc = new LoroDoc(); const counter = doc.getCounter("counter"); counter.increment(1); counter.increment(2); counter.decrement(4); - + const updates = doc.exportFrom(); const snapshot = doc.exportSnapshot(); const json = doc.exportJsonUpdates(); diff --git a/loro-js/tests/detached_editing.test.ts b/crates/loro-wasm/tests/detached_editing.test.ts similarity index 99% rename from loro-js/tests/detached_editing.test.ts rename to crates/loro-wasm/tests/detached_editing.test.ts index ce4c686f1..fbbda487a 100644 --- a/loro-js/tests/detached_editing.test.ts +++ b/crates/loro-wasm/tests/detached_editing.test.ts @@ -12,7 +12,7 @@ import { MapDiff, TextDiff, UndoManager, -} from "../src"; +} from "../bundler/index"; describe("detached editing", () => { it("basic tests", async () => { diff --git a/loro-js/tests/event.test.ts b/crates/loro-wasm/tests/event.test.ts similarity index 99% rename from loro-js/tests/event.test.ts rename to crates/loro-wasm/tests/event.test.ts index 2af292c84..c14ab537c 100644 --- a/loro-js/tests/event.test.ts +++ b/crates/loro-wasm/tests/event.test.ts @@ -11,7 +11,7 @@ import { LoroText, MapDiff, TextDiff, -} from "../src"; +} from "../bundler/index"; describe("event", () => { it("target", async () => { diff --git a/loro-js/tests/gc.test.ts b/crates/loro-wasm/tests/gc.test.ts similarity index 98% rename from loro-js/tests/gc.test.ts rename to crates/loro-wasm/tests/gc.test.ts index 0d2b7e10b..fc0932fe3 100644 --- a/loro-js/tests/gc.test.ts +++ b/crates/loro-wasm/tests/gc.test.ts @@ -8,7 +8,7 @@ import { LoroMap, LoroText, LoroTree, -} from "../src"; +} from "../bundler/index"; describe("gc", () => { it("should export gc snapshot", () => { diff --git a/loro-js/tests/issue.test.ts b/crates/loro-wasm/tests/issue.test.ts similarity index 92% rename from loro-js/tests/issue.test.ts rename to crates/loro-wasm/tests/issue.test.ts index 5828246ac..84c39cd67 100644 --- a/loro-js/tests/issue.test.ts +++ b/crates/loro-wasm/tests/issue.test.ts @@ -1,7 +1,6 @@ -import { describe, expect, expectTypeOf, it } from "vitest"; -import { LoroDoc } from "../src"; -import { Container, LoroText, OpId } from "../src"; -import { setDebug } from "loro-wasm"; +import { it } from "vitest"; +import { LoroDoc } from "../bundler/index"; +import { LoroText, OpId } from "../bundler/index"; it("#211", () => { const loro1 = new LoroDoc(); diff --git a/loro-js/tests/json.test.ts b/crates/loro-wasm/tests/json.test.ts similarity index 99% rename from loro-js/tests/json.test.ts rename to crates/loro-wasm/tests/json.test.ts index 682f1b783..e54b43661 100644 --- a/loro-js/tests/json.test.ts +++ b/crates/loro-wasm/tests/json.test.ts @@ -3,7 +3,7 @@ import { LoroDoc, LoroMap, TextOp, -} from "../src"; +} from "../bundler/index"; it("json encoding", () => { const doc = new LoroDoc(); diff --git a/loro-js/tests/misc.test.ts b/crates/loro-wasm/tests/misc.test.ts similarity index 99% rename from loro-js/tests/misc.test.ts rename to crates/loro-wasm/tests/misc.test.ts index 4ece6d0e5..f7802fe06 100644 --- a/loro-js/tests/misc.test.ts +++ b/crates/loro-wasm/tests/misc.test.ts @@ -1,5 +1,5 @@ import { assert, describe, expect, it } from "vitest"; -import { LoroDoc, LoroList, LoroMap, LoroText, VersionVector } from "../src"; +import { LoroDoc, LoroList, LoroMap, LoroText, VersionVector } from "../bundler/index"; import { expectTypeOf } from "vitest"; function assertEquals(a: any, b: any) { @@ -29,7 +29,7 @@ describe("transaction", () => { const loro = new LoroDoc(); const text = loro.getText("text"); let count = 0; - const sub = loro.subscribe((event: { origin: string }) => { + const sub = loro.subscribe((event) => { count += 1; sub(); assertEquals(event.origin, "origin"); diff --git a/loro-js/tests/movable_list.test.ts b/crates/loro-wasm/tests/movable_list.test.ts similarity index 99% rename from loro-js/tests/movable_list.test.ts rename to crates/loro-wasm/tests/movable_list.test.ts index c02aca02a..56a4f9404 100644 --- a/loro-js/tests/movable_list.test.ts +++ b/crates/loro-wasm/tests/movable_list.test.ts @@ -8,7 +8,7 @@ import { LoroMovableList, LoroText, TextDiff, -} from "../src"; +} from "../bundler/index"; describe("movable list", () => { it("should work like list", () => { diff --git a/loro-js/tests/richtext.test.ts b/crates/loro-wasm/tests/richtext.test.ts similarity index 98% rename from loro-js/tests/richtext.test.ts rename to crates/loro-wasm/tests/richtext.test.ts index 896251510..80726bfbf 100644 --- a/loro-js/tests/richtext.test.ts +++ b/crates/loro-wasm/tests/richtext.test.ts @@ -1,6 +1,5 @@ import { describe, expect, it } from "vitest"; -import { Delta, LoroDoc, TextDiff } from "../src"; -import { Cursor, OpId, PeerID, setDebug } from "loro-wasm"; +import { Delta, LoroDoc, TextDiff, Cursor, OpId } from "../bundler/index"; describe("richtext", () => { it("mark", () => { @@ -298,7 +297,7 @@ describe("richtext", () => { ]); text.deleteUtf8(3, 4); expect(text.toDelta()).toStrictEqual([ - { insert: "你b"}, + { insert: "你b" }, ]); }); @@ -336,7 +335,7 @@ describe("richtext", () => { const text = doc.getText('t'); text.insert(0, "你好"); let str = ""; - text.iter((s : string)=>{ + text.iter((s: string) => { str = str + s; return true; }); diff --git a/loro-js/tests/text.ts b/crates/loro-wasm/tests/text.ts similarity index 100% rename from loro-js/tests/text.ts rename to crates/loro-wasm/tests/text.ts diff --git a/loro-js/tests/tree.test.ts b/crates/loro-wasm/tests/tree.test.ts similarity index 98% rename from loro-js/tests/tree.test.ts rename to crates/loro-wasm/tests/tree.test.ts index 4e3a2651d..d6fa3c768 100644 --- a/loro-js/tests/tree.test.ts +++ b/crates/loro-wasm/tests/tree.test.ts @@ -1,5 +1,5 @@ import { assert, describe, expect, it } from "vitest"; -import { LoroDoc, LoroTree, LoroTreeNode, TreeDiff } from "../src"; +import { LoroDoc, LoroTree, LoroTreeNode, TreeDiff } from "../bundler/index"; function assertEquals(a: any, b: any) { expect(a).toStrictEqual(b); diff --git a/loro-js/tests/type.test.ts b/crates/loro-wasm/tests/type.test.ts similarity index 98% rename from loro-js/tests/type.test.ts rename to crates/loro-wasm/tests/type.test.ts index 3a73be32e..dadb5a26a 100644 --- a/loro-js/tests/type.test.ts +++ b/crates/loro-wasm/tests/type.test.ts @@ -7,7 +7,7 @@ import { LoroTree, PeerID, Value, -} from "../src"; +} from "../bundler/index"; import { expect, expectTypeOf, test } from "vitest"; test("Container should not match Value", () => { diff --git a/loro-js/tests/undo.test.ts b/crates/loro-wasm/tests/undo.test.ts similarity index 98% rename from loro-js/tests/undo.test.ts rename to crates/loro-wasm/tests/undo.test.ts index 53a67a1a9..4fbb4d216 100644 --- a/loro-js/tests/undo.test.ts +++ b/crates/loro-wasm/tests/undo.test.ts @@ -1,4 +1,4 @@ -import { Cursor, LoroDoc, UndoManager } from "../src"; +import { Cursor, LoroDoc, UndoManager } from "../bundler/index"; import { describe, expect, test } from "vitest"; describe("undo", () => { diff --git a/loro-js/tests/version.test.ts b/crates/loro-wasm/tests/version.test.ts similarity index 99% rename from loro-js/tests/version.test.ts rename to crates/loro-wasm/tests/version.test.ts index b7795f047..f88867a06 100644 --- a/loro-js/tests/version.test.ts +++ b/crates/loro-wasm/tests/version.test.ts @@ -5,7 +5,7 @@ import { LoroMap, OpId, VersionVector, -} from "../src"; +} from "../bundler/index"; describe("Frontiers", () => { it("two clients", () => { diff --git a/crates/loro-wasm/tsconfig.json b/crates/loro-wasm/tsconfig.json new file mode 100644 index 000000000..5e3c39c36 --- /dev/null +++ b/crates/loro-wasm/tsconfig.json @@ -0,0 +1,116 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + "lib": [ + "ES2016", + "DOM" + ], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "ESNext" /* Specify what module code is generated. */, + // "rootDir": "./", /* Specify the root folder within your source files. */ + "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./dist" /* Specify an output folder for all emitted files. */, + // "removeComments": true, /* Disable emitting comments. */ + "noEmit": false /* Disable emitting files from a compilation. */, + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, + /* Type Checking */ + "strict": true /* Enable all strict type-checking options. */, + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + "paths": { + "loro-wasm": [ + "./nodejs/loro_wasm.d.ts" + ] + } + }, + "exclude": [ + "dist", + "deno", + "scripts", + "deno_tests", + "node_modules" + ] +} diff --git a/loro-js/vite.config.ts b/crates/loro-wasm/vite.config.ts similarity index 85% rename from loro-js/vite.config.ts rename to crates/loro-wasm/vite.config.ts index 01fb39294..53851552c 100644 --- a/loro-js/vite.config.ts +++ b/crates/loro-wasm/vite.config.ts @@ -6,7 +6,8 @@ export default defineConfig({ test: { exclude: [ ...configDefaults.exclude, - "deno/*" + "deno/*", + "deno_tests/*" ] }, }); diff --git a/loro-js/.gitignore b/loro-js/.gitignore deleted file mode 100644 index 6096c0de1..000000000 --- a/loro-js/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/ -dist/ -docs/ \ No newline at end of file diff --git a/loro-js/.npmignore b/loro-js/.npmignore deleted file mode 100644 index cde86fc5e..000000000 --- a/loro-js/.npmignore +++ /dev/null @@ -1,10 +0,0 @@ -tests/ -.vscode/ -deno/ -src/ -node_modules/ -pnpm-lock.yaml -rollup.config.mjs -tsconfig.json -vite.config.ts -CHANGELOG.md diff --git a/loro-js/.vscode/settings.json b/loro-js/.vscode/settings.json deleted file mode 100644 index b8f98cc8f..000000000 --- a/loro-js/.vscode/settings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "deno.enable": false, - "editor.defaultFormatter": "vscode.typescript-language-features", - "editor.formatOnSave": true, - "[typescript]": { - "editor.defaultFormatter": "vscode.typescript-language-features" - } -} diff --git a/loro-js/CHANGELOG.md b/loro-js/CHANGELOG.md deleted file mode 100644 index c070d881d..000000000 --- a/loro-js/CHANGELOG.md +++ /dev/null @@ -1,1399 +0,0 @@ -# Changelog - -## 1.0.7 - -### Patch Changes - -- Skip published version -- Updated dependencies - - loro-wasm@1.0.2 - - -## 1.0.0-beta.5 - -### Patch Changes - -- - Fork at should restore detached state (#523) - - Subscription convert error (#525) -- Updated dependencies - - loro-wasm@1.0.0-beta.5 - -## 1.0.0-beta.4 - -### Patch Changes - -- Fix: ForkAt should inherit the config and auto commit from the original doc -- Updated dependencies - - loro-wasm@1.0.0-beta.4 - -## 1.0.0-beta.3 - -### Patch Changes - -- - Wasm api 1.0 (#521) - - Rename wasm export from (#519) - - Rename tree event (#520) -- Updated dependencies - - loro-wasm@1.0.0-beta.3 - -## 1.0.0-beta.2 - -### Patch Changes - -- - _(wasm)_ Add methods to encode and decode Frontiers (#517) - - Avoid auto unsubscribe (due to gc) in js env (#516) -- Updated dependencies - - loro-wasm@1.0.0-beta.2 - -## 1.0.0-beta.1 - -### Patch Changes - -- Performance improvement and bug fixes - - ### 🚀 Features - - - Redact (#504) - - ### 🐛 Bug Fixes - - - Ffi Subscription (#505) - - Ffi remove try unwrap (#506) - - Movable list undo impl (#509) - - Tracker skip applied deletion error (#512) - - IsContainerDeleted cache err (#513) - - ### 📚 Documentation - - - Refine wasm docs - - ### ⚡ Performance - - - Optimize shrink frontiers - - Optimize batch container registrations on arena (#510) - - Optimize high concurrency performance (#514) - - Use better data structure for frontiers (#515) - - ### Perf - - - Commit speed & text insert cache (#511) - -- Updated dependencies - - loro-wasm@1.0.0-beta.1 - -## 1.0.0-alpha.5 - -### Patch Changes - -- ## Fix - - - Use release build - - ## Test - - - Add compatibility tests (#503) - -- Updated dependencies - - loro-wasm@1.0.0 - -## 1.0.0-alpha.4 - -### Patch Changes - -- ### 🚀 Features - - - _(wasm)_ Commit message & get pending ops length (#477) - - Update text by line (#480) - - Add clear methods (#478) - - Travel change's ancestors (#483) - - Compact state store - - Add FFI for Loro (#420) - - Add dag allocation tree algorithm (#415) - - Add import status (#494) - - ### 🐛 Bug Fixes - - - Get correct tree_cache current vv when retreating (#476) - - Gc snapshot error (#481) - - Checkout into middle of marks - - Checkout diff-calc cache issue - - Return err if snapshot container has unknown container (#488) - - Do not set peer id with max (#491) - - Fork error (#493) - - FFI new sub import status (#497) - - Create event cannot find parent (#498) - - ### 🚜 Refactor - - - [**breaking**] Don't wait for `commit` to update version info - - Avoid footgun of impl ord for cid - - Loro import function should return LoroEncodeError (#487) - - [**breaking**] Better event api (#489) - - Change the first param of travel change from id to ids (#492) - - [**breaking**] List state snapshot schema for v1.0 (#485) - - ### ⚡ Performance - - - Make shrink frontiers faster when the peer num is large (#482) - - Optimize tree cache find children speed - - Avoid memory leak when forking repeatedly (#500) - - Optimize kv export_all by reusing encoded block (#501) - - Optimize speed of large maps (#496) - - Optimize diff calc cache use (#475) - - ### 🧪 Testing - - - Make awareness more robust - - Bench large folder with 1M files & 100M ops (#495) - - ### ⚙️ Miscellaneous Tasks - - - Use cached diff calc - -- Updated dependencies - - loro-wasm@1.0.0-alpha.4 - -## 1.0.0-alpha.3 - -### Patch Changes - -- ### 🐛 Bug Fixes - - - Cursor behavior when using gc-snapshot (#472) - - _(wasm)_ Type err - - ### ⚙️ Miscellaneous Tasks - - - Make tree parent id pub on loro crate - - ### Feat - - - Allow editing on detached mode (#473) - - ### Fix - - - Get tree's alive children correctly (#474) - - Should not emit event when exporting gc-snapshot (#471) - -- Updated dependencies - - loro-wasm@1.0.0-alpha.3 - -## 1.0.0-alpha.2 - -### Patch Changes - -- ### 🚀 Features - - - Fork doc at the target version (#469) - - ### 🚜 Refactor - - - BREAKING CHANGE: Use hierarchy value for tree value (#470) - -- Updated dependencies - - loro-wasm@1.0.0-alpha.2 - -## 1.0.0-alpha.1 - -### Patch Changes - -- ### 🚀 Features - - - Get shallow value of doc (#463) - - Add state only snapshot & refine check slow test - - Add new cid method to js binding - - Jsonpath experimental support (#466) - - ### 🐛 Bug Fixes - - - Raise error if perform action on a deleted container (#465) - - Raise error if moving a deleted node - - Export snapshot error on a gc doc - - ### 🚜 Refactor - - - Tree contains & isDeleted (#467) - - ### 🧪 Testing - - - Check state correctness on shallow doc - -- Updated dependencies - - loro-wasm@1.0.0-alpha.1 - -## 1.0.0-alpha.0 - -- Better encode schema that can be 100x faster -- Less memory usage -- You can trim needless history in snapshot now -- Better architecture and extensibility - -## 0.16.12 - -### Patch Changes - -- 46e21fc: Fix tree move issues -- Updated dependencies [46e21fc] - - loro-wasm@0.16.12 - -## 0.16.11 - -### Patch Changes - -- dce00ab: Make loro-wasm work in cloudflare worker -- Updated dependencies [dce00ab] - - loro-wasm@0.16.11 - -## 0.16.10 - -### Patch Changes - -- 7cf54e8: Fix batch importing with snapshot -- Updated dependencies [7cf54e8] - - loro-wasm@0.16.10 - -## 0.16.9 - -### Patch Changes - -- a761430: Fix build script -- Updated dependencies [a761430] - - loro-wasm@0.16.9 - -## 0.16.8 - -### Patch Changes - -- 38b4bcf: Add text update API - - - Remove the patch for crypto - - Add text update API (#404) - - Check invalid root container name (#411) - - ### 🐛 Bug Fixes - - - Workaround lldb bug make loro crate debuggable (#414) - - Delete the **bring back** tree node from the undo container remap (#423) - - ### 📚 Documentation - - - Fix typo - - Refine docs about event (#417) - - ### 🎨 Styling - - - Use clippy to perf code (#407) - - ### ⚙️ Miscellaneous Tasks - - - Add test tools (#410) - -- Updated dependencies [38b4bcf] - - loro-wasm@0.16.8 - -## 0.16.7 - -### Patch Changes - -- 45c98d5: Better text APIs and bug fixes - - ### 🚀 Features - - - Add insert_utf8 and delete_utf8 for Rust Text API (#396) - - Add text iter (#400) - - Add more text api (#398) - - ### 🐛 Bug Fixes - - - Tree undo when processing deleted node (#399) - - Tree diff calc children should be sorted by idlp (#401) - - When computing the len of the map, do not count elements that are None (#402) - - ### 📚 Documentation - - - Update wasm docs - - Rm experimental warning - - ### ⚙️ Miscellaneous Tasks - - - Update fuzz config - - Pnpm - - Rename position to fractional_index (#381) - -- Updated dependencies [45c98d5] - - loro-wasm@0.16.7 - -## 0.16.6 - -### Patch Changes - -- 1e94248: Add `.fork()` to duplicate the doc -- Updated dependencies [1e94248] - - loro-wasm@0.16.6 - -## 0.16.5 - -### Patch Changes - -- 439e4e9: Update pkg desc -- Updated dependencies [439e4e9] - - loro-wasm@0.16.5 - -## 0.16.4 - -### Patch Changes - -- afac347: feat: implement `Counter` and expose it to js side -- Updated dependencies [afac347] - - loro-wasm@0.16.4 - -## 0.16.4-alpha.0 - -### Patch Changes - -- Export/import JSON schema -- Updated dependencies - - loro-wasm@0.16.4 - -## 0.16.3 - -### Patch Changes - -- 6d47015: Make cursors transformation better in undo/redo loop -- dc55055: Perf(wasm) cache text.toDelta -- Updated dependencies [6d47015] -- Updated dependencies [dc55055] - - loro-wasm@0.16.3 - -## 0.16.2 - -### Patch Changes - -- 34f6064: Better undo events & transform cursors by undo manager (#369) - - #### 🧪 Testing - - - Enable compatibility test (#367) - -- Updated dependencies [34f6064] - - loro-wasm@0.16.2 - -## 0.16.1 - -### Patch Changes - -- 5cd80b0: Refine undo impl - - - Add "undo" origin for undo and redo event - - Allow users to skip certain local operations - - Skip undo/redo ops that are not visible to users - - Add returned bool value to indicate whether undo/redo is executed - -- Updated dependencies [5cd80b0] - - loro-wasm@0.16.1 - -## 0.16.0 - -### Minor Changes - -- c12c2b9: Movable Tree Children & Undo - - #### 🐛 Bug Fixes - - - Refine error message on corrupted data (#356) - - Add MovableList to CONTAINER_TYPES (#359) - - Better jitter for fractional index (#360) - - #### 🧪 Testing - - - Add compatibility tests (#357) - - #### Feat - - - Make the encoding format forward and backward compatible (#329) - - Undo (#361) - - Use fractional index to order the children of the tree (#298) - - #### 🐛 Bug Fixes - - - Tree fuzz sort value (#351) - - Upgrade wasm-bindgen to fix str free err (#353) - -### Patch Changes - -- Updated dependencies [c12c2b9] - - loro-wasm@0.16.0 - -## 0.15.3 - -### Patch Changes - -- 43506cc: Fix unsound issue caused by wasm-bindgen - - #### 🐛 Bug Fixes - - - Fix potential movable list bug (#354) - - Tree fuzz sort value (#351) - - Upgrade wasm-bindgen to fix str free err (#353) - - #### 📚 Documentation - - - Simplify readme (#352) - -- Updated dependencies [43506cc] - - loro-wasm@0.15.3 - -## 0.15.2 - -### Patch Changes - -- e30678d: Perf: fix deletions merge - - #### 🐛 Bug Fixes - - - _(wasm)_ Movable list .kind() (#342) - - #### ⚡ Performance - - - Delete span merge err (#348) - - #### ⚙️ Miscellaneous Tasks - - - Warn missing debug impl (#347) - - - -- Updated dependencies [e30678d] - - loro-wasm@0.15.2 - -## 0.15.1 - -### Patch Changes - -- 04c6290: Bug fixes and improvements. - - #### 🐛 Bug Fixes - - - Impl a few unimplemented! for movable tree (#335) - - Refine ts type; reject invalid operations (#334) - - Get cursor err on text and movable list (#337) - - Missing MovableList in all container type (#343) - - Upgrade generic-btree to allow large btree (#344) - - #### 📚 Documentation - - - Add warn(missing_docs) to loro and loro-wasm (#339) - - Minor fix on set_change_merge_interval api (#341) - - #### ⚙️ Miscellaneous Tasks - - - Skip the checking if not debug_assertions (#340) - - - -- Updated dependencies [04c6290] - - loro-wasm@0.15.1 - -## 0.15.0 - -### Minor Changes - -- 35b9b6e: Movable List (#293) - - Loro's List supports insert and delete operations but lacks built-in methods for `set` and `move`. To simulate set and move, developers might combine delete and insert. However, this approach can lead to issues during concurrent operations on the same element, often resulting in duplicate entries upon merging. - - For instance, consider a list [0, 1, 2]. If user A moves the element '0' to position 1, while user B moves it to position 2, the ideal merged outcome should be either [1, 0, 2] or [1, 2, 0]. However, using the delete-insert method to simulate a move results in [1, 0, 2, 0], as both users delete '0' from its original position and insert it independently at new positions. - - To address this, we introduce a MovableList container. This new container type directly supports move and set operations, aligning more closely with user expectations and preventing the issues associated with simulated moves. - - ## Example - - ```ts - import { Loro } from "loro-crdt"; - import { expect } from "vitest"; - - const doc = new Loro(); - const list = doc.getMovableList("list"); - list.push("a"); - list.push("b"); - list.push("c"); - expect(list.toArray()).toEqual(["a", "b", "c"]); - list.set(2, "d"); - list.move(0, 1); - const doc2 = new Loro(); - const list2 = doc2.getMovableList("list"); - expect(list2.length).toBe(0); - doc2.import(doc.exportFrom()); - expect(list2.length).toBe(3); - expect(list2.get(0)).toBe("b"); - expect(list2.get(1)).toBe("a"); - expect(list2.get(2)).toBe("d"); - ``` - -### Patch Changes - -- Updated dependencies [35b9b6e] - - loro-wasm@0.15.0 - -## 0.14.6 - -### Patch Changes - -- 24cf9b9: Bug Fix - - #### 🐛 Bug Fixes - - - Attached container can be inserted to `Map` or `List` (#331) - -- Updated dependencies [24cf9b9] - - loro-wasm@0.14.6 - -## 0.14.5 - -### Patch Changes - -- 73e3ba5: Bug Fix - - #### 🐛 Bug Fixes - - - _(js)_ Allow convert from undefined to LoroValue (#323) - - #### 🚜 Refactor - - - Refine ts type (#322) - -- Updated dependencies [73e3ba5] - - loro-wasm@0.14.5 - -## 0.14.4 - -### Patch Changes - -- 598d97e: ### 🚜 Refactor - - - Refine the TS Type of Awareness - - Parse Uint8array to LoroValue::Binary (#320) - - ### 📚 Documentation - - - Update how to publish new npm pkgs - -- Updated dependencies [598d97e] - - loro-wasm@0.14.4 - -## 0.14.3 - -### Patch Changes - -- a1fc2e3: Feat: Awareness (#318) -- Updated dependencies [a1fc2e3] - - loro-wasm@0.14.3 - -## 0.14.2 - -### Patch Changes - -- Refactor rename `StablePosition` to `Cursor` - - - Rename stable pos to cursor (#317) - - - -- Updated dependencies - - loro-wasm@0.14.2 - -## 0.14.1 - -### Patch Changes - -- Supports Cursors - - #### 🚀 Features - - - Cursors (#290) - -- Updated dependencies - - loro-wasm@0.14.1 - -## 0.14.0 - -### Minor Changes - -- Improved API - - ### 🚀 Features - - - Access value/container by path (#308) - - Decode import blob meta (#307) - - ### 🐛 Bug Fixes - - - Decode iter return result by updating columnar to 0.3.4 (#309) - - ### 🚜 Refactor - - - Replace "local" and "fromCheckout" in event with "triggeredBy" (#312) - - Add concrete type for each different container (#313) - - _(ts)_ Make types better (#315) - - ### 📚 Documentation - - - Refine wasm docs (#304) - - Clarify that peer id should be convertible to a u64 (#306) - - ### ⚙️ Miscellaneous Tasks - - - Add coverage report cli (#311) - -### Patch Changes - -- Updated dependencies - - loro-wasm@0.14.0 - -## 0.13.1 - -### Patch Changes - -- Fix type errors and conversion from js->rust error -- Updated dependencies - - loro-wasm@0.13.1 - -## 0.13.0 - -### Minor Changes - -- BREAKING CHANGE: `detached` mode for Containers #300 - - Now creating sub-containers is much easier. - - A container can be either attached to a document or detached. When it's detached, its history/state is not persisted. You can attach a container to a document by inserting it into an existing attached container. Once a container is attached, its state, along with all of its descendants's states, will be recreated in the document. After attaching, the container and its descendants will each have their corresponding "attached" version of themselves. - - When a detached container x is attached to a document, you can use `x.getAttached()` to obtain the corresponding attached container. - - When we use const text = new LoroList(), it's not attached to a doc. But we can insert it into a doc by map.insertContainer(”t”, text), where the map is attached. But if we want the operations on the text to be recorded to the doc, we now need to get its attached version. So we can use “let attachedText = text.getAttached()” - -### Patch Changes - -- Updated dependencies - - loro-wasm@0.13.0 - -## 0.12.0 - -### Minor Changes - -- Add getParent and getOrCreate - -### Patch Changes - -- Updated dependencies - - loro-wasm@0.12.0 - -## 0.11.1 - -### Patch Changes - -- Fix batch import -- Updated dependencies - - loro-wasm@0.11.1 - -## 0.11.0 - -### Minor Changes - -- Fix a few bugs and include BREAKING CHANG refactors - - - fix: should not reset the state when calling checkout to latest (#265) - - refactor: only send a event for one `import`/`transaction`/`checkout` (#263) - - perf: optimize snapshot encoding speed (#264) - - feat: remove deleted set in tree state and optimize api (#259) - -### Patch Changes - -- Updated dependencies - - loro-wasm@0.11.0 - -## 0.10.1 - -### Patch Changes - -- fix: remove checking after checkout -- Updated dependencies - - loro-wasm@0.10.1 - -## 0.10.0 - -### Minor Changes - -- New encoding schema - - BREAKING CHANGE: refactor: Optimizing Encoding Representation for Child Container Creation to Reduce Document Size (#247) - - feat: compare frontiers causal order (#257) - - docs: update docs about rich text style (#258) - -### Patch Changes - -- Updated dependencies - - loro-wasm@0.10.0 - -## 0.9.4 - -### Patch Changes - -- Fix a few richtext time travel issues -- Updated dependencies - - loro-wasm@0.9.4 - -## 0.9.3 - -### Patch Changes - -- feat: add getChangeAtLamport -- Updated dependencies - - loro-wasm@0.9.3 - -## 0.9.2 - -### Patch Changes - -- Fix a few rich text issue - - fix: time travel back should be able to nullify rich text span (#254) - - fix: formalize apply delta method (#252) - - fix: how to find best insert pos for richtext & expand type reverse behavior (#250) -- Updated dependencies - - loro-wasm@0.9.2 - -## 0.9.1 - -### Patch Changes - -- Fix use consistnt peer id repr and expose VersionVector type -- Updated dependencies - - loro-wasm@0.9.1 - -## 0.9.0 - -### Minor Changes - -- Refine the rich text CRDT in Loro - -### Patch Changes - -- Updated dependencies - - loro-wasm@0.9.0 - -## 0.8.0 - -### Minor Changes - -- Stabilize encoding and fix several issues related to time travel - -### Patch Changes - -- Updated dependencies - - loro-wasm@0.8.0 - -## 0.7.2-alpha.4 - -### Patch Changes - -- Fix encoding value err -- Updated dependencies - - loro-wasm@0.7.2 - -## 0.7.2-alpha.3 - -### Patch Changes - -- Fix export compressed snapshot -- Updated dependencies - - loro-wasm@0.7.2 - -## 0.7.2-alpha.2 - -### Patch Changes - -- Add compressed method -- Updated dependencies - - loro-wasm@0.7.2 - -## 0.7.2-alpha.1 - -### Patch Changes - -- Fix v0 exports -- Updated dependencies - - loro-wasm@0.7.2 - -## 0.7.2-alpha.0 - -### Patch Changes - -- Add experimental encode methods -- Updated dependencies - - loro-wasm@0.7.2 - -## 0.7.1 - -### Patch Changes - -- Fix a few richtext errors -- Updated dependencies - - loro-wasm@0.7.1 - -## 0.7.0 - -### Minor Changes - -- refactor: remove setPanicHook and call it internally when loaded - -### Patch Changes - -- Updated dependencies - - loro-wasm@0.7.0 - -## 0.6.5 - -### Patch Changes - -- Fix checkout err on seq data -- Updated dependencies - - loro-wasm@0.6.5 - -## 0.6.4 - -### Patch Changes - -- Fix time travel issue #211 -- Updated dependencies - - loro-wasm@0.6.4 - -## 0.6.3 - -### Patch Changes - -- Fix isContainer issue - -## 0.6.2 - -### Patch Changes - -- Refine getType and isContainer - -## 0.6.1 - -### Patch Changes - -- 6753c2f: Refine loro-crdt api -- Updated dependencies [6753c2f] - - loro-wasm@0.6.1 - -## 0.6.0 - -### Minor Changes - -- Improve API of event - -### Patch Changes - -- Updated dependencies - - loro-wasm@0.6.0 - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -## [0.5.0](https://github.com/loro-dev/loro/compare/v0.4.3...v0.5.0) (2023-11-27) - -### ⚠ BREAKING CHANGES - -- encoding schema is changed - -### Bug Fixes - -- [#181](https://github.com/loro-dev/loro/issues/181) importing should use inherent arena ([8e901cf](https://github.com/loro-dev/loro/commit/8e901cf00cc8469da136f18f13d2affc78e08e64)) -- deno dirname in windows ([#183](https://github.com/loro-dev/loro/issues/183)) ([c04dc34](https://github.com/loro-dev/loro/commit/c04dc344f5413b5135354c9652a70b5d698f04ac)) -- from snapshot should enable auto commit ([b940214](https://github.com/loro-dev/loro/commit/b94021498571cf7ac42f2896ca0abc82f15d823a)) -- keep strong ref to doc in handlers [#190](https://github.com/loro-dev/loro/issues/190) ([#191](https://github.com/loro-dev/loro/issues/191)) ([e23ef43](https://github.com/loro-dev/loro/commit/e23ef4362d69430601728f40b730e72a183ac4ea)) -- remove compress feature ([#184](https://github.com/loro-dev/loro/issues/184)) ([899270c](https://github.com/loro-dev/loro/commit/899270c6de065852d6e26a07b94b3d923cb83459)) -- typo in lib.rs ([#176](https://github.com/loro-dev/loro/issues/176)) ([83b0e8c](https://github.com/loro-dev/loro/commit/83b0e8cc7f8bccd9d7c152c0e5a59437bebe6c87)) - -### [0.4.3](https://github.com/loro-dev/loro/compare/v0.4.2...v0.4.3) (2023-11-16) - -### Bug Fixes - -- avoid i32 overflow ([f799da9](https://github.com/loro-dev/loro/commit/f799da9abbdf369ea1f120c700078bb87f27212b)) - -### [0.4.2](https://github.com/loro-dev/loro/compare/v0.4.1...v0.4.2) (2023-11-16) - -### Features - -- get sub container directly when getting value ([#175](https://github.com/loro-dev/loro/issues/175)) ([1ff1505](https://github.com/loro-dev/loro/commit/1ff1505933198be8f3b7aefc32e1698007e21c25)) -- **wasm:** add event id ([e54d2ac](https://github.com/loro-dev/loro/commit/e54d2ac21b02ad6b161336b0b9a99a0a85ca5a02)) - -### Bug Fixes - -- loro-wasm typo ([#171](https://github.com/loro-dev/loro/issues/171)) ([c4b9cb4](https://github.com/loro-dev/loro/commit/c4b9cb4b2b77c3c83b99b51153cd8dd19a948dc0)) - -### 0.4.1 (2023-11-12) - -### Features - -- add `from_checkout` mark to event ([#164](https://github.com/loro-dev/loro/issues/164)) ([08e4ed9](https://github.com/loro-dev/loro/commit/08e4ed9d407128debe616cfb9d3865e1e69b338e)) -- add bench ([d03617c](https://github.com/loro-dev/loro/commit/d03617ca265374f0e7be8ced81cb67611e2b1439)) -- add compress ([c9f63b6](https://github.com/loro-dev/loro/commit/c9f63b6594dbb4e8ba4b059bf1d6e9bd37fade68)) -- add compress ([6b6286d](https://github.com/loro-dev/loro/commit/6b6286d30b65a5ef6e49ff6b76e1234ae4c7ca25)) -- add contains ([b30dee1](https://github.com/loro-dev/loro/commit/b30dee1386dbe2fd87534e34023b4e534b768790)) -- add context check ([df3a708](https://github.com/loro-dev/loro/commit/df3a708e48f0c566ae516050922f17f153ac1d83)) -- add cursor support ([59f59b1](https://github.com/loro-dev/loro/commit/59f59b1c2ebcee3130cd9af6701895a192c0d1a9)) -- add decode state and loro to_json ([be02701](https://github.com/loro-dev/loro/commit/be0270140b0ac4d75551c2b4fe5558500257f523)) -- add decode state and loro to_json ([92e2bff](https://github.com/loro-dev/loro/commit/92e2bff6adbca8845c072ebe964888a0a806ce1f)) -- add delta compose ([9544e27](https://github.com/loro-dev/loro/commit/9544e27be4f9b769330a0fdba8f297e78d651c72)) -- add deps to change ([3eb4157](https://github.com/loro-dev/loro/commit/3eb415718c1183ef9fcea67c11d3420642559610)) -- add encode ([5969f92](https://github.com/loro-dev/loro/commit/5969f92b87a646e22d07e7b8393a5fb379d89688)) -- add enum as inner fork ([7704ce2](https://github.com/loro-dev/loro/commit/7704ce2939b347f9acbf5cfb53ea0a765c5c862d)) -- add fromCheckout to wasm ([fdd24bd](https://github.com/loro-dev/loro/commit/fdd24bd836a0466cccf90e605732fef9d88f9916)) -- add gc feature gate ([811d585](https://github.com/loro-dev/loro/commit/811d585fed7e79ea2d818e0ae977863bd059f2e5)) -- add go bindgen ([8f73917](https://github.com/loro-dev/loro/commit/8f739178e7210ec5eb08bd319be2fd4a4cc35b6c)) -- add index map ([0ce9dbc](https://github.com/loro-dev/loro/commit/0ce9dbc3095b6b78acde92516e6811b3c90e3eea)) -- add java bindgen ([271250b](https://github.com/loro-dev/loro/commit/271250ba05c3a2258fd42845dcbedb2bbcc5554f)) -- add list notify ([4ed1eae](https://github.com/loro-dev/loro/commit/4ed1eaee32e90b0b92db66379d2f4189636f85c9)) -- add map state snapshot ([48d784b](https://github.com/loro-dev/loro/commit/48d784bcd14562fb5dfdc92508eee2569e59a1c0)) -- add notify to map and list ([c574e7e](https://github.com/loro-dev/loro/commit/c574e7ea5b6f000d7ee8cf0578d4a3dea8cce9a5)) -- add origin to doc state diff ([874533e](https://github.com/loro-dev/loro/commit/874533e51a8f1f8810d0c513d74219126143fb79)) -- add pool mapping ([1c8f378](https://github.com/loro-dev/loro/commit/1c8f3784f0a5e9b7f2cc9c5a6c4dd2e36e9c841c)) -- add prelim ([bc8235f](https://github.com/loro-dev/loro/commit/bc8235ff47d6a862bc668648349376b3ec670fbd)) -- add prelim struct ([43cb9cc](https://github.com/loro-dev/loro/commit/43cb9cc6db841be4f9e1bedcd0411698af15fa77)) -- add Prelim struct ([b5880f0](https://github.com/loro-dev/loro/commit/b5880f0b667b03a1825671aa9790ae9d919816af)) -- add push to List ([99278b1](https://github.com/loro-dev/loro/commit/99278b1e2294eee85bc60a69adbda3c91953cfa5)) -- add python bingen ([8397274](https://github.com/loro-dev/loro/commit/83972746a6cee66c6e853f3e0460bb4f99006475)) -- add recursive wasm ([4726677](https://github.com/loro-dev/loro/commit/47266773baa8923102b731561c0497c8b053d7ec)) -- add return type for map and list ([39ece04](https://github.com/loro-dev/loro/commit/39ece045a8654e5d10a7b6097a28689755d29861)) -- add rle global index tree trait ([067fb82](https://github.com/loro-dev/loro/commit/067fb82058ede7007e012fe040fb728ae87cc14e)) -- add simple origin ([99e48b6](https://github.com/loro-dev/loro/commit/99e48b65ae11cafe2db913efb785c10deb9658a9)) -- add subscribe to containers in wasm ([6df69bd](https://github.com/loro-dev/loro/commit/6df69bd2bec9460d27170df4fa83cd5753073e12)) -- add tracing spans ([d718ed3](https://github.com/loro-dev/loro/commit/d718ed386fc93385d2911a45bcfb4afb2f353a32)) -- add tracing spans ([32b53aa](https://github.com/loro-dev/loro/commit/32b53aaacb8e47f1dd876518356a196ae927d269)) -- add typed versions of getMap and getList to Loro class ([#96](https://github.com/loro-dev/loro/issues/96)) ([bc09a04](https://github.com/loro-dev/loro/commit/bc09a0489f58bc99382edbfab3cb24eed9a0ccb0)) -- add withstartend ([8f00518](https://github.com/loro-dev/loro/commit/8f005180a47e5a110deaf9626bbdf0c761db0d31)) -- apply change ([8c0f033](https://github.com/loro-dev/loro/commit/8c0f033950da75b4be43b39ff1a7b6276b8fb643)) -- autocommit transaction ([#127](https://github.com/loro-dev/loro/issues/127)) ([8293347](https://github.com/loro-dev/loro/commit/82933473341b235b07051131676cdadf79930b4d)) -- basic import export pipeline ([f838373](https://github.com/loro-dev/loro/commit/f83837304e35fab7fbdd515fb3ad14cbd5139067)) -- basic pipeline for text ([1f827f9](https://github.com/loro-dev/loro/commit/1f827f944ea71bdeab1385a8bfd717558aa60100)) -- basic snapshot encoding ([e993f1b](https://github.com/loro-dev/loro/commit/e993f1b1558c8466af52e3435e18746a69875138)) -- basic wasm interface ([e0a472f](https://github.com/loro-dev/loro/commit/e0a472fd1a50fd282f00b63571e0048ab4ad8632)) -- change & op ([aae5cf2](https://github.com/loro-dev/loro/commit/aae5cf26ce3a1b07c57d0ea2babd4047b7d4b0c5)) -- change cfg api ([b156023](https://github.com/loro-dev/loro/commit/b15602307ef2c9d2149ce076245bf4e1aa34261f)) -- checkout to target version & use unicode index by default ([#98](https://github.com/loro-dev/loro/issues/98)) ([c105ff2](https://github.com/loro-dev/loro/commit/c105ff2220a3d9b98382d167d424422f15ad2bd3)) -- cmp vv ([aa060a9](https://github.com/loro-dev/loro/commit/aa060a93da4519a6e3d9d703f629fe9323ef4df3)) -- compact bytes init ([8704d22](https://github.com/loro-dev/loro/commit/8704d227508f448ccd06ffd011aa0aa7f71abf1b)) -- compressed rle update encode mode ([#107](https://github.com/loro-dev/loro/issues/107)) ([17d1a9e](https://github.com/loro-dev/loro/commit/17d1a9ea829820438da618186dcc1f97a015c7d4)) -- conenct container and store ([19c1215](https://github.com/loro-dev/loro/commit/19c12153f6006ec7f3e9cbf7a23c984cc85ccf20)) -- connect diff calculator ([8ebd41f](https://github.com/loro-dev/loro/commit/8ebd41fa3d997926bd6213c15fe2ed4505c73b86)) -- container checker ([0f2333b](https://github.com/loro-dev/loro/commit/0f2333b182214d6c2bb77948e4bb1f8dcf2ac5b4)) -- container iter ([13becdb](https://github.com/loro-dev/loro/commit/13becdb3f3ee3de22dcd0cd6d64cb9363487e1c4)) -- convert event to js & add vitest ([49f664d](https://github.com/loro-dev/loro/commit/49f664dd8f242192feb6853c102b9df0184d8db7)) -- convert frontiers to version vector ([336bd1e](https://github.com/loro-dev/loro/commit/336bd1e497f02458373cc8d4dfad357957d19533)) -- convert remote change to local change in oplog ([8f6a6e1](https://github.com/loro-dev/loro/commit/8f6a6e1cc2be03a9a3b42cf77a882f0d6c6db277)) -- create doc from snapshot ([#136](https://github.com/loro-dev/loro/issues/136)) ([e1ab03f](https://github.com/loro-dev/loro/commit/e1ab03f30fd75b28d9465f6c85ed2eed650e4660)) -- cursor mut ([66c50d4](https://github.com/loro-dev/loro/commit/66c50d4a9b33e61adca26f89e566c0149767a076)) -- dag find path ([ed14536](https://github.com/loro-dev/loro/commit/ed145367e07caf2e2e9828944c982bc01cc8486a)) -- dag init ([1ca2b42](https://github.com/loro-dev/loro/commit/1ca2b4226e201e956218d69c140a1151d1cb106c)) -- dag iter ([b828783](https://github.com/loro-dev/loro/commit/b8287837dc57f86b787a288a812fe2a26c871f7f)) -- dag partial iter ([8f6dd65](https://github.com/loro-dev/loro/commit/8f6dd6552259ed293721658ca693593b7ffae1f3)) -- delete ([550bce2](https://github.com/loro-dev/loro/commit/550bce28153cc051864e84933c938593237b3570)) -- delete range ([e19fb6a](https://github.com/loro-dev/loro/commit/e19fb6a91be10fffbffacd0291205cb7e03b2963)) -- diff calc bring back & tree new event and value ([#149](https://github.com/loro-dev/loro/issues/149)) ([acafc76](https://github.com/loro-dev/loro/commit/acafc76aff71264df869c4aab7b5cd1b3519a185)), closes [#147](https://github.com/loro-dev/loro/issues/147) [#151](https://github.com/loro-dev/loro/issues/151) -- dynamic insert content ([efd806b](https://github.com/loro-dev/loro/commit/efd806b8e4f597ded735e9c01c7287ba9e0537c1)) -- encode updates ([d3a0d10](https://github.com/loro-dev/loro/commit/d3a0d10b126a684b8e3d2719f0cbc70c19faee42)) -- encode/decode v2 ([f208744](https://github.com/loro-dev/loro/commit/f208744ec1200e1ccb297e48a0bc7b09adf1a431)) -- event (buggy) ([b5c325b](https://github.com/loro-dev/loro/commit/b5c325b4901d7c741517a69615e5d7157621b9ba)) -- event & wasm ([15be521](https://github.com/loro-dev/loro/commit/15be521777e17004c4a60d3968b2f8e5978eba75)) -- expose ContainerID ([cc129ee](https://github.com/loro-dev/loro/commit/cc129ee753933a8af2affda5185d2f5362e6156d)) -- expose from loro crate ([490a54d](https://github.com/loro-dev/loro/commit/490a54d55936f2f2a1bee561df4009db8d39240b)) -- expose frontier & make it comparable ([#95](https://github.com/loro-dev/loro/issues/95)) ([0a31b67](https://github.com/loro-dev/loro/commit/0a31b67dd4bad01262f9e06a08440ea6545fb7a0)) -- expose version and change inspect api to wasm ([#156](https://github.com/loro-dev/loro/issues/156)) ([7ccfd1e](https://github.com/loro-dev/loro/commit/7ccfd1e91d3decece3e8e4937fb1260cd3c64309)) -- extra pkg loro-crdt to wrap loro-wasm ([2f74b13](https://github.com/loro-dev/loro/commit/2f74b13e705548c30afc98db899df36d032e815f)) -- fast gc ([794e001](https://github.com/loro-dev/loro/commit/794e001ce98e0026d5ceb013e6059c71a71d27c1)) -- get missing span of vv ([b6d3f6b](https://github.com/loro-dev/loro/commit/b6d3f6b0b7f63d9ae5d777cd4bbead10b021fbeb)) -- get op content from store ([4f2f07d](https://github.com/loro-dev/loro/commit/4f2f07dd32a7d699290fc17909a9679beb564aaa)) -- get timestamp ([c31a4a0](https://github.com/loro-dev/loro/commit/c31a4a0239b2167a3fbb6a90915a4c64a3b29179)) -- get value deep ([0d0603d](https://github.com/loro-dev/loro/commit/0d0603d75f85ec77217a6c9012355471689b5ffc)) -- get vv from dag ([16395a4](https://github.com/loro-dev/loro/commit/16395a4fa291f103caea10d91489999272dcd49c)) -- handlers ([a3488c7](https://github.com/loro-dev/loro/commit/a3488c708896cdf9366736eb7a4dedabbc04de42)) -- hierarchy children & parent ([e402850](https://github.com/loro-dev/loro/commit/e4028504407d5f4f47cc6cf0d50f7d341547ca9d)) -- impl C ffi ([95309db](https://github.com/loro-dev/loro/commit/95309db710873156f3650591dd033571ee07ffca)) -- impl list map text transaction ([3c9818e](https://github.com/loro-dev/loro/commit/3c9818ef822d4773127abd0950f0c651726db07b)) -- impl loro decode ([580f2e5](https://github.com/loro-dev/loro/commit/580f2e54beb5aa2e579b1a572cd29d07ea127d5d)) -- impl yata ([670d194](https://github.com/loro-dev/loro/commit/670d194aeb7c08b741a74abec6666964a9f2f137)) -- impl yata insert_at ([ec59679](https://github.com/loro-dev/loro/commit/ec596792f64b2e4969382ad2e83ad0085bb3d26f)) -- implicit commit ([89c832e](https://github.com/loro-dev/loro/commit/89c832e2f2fb3c8c17f3779dab38b8be7e8fec70)) -- import without state ([a8b7d65](https://github.com/loro-dev/loro/commit/a8b7d65f8a2962d0524778500df60ed5d7d407c7)) -- init ([9ecd041](https://github.com/loro-dev/loro/commit/9ecd0417bdc262b3b39194e8f7b986b7310e841b)) -- init content map ([bd1b0a2](https://github.com/loro-dev/loro/commit/bd1b0a22159c1a0eda750e49f1ff37ca78428925)) -- init delta ([1ae9bf2](https://github.com/loro-dev/loro/commit/1ae9bf2a489f1b00d1632f2867921d295cda0ec7)) -- init encoding and build pipeline for wasm ([f14905d](https://github.com/loro-dev/loro/commit/f14905d56276ab5041cb2d8ccd7021059535bd7e)) -- init ffi ([a26d4b0](https://github.com/loro-dev/loro/commit/a26d4b0122f30b958b417ed92d43f823fa89adb8)) -- init list container transaction ([47b9b34](https://github.com/loro-dev/loro/commit/47b9b348183c07feb5930d7d72378ace368014bd)) -- init nodejs bindgen ([5b6f864](https://github.com/loro-dev/loro/commit/5b6f8644790f91894f99279d0d0ec9c2f89b443a)) -- init txn ([bc11f0a](https://github.com/loro-dev/loro/commit/bc11f0a6d260f2e92b340b0e22623dd7b5cbc2a0)) -- insert at cursor ([36c9fd7](https://github.com/loro-dev/loro/commit/36c9fd734046d41c133a2607b7cdb608d469fbca)) -- insert obj to list ([b56d747](https://github.com/loro-dev/loro/commit/b56d747019fe1604da1238dc3869a134dee8e6af)) -- insertion ([3c96a6b](https://github.com/loro-dev/loro/commit/3c96a6b224f15d85363662bf44e1c529b1794a43)) -- integrate to text container ([dce9f03](https://github.com/loro-dev/loro/commit/dce9f0382176bc27f2f8143775d6d102af8329fa)) -- introduce crdt-list ([cd95e22](https://github.com/loro-dev/loro/commit/cd95e2276cfc1e09a13ae67906c1c2b32fc75675)) -- introduce rope ([c25500d](https://github.com/loro-dev/loro/commit/c25500df044c6af0912217b001bd8b0ac263e515)) -- iter update in rle tree ([bc980c5](https://github.com/loro-dev/loro/commit/bc980c5b02e08240eb71e3ac0af7f7b92313fa1b)) -- list & text states ([2cbe214](https://github.com/loro-dev/loro/commit/2cbe21463cd6b24b312bc6da7eafd0d052f0738f)) -- list container ([077d696](https://github.com/loro-dev/loro/commit/077d696952f458bca6e2f156882303f02f7ed49f)) -- list diff calculator ([d2c3eea](https://github.com/loro-dev/loro/commit/d2c3eead90585850180ecd115cf2638ff3597b43)) -- list init ([29c4d20](https://github.com/loro-dev/loro/commit/29c4d2011e6853e708f1bde4a42055606048ffea)) -- list push_front ([5743f8d](https://github.com/loro-dev/loro/commit/5743f8d989f728ddefae66307e55213b1295e1ec)) -- loro use auto commit transaction ([47d1bb6](https://github.com/loro-dev/loro/commit/47d1bb603f6e3f09bd11f74e9f30f9dabd943a8e)) -- LoroValue Binary ([331dc6c](https://github.com/loro-dev/loro/commit/331dc6c994aa53ee21b83c77847c51528b1d70a5)) -- make capacity adjustable ([92434cc](https://github.com/loro-dev/loro/commit/92434ccdfc839ebe52cf3b87035d5b4178ca7bc1)) -- make getting child container handler simple ([#104](https://github.com/loro-dev/loro/issues/104)) ([b22bd98](https://github.com/loro-dev/loro/commit/b22bd98f6b55e2e2661e708d623f9458515c7919)) -- map basic ([a44a3cd](https://github.com/loro-dev/loro/commit/a44a3cd72b923845fdfc7b1385cfad989dbef534)) -- map container ([aa9590b](https://github.com/loro-dev/loro/commit/aa9590b54017d4e8daa18072ee3a600fe58498c0)) -- map transaction ([4652d83](https://github.com/loro-dev/loro/commit/4652d839ec1d32d2541f842cdfbd51460e5eecf9)) -- mermaid ([77065bf](https://github.com/loro-dev/loro/commit/77065bf57ee3af4d44a063615fe9eda36d2829cb)) -- **minor:** add a min match size ([e8ca8d6](https://github.com/loro-dev/loro/commit/e8ca8d61edfcf5807ef47fe6f1d724cd47d2d7bb)) -- movable tree support ([#120](https://github.com/loro-dev/loro/issues/120)) ([e01e984](https://github.com/loro-dev/loro/commit/e01e98411c49e607a486a5478dc6a5a899ff6d9b)) -- new map diff and map state ([4a8ce16](https://github.com/loro-dev/loro/commit/4a8ce16ff1e48119810c207932aec1688ac2dfba)) -- new rle vec ([1c5cd94](https://github.com/loro-dev/loro/commit/1c5cd948edd447b412c0fa538bda2717ef2c56a5)) -- notify ([72599b9](https://github.com/loro-dev/loro/commit/72599b99d1d612e5bdc10ee57c3a0818d4b4550c)) -- op iter ([6c61c6b](https://github.com/loro-dev/loro/commit/6c61c6baf26280a60e057e7b2055497e2a9a9d9b)) -- pending bk ([fdacd62](https://github.com/loro-dev/loro/commit/fdacd6282810d6c71c310b6f9952fe9625c2ec09)) -- pending import ([c1a72c3](https://github.com/loro-dev/loro/commit/c1a72c3d7e2feb73258177226cb1d02d16385b17)) -- pending remote changes, todo snapshot ([80a9d12](https://github.com/loro-dev/loro/commit/80a9d12ccc7d16e0699a9dfb05271a62f3746892)) -- pending snapshot ([c34df16](https://github.com/loro-dev/loro/commit/c34df16dcb878c98558c6df3cf9958a80381837c)) -- Peritext-like rich text support ([#123](https://github.com/loro-dev/loro/issues/123)) ([d942e3d](https://github.com/loro-dev/loro/commit/d942e3d7a2394509de0837faac3b453903d5d4e3)) -- pin ([10bac8c](https://github.com/loro-dev/loro/commit/10bac8c2934ed6cf6803427a260e263034474fbf)) -- readonly arena ([cc4e1d0](https://github.com/loro-dev/loro/commit/cc4e1d02e4b563fb35aab8a25526e6e8eac23ed9)) -- record diff in app state ([7f3bd5b](https://github.com/loro-dev/loro/commit/7f3bd5b0a462bb6511521d9556f9da58a0e86962)) -- record hierarchical info ([9bdb6b9](https://github.com/loro-dev/loro/commit/9bdb6b9fd4406a5715463db46a39d0a8b5493185)) -- recursive emit events ([fbebb5b](https://github.com/loro-dev/loro/commit/fbebb5b8e86207cb78313dee253f1b60bddb2291)) -- recursive map type; but perf becomes worse ([3d2ea64](https://github.com/loro-dev/loro/commit/3d2ea6479ac29d82c93046fd01a9a9cf86b38d4e)) -- remove gc ([99c8529](https://github.com/loro-dev/loro/commit/99c852955987e855dd64242c45cea23f8d6aa6f3)) -- replace notify set range method ([bd30f67](https://github.com/loro-dev/loro/commit/bd30f675a654de90b7d0369b3422476b64957130)) -- return cursor in iter ([0d99ceb](https://github.com/loro-dev/loro/commit/0d99ceb01ce09b992c9abebf854722f5c33ba386)) -- reuse tracker ([a1d1517](https://github.com/loro-dev/loro/commit/a1d1517de093a2feca12d29e6699c80f012355a7)) -- rle ([2c7e2de](https://github.com/loro-dev/loro/commit/2c7e2de7639b14b3be1dbb8caeec21d4615bd792)) -- rle tree insert ([028e3ba](https://github.com/loro-dev/loro/commit/028e3ba3f99adb2dcb73b838039040fee8924603)) -- root subscriber & apply event to value ([aaf4e68](https://github.com/loro-dev/loro/commit/aaf4e6822b73fa8cfe8bf9c5f52bf5287f9a74cf)) -- set range ([bf8973c](https://github.com/loro-dev/loro/commit/bf8973c7583e847a9855679fd235e5b835d250f0)) -- setup framework ([fb27c16](https://github.com/loro-dev/loro/commit/fb27c1656b89d83084a2afe5345d4ab9f6166c2f)) -- simple export and import ([5c47f2e](https://github.com/loro-dev/loro/commit/5c47f2e04e4315a7ac8405cb52530c84e62b67a0)) -- state snapshot ([2fedf8d](https://github.com/loro-dev/loro/commit/2fedf8d3967a2c02dab21ddb7ab2429b2e2955dc)) -- state snapshot import ([85865e5](https://github.com/loro-dev/loro/commit/85865e592ac699906dcacb38cbac78f1cfb9e720)) -- subscribe for container events ([470d23a](https://github.com/loro-dev/loro/commit/470d23a1988a75cb43c1b2c8a9321a72c33c202c)) -- subscribe unsubscribe ([e153f11](https://github.com/loro-dev/loro/commit/e153f113b8fe4823ddf7304a7a5b2ce10b04e895)) -- supply-chain safety with cargo-vet ([1252bcd](https://github.com/loro-dev/loro/commit/1252bcdda99e17893d5dde6cfe47cbd09399f71b)) -- support richtext in wasm & mark text with arbitrary value ([#142](https://github.com/loro-dev/loro/issues/142)) ([a40b5c6](https://github.com/loro-dev/loro/commit/a40b5c6e4a0a9a80e43d651f4596323182615069)), closes [#139](https://github.com/loro-dev/loro/issues/139) -- support txn abort for states ([fd588be](https://github.com/loro-dev/loro/commit/fd588beee27a41e00d3baf2d7529784237bc5a19)) -- supports setting capacity ([346117f](https://github.com/loro-dev/loro/commit/346117ff5425876b5f5a870e306d4da5e60c3138)) -- text transaction ([46e2c5a](https://github.com/loro-dev/loro/commit/46e2c5a960796420ea601351c321e96f555ebd33)) -- text utf16 ([00dbf06](https://github.com/loro-dev/loro/commit/00dbf0622d5acb6163bd7c369cafdd4bd40798a0)) -- to json and from json ([154ddfc](https://github.com/loro-dev/loro/commit/154ddfcfe56734647fdba8a75bc4e296d6e93015)) -- transaction decode ([0ff122b](https://github.com/loro-dev/loro/commit/0ff122b68e7a063b5368e98542f89a0d13da7290)) -- txn apply local op ([4634f0d](https://github.com/loro-dev/loro/commit/4634f0ddbb5cce07dafddb924c131795b73f2aa0)) -- update at cursor pos ([374e323](https://github.com/loro-dev/loro/commit/374e32384ed56d6552d929bf9431e8bd1ece3971)) -- update columnar ([5b0f3e3](https://github.com/loro-dev/loro/commit/5b0f3e3f50d9e13761a899bb103fcbdd9653cf93)) -- use columnar iterable ([a1c3eea](https://github.com/loro-dev/loro/commit/a1c3eea4f12a981a1f9e0908a15ecde8d12de9db)) -- use ContainerTrait ([9fefd75](https://github.com/loro-dev/loro/commit/9fefd75fb61bda94249b7f37d73cf12690590b45)) -- use text tracker diff ([c50294a](https://github.com/loro-dev/loro/commit/c50294ac228df15146e9be9d148001683fd05b44)) -- use the same api for container and temp container ([4bb3ea8](https://github.com/loro-dev/loro/commit/4bb3ea8b1b0c1f4019825ec9810f2dd25a1ecfaa)) -- wasm encode decode basic ([91e7b3a](https://github.com/loro-dev/loro/commit/91e7b3ac87cabc700ccd9b4ac84eaa2991836fe0)) -- wasm transaction ([ce00729](https://github.com/loro-dev/loro/commit/ce007295e13f5cb342411146a574977792a89b32)) -- **wasm:** get deep value ([66d74c1](https://github.com/loro-dev/loro/commit/66d74c1e74c34bde619cfa455394e5e4c3cf5266)) -- **wasm:** root subscribe & unsubscribe ([572fe85](https://github.com/loro-dev/loro/commit/572fe857a069abf2cff7eecdb4e71547d27a1f4b)) - -### Bug Fixes - -- decode snapshot after pending ([4a1f4e8](https://github.com/loro-dev/loro/commit/4a1f4e86477a14d77973500ca1ca2feb2c30ca82)) -- a few common ancestors bugs ([906aebf](https://github.com/loro-dev/loro/commit/906aebfa8abb53927ecaf4d0dd555adb0b8cb478)) -- a few recursive bugs ([0fac770](https://github.com/loro-dev/loro/commit/0fac77030945495582b3492d7ecf0f99aa62e4b8)) -- a weird deps bug ([b1d438d](https://github.com/loro-dev/loro/commit/b1d438d08d6e76bbeac01ff1175d295cda2c7e50)) -- adapt crdt-list change ([a7ce6dd](https://github.com/loro-dev/loro/commit/a7ce6ddfd6515d219dbc7a9b9588ad8fcce1a291)) -- add 2 site tests & fix update cursor bug ([b099b45](https://github.com/loro-dev/loro/commit/b099b4507c810045fe62981a00568ef60ea8e541)) -- add compress ([3727fb7](https://github.com/loro-dev/loro/commit/3727fb7f7218a7ba79e8fe5f2d618702ee3ad56c)) -- add debug info & reduce 40% mem usage ([1e9d576](https://github.com/loro-dev/loro/commit/1e9d5769f30a86df7608eae51d762dff01e076f4)) -- add err when updates cannot be apply ([e4b6c5b](https://github.com/loro-dev/loro/commit/e4b6c5b96c17ca044ea71674954d91cf42bd8a8c)) -- add event diff test & fix related bugs ([0a421d3](https://github.com/loro-dev/loro/commit/0a421d3931084af604130f0817bd2790e90cab45)) -- add local info ([f9f556f](https://github.com/loro-dev/loro/commit/f9f556f822c65e64bf4988e0479c32d9ad1aa835)) -- add root tracking test & and fix several related bugs ([06d53dd](https://github.com/loro-dev/loro/commit/06d53dd8a26a7db1050d26154950f01025e8a80f)) -- add safety comment to rle ([9240ad1](https://github.com/loro-dev/loro/commit/9240ad12ee03033e7f20df4642461b3e9449205d)) -- all vv and head vv error ([18235db](https://github.com/loro-dev/loro/commit/18235db95fb50b6b1e750ad77495546125949008)) -- all_vv update ([8dbdf04](https://github.com/loro-dev/loro/commit/8dbdf04228de4f01616cf122c14c37eb9ae9f573)) -- allow holes exist in tracker vv ([beeda6c](https://github.com/loro-dev/loro/commit/beeda6ccf6dda333315c096dd6b473a3cb05dbae)) -- apply effects order ([16dd4c7](https://github.com/loro-dev/loro/commit/16dd4c7182b83b5b0958c5047a0144ac170801fa)) -- avoid potential memory leak ([6a2da8a](https://github.com/loro-dev/loro/commit/6a2da8a01f9a8f82a63a6672f679471e848c68db)) -- avoid repeatedly apply ([36adcd0](https://github.com/loro-dev/loro/commit/36adcd0ba302ad25723f09c152a265dbde2213dd)) -- avoid Unresolved as PrelimValue ([a04d079](https://github.com/loro-dev/loro/commit/a04d0794aafc7173a2f7d53ecaf92c75047aec80)) -- avoid zero len del in text ([b805661](https://github.com/loro-dev/loro/commit/b8056614f5a7f11a50630a72586dfbf7fbfcb916)) -- basic import export test ([788808b](https://github.com/loro-dev/loro/commit/788808b05530f3f4e4d320094e8f9669e2786030)) -- batch notify should be sorted by path length ([fb8a0e2](https://github.com/loro-dev/loro/commit/fb8a0e2e7b42e1aa8a0e1732269dd93bd42ee9d5)) -- better capacity setting ([59d9c9b](https://github.com/loro-dev/loro/commit/59d9c9ba34b778362a52ea0e55d1182d0c407317)) -- better dag find common ancestor ([e11e93f](https://github.com/loro-dev/loro/commit/e11e93fe07ec9033ca5212c742c3c0f785970dbc)) -- bugs related to unknown type ([3d07e7e](https://github.com/loro-dev/loro/commit/3d07e7e7e5b3701b39f91a8366814d10de813634)) -- build event when commit ([dd4e7d5](https://github.com/loro-dev/loro/commit/dd4e7d5ee89d33a1b38d7aebb3da84ee2e3d4054)) -- build links between leaf nodes ([3fb88bd](https://github.com/loro-dev/loro/commit/3fb88bde6ee3321b3a4af1f85d4b23705346f758)) -- cache error ([8807d43](https://github.com/loro-dev/loro/commit/8807d43eca9795401e08bbe96984aefadbf2c763)) -- cache update in list diff calc ([5f5db10](https://github.com/loro-dev/loro/commit/5f5db10a6db50be3ff98594650614a72a4d901a2)) -- calculate lamport by deps ([e418978](https://github.com/loro-dev/loro/commit/e4189785ea2d0ffa8cc65863e60f37b701da20e3)) -- cap ([6546577](https://github.com/loro-dev/loro/commit/65465774efe6d8bcc9c67e1b5b21a9b69a1d3b6a)) -- cargo fix ([50b2834](https://github.com/loro-dev/loro/commit/50b283493d316b3b6356ba1a9dff7dee11ee63ba)) -- causal iter sort ([73bc9a7](https://github.com/loro-dev/loro/commit/73bc9a74f94deb0d48d7c5d930d539294bbe9b30)) -- change deps bug ([6dcd9d1](https://github.com/loro-dev/loro/commit/6dcd9d19e842f2c95b67b047cfb2491dbdb41ba9)) -- changes traveler bug ([3551bc4](https://github.com/loro-dev/loro/commit/3551bc4e99293961bc9d789fad86dc67cd5da241)) -- check err ([6a8087c](https://github.com/loro-dev/loro/commit/6a8087c756946467bdca2d3866d74ebf22146375)) -- checkout result err ([05f8023](https://github.com/loro-dev/loro/commit/05f802376eab01442a27e6c970a9618923d1a123)) -- client idx use Rle ([e048224](https://github.com/loro-dev/loro/commit/e0482242639ee25f3264fa52fc0e75f701e9c285)) -- columnar iter name ([0b64a56](https://github.com/loro-dev/loro/commit/0b64a567ed9fb6dc11df7764ce6e9dfea2c7a512)) -- commit txn when dropping ([93a52ba](https://github.com/loro-dev/loro/commit/93a52ba55ed786664e302ed97400ef230a1d1093)) -- common ancestor step 1 ([352ddc1](https://github.com/loro-dev/loro/commit/352ddc1c11a633cdbcffd6353b630f738d6e7fef)) -- compress flag ([b3420e4](https://github.com/loro-dev/loro/commit/b3420e4f649bee7f89a4f396a3136bc34552b5b9)) -- container id should be converted to js string ([f27786f](https://github.com/loro-dev/loro/commit/f27786fa2592b683cca9160f707b4ca2ed8a375a)) -- container length is inconsistent when fuzzing caused by decode ([95ad837](https://github.com/loro-dev/loro/commit/95ad837a79ffde6ae92fb2f6abc1f218d9982408)) -- container may be deleted from doc when editing ([bc66583](https://github.com/loro-dev/loro/commit/bc66583863ddc6076337fa195c52e7f7d3f3b81b)) -- crdt-list yata integrate err ([4213d4c](https://github.com/loro-dev/loro/commit/4213d4c488b1f96c90f2ee66ba6109050ce19695)) -- cursor get_sliced should have len > 0 ([9d31605](https://github.com/loro-dev/loro/commit/9d31605bde7013db38d8c173345f883404f0dd5b)) -- cursor should be invalidated ([65d6f4f](https://github.com/loro-dev/loro/commit/65d6f4ffe90465fa66bd15cfcfc124a21f0050a5)) -- cursor should not use Deref ([a93d9f7](https://github.com/loro-dev/loro/commit/a93d9f762d78dff472640ed54320d57766fcfa72)) -- dag ([78faec3](https://github.com/loro-dev/loro/commit/78faec33a1b43499df9c6d3e19ba0ec2b6f35d6c)) -- dag issues ([8db4778](https://github.com/loro-dev/loro/commit/8db47780b9ee5349b8c6c9db67dcd944317f6592)) -- dag partial iter bug ([6473d9c](https://github.com/loro-dev/loro/commit/6473d9c11ef13950a96296ae388197dae87303bb)) -- dead lock on list ([b94274d](https://github.com/loro-dev/loro/commit/b94274d8b983b178045563dab8a5c5c7cb03b3e3)) -- decode batch ([#54](https://github.com/loro-dev/loro/issues/54)) ([625771c](https://github.com/loro-dev/loro/commit/625771c37da67ce30d707ac00a8cfee00ddf8173)) -- decode deps ([45c1a2e](https://github.com/loro-dev/loro/commit/45c1a2e791d5c1de0bcbe4505f552149138a0334)) -- decode hierarchy for snapshot mode ([4748e1d](https://github.com/loro-dev/loro/commit/4748e1d38c10c285dd055e2611ec04db26582776)) -- decode notify ([27eb840](https://github.com/loro-dev/loro/commit/27eb84052503800262923fb3902e592e05f7fe3f)) -- decode remove unknown ([eb8a076](https://github.com/loro-dev/loro/commit/eb8a07641f33b27da01f916fc4efb92a6c734f92)) -- decode unknown ([89a2659](https://github.com/loro-dev/loro/commit/89a2659dfb036cf9aae9ecce30c0eb48e4430d7b)) -- delete span iter bug ([ec4e192](https://github.com/loro-dev/loro/commit/ec4e1926cbf1c81f7797d087a950da3e26a52656)) -- delta compose delete insert ([c4a62be](https://github.com/loro-dev/loro/commit/c4a62bee37bb9f3fde5080f2f3629fcd10975991)) -- DeltaValue trait add length ([25c1f44](https://github.com/loro-dev/loro/commit/25c1f449be733d2f458ee6b6d6683922119f229f)) -- deno tests ([e01b695](https://github.com/loro-dev/loro/commit/e01b6954dbc56f378df74117c591d722f3b4de49)) -- dep counter ([b8e27dc](https://github.com/loro-dev/loro/commit/b8e27dc011f4b708ca913f5900b08fbc2464bd4c)) -- dep is in merged pending change ([d4f786e](https://github.com/loro-dev/loro/commit/d4f786e64a1d758dcf51db618e8ad026bf8df826)) -- diff calc err ([e15e207](https://github.com/loro-dev/loro/commit/e15e207cab86822336bc5708945c22bdbaec9142)) -- effect iter, get_cursor_at_id_span bug ([b057201](https://github.com/loro-dev/loro/commit/b0572016a02e55756bd7e47a7e083c28077c9222)) -- empty doc with pending decode snapshot ([7b012de](https://github.com/loro-dev/loro/commit/7b012dec0052f5001e28e219924a8b13679918e1)) -- empty input ([8bb427a](https://github.com/loro-dev/loro/commit/8bb427a969eecfd888234dddbb288e04ff26f3e3)) -- encode enhanced pending changes ([a77bf2f](https://github.com/loro-dev/loro/commit/a77bf2fcb3be552f789c547ec4e3491178e49de0)) -- encode use dep_on_self ([5b22a1e](https://github.com/loro-dev/loro/commit/5b22a1e9aa12b4098e70a6d488355b88ed8ad2ae)) -- encode when only create container but no op ([f468e3b](https://github.com/loro-dev/loro/commit/f468e3b57b89753b2861a9380bab7903b079c07b)) -- encode_from no compression by default ([#77](https://github.com/loro-dev/loro/issues/77)) ([1002c9c](https://github.com/loro-dev/loro/commit/1002c9cca569d38c7c7de6f2e42e5b6257c188b5)) -- encoding ([889f564](https://github.com/loro-dev/loro/commit/889f564779d9d8b2308a03a11d3b331f6a02f3a1)) -- encoding error ([a91b43a](https://github.com/loro-dev/loro/commit/a91b43ab2523cc686f0cb7b6d217779ad3a57d68)) -- encoding merge err ([3bb2d34](https://github.com/loro-dev/loro/commit/3bb2d3490ddb86faa638f6b96e8ebb32fd758d16)) -- encoding version use u8 ([bfeed8f](https://github.com/loro-dev/loro/commit/bfeed8fb2ed96513ca8fcc4e518a7767c4f215a2)) -- export iter bug ([985a8f6](https://github.com/loro-dev/loro/commit/985a8f6920749bb7c55a23b4e90377a76bba2370)) -- feature err ([2ecb156](https://github.com/loro-dev/loro/commit/2ecb156f3077f702bbe211a7896a37cd86c3fd05)) -- find yspan.origin right error ([5ac137c](https://github.com/loro-dev/loro/commit/5ac137c877a567cf357a62c040f31e46bf6d216b)) -- find_path ([15c60ae](https://github.com/loro-dev/loro/commit/15c60aece0b5446cc45988416ec1f17f7238de36)) -- first met dep may have smaller counter ([fec3c27](https://github.com/loro-dev/loro/commit/fec3c272f8494043fbd46f8139beae7c57e47cc9)) -- fix a delete bug & init bench ([9e66e2d](https://github.com/loro-dev/loro/commit/9e66e2dc681c3294cde35656416649995a5e0623)) -- fix a encode/decode issue ([3638e3d](https://github.com/loro-dev/loro/commit/3638e3d0ed2b321689243d97955eeb7571c0f465)) -- fix a few bugs ([61c27ca](https://github.com/loro-dev/loro/commit/61c27ca58b8b0ef62cae6fabbb136f56b976ac64)) -- fix a few bugs ([5f6d663](https://github.com/loro-dev/loro/commit/5f6d66368e2253926c4ff0eecdde5b35ba404d38)) -- fix a few import panic ([1d3cd60](https://github.com/loro-dev/loro/commit/1d3cd60873af32bfee27a89a2c4607275c8cec9b)) -- fix a few recursive_refactored bug ([16ec59d](https://github.com/loro-dev/loro/commit/16ec59ddee6b4436014a2b7343915b4b5df13de0)) -- fix insertion err ([1f0f502](https://github.com/loro-dev/loro/commit/1f0f502be536ebc12a6f7966a6627339d9a6f35d)) -- fix lamport infer in change encode ([f527de5](https://github.com/loro-dev/loro/commit/f527de5a2fbab77ed5cef8b4a118bedca411411c)) -- fix memory leak ([b582e00](https://github.com/loro-dev/loro/commit/b582e005cb2f0cafc556389e3e8a753db9b936aa)) -- fix several bugs ([bcc2c57](https://github.com/loro-dev/loro/commit/bcc2c5755601a225bb53d7b3c15add4f52940151)) -- fix several issues detected by fuzzer ([886c1cd](https://github.com/loro-dev/loro/commit/886c1cdd4a246c34da49bdfebcf89f8fd8980784)) -- fix several iter & delete bug ([5104e94](https://github.com/loro-dev/loro/commit/5104e94cd0e5943500f98971e197244ee2059b00)) -- fix yspan merge bug ([d7d626d](https://github.com/loro-dev/loro/commit/d7d626dd97d251be7eac6f699e26cac38f3318d0)) -- fuzz ([fba6024](https://github.com/loro-dev/loro/commit/fba6024754b2bcfffcda934280e0806520bae0d9)) -- fuzz deps ([e85ba3f](https://github.com/loro-dev/loro/commit/e85ba3f3407693167117644184874089aab1929b)) -- g-btree bug, fixed by upgrade dep ([a52549e](https://github.com/loro-dev/loro/commit/a52549ea309fa9bd581628c3b0268fac69ff123c)) -- g-btree delete leaf err ([bcf81a4](https://github.com/loro-dev/loro/commit/bcf81a45eb23ceb35a96af6914bdc785ca612571)) -- get container by id err ([b98c225](https://github.com/loro-dev/loro/commit/b98c22570d0c9bbc0307d7df4006b544a2379cac)) -- get cursors at id span bug ([7154b5e](https://github.com/loro-dev/loro/commit/7154b5e8fe93b50e478083b240f5ed977cc39b25)) -- get deep value & throw mismatched context err ([88003bd](https://github.com/loro-dev/loro/commit/88003bdffee01a5d41058e5044d8d9a6b8c77158)) -- get first cursor at id span err ([46252a4](https://github.com/loro-dev/loro/commit/46252a4b4a4efa10f20f96f152c18b9d3ca089b7)) -- get is span should consider unapplied status ([9080e68](https://github.com/loro-dev/loro/commit/9080e68c8991ad5b6ec32d74d70380822a47c752)) -- get lamport by frontiers bug ([3d3c54e](https://github.com/loro-dev/loro/commit/3d3c54eb92eb78e77e5485e51f5cb2f89e4650d2)) -- get path dead loop ([76f995f](https://github.com/loro-dev/loro/commit/76f995f48fd957c516818c6262e7e432d9bef6f0)) -- hierarchy notify ([a24e284](https://github.com/loro-dev/loro/commit/a24e284fbae519766fdb12eadced0ea87dfa527b)) -- impl Fugue correctly ([#133](https://github.com/loro-dev/loro/issues/133)) ([c9cf106](https://github.com/loro-dev/loro/commit/c9cf106338d0c4c6f94181156f0be0d303e1dcb6)) -- import ([f0b8cf3](https://github.com/loro-dev/loro/commit/f0b8cf301fbecd9d98f79ad1f762ba578a08f517)) -- import change slice ([e6a4be5](https://github.com/loro-dev/loro/commit/e6a4be5dcf60a6d37710f87f85e4f24cdab063aa)) -- import context diff should keep causal order ([63bb791](https://github.com/loro-dev/loro/commit/63bb791abae65d6539376976cdf13f525eadae4d)) -- imported changes were not mergeable ([#147](https://github.com/loro-dev/loro/issues/147)) ([5b65963](https://github.com/loro-dev/loro/commit/5b65963104da368ac48f8e83f1583958137fe28e)) -- insert / delete 0 length content ([31b0fa3](https://github.com/loro-dev/loro/commit/31b0fa335462f56934a7965f6ec7bcc34683a1c3)) -- insert map logic bug ([d34abee](https://github.com/loro-dev/loro/commit/d34abeef929c232b6fce858ee6a4314116ccf202)) -- interface update ([a20b4c9](https://github.com/loro-dev/loro/commit/a20b4c9e8b09de31889c1441892039d0c1c359ae)) -- it's possible to enter the no sibling state ([284f1e0](https://github.com/loro-dev/loro/commit/284f1e086217a1cfb6fc40f33215620f1e311c01)) -- iter bug ([3eae708](https://github.com/loro-dev/loro/commit/3eae708b245ae6551d9ff8089e5bea5178d90126)) -- iter bug & lamport bug & set init len for tracker ([9157e75](https://github.com/loro-dev/loro/commit/9157e75ed73f51d2f719f8b4f90a7128609bf5bc)) -- iter end ([90596fa](https://github.com/loro-dev/loro/commit/90596fa3e37406336880c56b10b2d932c130acd2)) -- lamport issue ([2a0f842](https://github.com/loro-dev/loro/commit/2a0f842fc503467ea1d7d1690f90353e4fadf27d)) -- lamport order ([0cbf5e2](https://github.com/loro-dev/loro/commit/0cbf5e25487fee3b147760c6f120eb4716cd19e7)) -- lamport remove sort ([033916c](https://github.com/loro-dev/loro/commit/033916c5320d6b1cbcbe21a93b6214f726b0be69)) -- list ([c7e5c90](https://github.com/loro-dev/loro/commit/c7e5c907d5c3fd40a939792e51ca41fdf547d8e0)) -- list assert err ([c798662](https://github.com/loro-dev/loro/commit/c798662dd1604c7aa87a5a035258a865d000e52d)) -- list iter and slice err ([882def3](https://github.com/loro-dev/loro/commit/882def3fc3b5df2c5787ec921f6b9457e0949dfd)) -- list op merge logic ([55c274d](https://github.com/loro-dev/loro/commit/55c274d5ace0188c4df26fbdd5e69c89759be888)) -- list state err ([fa13d1d](https://github.com/loro-dev/loro/commit/fa13d1d06fe6b3299360073dfd1b4d0adf05a515)) -- list use delta as op ([d144906](https://github.com/loro-dev/loro/commit/d14490650283aa9baa9214ecfbe17d54a77ddc11)) -- list_op delete merge error ([24773ac](https://github.com/loro-dev/loro/commit/24773ac217de4982a21465f24d70fd288bba516f)) -- lookup change ([f0266f0](https://github.com/loro-dev/loro/commit/f0266f015fe8fa7a199cebe07198cb3da8760277)) -- loro-crdt type ([aadde5a](https://github.com/loro-dev/loro/commit/aadde5af9ef3a2999f593f7422fd2a5ce87807b3)) -- make directly apply faster ([e7b1148](https://github.com/loro-dev/loro/commit/e7b1148c8a74ebf2d69d1a92d5d1a70315bbffc7)) -- make encoding enhanced simpler ([9b18ff9](https://github.com/loro-dev/loro/commit/9b18ff9847ba7e7fa7ac6e38b713e7435975ad72)) -- make events JsValue ([86057ad](https://github.com/loro-dev/loro/commit/86057adb0596309b5ccbff912f43df6d920efbd8)) -- make export less strict ([6c1fef7](https://github.com/loro-dev/loro/commit/6c1fef7c95ffd347562308f49dd462b6c17a434a)) -- make it work for text container simple cases ([26a68dc](https://github.com/loro-dev/loro/commit/26a68dc64a975f1e3043d3537cc85c942f84a9b0)) -- make LoroCore: Send + Sync ([#61](https://github.com/loro-dev/loro/issues/61)) ([a03c68a](https://github.com/loro-dev/loro/commit/a03c68a993796078125be2d01dd6ca29bb92ba00)) -- make LoroValue serialize & deserialize compatible with json and binary ([5ec8752](https://github.com/loro-dev/loro/commit/5ec8752d3df4d8844d7285e8f8544e0d354ecaa4)) -- make recursive case work ([f5ae229](https://github.com/loro-dev/loro/commit/f5ae229ca343556da7d5dc630178cea3acfc7a6f)) -- make subscription work ([db29178](https://github.com/loro-dev/loro/commit/db2917898241c7531be889fe6562161613c2bab2)) -- make text container send&sync ([39f5140](https://github.com/loro-dev/loro/commit/39f514022e89af00018ee0caeb448edecf115487)) -- make text event in wasm use utf16 as index and len ([#88](https://github.com/loro-dev/loro/issues/88)) ([3e64116](https://github.com/loro-dev/loro/commit/3e64116621fb0396524d4579f1227075f4f3d1a9)) -- map apply order ([8f6059d](https://github.com/loro-dev/loro/commit/8f6059df5ab3d262279cc5c6d4b3063b0be0ab2d)) -- map fuzz diff delete LoroValue::Null ([398ddcb](https://github.com/loro-dev/loro/commit/398ddcb25a17b2ba84d27d4d6c36711485546a4c)) -- map lamport order ([b6e9983](https://github.com/loro-dev/loro/commit/b6e9983eb7f47b9277f720f02284f592b839d199)) -- map pool mapping ([af29f7e](https://github.com/loro-dev/loro/commit/af29f7e20268fe344592adeba859adf4c911c12e)) -- map version checkout err ([#101](https://github.com/loro-dev/loro/issues/101)) ([72cc8c6](https://github.com/loro-dev/loro/commit/72cc8c6ed5bf9791dcf622d32dc87f826f0ebd60)) -- merge err ([1ce91be](https://github.com/loro-dev/loro/commit/1ce91be046a9ca84ed444359ec539e81c9afc12d)) -- merge err ([3ea9770](https://github.com/loro-dev/loro/commit/3ea97708710bebbd22ae2a364187ebd5c573381f)) -- mermaid links fix ([4a608cc](https://github.com/loro-dev/loro/commit/4a608cc958c000bed0f62fa4a11c4fb2f426fb38)) -- modify after merging ([2d316b4](https://github.com/loro-dev/loro/commit/2d316b4414c88ec154f0ea07077a2d27bcbd1f63)) -- nesting notify ([953a461](https://github.com/loro-dev/loro/commit/953a4613c64c78b38481aface0d1453640084fea)) -- new encode format ([dad7680](https://github.com/loro-dev/loro/commit/dad768049e4dd5f0c02be5f21a91bf5b42b89ef2)) -- no panic when integrate an deleted container ([a7f21e3](https://github.com/loro-dev/loro/commit/a7f21e3f44b70eb74409cd20cfcdf0048b980dbb)) -- nodejs patch ([5c0d8b7](https://github.com/loro-dev/loro/commit/5c0d8b74f4e32af2fc6c81d61b614009362c9cb2)) -- not leaking closure ([b0d7ad8](https://github.com/loro-dev/loro/commit/b0d7ad88b99c4c21ef74f1bc655d5e4265e6c101)) -- notify ([77eac9e](https://github.com/loro-dev/loro/commit/77eac9eb304a0d0b837f34145bb6ef12084a496a)) -- notify fuzzy test ([2c11846](https://github.com/loro-dev/loro/commit/2c11846c99573c8109ccb282806dc3651dfc6b3c)) -- op content merge ([98c9360](https://github.com/loro-dev/loro/commit/98c9360a8576b6f70c7b7e27f74c8e6b0308864e)) -- op converter ([c294c61](https://github.com/loro-dev/loro/commit/c294c61343d1fdf9b5b69e4aa9547284c85aa5ad)) -- op counter ([d1d2425](https://github.com/loro-dev/loro/commit/d1d242578f5576ceb21161aee910f1e7e3ce1cdf)) -- op iter bug ([3b42c06](https://github.com/loro-dev/loro/commit/3b42c06a01b288b921bbb08ad330518b7034b066)) -- opt offset [lamport] ([7c8aa72](https://github.com/loro-dev/loro/commit/7c8aa72969ab266b19a0a6527a386ee84a9dcb9a)) -- origin left should points to non-deleted ([7c032b6](https://github.com/loro-dev/loro/commit/7c032b63213e492da6d14ba074463d13a4b25fb3)) -- other client pending import (with debug ([9db061e](https://github.com/loro-dev/loro/commit/9db061ed36a44f8fcadc6841e06287021e7dfc66)) -- partial iter bug ([037093f](https://github.com/loro-dev/loro/commit/037093f6bd5a933f7e4b23cfa43e5ae7088c3395)) -- pass dag prop test ([56be50c](https://github.com/loro-dev/loro/commit/56be50c1b6b9215457f93a0a9532b5a338eb1f34)) -- pass delta test ([344bbb1](https://github.com/loro-dev/loro/commit/344bbb1e344bcc443955432c82445e489b1d3f9e)) -- path reverse ([870b39e](https://github.com/loro-dev/loro/commit/870b39ec378b789cf0ea8e6f7676182f8d38c396)) -- post delete handler ([c8a83fe](https://github.com/loro-dev/loro/commit/c8a83fe67610a72b5ec8dee356dd2595f96d24f0)) -- prelim compatible with pool ([4194c79](https://github.com/loro-dev/loro/commit/4194c79fe7b883bf65ad00bb6505b437999c8ff5)) -- prelim transaction ([f165e25](https://github.com/loro-dev/loro/commit/f165e2594c7f2783c7b05c4c1c8162bf4ab00a1d)) -- range map ([96f29ee](https://github.com/loro-dev/loro/commit/96f29ee0fa2354ccc27cdc1294a3bf35e17e44be)) -- redefine and fix find common ancestor ([a9d57bf](https://github.com/loro-dev/loro/commit/a9d57bfc14707750fa1f4180f8f49a5cbd89a73b)) -- reduce heap alloc ([9c35aa2](https://github.com/loro-dev/loro/commit/9c35aa266cf4f9f0c67142a9876dc217f377b3eb)) -- reduce heap alloc ([43c2860](https://github.com/loro-dev/loro/commit/43c28608c61efd80b4174abca056f2b2587edc74)) -- reduce unsafe code ([b80a70b](https://github.com/loro-dev/loro/commit/b80a70bb2d48d1918373c2e49ac7fd50f22f5896)) -- refine mermaid diagram style ([bb3eb7b](https://github.com/loro-dev/loro/commit/bb3eb7b7a077a017676c3959e80573883e3d3bf2)) -- refine rangemap interface ([1933fe6](https://github.com/loro-dev/loro/commit/1933fe6a56b6380d6ae41de1334595c73c1a6866)) -- remove a few unsafe blocks about create cursor ([02ebfbc](https://github.com/loro-dev/loro/commit/02ebfbc0fcb3e011548491318ae7359c6d35fd9f)) -- remove auto commit ([04dd105](https://github.com/loro-dev/loro/commit/04dd105d33c26ed6bbd889c768d2cc4f0811706d)) -- remove changes error freeze behavior ([58fb7de](https://github.com/loro-dev/loro/commit/58fb7de26c1057694799f1847e2651b08f06b7a0)) -- remove checker to container inner ([73598c4](https://github.com/loro-dev/loro/commit/73598c49adf0eb50de0e539a14bdc660d7095a94)) -- remove container encoding ([16400dd](https://github.com/loro-dev/loro/commit/16400ddab08cf98fd8575aeb6d7cc3113867d4fb)) -- remove counter & lamport from RleUpdates encoding ([ea921e4](https://github.com/loro-dev/loro/commit/ea921e4c8fb40aeebc2bcf5c0d1eeaadd208ccae)) -- remove counter & lamport from snapshot ([ccfa3ee](https://github.com/loro-dev/loro/commit/ccfa3ee63d2e061856ed98ad33653fddc631dcef)) -- remove delta clone ([3a0b8d9](https://github.com/loro-dev/loro/commit/3a0b8d9d58cfe58eece1a27d7fc6c33f324b29b0)) -- remove events when delete container ([8f4b5f1](https://github.com/loro-dev/loro/commit/8f4b5f101a3c89aaaed054d36666ec1e4f667608)) -- remove heap ([e3a93be](https://github.com/loro-dev/loro/commit/e3a93be6a255e2ce65636fcec59058e71618a170)) -- remove lamport from snapshot ([d87b3b9](https://github.com/loro-dev/loro/commit/d87b3b960df91d26046fa2b5ddbfd1a5a50fe3b2)) -- remove needless check ([90fe4cc](https://github.com/loro-dev/loro/commit/90fe4cc69efbc502a28bf61baea096261a292726)) -- remove needless notify ([ff9877d](https://github.com/loro-dev/loro/commit/ff9877db4200c5a4347fc281044ec904b29b42a7)) -- remove needless notify ([83abf39](https://github.com/loro-dev/loro/commit/83abf398d19c2b5b0a6c8c40ef672504e51a9a4b)) -- remove over conservative check ([139d71e](https://github.com/loro-dev/loro/commit/139d71e64a6729ede2abfe616c98d2ae7620feac)) -- remove temp, add checker ([4f5f809](https://github.com/loro-dev/loro/commit/4f5f809bb63cf59fa39613f7d351406ec77f0918)) -- remove unknown type on content ([780f756](https://github.com/loro-dev/loro/commit/780f756450b2aeb95a051cd67a9421bcffc4107b)) -- rename has global index ([7e5c9b0](https://github.com/loro-dev/loro/commit/7e5c9b0b0ffab61d48d2bfff86a118035d2abb30)) -- resolve deep value ([1c7ccf2](https://github.com/loro-dev/loro/commit/1c7ccf2b53dc41e516449d0eeaf047a8e2e7f5f6)) -- return err when changes should be queued ([ae730d2](https://github.com/loro-dev/loro/commit/ae730d2b8ce5bb179621ab5932be8cae49bd474c)) -- return Err when index out of bound ([532eee0](https://github.com/loro-dev/loro/commit/532eee09a427ed34ae8e2bc3ffad6c50030f7c8e)) -- return none for deleted container when finding path ([d2123a2](https://github.com/loro-dev/loro/commit/d2123a2099868bd3ca2d5e3b4a185e72b2d46316)) -- revert enhanced encoding ([05dc62a](https://github.com/loro-dev/loro/commit/05dc62a31c1636aede14b102e180730fb0d0a7ba)) -- richtext event ([#138](https://github.com/loro-dev/loro/issues/138)) ([95e6130](https://github.com/loro-dev/loro/commit/95e6130d930d710f7099a70591a6c405d79668c1)) -- rle iter logic ([4784918](https://github.com/loro-dev/loro/commit/478491831df1a27d6b134cb7ba0a208f736cd386)) -- rletree creator ([0127690](https://github.com/loro-dev/loro/commit/0127690b1156f36fe92fca0b066c30d01be35f1b)) -- rleUpdates lamport calculate ([52dd09d](https://github.com/loro-dev/loro/commit/52dd09db2a7378ff25ba8198805f6b107e876567)) -- rm snapshot start counter ([04cec60](https://github.com/loro-dev/loro/commit/04cec6048f3e1ececc08f2ea285428e23f7df9ba)) -- seq container vv error ([e385c09](https://github.com/loro-dev/loro/commit/e385c09e11ad05162cc7ed80673108cb6eefef99)) -- set small range err ([592199a](https://github.com/loro-dev/loro/commit/592199ab6575cc3aa17a275129ae8cba70f94111)) -- settimeout by default in subscription ([94f481e](https://github.com/loro-dev/loro/commit/94f481e65ebad1a5c48a4f36947233fe7e089e03)) -- should be readonly when doc is in detached mode ([640828b](https://github.com/loro-dev/loro/commit/640828bf26c0bed1f77d1910a332d9bcb0ce65b7)) -- should filter out non-active spans on delete ([a2fcd73](https://github.com/loro-dev/loro/commit/a2fcd73b44ea21dc5888212bb7821da9f1a559e3)) -- should keep deleted container id in hierarchy ([8722208](https://github.com/loro-dev/loro/commit/872220851d65e60bbeddda11809f5f20d5f2ad1a)) -- should notify err ([c611728](https://github.com/loro-dev/loro/commit/c611728d8891a4fb67764f1265de63b0118e6f3b)) -- should use slicerange in text container ([114e129](https://github.com/loro-dev/loro/commit/114e12944de5ad0414522f92f39c61953064d95a)) -- simplify create level when apply update ([81b8f2c](https://github.com/loro-dev/loro/commit/81b8f2c591233521e703148766c6ee9b1e29e820)) -- simplify get siblings ([6da6cd2](https://github.com/loro-dev/loro/commit/6da6cd29154cb929650dfe84a608afb0a0078998)) -- simplify op set ([bc57f01](https://github.com/loro-dev/loro/commit/bc57f01e181aaa80990cde96a78b6dd2dc0514fe)) -- slice issue ([ec07825](https://github.com/loro-dev/loro/commit/ec07825c4f426a88f7287077cd1a446470cf8e85)) -- snapshot container error due to temp idx ([dc69267](https://github.com/loro-dev/loro/commit/dc6926773c06899a91b93146d69386f56a5d100c)) -- snapshot encode err ([#135](https://github.com/loro-dev/loro/issues/135)) ([8235eaa](https://github.com/loro-dev/loro/commit/8235eaaa9b797ef28128a5df697f9c2430e5628a)) -- snapshot encoding err ([2a436e0](https://github.com/loro-dev/loro/commit/2a436e07ad96a68ccb1ca654bc2626ac2b451890)) -- snapshot load diff ([7ffac80](https://github.com/loro-dev/loro/commit/7ffac80215c5568a06c7dbb6c7c4dc6ac0fadaf8)) -- snapshot pending import ([ac80775](https://github.com/loro-dev/loro/commit/ac80775b17987b0a537d0b0d660ddc0d57390634)) -- snapshot unknown and change value to i64 ([af6342a](https://github.com/loro-dev/loro/commit/af6342a52d8f35609d8211fcb9f96abda52256f3)) -- SnapshotOp map use u32 ([d2b8941](https://github.com/loro-dev/loro/commit/d2b8941f06bc85d0c320c1f62a6c4bb42892dcc8)) -- some suggestions about rm lamport ([1743f4a](https://github.com/loro-dev/loro/commit/1743f4af42b6a0761eb922e1acd2c157476bf6ee)) -- sort change by ord ([e196e23](https://github.com/loro-dev/loro/commit/e196e23581cbad87611e082aa6dc96c7a290d3ea)) -- sort key -lamport ([de12fc8](https://github.com/loro-dev/loro/commit/de12fc8da9498fa55217ac73a72d37def53389bd)) -- speed up encode ([6020198](https://github.com/loro-dev/loro/commit/60201989ec2ea2a893c2d39af673489985b9cba1)) -- still apply op from deleted container ([fcffc29](https://github.com/loro-dev/loro/commit/fcffc2924f40604ab6111ee6d215bcceea40580a)) -- string fuzzy ([1df1f1d](https://github.com/loro-dev/loro/commit/1df1f1d2bffff8f1759760f79eb31ee975f58956)) -- styling ([0241567](https://github.com/loro-dev/loro/commit/02415676eac8931b5a7e6c099056b5ba3bee34c4)) -- test ([38ccf36](https://github.com/loro-dev/loro/commit/38ccf36b9d2a4a0ccd70a0242e51918fb06effde)) -- text container heads update ([93af1c7](https://github.com/loro-dev/loro/commit/93af1c72c5eecfc2f2cd7154f4520703211ab1e7)) -- text sync issues ([abec22c](https://github.com/loro-dev/loro/commit/abec22cd223fac89b0d670543f0ba9cbbbb8b58e)) -- to json result ([b1738e3](https://github.com/loro-dev/loro/commit/b1738e34a941d043f299d4c1d8fe6b109dfd4f21)) -- to_json resolve deep ([3faaf25](https://github.com/loro-dev/loro/commit/3faaf259918bc45432aa3ac1d0360fbd7a4e68ea)) -- to_json resolve deep ([11292e3](https://github.com/loro-dev/loro/commit/11292e3337956f91906411f247d9d6580bd53789)) -- to_json resolve deep ([8a3f205](https://github.com/loro-dev/loro/commit/8a3f20524e437c54ed8e37ff834783b89e1d663e)) -- tracker state fix ([12e2899](https://github.com/loro-dev/loro/commit/12e2899bdd5098d16f4acd7b161789b7cbba04d2)) -- transaction ([74a7aa6](https://github.com/loro-dev/loro/commit/74a7aa6c1a0b78e1b34222a4af28ae4d8793c1c8)) -- transaction op apply ([1979c23](https://github.com/loro-dev/loro/commit/1979c2312585e5d6ccb78c71403b54c46c9f4c16)) -- tree balance issue ([d36c41b](https://github.com/loro-dev/loro/commit/d36c41b7cd6c44fdab33c18550cfb1b674ceef97)) -- try merging parent after its children removed ([7191668](https://github.com/loro-dev/loro/commit/7191668a65459c3dc2d58b47e3529e330cef6fa4)) -- try to avoid recursive lock in notification ([05f19de](https://github.com/loro-dev/loro/commit/05f19de9ded7d732852a07a37d5800472f42f5ea)) -- try to put origin right to an un deleted elem ([0509db4](https://github.com/loro-dev/loro/commit/0509db416b5ffc04f40eb14dfc6c1e1ad47366de)) -- two sites sync issue ([69521a9](https://github.com/loro-dev/loro/commit/69521a97efde9c15d2f8af484d7c5bdc1d84d87b)) -- type err ([3a0c00f](https://github.com/loro-dev/loro/commit/3a0c00fdecd97b08df5103ed32284df631a97c2e)) -- type err ([8a15d2e](https://github.com/loro-dev/loro/commit/8a15d2e86308aed67149727864ab0e6a457f4597)) -- type error ([cb26a46](https://github.com/loro-dev/loro/commit/cb26a46b9e0dc6cc8b809ac7dfa2a330a50eb5f6)) -- typo on op -> diff ([aa151a4](https://github.com/loro-dev/loro/commit/aa151a48f54c2fca93a0e08419c427b7b8f1e619)) -- ues try_lock ([cf1f7dc](https://github.com/loro-dev/loro/commit/cf1f7dc443796598835b27e5543b920a362f24ad)) -- unsound (violate borrow stack rules) bugs detected by Miri ([#32](https://github.com/loro-dev/loro/issues/32)) ([f757b86](https://github.com/loro-dev/loro/commit/f757b86f5c1bec4ac7ccdc5b0fa9aa3657906b79)) -- unsubscribe ([8545a0a](https://github.com/loro-dev/loro/commit/8545a0aa7536a5e3fb74b2542787d319a8dd9f72)) -- update bumpalo fix potential leaks ([737c14e](https://github.com/loro-dev/loro/commit/737c14e99a8d4c44d2072a2307acdc4171e384be)) -- update crate path ([fbb2403](https://github.com/loro-dev/loro/commit/fbb2403f8fa56c811b7b27fa2dfe09c445d951e3)) -- update deps ([cc3a869](https://github.com/loro-dev/loro/commit/cc3a869ee4dcd38c33b9a40a3659172791189e39)) -- update leaf cache when create new elem by del ([e30ba86](https://github.com/loro-dev/loro/commit/e30ba86653f6caa8395c1159999e74e4fd9a906c)) -- use &mut instead of BumpBox for Node ([12e2937](https://github.com/loro-dev/loro/commit/12e29374dc2e3829516ff1a536d1397e7c010f06)) -- use after free in heap mode when deleting ([f7821f0](https://github.com/loro-dev/loro/commit/f7821f05153ef6f9214b0871a3cec8e7e0d5aacb)) -- use better structure for log store access ([4fc987f](https://github.com/loro-dev/loro/commit/4fc987f42a1c940adff0b3e7de9dd224b56d1d70)) -- use BTreeMap to iter node content ([7ec25b3](https://github.com/loro-dev/loro/commit/7ec25b396e767b0c975e33a3cd4e5342451cd3eb)) -- use container id when converting unresolved to jsvalue ([16e76ea](https://github.com/loro-dev/loro/commit/16e76eaf8e422b0cf88735cada6ebf1ef3d7b794)) -- use heap mode in text state ([62891e2](https://github.com/loro-dev/loro/commit/62891e25b3e1973b84ce9213935e72bac249f5aa)), closes [#8](https://github.com/loro-dev/loro/issues/8) -- use LoroValue as json content ([2e1d508](https://github.com/loro-dev/loro/commit/2e1d5080a53995027aac91b2818070d0805de594)) -- use LoroValue as json content ([fabef2a](https://github.com/loro-dev/loro/commit/fabef2ad3579e2bf3e40857fdd8309511b4fa0b9)) -- use Option as delta meta ([449a772](https://github.com/loro-dev/loro/commit/449a77254d9d183be95ba095257e0a1cb9d02c28)) -- use promise.then instead of timeout ([32378a7](https://github.com/loro-dev/loro/commit/32378a71882928f99888021ee05b3a2fa233523c)) -- use split_off to take n ([6fd81c8](https://github.com/loro-dev/loro/commit/6fd81c8d20ff170760fa6dd3dd34631763e8cd99)) -- use stack instead of heap ([5707258](https://github.com/loro-dev/loro/commit/57072585a1c9f1f6cc4624872a21cbc7061e9ae3)) -- use topological sort for causal iter ([ee22d29](https://github.com/loro-dev/loro/commit/ee22d295737c42a1db090e4cd6974e25ac8624ba)) -- use Transaction to decode/import ([#92](https://github.com/loro-dev/loro/issues/92)) ([e51d6f8](https://github.com/loro-dev/loro/commit/e51d6f8760bdebc5aff202aa3cb7af3e1e7e8d9a)) -- use update encoding by default ([bd3ac43](https://github.com/loro-dev/loro/commit/bd3ac432032b07ec3147caea5bb112619251e8bd)) -- use utf16 by default for text in wasm ([4c37235](https://github.com/loro-dev/loro/commit/4c372359e696694516029d9bfe9772d700d1f88d)) -- utf16 len fallback to utf8 when unknown ([#93](https://github.com/loro-dev/loro/issues/93)) ([bbcb6f3](https://github.com/loro-dev/loro/commit/bbcb6f39577857f8b6876bd4e8210ca61e677cb1)) -- utf16 query err ([#151](https://github.com/loro-dev/loro/issues/151)) ([5a9baeb](https://github.com/loro-dev/loro/commit/5a9baebba0148dfd2113320b4dab9b916c183c21)) -- vec slice bug ([cf3e3ee](https://github.com/loro-dev/loro/commit/cf3e3ee3616de9c07c4442e396a5c7da478367d3)) -- vec slice is ill defined ([610a651](https://github.com/loro-dev/loro/commit/610a651b5c02b654ad2ebe28bb4524c5a2481a8e)) -- warnings ([200a6dd](https://github.com/loro-dev/loro/commit/200a6dd39adcdb0e998bc718b7b977f207448659)) -- wasm add client id check ([9734860](https://github.com/loro-dev/loro/commit/973486067ae9aa911e60bec1043e631e7710df53)) -- wasm change peerid should be bigint ([48611c5](https://github.com/loro-dev/loro/commit/48611c5f15615924719b46dd96ce09c44e898c20)) -- wasm hierarchy notify dead lock ([80640ca](https://github.com/loro-dev/loro/commit/80640ca4e1812dc6cdcf4569575993cfcb06977b)) -- wasm interface ([e124bbb](https://github.com/loro-dev/loro/commit/e124bbbec10d6c91a6ccf43dbec40927315b77e8)) -- wasm loro class inner mutability ([6a02ce1](https://github.com/loro-dev/loro/commit/6a02ce1568c6674747603daa85d035f56b2ffd36)) -- wasm type convert err ([3c7e939](https://github.com/loro-dev/loro/commit/3c7e939020dd834530ce3ed1f02d2e2386a9d88b)) -- yata fuzzing now works ([b11fe73](https://github.com/loro-dev/loro/commit/b11fe7394e0ea5094f9bebd43570d56b8abfdc0b)) -- yata fuzzing works now ([7f728db](https://github.com/loro-dev/loro/commit/7f728db4952d37a5f62c217bf8cac08266750b6d)) -- yata id spans generate bug ([280382c](https://github.com/loro-dev/loro/commit/280382c39cbe034df42b306e1fca38875949f5db)) -- yspan slice bug ([8406b18](https://github.com/loro-dev/loro/commit/8406b182ae0717c955dba008a96fdd044f808ecc)) diff --git a/loro-js/LICENSE b/loro-js/LICENSE deleted file mode 100644 index bffe7781b..000000000 --- a/loro-js/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Loro - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/loro-js/README.md b/loro-js/README.md deleted file mode 100644 index 2a6cc838b..000000000 --- a/loro-js/README.md +++ /dev/null @@ -1,138 +0,0 @@ -

- - - - - -

-

-Loro -

-

- Reimagine state management with CRDTs 🦜
- Make your app state synchronized and collaborative effortlessly. -

-

- loro-dev%2Floro | Trendshift -

-

- - Documentation - - | - - Getting Started - - | - - Rust Doc - -

-

- - - - - - -

- - -https://github.com/loro-dev/loro/assets/18425020/fe246c47-a120-44b3-91d4-1e7232a5b4ac - -Loro is a [CRDTs(Conflict-free Replicated Data Types)](https://crdt.tech/) library that makes building [local-first apps][local-first] easier. It is currently available for JavaScript (via WASM) and Rust developers. - -Explore our vision in our blog: [**✨ Reimagine State Management with CRDTs**](https://loro.dev/blog/loro-now-open-source). - -# Features - -**Basic Features Provided by CRDTs** - -- P2P Synchronization -- Automatic Merging -- Local Availability -- Scalability -- Delta Updates - -**Supported CRDT Algorithms** - -- 📝 Text Editing with [Fugue] -- 📙 [Peritext-like Rich Text CRDT](https://loro.dev/blog/loro-richtext) -- 🌲 [Moveable Tree](https://loro.dev/docs/tutorial/tree) -- 🚗 [Moveable List](https://loro.dev/docs/tutorial/list) -- 🗺️ [Last-Write-Wins Map](https://loro.dev/docs/tutorial/map) -- 🔄 [Replayable Event Graph](https://loro.dev/docs/advanced/replayable_event_graph) - -**Advanced Features in Loro** - -- 📖 Preserve Editing History in a [Replayable Event Graph](https://loro.dev/docs/advanced/replayable_event_graph) -- ⏱️ Fast [Time Travel](https://loro.dev/docs/tutorial/time_travel) Through History - -https://github.com/loro-dev/loro/assets/18425020/ec2d20a3-3d8c-4483-a601-b200243c9792 - -# Example - -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/edit/loro-basic-test?file=test%2Floro-sync.test.ts) - -```ts -import { expect, test } from 'vitest'; -import { Loro, LoroList } from 'loro-crdt'; - -/** - * Demonstrates synchronization of two documents with two rounds of exchanges. - */ -// Initialize document A -const docA = new Loro(); -const listA: LoroList = docA.getList('list'); -listA.insert(0, 'A'); -listA.insert(1, 'B'); -listA.insert(2, 'C'); - -// Export the state of document A as a byte array -const bytes: Uint8Array = docA.exportFrom(); - -// Simulate sending `bytes` across the network to another peer, B -const docB = new Loro(); -// Peer B imports the updates from A -docB.import(bytes); - -// Verify that B's state matches A's state -expect(docB.toJSON()).toStrictEqual({ - list: ['A', 'B', 'C'], -}); - -// Get the current operation log version of document B -const version = docB.oplogVersion(); - -// Simulate editing at B: delete item 'B' -const listB: LoroList = docB.getList('list'); -listB.delete(1, 1); - -// Export the updates from B since the last synchronization point -const bytesB: Uint8Array = docB.exportFrom(version); - -// Simulate sending `bytesB` back across the network to A -// A imports the updates from B -docA.import(bytesB); - -// Verify that the list at A now matches the list at B after merging -expect(docA.toJSON()).toStrictEqual({ - list: ['A', 'C'], -}); -``` - -# Credits - -Loro draws inspiration from the innovative work of the following projects and individuals: - -- [Ink & Switch](https://inkandswitch.com/): The principles of Local-first Software have greatly influenced this project. The [Peritext](https://www.inkandswitch.com/peritext/) project has also shaped our approach to rich text CRDTs. -- [Diamond-types](https://github.com/josephg/diamond-types): The [Replayable Event Graph (REG)](https://loro.dev/docs/advanced/replayable_event_graph) algorithm from @josephg has been adapted to reduce the computation and space usage of CRDTs. -- [Automerge](https://github.com/automerge/automerge): Their use of columnar encoding for CRDTs has informed our strategies for efficient data encoding. -- [Yjs](https://github.com/yjs/yjs): We have incorporated a similar algorithm for effectively merging collaborative editing operations, thanks to their pioneering works. -- [Matthew Weidner](https://mattweidner.com/): His work on the [Fugue](https://arxiv.org/abs/2305.00583) algorithm has been invaluable, enhancing our text editing capabilities. -- [Martin Kleppmann](https://martin.kleppmann.com/): His work on CRDTs has significantly influenced our comprehension of the field. - - -[local-first]: https://www.inkandswitch.com/local-first/ -[Fugue]: https://arxiv.org/abs/2305.00583 -[Peritext]: https://www.inkandswitch.com/peritext/ diff --git a/loro-js/deno/.vscode/settings.json b/loro-js/deno/.vscode/settings.json deleted file mode 100644 index cbac5697b..000000000 --- a/loro-js/deno/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "deno.enable": true -} diff --git a/loro-js/deno/deno.json b/loro-js/deno/deno.json deleted file mode 100644 index f1a9d757a..000000000 --- a/loro-js/deno/deno.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "@loro/loro", - "version": "0.1.0", - "exports": "./mod.ts" -} diff --git a/loro-js/deno/mod.ts b/loro-js/deno/mod.ts deleted file mode 100644 index 96f8df8c1..000000000 --- a/loro-js/deno/mod.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "npm:loro-crdt@0.14.2"; diff --git a/loro-js/deno/test.ts b/loro-js/deno/test.ts deleted file mode 100644 index 274db3ec3..000000000 --- a/loro-js/deno/test.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Loro } from "./mod.ts"; -import { expect } from 'npm:expect' - -Deno.test("test", () => { - const doc = new Loro(); - const text = doc.getText("text"); - text.insert(0, "123") - expect(text.toString()).toEqual("123"); - text.insert(0, "123") - expect(text.toString()).toEqual("123123"); - const docB = Loro.fromSnapshot(doc.exportSnapshot()); - expect(docB.getText('text').toString()).toEqual("123123"); -}) diff --git a/loro-js/package.json b/loro-js/package.json deleted file mode 100644 index 661c6ab16..000000000 --- a/loro-js/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "loro-crdt", - "version": "1.0.7", - "description": "Loro CRDTs is a high-performance CRDT framework that makes your app state synchronized, collaborative and maintainable effortlessly.", - "keywords": [ - "crdt", - "CRDTs", - "realtime", - "collaboration", - "sync", - "p2p" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/loro-dev/loro.git" - }, - "main": "dist/loro.js", - "module": "dist/loro.mjs", - "typings": "dist/loro.d.ts", - "scripts": { - "build": "rollup -c", - "watch": "rollup -c -w", - "test": "node --expose-gc ./node_modules/vitest/vitest.mjs run && npx tsc --noEmit", - "prepublish": "pnpm run build" - }, - "author": "Loro", - "homepage": "https://loro.dev", - "license": "MIT", - "dependencies": { - "loro-wasm": "workspace:*" - }, - "devDependencies": { - "@rollup/plugin-node-resolve": "^15.0.1", - "@typescript-eslint/parser": "^6.2.0", - "@vitest/ui": "^1.0.4", - "esbuild": "^0.18.20", - "eslint": "^8.46.0", - "loro-crdt-old": "npm:loro-crdt@=0.16.0", - "loro-crdt-alpha-4": "npm:loro-crdt@=1.0.0-alpha.4", - "prettier": "^3.0.0", - "rollup": "^3.20.1", - "rollup-plugin-dts": "^5.3.0", - "rollup-plugin-esbuild": "^5.0.0", - "typescript": "^5.0.2", - "vite": "^4.2.1", - "vite-plugin-wasm": "^3.2.2", - "vitest": "^1.4.0" - } -} diff --git a/loro-js/pnpm-lock.yaml b/loro-js/pnpm-lock.yaml deleted file mode 100644 index ebe9bde86..000000000 --- a/loro-js/pnpm-lock.yaml +++ /dev/null @@ -1,1198 +0,0 @@ -lockfileVersion: 5.4 - -specifiers: - '@rollup/plugin-node-resolve': ^15.0.1 - esbuild: ^0.17.12 - loro-wasm: ^0.2.4 - rollup: ^3.20.1 - rollup-plugin-dts: ^5.3.0 - rollup-plugin-esbuild: ^5.0.0 - typescript: ^5.0.2 - vite: ^4.2.1 - vite-plugin-wasm: ^3.2.2 - vitest: ^0.29.7 - -dependencies: - loro-wasm: 0.2.4 - -devDependencies: - '@rollup/plugin-node-resolve': registry.npmmirror.com/@rollup/plugin-node-resolve/15.0.1_rollup@3.20.1 - esbuild: registry.npmmirror.com/esbuild/0.17.12 - rollup: registry.npmmirror.com/rollup/3.20.1 - rollup-plugin-dts: registry.npmmirror.com/rollup-plugin-dts/5.3.0_36lvh7uyik5cyyok7ph4zotgne - rollup-plugin-esbuild: registry.npmmirror.com/rollup-plugin-esbuild/5.0.0_4fotepe5hg34vfvsd27tojnb5y - typescript: registry.npmmirror.com/typescript/5.0.2 - vite: registry.npmmirror.com/vite/4.2.1 - vite-plugin-wasm: registry.npmmirror.com/vite-plugin-wasm/3.2.2_vite@4.2.1 - vitest: registry.npmmirror.com/vitest/0.29.7 - -packages: - - /@babel/code-frame/7.18.6: - resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} - engines: {node: '>=6.9.0'} - requiresBuild: true - dependencies: - '@babel/highlight': registry.npmmirror.com/@babel/highlight/7.18.6 - dev: true - optional: true - - /@esbuild/android-arm/0.17.12: - resolution: {integrity: sha512-E/sgkvwoIfj4aMAPL2e35VnUJspzVYl7+M1B2cqeubdBhADV4uPon0KCc8p2G+LqSJ6i8ocYPCqY3A4GGq0zkQ==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@esbuild/android-arm64/0.17.12: - resolution: {integrity: sha512-WQ9p5oiXXYJ33F2EkE3r0FRDFVpEdcDiwNX3u7Xaibxfx6vQE0Sb8ytrfQsA5WO6kDn6mDfKLh6KrPBjvkk7xA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@esbuild/android-x64/0.17.12: - resolution: {integrity: sha512-m4OsaCr5gT+se25rFPHKQXARMyAehHTQAz4XX1Vk3d27VtqiX0ALMBPoXZsGaB6JYryCLfgGwUslMqTfqeLU0w==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@esbuild/darwin-arm64/0.17.12: - resolution: {integrity: sha512-O3GCZghRIx+RAN0NDPhyyhRgwa19MoKlzGonIb5hgTj78krqp9XZbYCvFr9N1eUxg0ZQEpiiZ4QvsOQwBpP+lg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@esbuild/darwin-x64/0.17.12: - resolution: {integrity: sha512-5D48jM3tW27h1qjaD9UNRuN+4v0zvksqZSPZqeSWggfMlsVdAhH3pwSfQIFJwcs9QJ9BRibPS4ViZgs3d2wsCA==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@esbuild/freebsd-arm64/0.17.12: - resolution: {integrity: sha512-OWvHzmLNTdF1erSvrfoEBGlN94IE6vCEaGEkEH29uo/VoONqPnoDFfShi41Ew+yKimx4vrmmAJEGNoyyP+OgOQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/freebsd-x64/0.17.12: - resolution: {integrity: sha512-A0Xg5CZv8MU9xh4a+7NUpi5VHBKh1RaGJKqjxe4KG87X+mTjDE6ZvlJqpWoeJxgfXHT7IMP9tDFu7IZ03OtJAw==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-arm/0.17.12: - resolution: {integrity: sha512-WsHyJ7b7vzHdJ1fv67Yf++2dz3D726oO3QCu8iNYik4fb5YuuReOI9OtA+n7Mk0xyQivNTPbl181s+5oZ38gyA==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-arm64/0.17.12: - resolution: {integrity: sha512-cK3AjkEc+8v8YG02hYLQIQlOznW+v9N+OI9BAFuyqkfQFR+DnDLhEM5N8QRxAUz99cJTo1rLNXqRrvY15gbQUg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-ia32/0.17.12: - resolution: {integrity: sha512-jdOBXJqcgHlah/nYHnj3Hrnl9l63RjtQ4vn9+bohjQPI2QafASB5MtHAoEv0JQHVb/xYQTFOeuHnNYE1zF7tYw==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-loong64/0.17.12: - resolution: {integrity: sha512-GTOEtj8h9qPKXCyiBBnHconSCV9LwFyx/gv3Phw0pa25qPYjVuuGZ4Dk14bGCfGX3qKF0+ceeQvwmtI+aYBbVA==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-mips64el/0.17.12: - resolution: {integrity: sha512-o8CIhfBwKcxmEENOH9RwmUejs5jFiNoDw7YgS0EJTF6kgPgcqLFjgoc5kDey5cMHRVCIWc6kK2ShUePOcc7RbA==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-ppc64/0.17.12: - resolution: {integrity: sha512-biMLH6NR/GR4z+ap0oJYb877LdBpGac8KfZoEnDiBKd7MD/xt8eaw1SFfYRUeMVx519kVkAOL2GExdFmYnZx3A==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-riscv64/0.17.12: - resolution: {integrity: sha512-jkphYUiO38wZGeWlfIBMB72auOllNA2sLfiZPGDtOBb1ELN8lmqBrlMiucgL8awBw1zBXN69PmZM6g4yTX84TA==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-s390x/0.17.12: - resolution: {integrity: sha512-j3ucLdeY9HBcvODhCY4b+Ds3hWGO8t+SAidtmWu/ukfLLG/oYDMaA+dnugTVAg5fnUOGNbIYL9TOjhWgQB8W5g==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-x64/0.17.12: - resolution: {integrity: sha512-uo5JL3cgaEGotaqSaJdRfFNSCUJOIliKLnDGWaVCgIKkHxwhYMm95pfMbWZ9l7GeW9kDg0tSxcy9NYdEtjwwmA==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/netbsd-x64/0.17.12: - resolution: {integrity: sha512-DNdoRg8JX+gGsbqt2gPgkgb00mqOgOO27KnrWZtdABl6yWTST30aibGJ6geBq3WM2TIeW6COs5AScnC7GwtGPg==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/openbsd-x64/0.17.12: - resolution: {integrity: sha512-aVsENlr7B64w8I1lhHShND5o8cW6sB9n9MUtLumFlPhG3elhNWtE7M1TFpj3m7lT3sKQUMkGFjTQBrvDDO1YWA==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/sunos-x64/0.17.12: - resolution: {integrity: sha512-qbHGVQdKSwi0JQJuZznS4SyY27tYXYF0mrgthbxXrZI3AHKuRvU+Eqbg/F0rmLDpW/jkIZBlCO1XfHUBMNJ1pg==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-arm64/0.17.12: - resolution: {integrity: sha512-zsCp8Ql+96xXTVTmm6ffvoTSZSV2B/LzzkUXAY33F/76EajNw1m+jZ9zPfNJlJ3Rh4EzOszNDHsmG/fZOhtqDg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-ia32/0.17.12: - resolution: {integrity: sha512-FfrFjR4id7wcFYOdqbDfDET3tjxCozUgbqdkOABsSFzoZGFC92UK7mg4JKRc/B3NNEf1s2WHxJ7VfTdVDPN3ng==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-x64/0.17.12: - resolution: {integrity: sha512-JOOxw49BVZx2/5tW3FqkdjSD/5gXYeVGPDcB0lvap0gLQshkh1Nyel1QazC+wNxus3xPlsYAgqU1BUmrmCvWtw==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /fsevents/2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /loro-wasm/0.2.4: - resolution: {integrity: sha512-pkf2XjUlKy+NiugDNZbIPAA++Ghl/DvWC1HB+xq+Cbrdhp2asvzjtz/HpIK1s9aRdV1XENdFv51jv2w6kTlkKQ==} - dev: false - - registry.npmmirror.com/@babel/helper-validator-identifier/7.19.1: - resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz} - name: '@babel/helper-validator-identifier' - version: 7.19.1 - engines: {node: '>=6.9.0'} - dev: true - optional: true - - registry.npmmirror.com/@babel/highlight/7.18.6: - resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@babel/highlight/-/highlight-7.18.6.tgz} - name: '@babel/highlight' - version: 7.18.6 - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': registry.npmmirror.com/@babel/helper-validator-identifier/7.19.1 - chalk: registry.npmmirror.com/chalk/2.4.2 - js-tokens: registry.npmmirror.com/js-tokens/4.0.0 - dev: true - optional: true - - registry.npmmirror.com/@jridgewell/sourcemap-codec/1.4.14: - resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz} - name: '@jridgewell/sourcemap-codec' - version: 1.4.14 - dev: true - - registry.npmmirror.com/@rollup/plugin-node-resolve/15.0.1_rollup@3.20.1: - resolution: {integrity: sha512-ReY88T7JhJjeRVbfCyNj+NXAG3IIsVMsX9b5/9jC98dRP8/yxlZdz7mHZbHk5zHr24wZZICS5AcXsFZAXYUQEg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.0.1.tgz} - id: registry.npmmirror.com/@rollup/plugin-node-resolve/15.0.1 - name: '@rollup/plugin-node-resolve' - version: 15.0.1 - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.78.0||^3.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': registry.npmmirror.com/@rollup/pluginutils/5.0.2_rollup@3.20.1 - '@types/resolve': registry.npmmirror.com/@types/resolve/1.20.2 - deepmerge: registry.npmmirror.com/deepmerge/4.3.1 - is-builtin-module: registry.npmmirror.com/is-builtin-module/3.2.1 - is-module: registry.npmmirror.com/is-module/1.0.0 - resolve: registry.npmmirror.com/resolve/1.22.1 - rollup: registry.npmmirror.com/rollup/3.20.1 - dev: true - - registry.npmmirror.com/@rollup/pluginutils/5.0.2_rollup@3.20.1: - resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz} - id: registry.npmmirror.com/@rollup/pluginutils/5.0.2 - name: '@rollup/pluginutils' - version: 5.0.2 - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@types/estree': registry.npmmirror.com/@types/estree/1.0.0 - estree-walker: registry.npmmirror.com/estree-walker/2.0.2 - picomatch: registry.npmmirror.com/picomatch/2.3.1 - rollup: registry.npmmirror.com/rollup/3.20.1 - dev: true - - registry.npmmirror.com/@types/chai-subset/1.3.3: - resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/chai-subset/-/chai-subset-1.3.3.tgz} - name: '@types/chai-subset' - version: 1.3.3 - dependencies: - '@types/chai': registry.npmmirror.com/@types/chai/4.3.4 - dev: true - - registry.npmmirror.com/@types/chai/4.3.4: - resolution: {integrity: sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/chai/-/chai-4.3.4.tgz} - name: '@types/chai' - version: 4.3.4 - dev: true - - registry.npmmirror.com/@types/estree/1.0.0: - resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/estree/-/estree-1.0.0.tgz} - name: '@types/estree' - version: 1.0.0 - dev: true - - registry.npmmirror.com/@types/node/18.15.6: - resolution: {integrity: sha512-YErOafCZpK4g+Rp3Q/PBgZNAsWKGunQTm9FA3/Pbcm0VCriTEzcrutQ/SxSc0rytAp0NoFWue669jmKhEtd0sA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/node/-/node-18.15.6.tgz} - name: '@types/node' - version: 18.15.6 - dev: true - - registry.npmmirror.com/@types/resolve/1.20.2: - resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/resolve/-/resolve-1.20.2.tgz} - name: '@types/resolve' - version: 1.20.2 - dev: true - - registry.npmmirror.com/@vitest/expect/0.29.7: - resolution: {integrity: sha512-UtG0tW0DP6b3N8aw7PHmweKDsvPv4wjGvrVZW7OSxaFg76ShtVdMiMcUkZJgCE8QWUmhwaM0aQhbbVLo4F4pkA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@vitest/expect/-/expect-0.29.7.tgz} - name: '@vitest/expect' - version: 0.29.7 - dependencies: - '@vitest/spy': registry.npmmirror.com/@vitest/spy/0.29.7 - '@vitest/utils': registry.npmmirror.com/@vitest/utils/0.29.7 - chai: registry.npmmirror.com/chai/4.3.7 - dev: true - - registry.npmmirror.com/@vitest/runner/0.29.7: - resolution: {integrity: sha512-Yt0+csM945+odOx4rjZSjibQfl2ymxqVsmYz6sO2fiO5RGPYDFCo60JF6tLL9pz4G/kjY4irUxadeB1XT+H1jg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@vitest/runner/-/runner-0.29.7.tgz} - name: '@vitest/runner' - version: 0.29.7 - dependencies: - '@vitest/utils': registry.npmmirror.com/@vitest/utils/0.29.7 - p-limit: registry.npmmirror.com/p-limit/4.0.0 - pathe: registry.npmmirror.com/pathe/1.1.0 - dev: true - - registry.npmmirror.com/@vitest/spy/0.29.7: - resolution: {integrity: sha512-IalL0iO6A6Xz8hthR8sctk6ZS//zVBX48EiNwQguYACdgdei9ZhwMaBFV70mpmeYAFCRAm+DpoFHM5470Im78A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@vitest/spy/-/spy-0.29.7.tgz} - name: '@vitest/spy' - version: 0.29.7 - dependencies: - tinyspy: registry.npmmirror.com/tinyspy/1.1.1 - dev: true - - registry.npmmirror.com/@vitest/utils/0.29.7: - resolution: {integrity: sha512-vNgGadp2eE5XKCXtZXL5UyNEDn68npSct75OC9AlELenSK0DiV1Mb9tfkwJHKjRb69iek+e79iipoJx8+s3SdA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@vitest/utils/-/utils-0.29.7.tgz} - name: '@vitest/utils' - version: 0.29.7 - dependencies: - cli-truncate: registry.npmmirror.com/cli-truncate/3.1.0 - diff: registry.npmmirror.com/diff/5.1.0 - loupe: registry.npmmirror.com/loupe/2.3.6 - pretty-format: registry.npmmirror.com/pretty-format/27.5.1 - dev: true - - registry.npmmirror.com/acorn-walk/8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.2.0.tgz} - name: acorn-walk - version: 8.2.0 - engines: {node: '>=0.4.0'} - dev: true - - registry.npmmirror.com/acorn/8.8.2: - resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/acorn/-/acorn-8.8.2.tgz} - name: acorn - version: 8.8.2 - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - - registry.npmmirror.com/ansi-regex/5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz} - name: ansi-regex - version: 5.0.1 - engines: {node: '>=8'} - dev: true - - registry.npmmirror.com/ansi-regex/6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ansi-regex/-/ansi-regex-6.0.1.tgz} - name: ansi-regex - version: 6.0.1 - engines: {node: '>=12'} - dev: true - - registry.npmmirror.com/ansi-styles/3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ansi-styles/-/ansi-styles-3.2.1.tgz} - name: ansi-styles - version: 3.2.1 - engines: {node: '>=4'} - dependencies: - color-convert: registry.npmmirror.com/color-convert/1.9.3 - dev: true - optional: true - - registry.npmmirror.com/ansi-styles/5.2.0: - resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ansi-styles/-/ansi-styles-5.2.0.tgz} - name: ansi-styles - version: 5.2.0 - engines: {node: '>=10'} - dev: true - - registry.npmmirror.com/ansi-styles/6.2.1: - resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ansi-styles/-/ansi-styles-6.2.1.tgz} - name: ansi-styles - version: 6.2.1 - engines: {node: '>=12'} - dev: true - - registry.npmmirror.com/assertion-error/1.1.0: - resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/assertion-error/-/assertion-error-1.1.0.tgz} - name: assertion-error - version: 1.1.0 - dev: true - - registry.npmmirror.com/builtin-modules/3.3.0: - resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/builtin-modules/-/builtin-modules-3.3.0.tgz} - name: builtin-modules - version: 3.3.0 - engines: {node: '>=6'} - dev: true - - registry.npmmirror.com/cac/6.7.14: - resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/cac/-/cac-6.7.14.tgz} - name: cac - version: 6.7.14 - engines: {node: '>=8'} - dev: true - - registry.npmmirror.com/chai/4.3.7: - resolution: {integrity: sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/chai/-/chai-4.3.7.tgz} - name: chai - version: 4.3.7 - engines: {node: '>=4'} - dependencies: - assertion-error: registry.npmmirror.com/assertion-error/1.1.0 - check-error: registry.npmmirror.com/check-error/1.0.2 - deep-eql: registry.npmmirror.com/deep-eql/4.1.3 - get-func-name: registry.npmmirror.com/get-func-name/2.0.0 - loupe: registry.npmmirror.com/loupe/2.3.6 - pathval: registry.npmmirror.com/pathval/1.1.1 - type-detect: registry.npmmirror.com/type-detect/4.0.8 - dev: true - - registry.npmmirror.com/chalk/2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/chalk/-/chalk-2.4.2.tgz} - name: chalk - version: 2.4.2 - engines: {node: '>=4'} - dependencies: - ansi-styles: registry.npmmirror.com/ansi-styles/3.2.1 - escape-string-regexp: registry.npmmirror.com/escape-string-regexp/1.0.5 - supports-color: registry.npmmirror.com/supports-color/5.5.0 - dev: true - optional: true - - registry.npmmirror.com/check-error/1.0.2: - resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/check-error/-/check-error-1.0.2.tgz} - name: check-error - version: 1.0.2 - dev: true - - registry.npmmirror.com/cli-truncate/3.1.0: - resolution: {integrity: sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/cli-truncate/-/cli-truncate-3.1.0.tgz} - name: cli-truncate - version: 3.1.0 - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - slice-ansi: registry.npmmirror.com/slice-ansi/5.0.0 - string-width: registry.npmmirror.com/string-width/5.1.2 - dev: true - - registry.npmmirror.com/color-convert/1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/color-convert/-/color-convert-1.9.3.tgz} - name: color-convert - version: 1.9.3 - dependencies: - color-name: registry.npmmirror.com/color-name/1.1.3 - dev: true - optional: true - - registry.npmmirror.com/color-name/1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/color-name/-/color-name-1.1.3.tgz} - name: color-name - version: 1.1.3 - dev: true - optional: true - - registry.npmmirror.com/debug/4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz} - name: debug - version: 4.3.4 - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: registry.npmmirror.com/ms/2.1.2 - dev: true - - registry.npmmirror.com/deep-eql/4.1.3: - resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/deep-eql/-/deep-eql-4.1.3.tgz} - name: deep-eql - version: 4.1.3 - engines: {node: '>=6'} - dependencies: - type-detect: registry.npmmirror.com/type-detect/4.0.8 - dev: true - - registry.npmmirror.com/deepmerge/4.3.1: - resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/deepmerge/-/deepmerge-4.3.1.tgz} - name: deepmerge - version: 4.3.1 - engines: {node: '>=0.10.0'} - dev: true - - registry.npmmirror.com/diff/5.1.0: - resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/diff/-/diff-5.1.0.tgz} - name: diff - version: 5.1.0 - engines: {node: '>=0.3.1'} - dev: true - - registry.npmmirror.com/eastasianwidth/0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz} - name: eastasianwidth - version: 0.2.0 - dev: true - - registry.npmmirror.com/emoji-regex/9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/emoji-regex/-/emoji-regex-9.2.2.tgz} - name: emoji-regex - version: 9.2.2 - dev: true - - registry.npmmirror.com/es-module-lexer/1.2.0: - resolution: {integrity: sha512-2BMfqBDeVCcOlLaL1ZAfp+D868SczNpKArrTM3dhpd7dK/OVlogzY15qpUngt+LMTq5UC/csb9vVQAgupucSbA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/es-module-lexer/-/es-module-lexer-1.2.0.tgz} - name: es-module-lexer - version: 1.2.0 - dev: true - - registry.npmmirror.com/esbuild/0.17.12: - resolution: {integrity: sha512-bX/zHl7Gn2CpQwcMtRogTTBf9l1nl+H6R8nUbjk+RuKqAE3+8FDulLA+pHvX7aA7Xe07Iwa+CWvy9I8Y2qqPKQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild/-/esbuild-0.17.12.tgz} - name: esbuild - version: 0.17.12 - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/android-arm': 0.17.12 - '@esbuild/android-arm64': 0.17.12 - '@esbuild/android-x64': 0.17.12 - '@esbuild/darwin-arm64': 0.17.12 - '@esbuild/darwin-x64': 0.17.12 - '@esbuild/freebsd-arm64': 0.17.12 - '@esbuild/freebsd-x64': 0.17.12 - '@esbuild/linux-arm': 0.17.12 - '@esbuild/linux-arm64': 0.17.12 - '@esbuild/linux-ia32': 0.17.12 - '@esbuild/linux-loong64': 0.17.12 - '@esbuild/linux-mips64el': 0.17.12 - '@esbuild/linux-ppc64': 0.17.12 - '@esbuild/linux-riscv64': 0.17.12 - '@esbuild/linux-s390x': 0.17.12 - '@esbuild/linux-x64': 0.17.12 - '@esbuild/netbsd-x64': 0.17.12 - '@esbuild/openbsd-x64': 0.17.12 - '@esbuild/sunos-x64': 0.17.12 - '@esbuild/win32-arm64': 0.17.12 - '@esbuild/win32-ia32': 0.17.12 - '@esbuild/win32-x64': 0.17.12 - dev: true - - registry.npmmirror.com/escape-string-regexp/1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz} - name: escape-string-regexp - version: 1.0.5 - engines: {node: '>=0.8.0'} - dev: true - optional: true - - registry.npmmirror.com/estree-walker/2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz} - name: estree-walker - version: 2.0.2 - dev: true - - registry.npmmirror.com/function-bind/1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/function-bind/-/function-bind-1.1.1.tgz} - name: function-bind - version: 1.1.1 - dev: true - - registry.npmmirror.com/get-func-name/2.0.0: - resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/get-func-name/-/get-func-name-2.0.0.tgz} - name: get-func-name - version: 2.0.0 - dev: true - - registry.npmmirror.com/has-flag/3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/has-flag/-/has-flag-3.0.0.tgz} - name: has-flag - version: 3.0.0 - engines: {node: '>=4'} - dev: true - optional: true - - registry.npmmirror.com/has/1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/has/-/has-1.0.3.tgz} - name: has - version: 1.0.3 - engines: {node: '>= 0.4.0'} - dependencies: - function-bind: registry.npmmirror.com/function-bind/1.1.1 - dev: true - - registry.npmmirror.com/is-builtin-module/3.2.1: - resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz} - name: is-builtin-module - version: 3.2.1 - engines: {node: '>=6'} - dependencies: - builtin-modules: registry.npmmirror.com/builtin-modules/3.3.0 - dev: true - - registry.npmmirror.com/is-core-module/2.11.0: - resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/is-core-module/-/is-core-module-2.11.0.tgz} - name: is-core-module - version: 2.11.0 - dependencies: - has: registry.npmmirror.com/has/1.0.3 - dev: true - - registry.npmmirror.com/is-fullwidth-code-point/4.0.0: - resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz} - name: is-fullwidth-code-point - version: 4.0.0 - engines: {node: '>=12'} - dev: true - - registry.npmmirror.com/is-module/1.0.0: - resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/is-module/-/is-module-1.0.0.tgz} - name: is-module - version: 1.0.0 - dev: true - - registry.npmmirror.com/joycon/3.1.1: - resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/joycon/-/joycon-3.1.1.tgz} - name: joycon - version: 3.1.1 - engines: {node: '>=10'} - dev: true - - registry.npmmirror.com/js-tokens/4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz} - name: js-tokens - version: 4.0.0 - dev: true - optional: true - - registry.npmmirror.com/jsonc-parser/3.2.0: - resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz} - name: jsonc-parser - version: 3.2.0 - dev: true - - registry.npmmirror.com/local-pkg/0.4.3: - resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/local-pkg/-/local-pkg-0.4.3.tgz} - name: local-pkg - version: 0.4.3 - engines: {node: '>=14'} - dev: true - - registry.npmmirror.com/loupe/2.3.6: - resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/loupe/-/loupe-2.3.6.tgz} - name: loupe - version: 2.3.6 - dependencies: - get-func-name: registry.npmmirror.com/get-func-name/2.0.0 - dev: true - - registry.npmmirror.com/magic-string/0.30.0: - resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/magic-string/-/magic-string-0.30.0.tgz} - name: magic-string - version: 0.30.0 - engines: {node: '>=12'} - dependencies: - '@jridgewell/sourcemap-codec': registry.npmmirror.com/@jridgewell/sourcemap-codec/1.4.14 - dev: true - - registry.npmmirror.com/mlly/1.2.0: - resolution: {integrity: sha512-+c7A3CV0KGdKcylsI6khWyts/CYrGTrRVo4R/I7u/cUsy0Conxa6LUhiEzVKIw14lc2L5aiO4+SeVe4TeGRKww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/mlly/-/mlly-1.2.0.tgz} - name: mlly - version: 1.2.0 - dependencies: - acorn: registry.npmmirror.com/acorn/8.8.2 - pathe: registry.npmmirror.com/pathe/1.1.0 - pkg-types: registry.npmmirror.com/pkg-types/1.0.2 - ufo: registry.npmmirror.com/ufo/1.1.1 - dev: true - - registry.npmmirror.com/ms/2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz} - name: ms - version: 2.1.2 - dev: true - - registry.npmmirror.com/nanoid/3.3.4: - resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/nanoid/-/nanoid-3.3.4.tgz} - name: nanoid - version: 3.3.4 - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - dev: true - - registry.npmmirror.com/p-limit/4.0.0: - resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/p-limit/-/p-limit-4.0.0.tgz} - name: p-limit - version: 4.0.0 - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - yocto-queue: registry.npmmirror.com/yocto-queue/1.0.0 - dev: true - - registry.npmmirror.com/path-parse/1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz} - name: path-parse - version: 1.0.7 - dev: true - - registry.npmmirror.com/pathe/1.1.0: - resolution: {integrity: sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/pathe/-/pathe-1.1.0.tgz} - name: pathe - version: 1.1.0 - dev: true - - registry.npmmirror.com/pathval/1.1.1: - resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/pathval/-/pathval-1.1.1.tgz} - name: pathval - version: 1.1.1 - dev: true - - registry.npmmirror.com/picocolors/1.0.0: - resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz} - name: picocolors - version: 1.0.0 - dev: true - - registry.npmmirror.com/picomatch/2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz} - name: picomatch - version: 2.3.1 - engines: {node: '>=8.6'} - dev: true - - registry.npmmirror.com/pkg-types/1.0.2: - resolution: {integrity: sha512-hM58GKXOcj8WTqUXnsQyJYXdeAPbythQgEF3nTcEo+nkD49chjQ9IKm/QJy9xf6JakXptz86h7ecP2024rrLaQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/pkg-types/-/pkg-types-1.0.2.tgz} - name: pkg-types - version: 1.0.2 - dependencies: - jsonc-parser: registry.npmmirror.com/jsonc-parser/3.2.0 - mlly: registry.npmmirror.com/mlly/1.2.0 - pathe: registry.npmmirror.com/pathe/1.1.0 - dev: true - - registry.npmmirror.com/postcss/8.4.21: - resolution: {integrity: sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/postcss/-/postcss-8.4.21.tgz} - name: postcss - version: 8.4.21 - engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: registry.npmmirror.com/nanoid/3.3.4 - picocolors: registry.npmmirror.com/picocolors/1.0.0 - source-map-js: registry.npmmirror.com/source-map-js/1.0.2 - dev: true - - registry.npmmirror.com/pretty-format/27.5.1: - resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/pretty-format/-/pretty-format-27.5.1.tgz} - name: pretty-format - version: 27.5.1 - engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} - dependencies: - ansi-regex: registry.npmmirror.com/ansi-regex/5.0.1 - ansi-styles: registry.npmmirror.com/ansi-styles/5.2.0 - react-is: registry.npmmirror.com/react-is/17.0.2 - dev: true - - registry.npmmirror.com/react-is/17.0.2: - resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/react-is/-/react-is-17.0.2.tgz} - name: react-is - version: 17.0.2 - dev: true - - registry.npmmirror.com/resolve/1.22.1: - resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/resolve/-/resolve-1.22.1.tgz} - name: resolve - version: 1.22.1 - hasBin: true - dependencies: - is-core-module: registry.npmmirror.com/is-core-module/2.11.0 - path-parse: registry.npmmirror.com/path-parse/1.0.7 - supports-preserve-symlinks-flag: registry.npmmirror.com/supports-preserve-symlinks-flag/1.0.0 - dev: true - - registry.npmmirror.com/rollup-plugin-dts/5.3.0_36lvh7uyik5cyyok7ph4zotgne: - resolution: {integrity: sha512-8FXp0ZkyZj1iU5klkIJYLjIq/YZSwBoERu33QBDxm/1yw5UU4txrEtcmMkrq+ZiKu3Q4qvPCNqc3ovX6rjqzbQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/rollup-plugin-dts/-/rollup-plugin-dts-5.3.0.tgz} - id: registry.npmmirror.com/rollup-plugin-dts/5.3.0 - name: rollup-plugin-dts - version: 5.3.0 - engines: {node: '>=v14'} - peerDependencies: - rollup: ^3.0.0 - typescript: ^4.1 || ^5.0 - dependencies: - magic-string: registry.npmmirror.com/magic-string/0.30.0 - rollup: registry.npmmirror.com/rollup/3.20.1 - typescript: registry.npmmirror.com/typescript/5.0.2 - optionalDependencies: - '@babel/code-frame': 7.18.6 - dev: true - - registry.npmmirror.com/rollup-plugin-esbuild/5.0.0_4fotepe5hg34vfvsd27tojnb5y: - resolution: {integrity: sha512-1cRIOHAPh8WQgdQQyyvFdeOdxuiyk+zB5zJ5+YOwrZP4cJ0MT3Fs48pQxrZeyZHcn+klFherytILVfE4aYrneg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/rollup-plugin-esbuild/-/rollup-plugin-esbuild-5.0.0.tgz} - id: registry.npmmirror.com/rollup-plugin-esbuild/5.0.0 - name: rollup-plugin-esbuild - version: 5.0.0 - engines: {node: '>=14.18.0', npm: '>=8.0.0'} - peerDependencies: - esbuild: '>=0.10.1' - rollup: ^1.20.0 || ^2.0.0 || ^3.0.0 - dependencies: - '@rollup/pluginutils': registry.npmmirror.com/@rollup/pluginutils/5.0.2_rollup@3.20.1 - debug: registry.npmmirror.com/debug/4.3.4 - es-module-lexer: registry.npmmirror.com/es-module-lexer/1.2.0 - esbuild: registry.npmmirror.com/esbuild/0.17.12 - joycon: registry.npmmirror.com/joycon/3.1.1 - jsonc-parser: registry.npmmirror.com/jsonc-parser/3.2.0 - rollup: registry.npmmirror.com/rollup/3.20.1 - transitivePeerDependencies: - - supports-color - dev: true - - registry.npmmirror.com/rollup/3.20.1: - resolution: {integrity: sha512-sz2w8cBJlWQ2E17RcpvHuf4sk2BQx4tfKDnjNPikEpLEevrbIAR7CH3PGa2hpPwWbNgPaA9yh9Jzljds5bc9zg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/rollup/-/rollup-3.20.1.tgz} - name: rollup - version: 3.20.1 - engines: {node: '>=14.18.0', npm: '>=8.0.0'} - hasBin: true - optionalDependencies: - fsevents: 2.3.2 - dev: true - - registry.npmmirror.com/siginfo/2.0.0: - resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/siginfo/-/siginfo-2.0.0.tgz} - name: siginfo - version: 2.0.0 - dev: true - - registry.npmmirror.com/slice-ansi/5.0.0: - resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/slice-ansi/-/slice-ansi-5.0.0.tgz} - name: slice-ansi - version: 5.0.0 - engines: {node: '>=12'} - dependencies: - ansi-styles: registry.npmmirror.com/ansi-styles/6.2.1 - is-fullwidth-code-point: registry.npmmirror.com/is-fullwidth-code-point/4.0.0 - dev: true - - registry.npmmirror.com/source-map-js/1.0.2: - resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz} - name: source-map-js - version: 1.0.2 - engines: {node: '>=0.10.0'} - dev: true - - registry.npmmirror.com/source-map/0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz} - name: source-map - version: 0.6.1 - engines: {node: '>=0.10.0'} - dev: true - - registry.npmmirror.com/stackback/0.0.2: - resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/stackback/-/stackback-0.0.2.tgz} - name: stackback - version: 0.0.2 - dev: true - - registry.npmmirror.com/std-env/3.3.2: - resolution: {integrity: sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/std-env/-/std-env-3.3.2.tgz} - name: std-env - version: 3.3.2 - dev: true - - registry.npmmirror.com/string-width/5.1.2: - resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/string-width/-/string-width-5.1.2.tgz} - name: string-width - version: 5.1.2 - engines: {node: '>=12'} - dependencies: - eastasianwidth: registry.npmmirror.com/eastasianwidth/0.2.0 - emoji-regex: registry.npmmirror.com/emoji-regex/9.2.2 - strip-ansi: registry.npmmirror.com/strip-ansi/7.0.1 - dev: true - - registry.npmmirror.com/strip-ansi/7.0.1: - resolution: {integrity: sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.0.1.tgz} - name: strip-ansi - version: 7.0.1 - engines: {node: '>=12'} - dependencies: - ansi-regex: registry.npmmirror.com/ansi-regex/6.0.1 - dev: true - - registry.npmmirror.com/strip-literal/1.0.1: - resolution: {integrity: sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/strip-literal/-/strip-literal-1.0.1.tgz} - name: strip-literal - version: 1.0.1 - dependencies: - acorn: registry.npmmirror.com/acorn/8.8.2 - dev: true - - registry.npmmirror.com/supports-color/5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz} - name: supports-color - version: 5.5.0 - engines: {node: '>=4'} - dependencies: - has-flag: registry.npmmirror.com/has-flag/3.0.0 - dev: true - optional: true - - registry.npmmirror.com/supports-preserve-symlinks-flag/1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz} - name: supports-preserve-symlinks-flag - version: 1.0.0 - engines: {node: '>= 0.4'} - dev: true - - registry.npmmirror.com/tinybench/2.4.0: - resolution: {integrity: sha512-iyziEiyFxX4kyxSp+MtY1oCH/lvjH3PxFN8PGCDeqcZWAJ/i+9y+nL85w99PxVzrIvew/GSkSbDYtiGVa85Afg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/tinybench/-/tinybench-2.4.0.tgz} - name: tinybench - version: 2.4.0 - dev: true - - registry.npmmirror.com/tinypool/0.4.0: - resolution: {integrity: sha512-2ksntHOKf893wSAH4z/+JbPpi92esw8Gn9N2deXX+B0EO92hexAVI9GIZZPx7P5aYo5KULfeOSt3kMOmSOy6uA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/tinypool/-/tinypool-0.4.0.tgz} - name: tinypool - version: 0.4.0 - engines: {node: '>=14.0.0'} - dev: true - - registry.npmmirror.com/tinyspy/1.1.1: - resolution: {integrity: sha512-UVq5AXt/gQlti7oxoIg5oi/9r0WpF7DGEVwXgqWSMmyN16+e3tl5lIvTaOpJ3TAtu5xFzWccFRM4R5NaWHF+4g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/tinyspy/-/tinyspy-1.1.1.tgz} - name: tinyspy - version: 1.1.1 - engines: {node: '>=14.0.0'} - dev: true - - registry.npmmirror.com/type-detect/4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/type-detect/-/type-detect-4.0.8.tgz} - name: type-detect - version: 4.0.8 - engines: {node: '>=4'} - dev: true - - registry.npmmirror.com/typescript/5.0.2: - resolution: {integrity: sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/typescript/-/typescript-5.0.2.tgz} - name: typescript - version: 5.0.2 - engines: {node: '>=12.20'} - hasBin: true - dev: true - - registry.npmmirror.com/ufo/1.1.1: - resolution: {integrity: sha512-MvlCc4GHrmZdAllBc0iUDowff36Q9Ndw/UzqmEKyrfSzokTd9ZCy1i+IIk5hrYKkjoYVQyNbrw7/F8XJ2rEwTg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ufo/-/ufo-1.1.1.tgz} - name: ufo - version: 1.1.1 - dev: true - - registry.npmmirror.com/vite-node/0.29.7_@types+node@18.15.6: - resolution: {integrity: sha512-PakCZLvz37yFfUPWBnLa1OYHPCGm5v4pmRrTcFN4V/N/T3I6tyP3z07S//9w+DdeL7vVd0VSeyMZuAh+449ZWw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite-node/-/vite-node-0.29.7.tgz} - id: registry.npmmirror.com/vite-node/0.29.7 - name: vite-node - version: 0.29.7 - engines: {node: '>=v14.16.0'} - hasBin: true - dependencies: - cac: registry.npmmirror.com/cac/6.7.14 - debug: registry.npmmirror.com/debug/4.3.4 - mlly: registry.npmmirror.com/mlly/1.2.0 - pathe: registry.npmmirror.com/pathe/1.1.0 - picocolors: registry.npmmirror.com/picocolors/1.0.0 - vite: registry.npmmirror.com/vite/4.2.1_@types+node@18.15.6 - transitivePeerDependencies: - - '@types/node' - - less - - sass - - stylus - - sugarss - - supports-color - - terser - dev: true - - registry.npmmirror.com/vite-plugin-wasm/3.2.2_vite@4.2.1: - resolution: {integrity: sha512-cdbBUNR850AEoMd5nvLmnyeq63CSfoP1ctD/L2vLk/5+wsgAPlAVAzUK5nGKWO/jtehNlrSSHLteN+gFQw7VOA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite-plugin-wasm/-/vite-plugin-wasm-3.2.2.tgz} - id: registry.npmmirror.com/vite-plugin-wasm/3.2.2 - name: vite-plugin-wasm - version: 3.2.2 - peerDependencies: - vite: ^2 || ^3 || ^4 - dependencies: - vite: registry.npmmirror.com/vite/4.2.1 - dev: true - - registry.npmmirror.com/vite/4.2.1: - resolution: {integrity: sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite/-/vite-4.2.1.tgz} - name: vite - version: 4.2.1 - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - '@types/node': '>= 14' - less: '*' - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - esbuild: registry.npmmirror.com/esbuild/0.17.12 - postcss: registry.npmmirror.com/postcss/8.4.21 - resolve: registry.npmmirror.com/resolve/1.22.1 - rollup: registry.npmmirror.com/rollup/3.20.1 - optionalDependencies: - fsevents: 2.3.2 - dev: true - - registry.npmmirror.com/vite/4.2.1_@types+node@18.15.6: - resolution: {integrity: sha512-7MKhqdy0ISo4wnvwtqZkjke6XN4taqQ2TBaTccLIpOKv7Vp2h4Y+NpmWCnGDeSvvn45KxvWgGyb0MkHvY1vgbg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite/-/vite-4.2.1.tgz} - id: registry.npmmirror.com/vite/4.2.1 - name: vite - version: 4.2.1 - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - '@types/node': '>= 14' - less: '*' - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - '@types/node': registry.npmmirror.com/@types/node/18.15.6 - esbuild: registry.npmmirror.com/esbuild/0.17.12 - postcss: registry.npmmirror.com/postcss/8.4.21 - resolve: registry.npmmirror.com/resolve/1.22.1 - rollup: registry.npmmirror.com/rollup/3.20.1 - optionalDependencies: - fsevents: 2.3.2 - dev: true - - registry.npmmirror.com/vitest/0.29.7: - resolution: {integrity: sha512-aWinOSOu4jwTuZHkb+cCyrqQ116Q9TXaJrNKTHudKBknIpR0VplzeaOUuDF9jeZcrbtQKZQt6yrtd+eakbaxHg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vitest/-/vitest-0.29.7.tgz} - name: vitest - version: 0.29.7 - engines: {node: '>=v14.16.0'} - hasBin: true - peerDependencies: - '@edge-runtime/vm': '*' - '@vitest/browser': '*' - '@vitest/ui': '*' - happy-dom: '*' - jsdom: '*' - safaridriver: '*' - webdriverio: '*' - peerDependenciesMeta: - '@edge-runtime/vm': - optional: true - '@vitest/browser': - optional: true - '@vitest/ui': - optional: true - happy-dom: - optional: true - jsdom: - optional: true - safaridriver: - optional: true - webdriverio: - optional: true - dependencies: - '@types/chai': registry.npmmirror.com/@types/chai/4.3.4 - '@types/chai-subset': registry.npmmirror.com/@types/chai-subset/1.3.3 - '@types/node': registry.npmmirror.com/@types/node/18.15.6 - '@vitest/expect': registry.npmmirror.com/@vitest/expect/0.29.7 - '@vitest/runner': registry.npmmirror.com/@vitest/runner/0.29.7 - '@vitest/spy': registry.npmmirror.com/@vitest/spy/0.29.7 - '@vitest/utils': registry.npmmirror.com/@vitest/utils/0.29.7 - acorn: registry.npmmirror.com/acorn/8.8.2 - acorn-walk: registry.npmmirror.com/acorn-walk/8.2.0 - cac: registry.npmmirror.com/cac/6.7.14 - chai: registry.npmmirror.com/chai/4.3.7 - debug: registry.npmmirror.com/debug/4.3.4 - local-pkg: registry.npmmirror.com/local-pkg/0.4.3 - pathe: registry.npmmirror.com/pathe/1.1.0 - picocolors: registry.npmmirror.com/picocolors/1.0.0 - source-map: registry.npmmirror.com/source-map/0.6.1 - std-env: registry.npmmirror.com/std-env/3.3.2 - strip-literal: registry.npmmirror.com/strip-literal/1.0.1 - tinybench: registry.npmmirror.com/tinybench/2.4.0 - tinypool: registry.npmmirror.com/tinypool/0.4.0 - tinyspy: registry.npmmirror.com/tinyspy/1.1.1 - vite: registry.npmmirror.com/vite/4.2.1_@types+node@18.15.6 - vite-node: registry.npmmirror.com/vite-node/0.29.7_@types+node@18.15.6 - why-is-node-running: registry.npmmirror.com/why-is-node-running/2.2.2 - transitivePeerDependencies: - - less - - sass - - stylus - - sugarss - - supports-color - - terser - dev: true - - registry.npmmirror.com/why-is-node-running/2.2.2: - resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/why-is-node-running/-/why-is-node-running-2.2.2.tgz} - name: why-is-node-running - version: 2.2.2 - engines: {node: '>=8'} - hasBin: true - dependencies: - siginfo: registry.npmmirror.com/siginfo/2.0.0 - stackback: registry.npmmirror.com/stackback/0.0.2 - dev: true - - registry.npmmirror.com/yocto-queue/1.0.0: - resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/yocto-queue/-/yocto-queue-1.0.0.tgz} - name: yocto-queue - version: 1.0.0 - engines: {node: '>=12.20'} - dev: true diff --git a/loro-js/rollup.config.mjs b/loro-js/rollup.config.mjs deleted file mode 100644 index 70244fd6b..000000000 --- a/loro-js/rollup.config.mjs +++ /dev/null @@ -1,37 +0,0 @@ -import { defineConfig } from "rollup"; -import dts from "rollup-plugin-dts"; -import esbuild from "rollup-plugin-esbuild"; -import packageJson from "./package.json" assert { type: "json" }; - -const name = packageJson.main.replace(/\.js$/, ""); - -const bundle = (config) => ({ - ...config, - input: "src/index.ts", - external: (id) => !/^[./]/.test(id), -}); - -export default defineConfig([ - bundle({ - plugins: [esbuild()], - output: [ - { - file: `${name}.js`, - format: "cjs", - sourcemap: true, - }, - { - file: `${name}.mjs`, - format: "es", - sourcemap: true, - }, - ], - }), - bundle({ - plugins: [dts()], - output: { - file: `${name}.d.ts`, - format: "es", - }, - }), -]); diff --git a/loro-js/src/awareness.ts b/loro-js/src/awareness.ts deleted file mode 100644 index 90b51d1c7..000000000 --- a/loro-js/src/awareness.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { AwarenessWasm, PeerID, Value } from "loro-wasm"; - -export type AwarenessListener = ( - arg: { updated: PeerID[]; added: PeerID[]; removed: PeerID[] }, - origin: "local" | "timeout" | "remote" | string, -) => void; - -/** - * Awareness is a structure that allows to track the ephemeral state of the peers. - * - * If we don't receive a state update from a peer within the timeout, we will remove their state. - * The timeout is in milliseconds. This can be used to handle the off-line state of a peer. - */ -export class Awareness { - inner: AwarenessWasm; - private peer: PeerID; - private timer: number | undefined; - private timeout: number; - private listeners: Set = new Set(); - constructor(peer: PeerID, timeout: number = 30000) { - this.inner = new AwarenessWasm(peer, timeout); - this.peer = peer; - this.timeout = timeout; - } - - apply(bytes: Uint8Array, origin = "remote") { - const { updated, added } = this.inner.apply(bytes); - this.listeners.forEach((listener) => { - listener({ updated, added, removed: [] }, origin); - }); - - this.startTimerIfNotEmpty(); - } - - setLocalState(state: T) { - const wasEmpty = this.inner.getState(this.peer) == null; - this.inner.setLocalState(state); - if (wasEmpty) { - this.listeners.forEach((listener) => { - listener( - { updated: [], added: [this.inner.peer()], removed: [] }, - "local", - ); - }); - } else { - this.listeners.forEach((listener) => { - listener( - { updated: [this.inner.peer()], added: [], removed: [] }, - "local", - ); - }); - } - - this.startTimerIfNotEmpty(); - } - - getLocalState(): T | undefined { - return this.inner.getState(this.peer); - } - - getAllStates(): Record { - return this.inner.getAllStates(); - } - - encode(peers: PeerID[]): Uint8Array { - return this.inner.encode(peers); - } - - encodeAll(): Uint8Array { - return this.inner.encodeAll(); - } - - addListener(listener: AwarenessListener) { - this.listeners.add(listener); - } - - removeListener(listener: AwarenessListener) { - this.listeners.delete(listener); - } - - peers(): PeerID[] { - return this.inner.peers(); - } - - destroy() { - clearInterval(this.timer); - this.listeners.clear(); - } - - private startTimerIfNotEmpty() { - if (this.inner.isEmpty() || this.timer != null) { - return; - } - - this.timer = setInterval(() => { - const removed = this.inner.removeOutdated(); - if (removed.length > 0) { - this.listeners.forEach((listener) => { - listener({ updated: [], added: [], removed }, "timeout"); - }); - } - if (this.inner.isEmpty()) { - clearInterval(this.timer); - this.timer = undefined; - } - }, this.timeout / 2) as unknown as number; - } -} diff --git a/loro-js/src/index.ts b/loro-js/src/index.ts deleted file mode 100644 index bff99a9e7..000000000 --- a/loro-js/src/index.ts +++ /dev/null @@ -1,681 +0,0 @@ -export * from "loro-wasm"; -export type * from "loro-wasm"; -import { - Container, - ContainerID, - ContainerType, - Delta, - LoroCounter, - LoroDoc, - LoroList, - LoroMap, - LoroText, - LoroTree, - OpId, - TreeID, - Value, -} from "loro-wasm"; - -/** - * @deprecated Please use LoroDoc - */ -export class Loro extends LoroDoc {} -export { Awareness } from "./awareness"; - -export type Frontiers = OpId[]; - -/** - * Represents a path to identify the exact location of an event's target. - * The path is composed of numbers (e.g., indices of a list container) strings - * (e.g., keys of a map container) and TreeID (the node of a tree container), - * indicating the absolute position of the event's source within a loro document. - */ -export type Path = (number | string | TreeID)[]; - -/** - * A batch of events that created by a single `import`/`transaction`/`checkout`. - * - * @prop by - How the event is triggered. - * @prop origin - (Optional) Provides information about the origin of the event. - * @prop diff - Contains the differential information related to the event. - * @prop target - Identifies the container ID of the event's target. - * @prop path - Specifies the absolute path of the event's emitter, which can be an index of a list container or a key of a map container. - */ -export interface LoroEventBatch { - /** - * How the event is triggered. - * - * - `local`: The event is triggered by a local transaction. - * - `import`: The event is triggered by an import operation. - * - `checkout`: The event is triggered by a checkout operation. - */ - by: "local" | "import" | "checkout"; - origin?: string; - /** - * The container ID of the current event receiver. - * It's undefined if the subscriber is on the root document. - */ - currentTarget?: ContainerID; - events: LoroEvent[]; -} - -/** - * The concrete event of Loro. - */ -export interface LoroEvent { - /** - * The container ID of the event's target. - */ - target: ContainerID; - diff: Diff; - /** - * The absolute path of the event's emitter, which can be an index of a list container or a key of a map container. - */ - path: Path; -} - -export type ListDiff = { - type: "list"; - diff: Delta<(Value | Container)[]>[]; -}; - -export type TextDiff = { - type: "text"; - diff: Delta[]; -}; - -export type MapDiff = { - type: "map"; - updated: Record; -}; - -export type TreeDiffItem = - | { - target: TreeID; - action: "create"; - parent: TreeID | undefined; - index: number; - fractionalIndex: string; - } - | { - target: TreeID; - action: "delete"; - oldParent: TreeID | undefined; - oldIndex: number; - } - | { - target: TreeID; - action: "move"; - parent: TreeID | undefined; - index: number; - fractionalIndex: string; - oldParent: TreeID | undefined; - oldIndex: number; - }; - -export type TreeDiff = { - type: "tree"; - diff: TreeDiffItem[]; -}; - -export type CounterDiff = { - type: "counter"; - increment: number; -}; - -export type Diff = ListDiff | TextDiff | MapDiff | TreeDiff | CounterDiff; - -interface Listener { - (event: LoroEventBatch): void; -} - -const CONTAINER_TYPES = [ - "Map", - "Text", - "List", - "Tree", - "MovableList", - "Counter", -]; - -export function isContainerId(s: string): s is ContainerID { - return s.startsWith("cid:"); -} - -/** Whether the value is a container. - * - * # Example - * - * ```ts - * const doc = new LoroDoc(); - * const map = doc.getMap("map"); - * const list = doc.getList("list"); - * const text = doc.getText("text"); - * isContainer(map); // true - * isContainer(list); // true - * isContainer(text); // true - * isContainer(123); // false - * isContainer("123"); // false - * isContainer({}); // false - * ``` - */ -export function isContainer(value: any): value is Container { - if (typeof value !== "object" || value == null) { - return false; - } - - const p = Object.getPrototypeOf(value); - if (p == null || typeof p !== "object" || typeof p["kind"] !== "function") { - return false; - } - - return CONTAINER_TYPES.includes(value.kind()); -} - -/** Get the type of a value that may be a container. - * - * # Example - * - * ```ts - * const doc = new LoroDoc(); - * const map = doc.getMap("map"); - * const list = doc.getList("list"); - * const text = doc.getText("text"); - * getType(map); // "Map" - * getType(list); // "List" - * getType(text); // "Text" - * getType(123); // "Json" - * getType("123"); // "Json" - * getType({}); // "Json" - * ``` - */ -export function getType( - value: T, -): T extends LoroText ? "Text" - : T extends LoroMap ? "Map" - : T extends LoroTree ? "Tree" - : T extends LoroList ? "List" - : T extends LoroCounter ? "Counter" - : "Json" { - if (isContainer(value)) { - return value.kind() as unknown as any; - } - - return "Json" as any; -} - -export type Subscription = () => void; -declare module "loro-wasm" { - interface LoroDoc { - subscribe(listener: Listener): Subscription; - } - - interface UndoManager { - /** - * Set the callback function that is called when an undo/redo step is pushed. - * The function can return a meta data value that will be attached to the given stack item. - * - * @param listener - The callback function. - */ - setOnPush(listener?: UndoConfig["onPush"]): void; - /** - * Set the callback function that is called when an undo/redo step is popped. - * The function will have a meta data value that was attached to the given stack item when `onPush` was called. - * - * @param listener - The callback function. - */ - setOnPop(listener?: UndoConfig["onPop"]): void; - } - - interface LoroDoc< - T extends Record = Record, - > { - /** - * Get a LoroMap by container id - * - * The object returned is a new js object each time because it need to cross - * the WASM boundary. - * - * @example - * ```ts - * import { LoroDoc } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const map = doc.getMap("map"); - * ``` - */ - getMap( - name: Key, - ): T[Key] extends LoroMap ? T[Key] : LoroMap; - /** - * Get a LoroList by container id - * - * The object returned is a new js object each time because it need to cross - * the WASM boundary. - * - * @example - * ```ts - * import { LoroDoc } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const list = doc.getList("list"); - * ``` - */ - getList( - name: Key, - ): T[Key] extends LoroList ? T[Key] : LoroList; - /** - * Get a LoroMovableList by container id - * - * The object returned is a new js object each time because it need to cross - * the WASM boundary. - * - * @example - * ```ts - * import { LoroDoc } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const list = doc.getList("list"); - * ``` - */ - getMovableList( - name: Key, - ): T[Key] extends LoroMovableList ? T[Key] : LoroMovableList; - /** - * Get a LoroTree by container id - * - * The object returned is a new js object each time because it need to cross - * the WASM boundary. - * - * @example - * ```ts - * import { LoroDoc } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const tree = doc.getTree("tree"); - * ``` - */ - getTree( - name: Key, - ): T[Key] extends LoroTree ? T[Key] : LoroTree; - getText(key: string | ContainerID): LoroText; - } - - interface LoroList { - new (): LoroList; - /** - * Get elements of the list. If the value is a child container, the corresponding - * `Container` will be returned. - * - * @example - * ```ts - * import { LoroDoc, LoroText } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const list = doc.getList("list"); - * list.insert(0, 100); - * list.insert(1, "foo"); - * list.insert(2, true); - * list.insertContainer(3, new LoroText()); - * console.log(list.value); // [100, "foo", true, LoroText]; - * ``` - */ - toArray(): T[]; - /** - * Insert a container at the index. - * - * @example - * ```ts - * import { LoroDoc, LoroText } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const list = doc.getList("list"); - * list.insert(0, 100); - * const text = list.insertContainer(1, new LoroText()); - * text.insert(0, "Hello"); - * console.log(list.toJSON()); // [100, "Hello"]; - * ``` - */ - insertContainer( - pos: number, - child: C, - ): T extends C ? T : C; - /** - * Get the value at the index. If the value is a container, the corresponding handler will be returned. - * - * @example - * ```ts - * import { LoroDoc } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const list = doc.getList("list"); - * list.insert(0, 100); - * console.log(list.get(0)); // 100 - * console.log(list.get(1)); // undefined - * ``` - */ - get(index: number): T; - /** - * Insert a value at index. - * - * @example - * ```ts - * import { LoroDoc } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const list = doc.getList("list"); - * list.insert(0, 100); - * list.insert(1, "foo"); - * list.insert(2, true); - * console.log(list.value); // [100, "foo", true]; - * ``` - */ - insert(pos: number, value: Exclude): void; - delete(pos: number, len: number): void; - push(value: Exclude): void; - subscribe(listener: Listener): Subscription; - getAttached(): undefined | LoroList; - } - - interface LoroMovableList { - new (): LoroMovableList; - /** - * Get elements of the list. If the value is a child container, the corresponding - * `Container` will be returned. - * - * @example - * ```ts - * import { LoroDoc, LoroText } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const list = doc.getMovableList("list"); - * list.insert(0, 100); - * list.insert(1, "foo"); - * list.insert(2, true); - * list.insertContainer(3, new LoroText()); - * console.log(list.value); // [100, "foo", true, LoroText]; - * ``` - */ - toArray(): T[]; - /** - * Insert a container at the index. - * - * @example - * ```ts - * import { LoroDoc, LoroText } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const list = doc.getMovableList("list"); - * list.insert(0, 100); - * const text = list.insertContainer(1, new LoroText()); - * text.insert(0, "Hello"); - * console.log(list.toJSON()); // [100, "Hello"]; - * ``` - */ - insertContainer( - pos: number, - child: C, - ): T extends C ? T : C; - /** - * Get the value at the index. If the value is a container, the corresponding handler will be returned. - * - * @example - * ```ts - * import { LoroDoc } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const list = doc.getMovableList("list"); - * list.insert(0, 100); - * console.log(list.get(0)); // 100 - * console.log(list.get(1)); // undefined - * ``` - */ - get(index: number): T; - /** - * Insert a value at index. - * - * @example - * ```ts - * import { LoroDoc } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const list = doc.getMovableList("list"); - * list.insert(0, 100); - * list.insert(1, "foo"); - * list.insert(2, true); - * console.log(list.value); // [100, "foo", true]; - * ``` - */ - insert(pos: number, value: Exclude): void; - delete(pos: number, len: number): void; - push(value: Exclude): void; - subscribe(listener: Listener): Subscription; - getAttached(): undefined | LoroMovableList; - /** - * Set the value at the given position. - * - * It's different from `delete` + `insert` that it will replace the value at the position. - * - * For example, if you have a list `[1, 2, 3]`, and you call `set(1, 100)`, the list will be `[1, 100, 3]`. - * If concurrently someone call `set(1, 200)`, the list will be `[1, 200, 3]` or `[1, 100, 3]`. - * - * But if you use `delete` + `insert` to simulate the set operation, they may create redundant operations - * and the final result will be `[1, 100, 200, 3]` or `[1, 200, 100, 3]`. - * - * @example - * ```ts - * import { LoroDoc } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const list = doc.getMovableList("list"); - * list.insert(0, 100); - * list.insert(1, "foo"); - * list.insert(2, true); - * list.set(1, "bar"); - * console.log(list.value); // [100, "bar", true]; - * ``` - */ - set(pos: number, value: Exclude): void; - /** - * Set a container at the index. - * - * @example - * ```ts - * import { LoroDoc, LoroText } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const list = doc.getMovableList("list"); - * list.insert(0, 100); - * const text = list.setContainer(0, new LoroText()); - * text.insert(0, "Hello"); - * console.log(list.toJSON()); // ["Hello"]; - * ``` - */ - setContainer( - pos: number, - child: C, - ): T extends C ? T : C; - } - - interface LoroMap< - T extends Record = Record, - > { - new (): LoroMap; - /** - * Get the value of the key. If the value is a child container, the corresponding - * `Container` will be returned. - * - * The object returned is a new js object each time because it need to cross - * - * @example - * ```ts - * import { LoroDoc } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const map = doc.getMap("map"); - * map.set("foo", "bar"); - * const bar = map.get("foo"); - * ``` - */ - getOrCreateContainer(key: string, child: C): C; - /** - * Set the key with a container. - * - * @example - * ```ts - * import { LoroDoc, LoroText, LoroList } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const map = doc.getMap("map"); - * map.set("foo", "bar"); - * const text = map.setContainer("text", new LoroText()); - * const list = map.setContainer("list", new LoroList()); - * ``` - */ - setContainer( - key: Key, - child: C, - ): NonNullableType extends C ? NonNullableType : C; - /** - * Get the value of the key. If the value is a child container, the corresponding - * `Container` will be returned. - * - * The object/value returned is a new js object/value each time because it need to cross - * the WASM boundary. - * - * @example - * ```ts - * import { LoroDoc } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const map = doc.getMap("map"); - * map.set("foo", "bar"); - * const bar = map.get("foo"); - * ``` - */ - get(key: Key): T[Key]; - /** - * Set the key with the value. - * - * If the value of the key is exist, the old value will be updated. - * - * @example - * ```ts - * import { LoroDoc } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const map = doc.getMap("map"); - * map.set("foo", "bar"); - * map.set("foo", "baz"); - * ``` - */ - set( - key: Key, - value: Exclude, - ): void; - delete(key: string): void; - subscribe(listener: Listener): Subscription; - } - - interface LoroText { - new (): LoroText; - insert(pos: number, text: string): void; - delete(pos: number, len: number): void; - subscribe(listener: Listener): Subscription; - } - - interface LoroTree< - T extends Record = Record, - > { - new (): LoroTree; - /** - * Create a new tree node as the child of parent and return a `LoroTreeNode` instance. - * If the parent is undefined, the tree node will be a root node. - * - * If the index is not provided, the new node will be appended to the end. - * - * @example - * ```ts - * import { LoroDoc } from "loro-crdt"; - * - * const doc = new LoroDoc(); - * const tree = doc.getTree("tree"); - * const root = tree.createNode(); - * const node = tree.createNode(undefined, 0); - * - * // undefined - * // / \ - * // node root - * ``` - */ - createNode(parent?: TreeID, index?: number): LoroTreeNode; - move(target: TreeID, parent?: TreeID, index?: number): void; - delete(target: TreeID): void; - has(target: TreeID): boolean; - /** - * Get LoroTreeNode by the TreeID. - */ - getNodeByID(target: TreeID): LoroTreeNode; - subscribe(listener: Listener): Subscription; - } - - interface LoroTreeNode< - T extends Record = Record, - > { - /** - * Get the associated metadata map container of a tree node. - */ - readonly data: LoroMap; - /** - * Create a new node as the child of the current node and - * return an instance of `LoroTreeNode`. - * - * If the index is not provided, the new node will be appended to the end. - * - * @example - * ```typescript - * import { LoroDoc } from "loro-crdt"; - * - * let doc = new LoroDoc(); - * let tree = doc.getTree("tree"); - * let root = tree.createNode(); - * let node = root.createNode(); - * let node2 = root.createNode(0); - * // root - * // / \ - * // node2 node - * ``` - */ - createNode(index?: number): LoroTreeNode; - move(parent?: LoroTreeNode, index?: number): void; - parent(): LoroTreeNode | undefined; - /** - * Get the children of this node. - * - * The objects returned are new js objects each time because they need to cross - * the WASM boundary. - */ - children(): Array> | undefined; - } - - interface AwarenessWasm { - getState(peer: PeerID): T | undefined; - getTimestamp(peer: PeerID): number | undefined; - getAllStates(): Record; - setLocalState(value: T): void; - removeOutdated(): PeerID[]; - } -} - -type NonNullableType = Exclude; - -export function newContainerID(id: OpId, type: ContainerType): ContainerID { - return `cid:${id.counter}@${id.peer}:${type}`; -} - -export function newRootContainerID( - name: string, - type: ContainerType, -): ContainerID { - return `cid:root-${name}:${type}`; -} diff --git a/loro-js/tsconfig.json b/loro-js/tsconfig.json deleted file mode 100644 index 32ba9135a..000000000 --- a/loro-js/tsconfig.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - /* Projects */ - // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - /* Language and Environment */ - "target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "jsx": "preserve", /* Specify what JSX code is generated. */ - // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ - // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - /* Modules */ - "module": "commonjs" /* Specify what module code is generated. */, - // "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ - // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ - // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ - // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ - // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ - // "resolveJsonModule": true, /* Enable importing .json files. */ - // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ - // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ - // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - "outDir": "./dist" /* Specify an output folder for all emitted files. */, - // "removeComments": true, /* Disable emitting comments. */ - "noEmit": true /* Disable emitting files from a compilation. */, - // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ - // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ - /* Interop Constraints */ - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, - // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, - /* Type Checking */ - "strict": true /* Enable all strict type-checking options. */, - // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ - // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ - // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ - // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ - }, - "exclude": [ - "node_modules", - "dist", - "deno" - ] -} diff --git a/package.json b/package.json index 9d84d69ff..b9278b275 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,9 @@ "build": "cargo build", "test": "cargo nextest run --features=test_utils,jsonpath --no-fail-fast && cargo test --doc", "test-all": "pnpm test && pnpm test-wasm", - "test-wasm": "cd crates/loro-wasm && deno task dev && cd ../../loro-js && pnpm i && pnpm run test", + "test-wasm": "cd crates/loro-wasm && pnpm i && pnpm build-dev", "coverage": "mkdir -p coverage && cargo llvm-cov nextest --features test_utils,jsonpath --lcov > coverage/lcov-nextest.info && cargo llvm-cov report", - "release-wasm": "cd crates/loro-wasm && deno task release && cd ../../loro-js && pnpm i && pnpm build && pnpm run test", + "release-wasm": "cd crates/loro-wasm && pnpm i && pnpm build-release", "check": "cargo clippy --all-features -- -Dwarnings", "run-fuzz-corpus": "cd crates/fuzz && cargo +nightly fuzz run all -- -max_total_time=1", "fix": "cargo clippy --fix --features=test_utils", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 15a6e9764..fb08f1307 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,62 +17,18 @@ importers: crates/loro-wasm: devDependencies: - vite-plugin-top-level-await: - specifier: ^1.2.2 - version: 1.4.1(vite@4.5.3) - vite-plugin-wasm: - specifier: ^3.1.0 - version: 3.3.0(vite@4.5.3) - - examples/loro-quill: - dependencies: - is-equal: - specifier: ^1.6.4 - version: 1.7.0 - loro-crdt: - specifier: workspace:* - version: link:../../loro-js - quill: - specifier: ^1.3.7 - version: 1.3.7 - vue: - specifier: ^3.2.47 - version: 3.4.27(typescript@5.4.5) - devDependencies: - '@types/quill': - specifier: ^1.3.7 - version: 1.3.10 - '@vitejs/plugin-vue': - specifier: ^4.1.0 - version: 4.6.2(vite@4.5.3)(vue@3.4.27) - typescript: - specifier: ^5.2.0 - version: 5.4.5 - vite: - specifier: ^4.3.2 - version: 4.5.3 - vite-plugin-top-level-await: - specifier: ^1.3.0 - version: 1.4.1(vite@4.5.3) - vite-plugin-wasm: - specifier: ^3.2.2 - version: 3.3.0(vite@4.5.3) - vue-tsc: - specifier: ^1.4.2 - version: 1.8.27(typescript@5.4.5) - - loro-js: - dependencies: - loro-wasm: - specifier: workspace:* - version: link:../crates/loro-wasm - devDependencies: + '@rollup/plugin-alias': + specifier: ^5.1.1 + version: 5.1.1(rollup@3.29.4) '@rollup/plugin-node-resolve': specifier: ^15.0.1 version: 15.2.3(rollup@3.29.4) + '@rollup/plugin-typescript': + specifier: ^12.1.1 + version: 12.1.1(rollup@3.29.4)(tslib@2.8.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: ^6.2.0 - version: 6.21.0(eslint@8.57.0)(typescript@5.4.5) + version: 6.21.0(eslint@8.57.0)(typescript@5.6.3) '@vitest/ui': specifier: ^1.0.4 version: 1.6.0(vitest@1.6.0) @@ -96,23 +52,66 @@ importers: version: 3.29.4 rollup-plugin-dts: specifier: ^5.3.0 - version: 5.3.1(rollup@3.29.4)(typescript@5.4.5) + version: 5.3.1(rollup@3.29.4)(typescript@5.6.3) rollup-plugin-esbuild: specifier: ^5.0.0 version: 5.0.0(esbuild@0.18.20)(rollup@3.29.4) + tslib: + specifier: ^2.8.0 + version: 2.8.0 typescript: - specifier: ^5.0.2 - version: 5.4.5 + specifier: ^5.6.3 + version: 5.6.3 vite: specifier: ^4.2.1 version: 4.5.3 + vite-plugin-top-level-await: + specifier: ^1.2.2 + version: 1.4.1(rollup@3.29.4)(vite@4.5.3) vite-plugin-wasm: - specifier: ^3.2.2 + specifier: ^3.1.0 version: 3.3.0(vite@4.5.3) vitest: specifier: ^1.4.0 version: 1.6.0(@vitest/ui@1.6.0) + examples/loro-quill: + dependencies: + is-equal: + specifier: ^1.6.4 + version: 1.7.0 + loro-crdt: + specifier: workspace:* + version: link:../../crates/loro-wasm + quill: + specifier: ^1.3.7 + version: 1.3.7 + vue: + specifier: ^3.2.47 + version: 3.4.27(typescript@5.4.5) + devDependencies: + '@types/quill': + specifier: ^1.3.7 + version: 1.3.10 + '@vitejs/plugin-vue': + specifier: ^4.1.0 + version: 4.6.2(vite@4.5.3)(vue@3.4.27(typescript@5.4.5)) + typescript: + specifier: ^5.2.0 + version: 5.4.5 + vite: + specifier: ^4.3.2 + version: 4.5.3 + vite-plugin-top-level-await: + specifier: ^1.3.0 + version: 1.4.1(rollup@4.17.2)(vite@4.5.3) + vite-plugin-wasm: + specifier: ^3.2.2 + version: 3.3.0(vite@4.5.3) + vue-tsc: + specifier: ^1.4.2 + version: 1.8.27(typescript@5.4.5) + packages: '@babel/code-frame@7.24.2': @@ -487,6 +486,7 @@ packages: '@humanwhocodes/config-array@0.11.14': resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} @@ -494,6 +494,7 @@ packages: '@humanwhocodes/object-schema@2.0.3': resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@jest/schemas@29.6.3': resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} @@ -523,6 +524,15 @@ packages: '@polka/url@1.0.0-next.25': resolution: {integrity: sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==} + '@rollup/plugin-alias@5.1.1': + resolution: {integrity: sha512-PR9zDb+rOzkRb2VD+EuKB7UC41vU5DIwZ5qqCpk0KJudcWAyi8rvYOhS7+L5aZCspw1stTViLgN5v6FF1p5cgQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + '@rollup/plugin-node-resolve@15.2.3': resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} engines: {node: '>=14.0.0'} @@ -532,6 +542,19 @@ packages: rollup: optional: true + '@rollup/plugin-typescript@12.1.1': + resolution: {integrity: sha512-t7O653DpfB5MbFrqPe/VcKFFkvRuFNp9qId3xq4Eth5xlyymzxNpye2z8Hrl0RIMuXTSr5GGcFpkdlMeacUiFQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.14.0||^3.0.0||^4.0.0 + tslib: '*' + typescript: '>=3.7.0' + peerDependenciesMeta: + rollup: + optional: true + tslib: + optional: true + '@rollup/plugin-virtual@3.0.2': resolution: {integrity: sha512-10monEYsBp3scM4/ND4LNH5Rxvh3e/cVeL3jWTgZ2SrQ+BmUoQcopVQvnaMcOnykb1VkxUFuDAN+0FnpTFRy2A==} engines: {node: '>=14.0.0'} @@ -1186,6 +1209,7 @@ packages: eslint@8.57.0: resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true espree@9.6.1: @@ -1342,6 +1366,7 @@ packages: glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported globals@13.24.0: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} @@ -1437,6 +1462,7 @@ packages: inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -2008,6 +2034,7 @@ packages: rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rollup-plugin-dts@5.3.1: @@ -2240,6 +2267,9 @@ packages: peerDependencies: typescript: '>=4.2.0' + tslib@2.8.0: + resolution: {integrity: sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==} + tty-table@4.2.3: resolution: {integrity: sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA==} engines: {node: '>=8.0.0'} @@ -2290,6 +2320,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@5.6.3: + resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} + engines: {node: '>=14.17'} + hasBin: true + ufo@1.5.3: resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} @@ -2897,6 +2932,10 @@ snapshots: '@polka/url@1.0.0-next.25': {} + '@rollup/plugin-alias@5.1.1(rollup@3.29.4)': + optionalDependencies: + rollup: 3.29.4 + '@rollup/plugin-node-resolve@15.2.3(rollup@3.29.4)': dependencies: '@rollup/pluginutils': 5.1.0(rollup@3.29.4) @@ -2905,15 +2944,32 @@ snapshots: is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.8 + optionalDependencies: rollup: 3.29.4 - '@rollup/plugin-virtual@3.0.2': {} + '@rollup/plugin-typescript@12.1.1(rollup@3.29.4)(tslib@2.8.0)(typescript@5.6.3)': + dependencies: + '@rollup/pluginutils': 5.1.0(rollup@3.29.4) + resolve: 1.22.8 + typescript: 5.6.3 + optionalDependencies: + rollup: 3.29.4 + tslib: 2.8.0 + + '@rollup/plugin-virtual@3.0.2(rollup@3.29.4)': + optionalDependencies: + rollup: 3.29.4 + + '@rollup/plugin-virtual@3.0.2(rollup@4.17.2)': + optionalDependencies: + rollup: 4.17.2 '@rollup/pluginutils@5.1.0(rollup@3.29.4)': dependencies: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 + optionalDependencies: rollup: 3.29.4 '@rollup/rollup-android-arm-eabi@4.17.2': @@ -3034,15 +3090,16 @@ snapshots: '@types/semver@7.5.8': {} - '@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.6.3) '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.3.4 eslint: 8.57.0 - typescript: 5.4.5 + optionalDependencies: + typescript: 5.6.3 transitivePeerDependencies: - supports-color @@ -3053,7 +3110,7 @@ snapshots: '@typescript-eslint/types@6.21.0': {} - '@typescript-eslint/typescript-estree@6.21.0(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@6.21.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 @@ -3062,8 +3119,9 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.6.2 - ts-api-utils: 1.3.0(typescript@5.4.5) - typescript: 5.4.5 + ts-api-utils: 1.3.0(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 transitivePeerDependencies: - supports-color @@ -3074,7 +3132,7 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-vue@4.6.2(vite@4.5.3)(vue@3.4.27)': + '@vitejs/plugin-vue@4.6.2(vite@4.5.3)(vue@3.4.27(typescript@5.4.5))': dependencies: vite: 4.5.3 vue: 3.4.27(typescript@5.4.5) @@ -3172,8 +3230,9 @@ snapshots: minimatch: 9.0.4 muggle-string: 0.3.1 path-browserify: 1.0.1 - typescript: 5.4.5 vue-template-compiler: 2.7.16 + optionalDependencies: + typescript: 5.4.5 '@vue/reactivity@3.4.27': dependencies: @@ -3190,7 +3249,7 @@ snapshots: '@vue/shared': 3.4.27 csstype: 3.1.3 - '@vue/server-renderer@3.4.27(vue@3.4.27)': + '@vue/server-renderer@3.4.27(vue@3.4.27(typescript@5.4.5))': dependencies: '@vue/compiler-ssr': 3.4.27 '@vue/shared': 3.4.27 @@ -4509,11 +4568,11 @@ snapshots: dependencies: glob: 7.2.3 - rollup-plugin-dts@5.3.1(rollup@3.29.4)(typescript@5.4.5): + rollup-plugin-dts@5.3.1(rollup@3.29.4)(typescript@5.6.3): dependencies: magic-string: 0.30.10 rollup: 3.29.4 - typescript: 5.4.5 + typescript: 5.6.3 optionalDependencies: '@babel/code-frame': 7.24.2 @@ -4750,9 +4809,11 @@ snapshots: trim-newlines@3.0.1: {} - ts-api-utils@1.3.0(typescript@5.4.5): + ts-api-utils@1.3.0(typescript@5.6.3): dependencies: - typescript: 5.4.5 + typescript: 5.6.3 + + tslib@2.8.0: {} tty-table@4.2.3: dependencies: @@ -4812,6 +4873,8 @@ snapshots: typescript@5.4.5: {} + typescript@5.6.3: {} + ufo@1.5.3: {} unbox-primitive@1.0.2: @@ -4851,9 +4914,19 @@ snapshots: - supports-color - terser - vite-plugin-top-level-await@1.4.1(vite@4.5.3): + vite-plugin-top-level-await@1.4.1(rollup@3.29.4)(vite@4.5.3): dependencies: - '@rollup/plugin-virtual': 3.0.2 + '@rollup/plugin-virtual': 3.0.2(rollup@3.29.4) + '@swc/core': 1.5.5 + uuid: 9.0.1 + vite: 4.5.3 + transitivePeerDependencies: + - '@swc/helpers' + - rollup + + vite-plugin-top-level-await@1.4.1(rollup@4.17.2)(vite@4.5.3): + dependencies: + '@rollup/plugin-virtual': 3.0.2(rollup@4.17.2) '@swc/core': 1.5.5 uuid: 9.0.1 vite: 4.5.3 @@ -4887,7 +4960,6 @@ snapshots: '@vitest/runner': 1.6.0 '@vitest/snapshot': 1.6.0 '@vitest/spy': 1.6.0 - '@vitest/ui': 1.6.0(vitest@1.6.0) '@vitest/utils': 1.6.0 acorn-walk: 8.3.2 chai: 4.4.1 @@ -4904,6 +4976,8 @@ snapshots: vite: 5.2.11 vite-node: 1.6.0 why-is-node-running: 2.2.2 + optionalDependencies: + '@vitest/ui': 1.6.0(vitest@1.6.0) transitivePeerDependencies: - less - lightningcss @@ -4930,8 +5004,9 @@ snapshots: '@vue/compiler-dom': 3.4.27 '@vue/compiler-sfc': 3.4.27 '@vue/runtime-dom': 3.4.27 - '@vue/server-renderer': 3.4.27(vue@3.4.27) + '@vue/server-renderer': 3.4.27(vue@3.4.27(typescript@5.4.5)) '@vue/shared': 3.4.27 + optionalDependencies: typescript: 5.4.5 wcwidth@1.0.1: