Skip to content

Releases: mutativejs/travels

1.3.1

Choose a tag to compare

@unadlib unadlib released this 15 May 16:50

[1.3.1] - 2026-05-16

Fixed

  • Wrap object values returned from setState(() => value) only when they do not contain Mutative drafts, removing noisy Mutative warnings while preserving draft-returning updater behavior.
  • Avoid Mutative warnings when manual archive() merges pending patches.
  • Avoid scheduling pending-state cleanup microtasks for no-op updates.
  • Avoid duplicate subscriber and devtools notifications for clean replaceStateWithoutHistory no-ops while preserving mutable external-state rebasing.
  • Fix release workflow polling for dispatched API Docs runs, including empty run conclusions while the deployment is still in progress.

Changed

  • Reuse a single cloned patches snapshot for subscribers and devtools callbacks during each change event.
  • Build API docs before npm publish, then deploy GitHub Pages from the validated release tag after npm publishing succeeds.

Documentation

  • Clarify that subscribe patch snapshots and getHistory() arrays and entries are shared read-only data.
  • Clarify the release checklist for tag-driven npm publishing and GitHub Pages deployment.

Full Changelog: v1.3.0...v1.3.1

1.3.0

Choose a tag to compare

@unadlib unadlib released this 15 May 14:05

[1.3.0] - 2026-05-15

Added

  • Add versioned persistence APIs for serializing and restoring state, history, position, metadata, and schema version.
  • Add persistence migration hooks and compatibility checks for safely loading older or unsupported snapshots.
  • Add warnings for unsupported state shapes so applications can detect values that are unsafe for JSON Patch persistence.
  • Add product-oriented history controls for archive metadata, pending history entries, manual pending metadata, and status reporting.
  • Add integration examples for persistence adapters, local-first persistence, form builders, canvas editors, MobX, Pinia, Vue, and Zustand.
  • Add browser, property-based, persistence, product API, Vue example, and type-level test coverage.

Fixed

  • Validate persisted patches, patch paths, metadata entries, patch values, unsupported operations, and root add/remove operations before rehydration.
  • Roll back failed transactions and isolate nested transactions to keep history and state consistent.
  • Preserve, clone, serialize, and forward history metadata and pending manual patches consistently.
  • Retain contiguous rehydrated history while respecting maxHistory.
  • Keep Vue history methods and status refs in sync after controls updates.
  • Avoid rebroadcasting remote snapshots and provide safer local-first snapshot fallback behavior.
  • Handle rebase and reset no-op replacements without corrupting baseline history.

Changed

  • GitHub Pages and npm publishing now run only from explicit v* release tags.
  • Release tags must match the package.json version exactly, with a leading v.
  • Tag releases now run the full CI, e2e, coverage, and benchmark gates before npm publishing or GitHub Pages deployment.
  • Ordinary pushes to main now run CI only and no longer publish docs, publish npm, or create release PRs.
  • Update release documentation to use manual version and changelog commits followed by explicit tag publishing.

Documentation

  • Clarify README positioning, persistence usage, compatibility guidance, and framework integration paths.
  • Add compatibility, migration, and release checklist documentation.

Full Changelog: v1.2.0...v1.3.0

1.2.0

Choose a tag to compare

@unadlib unadlib released this 21 Apr 18:13

[1.2.0] - 2026-04-22

This release adds rebase(), a new API for clearing history and making the current state the new baseline.

What's Changed

Added

  • rebase() on Travels
  • rebasable controls via getControls()
  • dedicated tests covering normal, manual archive, mutable, and mid-history rebasing
  • README guidance for rebase() and external form manager integration

Important

rebase() is destructive:

  • past history is removed
  • future history is removed
  • pending manual-archive changes are cleared
  • reset() returns to the rebased state

New Contributors

Full Changelog: v1.1.0...v1.2.0

1.1.0

Choose a tag to compare

@unadlib unadlib released this 27 Feb 16:40

[1.1.0] - 2026-02-28

Fixed

  • Preserve Map/Set values when cloning patch history for getPatches() and rehydration.
  • Keep reset() baseline isolated for Map/Set states even when structuredClone is unavailable.

Changed

  • maxHistory now strictly requires a non-negative integer. Invalid values such as NaN, Infinity, and decimals throw an error.
  • Invalid initialPatches now default to safe fallback (discard persisted history and continue). Set strictInitialPatches: true to opt into fail-fast throws.

Full Changelog: v1.0.0...v1.1.0

1.0.0

Choose a tag to compare

@unadlib unadlib released this 23 Jan 17:47

[1.0.0] - 2026-01-24

🎉 First Stable Release

Travels is a fast, framework-agnostic undo/redo library powered by Mutative JSON Patch. This v1.0.0 release marks the library as production-ready after extensive testing and refinement.

Highlights

  • 10x faster than traditional snapshot-based undo systems
  • Memory-efficient - stores only JSON Patches, not full state copies
  • Framework-agnostic - works with React, Vue, Zustand, MobX, Pinia, or vanilla JS
  • Full TypeScript support with comprehensive type definitions

Features

  • Core API: createTravels() with setState, back, forward, go, reset
  • History Management: getHistory(), getPosition(), getPatches(), canBack(), canForward()
  • Mutable Mode: Keep reactive state references stable for MobX, Vue/Pinia integration
  • Manual Archive Mode: Batch multiple changes into a single undo step with autoArchive: false
  • Persistence Support: Save and restore history with initialPatches and initialPosition
  • Controls API: getControls() for easy UI binding
  • Configurable Options: maxHistory, enableAutoFreeze, strict, mark, patchesOptions

Bug Fixes (since v0.9.0)

  • Fixed root replacement handling in mutable mode
  • Fixed hasOnlyArrayIndices, maxHistory, and reset edge cases
  • Fixed pendingState race condition in setState

Performance

  • Added caching for getControls() and getHistory()

Documentation

Breaking Changes

None. This is the first stable release.


Full Changelog: v0.9.0...v1.0.0

0.9.0

Choose a tag to compare

@unadlib unadlib released this 15 Nov 07:17

Full Changelog: v0.8.1...v0.9.0

0.8.1

Choose a tag to compare

@unadlib unadlib released this 14 Nov 17:26

Full Changelog: v0.8.0...v0.8.1

0.8.0

Choose a tag to compare

@unadlib unadlib released this 15 Oct 18:37

What's Changed

  • fix(max-history): fix rehydrated stores ignore maxHistory by @unadlib in #2
  • fix(mutable): fix mutable mode ignores primitive state by @unadlib in #4

New Contributors

Full Changelog: v0.7.1...v0.8.0

0.7.1

Choose a tag to compare

@unadlib unadlib released this 15 Oct 14:50

Full Changelog: v0.7.0...v0.7.1

0.7.0

Choose a tag to compare

@unadlib unadlib released this 13 Oct 19:12

Full Changelog: v0.6.1...v0.7.0