diff --git a/Cargo.lock b/Cargo.lock index 27039b0..cfb8fae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -175,7 +175,7 @@ dependencies = [ ] [[package]] -name = "reconcile" +name = "reconcile-text" version = "0.4.3" dependencies = [ "cfg-if 1.0.1", diff --git a/Cargo.toml b/Cargo.toml index c6393c6..9d55bed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "reconcile" +name = "reconcile-text" description = "Think diff3 or git merge, but with automated conflict resolution that requires no user intervention" version = "0.4.3" rust-version = "1.85" @@ -16,6 +16,10 @@ exclude = ["reconcile-js", ".*", "examples/website"] [lib] crate-type = ["cdylib", "rlib"] +[[example]] +name = "merge-file" +path = "examples/merge-file.rs" + [dependencies] serde = { version = "1.0.219", optional = true, features = ["derive"] } diff --git a/README.md b/README.md index 82eb088..69c199d 100644 --- a/README.md +++ b/README.md @@ -23,17 +23,17 @@ TODO: add links for crates and npm ### Rust -Add `reconcile` to your `Cargo.toml`: +Add `reconcile-text` to your `Cargo.toml`: ```toml [dependencies] -reconcile = "0.4" +reconcile-text = "0.4" ``` Then merge away: ```rust -use reconcile::{reconcile, BuiltinTokenizer}; +use reconcile_text::{reconcile, BuiltinTokenizer}; // Start with original text let parent = "Hello world"; @@ -51,13 +51,13 @@ assert_eq!(result.apply().text(), "Hi beautiful world"); Install via npm: ```bash -npm install reconcile +npm install reconcile-text ``` Then use in your application: ```javascript -import { init, reconcile } from 'reconcile'; +import { init, reconcile } from 'reconcile-text'; // Same example as above const parent = 'Hello world'; @@ -85,7 +85,7 @@ Reconcile offers different ways to split text for merging: - **Word tokeniser** (`BuiltinTokenizer::Word`) — Splits on word boundaries (recommended for prose) - **Character tokeniser** (`BuiltinTokenizer::Character`) — Individual characters (fine-grained control) -- **Line tokeniser** (`BuiltinTokenizer::Line`) — Line-by-line (similar to `git merge`) +- **Line tokeniser** (`BuiltinTokenizer::Line`) — Line-by-line (similar to `git merge` or more precisely [`git merge-file`](https://git-scm.com/docs/git-merge-file)) - **Custom tokeniser** — Roll your own for specialised use cases ### Cursor tracking diff --git a/examples/merge-file.rs b/examples/merge-file.rs index 3d51628..c94cd48 100644 --- a/examples/merge-file.rs +++ b/examples/merge-file.rs @@ -1,9 +1,9 @@ use std::{env, fs, process}; -use reconcile_merge::{BuiltinTokenizer, reconcile}; +use reconcile_text::{BuiltinTokenizer, reconcile}; /// Merges three versions of a file: mine, base, and theirs. -/// Implement a trivial version git merge-file (https://git-scm.com/docs/git-merge-file) +/// Implement a trivial version git merge-file () /// /// Run it with: /// `cargo run --example merge-file my.txt base.txt their.txt [output_file.txt]` @@ -22,17 +22,17 @@ fn main() { // Read files let mine_content = fs::read_to_string(mine_file).unwrap_or_else(|e| { - eprintln!("Error reading {}: {}", mine_file, e); + eprintln!("Error reading {mine_file}: {e}"); process::exit(1); }); let base_content = fs::read_to_string(base_file).unwrap_or_else(|e| { - eprintln!("Error reading {}: {}", base_file, e); + eprintln!("Error reading {base_file}: {e}"); process::exit(1); }); let theirs_content = fs::read_to_string(theirs_file).unwrap_or_else(|e| { - eprintln!("Error reading {}: {}", theirs_file, e); + eprintln!("Error reading {theirs_file}: {e}"); process::exit(1); }); @@ -49,10 +49,10 @@ fn main() { // Write the result if let Some(output_path) = output_file { if let Err(e) = fs::write(output_path, merged_content) { - eprintln!("Error writing to {}: {}", output_path, e); + eprintln!("Error writing to {output_path}: {e}"); process::exit(1); } } else { - print!("{}", merged_content); + print!("{merged_content}"); } } diff --git a/examples/website/index.ts b/examples/website/index.ts index 2c810c8..f056621 100644 --- a/examples/website/index.ts +++ b/examples/website/index.ts @@ -1,5 +1,5 @@ -import { reconcileWithHistory } from 'reconcile'; -import type { Tokenizer } from 'reconcile'; +import { reconcileWithHistory } from 'reconcile-text'; +import type { Tokenizer } from 'reconcile-text'; import './style.scss'; const originalTextArea = document.getElementById('original') as HTMLTextAreaElement; diff --git a/examples/website/package-lock.json b/examples/website/package-lock.json index be7c2ba..4c0716e 100644 --- a/examples/website/package-lock.json +++ b/examples/website/package-lock.json @@ -1,10 +1,10 @@ { - "name": "portfolio", + "name": "reconcile-example-website", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "portfolio", + "name": "reconcile-example-website", "license": "GPL-3.0-or-later", "devDependencies": { "css-loader": "^7.1.2", @@ -12,7 +12,7 @@ "inline-source-webpack-plugin": "^3.0.1", "mini-css-extract-plugin": "^2.9.2", "prettier": "^3.6.2", - "reconcile": "file:../../reconcile-js", + "reconcile-text": "file:../../reconcile-js", "resolve-url-loader": "^5.0.0", "sass": "^1.89.2", "sass-loader": "^16.0.5", @@ -26,19 +26,22 @@ } }, "../../reconcile-js": { - "name": "reconcile", - "version": "0.4.0", + "name": "reconcile-text", + "version": "0.4.3", "dev": true, + "license": "MIT", "devDependencies": { - "@types/jest": "^29.5.14", - "jest": "^29.7.0", - "reconcile": "file:../pkg", - "ts-jest": "^29.3.4", + "@types/jest": "^30.0.0", + "jest": "^30.0.4", + "prettier": "^3.6.2", + "reconcile-text": "file:../pkg", + "ts-jest": "^29.4.0", "ts-loader": "^9.5.2", "tslib": "2.8.1", "typescript": "5.8.3", "webpack": "^5.99.9", - "webpack-cli": "^6.0.1" + "webpack-cli": "^6.0.1", + "webpack-merge": "^6.0.1" } }, "node_modules/@discoveryjs/json-ext": { @@ -3960,7 +3963,7 @@ "node": ">= 10.13.0" } }, - "node_modules/reconcile": { + "node_modules/reconcile-text": { "resolved": "../../reconcile-js", "link": true }, diff --git a/examples/website/package.json b/examples/website/package.json index f7a3a06..ea75200 100644 --- a/examples/website/package.json +++ b/examples/website/package.json @@ -22,7 +22,7 @@ ], "homepage": "https://github.com/schmelczer/reconcile#readme", "devDependencies": { - "reconcile": "file:../../reconcile-js", + "reconcile-text": "file:../../reconcile-js", "css-loader": "^7.1.2", "html-webpack-plugin": "^5.6.3", "mini-css-extract-plugin": "^2.9.2", diff --git a/reconcile-js/jest.config.js b/reconcile-js/jest.config.js index d8542ff..d411a6e 100644 --- a/reconcile-js/jest.config.js +++ b/reconcile-js/jest.config.js @@ -1,6 +1,6 @@ module.exports = { preset: 'ts-jest/presets/js-with-babel-esm', moduleNameMapper: { - '^reconcile/reconcile_bg\\.wasm$': `/__mocks__/wasm.js`, + '^reconcile-text/reconcile_bg\\.wasm$': `/__mocks__/wasm.js`, }, }; diff --git a/reconcile-js/package-lock.json b/reconcile-js/package-lock.json index f1a450f..4c3ac2d 100644 --- a/reconcile-js/package-lock.json +++ b/reconcile-js/package-lock.json @@ -1,17 +1,18 @@ { - "name": "reconcile", + "name": "reconcile-text", "version": "0.4.3", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "reconcile", + "name": "reconcile-text", "version": "0.4.3", + "license": "MIT", "devDependencies": { "@types/jest": "^30.0.0", "jest": "^30.0.4", "prettier": "^3.6.2", - "reconcile": "file:../pkg", + "reconcile-text": "file:../pkg", "ts-jest": "^29.4.0", "ts-loader": "^9.5.2", "tslib": "2.8.1", @@ -22,8 +23,8 @@ } }, "../pkg": { - "name": "reconcile", - "version": "0.4.0", + "name": "reconcile-text", + "version": "0.4.3", "dev": true, "license": "MIT" }, @@ -4542,7 +4543,7 @@ "node": ">= 10.13.0" } }, - "node_modules/reconcile": { + "node_modules/reconcile-text": { "resolved": "../pkg", "link": true }, diff --git a/reconcile-js/package.json b/reconcile-js/package.json index d370b22..2d504da 100644 --- a/reconcile-js/package.json +++ b/reconcile-js/package.json @@ -1,5 +1,5 @@ { - "name": "reconcile", + "name": "reconcile-text", "version": "0.4.3", "description": "Think diff3 or git merge, but with automated conflict resolution that requires no user intervention", "main": "dist/reconcile.node.js", @@ -39,7 +39,7 @@ "@types/jest": "^30.0.0", "jest": "^30.0.4", "prettier": "^3.6.2", - "reconcile": "file:../pkg", + "reconcile-text": "file:../pkg", "ts-jest": "^29.4.0", "ts-loader": "^9.5.2", "tslib": "2.8.1", diff --git a/reconcile-js/src/index.ts b/reconcile-js/src/index.ts index 6db3163..8a27422 100644 --- a/reconcile-js/src/index.ts +++ b/reconcile-js/src/index.ts @@ -7,9 +7,9 @@ import { reconcileWithHistory as wasmReconcileWithHistory, History, initSync, -} from 'reconcile'; +} from 'reconcile-text'; -import wasmBytes from 'reconcile/reconcile_bg.wasm'; +import wasmBytes from 'reconcile-text/reconcile_bg.wasm'; export interface TextWithCursors { /** The document's entire content */ diff --git a/src/lib.rs b/src/lib.rs index 2518975..31b667c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,7 +12,7 @@ //! ✨ **[Try the interactive demo](https://schmelczer.dev/reconcile)** to see it in action! //! //! ``` -//! use reconcile::{reconcile, BuiltinTokenizer}; +//! use reconcile_text::{reconcile, BuiltinTokenizer}; //! //! // Start with original text //! let parent = "Merging text is hard!"; @@ -34,7 +34,7 @@ //! ### Built-in tokenisers //! //! ``` -//! use reconcile::{reconcile, BuiltinTokenizer}; +//! use reconcile_text::{reconcile, BuiltinTokenizer}; //! //! let parent = "The quick brown fox\n"; //! let left = "The very quick brown fox\n"; // Added "very" @@ -51,7 +51,7 @@ //! you can implement custom tokenisation logic: //! //! ``` -//! use reconcile::{reconcile, Token, BuiltinTokenizer}; +//! use reconcile_text::{reconcile, Token, BuiltinTokenizer}; //! //! // Example: custom sentence-based tokeniser //! let sentence_tokeniser = |text: &str| { @@ -83,7 +83,7 @@ //! cursors and selection ranges during merging: //! //! ``` -//! use reconcile::{reconcile, BuiltinTokenizer, TextWithCursors, CursorPosition}; +//! use reconcile_text::{reconcile, BuiltinTokenizer, TextWithCursors, CursorPosition}; //! //! let parent = "Hello world"; //! let left = TextWithCursors::new( diff --git a/src/operation_transformation.rs b/src/operation_transformation.rs index 785d69a..82dedef 100644 --- a/src/operation_transformation.rs +++ b/src/operation_transformation.rs @@ -29,7 +29,7 @@ use crate::{ /// granularity of words. /// /// ``` -/// use reconcile::{reconcile, BuiltinTokenizer}; +/// use reconcile_text::{reconcile, BuiltinTokenizer}; /// /// let parent = "Merging text is hard!"; /// let left = "Merging text is easy!"; diff --git a/src/operation_transformation/snapshots/reconcile__operations__edited_text__tests__calculate_operations.snap b/src/operation_transformation/snapshots/reconcile__operations__edited_text__tests__calculate_operations.snap deleted file mode 100644 index 02956ef..0000000 --- a/src/operation_transformation/snapshots/reconcile__operations__edited_text__tests__calculate_operations.snap +++ /dev/null @@ -1,61 +0,0 @@ ---- -source: reconcile/src/operations/edited_text.rs -expression: operations -snapshot_kind: text ---- -EditedText { - text: "hello world! How are you? Adam", - operations: [ - OrderedOperation { - order: 0, - operation: Insert { - index: 0, - text: "Hello, my friend! ", - }, - }, - OrderedOperation { - order: 0, - operation: Delete { - index: 18, - deleted_character_count: 13, - deleted_text: Some( - "hello world! ", - ), - }, - }, - OrderedOperation { - order: 21, - operation: Delete { - index: 26, - deleted_character_count: 5, - deleted_text: Some( - "you? ", - ), - }, - }, - OrderedOperation { - order: 26, - operation: Delete { - index: 26, - deleted_character_count: 5, - deleted_text: Some( - " Adam", - ), - }, - }, - OrderedOperation { - order: 31, - operation: Insert { - index: 26, - text: "you ", - }, - }, - OrderedOperation { - order: 31, - operation: Insert { - index: 30, - text: "doing? Albert", - }, - }, - ], -} diff --git a/src/operation_transformation/snapshots/reconcile__operations__operation_sequence__tests__calculate_operations.snap b/src/operation_transformation/snapshots/reconcile__operations__operation_sequence__tests__calculate_operations.snap deleted file mode 100644 index 1ba5156..0000000 --- a/src/operation_transformation/snapshots/reconcile__operations__operation_sequence__tests__calculate_operations.snap +++ /dev/null @@ -1,60 +0,0 @@ ---- -source: reconcile/src/operations/operation_sequence.rs -expression: operations -snapshot_kind: text ---- -EditedText { - operations: [ - OrderedOperation { - order: 0, - operation: Insert { - index: 0, - text: "Hello, my friend! ", - }, - }, - OrderedOperation { - order: 0, - operation: Delete { - index: 18, - deleted_character_count: 13, - deleted_text: Some( - "hello world! ", - ), - }, - }, - OrderedOperation { - order: 21, - operation: Delete { - index: 26, - deleted_character_count: 5, - deleted_text: Some( - "you? ", - ), - }, - }, - OrderedOperation { - order: 26, - operation: Delete { - index: 26, - deleted_character_count: 5, - deleted_text: Some( - " Adam", - ), - }, - }, - OrderedOperation { - order: 31, - operation: Insert { - index: 26, - text: "you ", - }, - }, - OrderedOperation { - order: 31, - operation: Insert { - index: 30, - text: "doing? Albert", - }, - }, - ], -} diff --git a/src/operation_transformation/snapshots/reconcile__operation_transformation__edited_text__tests__calculate_operations.snap b/src/operation_transformation/snapshots/reconcile_text__operation_transformation__edited_text__tests__calculate_operations.snap similarity index 100% rename from src/operation_transformation/snapshots/reconcile__operation_transformation__edited_text__tests__calculate_operations.snap rename to src/operation_transformation/snapshots/reconcile_text__operation_transformation__edited_text__tests__calculate_operations.snap diff --git a/src/operation_transformation/snapshots/reconcile__operation_transformation__edited_text__tests__calculate_operations_with_no_diff.snap b/src/operation_transformation/snapshots/reconcile_text__operation_transformation__edited_text__tests__calculate_operations_with_no_diff.snap similarity index 100% rename from src/operation_transformation/snapshots/reconcile__operation_transformation__edited_text__tests__calculate_operations_with_no_diff.snap rename to src/operation_transformation/snapshots/reconcile_text__operation_transformation__edited_text__tests__calculate_operations_with_no_diff.snap diff --git a/src/tokenizer/snapshots/reconcile__tokenizer__word_tokenizer__tests__with_snapshots-5.snap b/src/tokenizer/snapshots/reconcile__tokenizer__word_tokenizer__tests__with_snapshots-5.snap deleted file mode 100644 index 832147e..0000000 --- a/src/tokenizer/snapshots/reconcile__tokenizer__word_tokenizer__tests__with_snapshots-5.snap +++ /dev/null @@ -1,39 +0,0 @@ ---- -source: reconcile/src/tokenizer/word_tokenizer.rs -expression: "word_tokenizer(\" hello, \\nwhere are you?\")" -snapshot_kind: text ---- -[ - Token { - normalised: " ", - original: " ", - }, - Token { - normalised: "hello,", - original: "hello,", - }, - Token { - normalised: " \n", - original: " \n", - }, - Token { - normalised: "where", - original: "where", - }, - Token { - normalised: " ", - original: " ", - }, - Token { - normalised: "are", - original: "are", - }, - Token { - normalised: " ", - original: " ", - }, - Token { - normalised: "you?", - original: "you?", - }, -] diff --git a/src/tokenizer/snapshots/reconcile__tokenizer__character_tokenizer__tests__with_snapshots-2.snap b/src/tokenizer/snapshots/reconcile_text__tokenizer__character_tokenizer__tests__with_snapshots-2.snap similarity index 100% rename from src/tokenizer/snapshots/reconcile__tokenizer__character_tokenizer__tests__with_snapshots-2.snap rename to src/tokenizer/snapshots/reconcile_text__tokenizer__character_tokenizer__tests__with_snapshots-2.snap diff --git a/src/tokenizer/snapshots/reconcile__tokenizer__character_tokenizer__tests__with_snapshots.snap b/src/tokenizer/snapshots/reconcile_text__tokenizer__character_tokenizer__tests__with_snapshots.snap similarity index 82% rename from src/tokenizer/snapshots/reconcile__tokenizer__character_tokenizer__tests__with_snapshots.snap rename to src/tokenizer/snapshots/reconcile_text__tokenizer__character_tokenizer__tests__with_snapshots.snap index 9aa9b44..c7763ed 100644 --- a/src/tokenizer/snapshots/reconcile__tokenizer__character_tokenizer__tests__with_snapshots.snap +++ b/src/tokenizer/snapshots/reconcile_text__tokenizer__character_tokenizer__tests__with_snapshots.snap @@ -1,5 +1,6 @@ --- source: src/tokenizer/character_tokenizer.rs expression: "character_tokenizer(\"\")" +snapshot_kind: text --- [] diff --git a/src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots-2.snap b/src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots-2.snap similarity index 100% rename from src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots-2.snap rename to src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots-2.snap diff --git a/src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots-3.snap b/src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots-3.snap similarity index 100% rename from src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots-3.snap rename to src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots-3.snap diff --git a/src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots-4.snap b/src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots-4.snap similarity index 100% rename from src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots-4.snap rename to src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots-4.snap diff --git a/src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots-5.snap b/src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots-5.snap similarity index 100% rename from src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots-5.snap rename to src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots-5.snap diff --git a/src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots-6.snap b/src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots-6.snap similarity index 100% rename from src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots-6.snap rename to src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots-6.snap diff --git a/src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots-7.snap b/src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots-7.snap similarity index 100% rename from src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots-7.snap rename to src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots-7.snap diff --git a/src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots-8.snap b/src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots-8.snap similarity index 100% rename from src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots-8.snap rename to src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots-8.snap diff --git a/src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots-9.snap b/src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots-9.snap similarity index 100% rename from src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots-9.snap rename to src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots-9.snap diff --git a/src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots.snap b/src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots.snap similarity index 100% rename from src/tokenizer/snapshots/reconcile__tokenizer__line_tokenizer__tests__with_snapshots.snap rename to src/tokenizer/snapshots/reconcile_text__tokenizer__line_tokenizer__tests__with_snapshots.snap diff --git a/src/tokenizer/snapshots/reconcile__tokenizer__word_tokenizer__tests__with_snapshots-2.snap b/src/tokenizer/snapshots/reconcile_text__tokenizer__word_tokenizer__tests__with_snapshots-2.snap similarity index 56% rename from src/tokenizer/snapshots/reconcile__tokenizer__word_tokenizer__tests__with_snapshots-2.snap rename to src/tokenizer/snapshots/reconcile_text__tokenizer__word_tokenizer__tests__with_snapshots-2.snap index 892e524..f61f901 100644 --- a/src/tokenizer/snapshots/reconcile__tokenizer__word_tokenizer__tests__with_snapshots-2.snap +++ b/src/tokenizer/snapshots/reconcile_text__tokenizer__word_tokenizer__tests__with_snapshots-2.snap @@ -1,5 +1,5 @@ --- -source: reconcile/src/tokenizer/word_tokenizer.rs +source: src/tokenizer/word_tokenizer.rs expression: "word_tokenizer(\"\")" snapshot_kind: text --- diff --git a/src/tokenizer/snapshots/reconcile__tokenizer__word_tokenizer__tests__with_snapshots-3.snap b/src/tokenizer/snapshots/reconcile_text__tokenizer__word_tokenizer__tests__with_snapshots-3.snap similarity index 100% rename from src/tokenizer/snapshots/reconcile__tokenizer__word_tokenizer__tests__with_snapshots-3.snap rename to src/tokenizer/snapshots/reconcile_text__tokenizer__word_tokenizer__tests__with_snapshots-3.snap diff --git a/src/tokenizer/snapshots/reconcile__tokenizer__word_tokenizer__tests__with_snapshots-4.snap b/src/tokenizer/snapshots/reconcile_text__tokenizer__word_tokenizer__tests__with_snapshots-4.snap similarity index 100% rename from src/tokenizer/snapshots/reconcile__tokenizer__word_tokenizer__tests__with_snapshots-4.snap rename to src/tokenizer/snapshots/reconcile_text__tokenizer__word_tokenizer__tests__with_snapshots-4.snap diff --git a/src/tokenizer/snapshots/reconcile__tokenizer__word_tokenizer__tests__with_snapshots.snap b/src/tokenizer/snapshots/reconcile_text__tokenizer__word_tokenizer__tests__with_snapshots.snap similarity index 100% rename from src/tokenizer/snapshots/reconcile__tokenizer__word_tokenizer__tests__with_snapshots.snap rename to src/tokenizer/snapshots/reconcile_text__tokenizer__word_tokenizer__tests__with_snapshots.snap diff --git a/src/utils/snapshots/reconcile__utils__myers_diff__tests__complex_diff.snap b/src/utils/snapshots/reconcile_text__utils__myers_diff__tests__complex_diff.snap similarity index 100% rename from src/utils/snapshots/reconcile__utils__myers_diff__tests__complex_diff.snap rename to src/utils/snapshots/reconcile_text__utils__myers_diff__tests__complex_diff.snap diff --git a/src/utils/snapshots/reconcile__utils__myers_diff__tests__delete_only.snap b/src/utils/snapshots/reconcile_text__utils__myers_diff__tests__delete_only.snap similarity index 100% rename from src/utils/snapshots/reconcile__utils__myers_diff__tests__delete_only.snap rename to src/utils/snapshots/reconcile_text__utils__myers_diff__tests__delete_only.snap diff --git a/src/utils/snapshots/reconcile__utils__myers_diff__tests__identical_content.snap b/src/utils/snapshots/reconcile_text__utils__myers_diff__tests__identical_content.snap similarity index 100% rename from src/utils/snapshots/reconcile__utils__myers_diff__tests__identical_content.snap rename to src/utils/snapshots/reconcile_text__utils__myers_diff__tests__identical_content.snap diff --git a/src/utils/snapshots/reconcile__utils__myers_diff__tests__insert_only.snap b/src/utils/snapshots/reconcile_text__utils__myers_diff__tests__insert_only.snap similarity index 100% rename from src/utils/snapshots/reconcile__utils__myers_diff__tests__insert_only.snap rename to src/utils/snapshots/reconcile_text__utils__myers_diff__tests__insert_only.snap diff --git a/src/utils/snapshots/reconcile__utils__myers_diff__tests__prefix_and_suffix.snap b/src/utils/snapshots/reconcile_text__utils__myers_diff__tests__prefix_and_suffix.snap similarity index 100% rename from src/utils/snapshots/reconcile__utils__myers_diff__tests__prefix_and_suffix.snap rename to src/utils/snapshots/reconcile_text__utils__myers_diff__tests__prefix_and_suffix.snap diff --git a/tests/example_document.rs b/tests/example_document.rs index ec9d79a..2984077 100644 --- a/tests/example_document.rs +++ b/tests/example_document.rs @@ -1,5 +1,5 @@ use pretty_assertions::assert_eq; -use reconcile::{CursorPosition, EditedText, TextWithCursors}; +use reconcile_text::{CursorPosition, EditedText, TextWithCursors}; use serde::Deserialize; /// `ExampleDocument` represents a test case for the reconciliation process. diff --git a/tests/test.rs b/tests/test.rs index 7c6fe88..e9968b9 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -3,7 +3,7 @@ mod example_document; use std::{fs, path::Path}; use example_document::ExampleDocument; -use reconcile::{BuiltinTokenizer, reconcile}; +use reconcile_text::{BuiltinTokenizer, reconcile}; use serde::Deserialize; #[test] diff --git a/tests/wasm.rs b/tests/wasm.rs index ee584f5..5ec5f35 100644 --- a/tests/wasm.rs +++ b/tests/wasm.rs @@ -1,6 +1,6 @@ #![cfg(feature = "wasm")] -use reconcile::{BuiltinTokenizer, CursorPosition, TextWithCursors, wasm::*}; +use reconcile_text::{BuiltinTokenizer, CursorPosition, TextWithCursors, wasm::*}; use wasm_bindgen_test::*; #[wasm_bindgen_test(unsupported = test)]