From 1b5794bc51c959e89d31248c8bf45b331805d1f0 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Wed, 28 Oct 2026 10:44:51 +0000 Subject: [PATCH] Remove version hardcoding --- README.md | 16 ++++++---------- scripts/bump-version.sh | 1 - scripts/lint.sh | 6 ------ 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 609edd5..8f17961 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # `reconcile-text`: conflict-free 3-way text merging -A Rust, TypeScript, and Python library for merging conflicting text edits without manual intervention. Unlike traditional 3-way merge tools that produce conflict markers, `reconcile-text` automatically resolves conflicts by applying both sets of changes (while updating cursor positions) using an algorithm inspired by Operational Transformation. +Merge a common parent and two edited versions into one text, without conflict markers. `reconcile-text` combines changes from both sides and updates any cursor positions you pass in. It is available as a library for Rust, JavaScript/TypeScript, and Python. + +It is built for syncing text files when all you have are snapshots: the document before editing and the two versions it became. The merge needs no saved operation history or persistent document metadata beyond that parent text. ## Try it @@ -24,22 +26,16 @@ For the motivation and algorithm behind the library, read [Conflict-Free Three-W ## Quick start +Each example merges two changes to the same greeting: one side adds a word, while the other changes the greeting itself. + ### Rust -Install via crates.io: +Install from [crates.io][crates]: ```sh cargo add reconcile-text ``` -Alternatively, add `reconcile-text` to your `Cargo.toml`: - -```toml -[dependencies] -reconcile-text = "0.13.2" -``` - -Then start merging: ```rust use reconcile_text::{reconcile, BuiltinTokenizer}; diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh index 7e1246a..58a487d 100755 --- a/scripts/bump-version.sh +++ b/scripts/bump-version.sh @@ -39,7 +39,6 @@ which cargo-set-version || cargo install cargo-edit cargo set-version --bump $1 NEWVER=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/') -sed_inplace "s/^reconcile-text = \".*\"/reconcile-text = \"$NEWVER\"/" README.md which wasm-pack || cargo install wasm-pack diff --git a/scripts/lint.sh b/scripts/lint.sh index 802e2c5..e5f50bc 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -2,12 +2,6 @@ set -e -VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/') -if ! grep -Fxq "reconcile-text = \"$VERSION\"" README.md; then - echo "README.md must use the Cargo.toml version ($VERSION) in the Rust installation example." - exit 1 -fi - which cargo-machete || cargo install cargo-machete cargo machete