Skip to content

Releases: charkour/zundo

v2.0.0-experimental.0

05 Aug 21:36
Compare
Choose a tag to compare
v2.0.0-experimental.0 Pre-release
Pre-release

Support zustand v4 with an updated API. This is an experimental release that will be similar to v2 of zundo.

BREAKING CHANGES
The methods undo, redo, clear, setIsUndoHistoryEnabled, and getState are not accessed from useStore.temporal instead of useStore().

  const { undo, redo, clear, setIsUndoHistoryEnabled, getState } = useStore.temporal;

What's Changed

Full Changelog: v1.6.0...v2.0.0-experimental.0

v1.6.0

03 Aug 00:18
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.5.9...v1.6.0

v2.0.0-beta.0

17 Jan 12:59
48c873c
Compare
Choose a tag to compare
v2.0.0-beta.0 Pre-release
Pre-release

What's Changed

  • Updated undo and redo to accept a number of steps by @ivoilic in #32
    • This includes an awesome mascot image made by @ivoilic 🎉

Breaking Changes

  • Changes to undo/redo callbacks By default the event is passed which throws a type error since the functions are now expecting a number as the first parameter.
- <button onClick={undo} />
+ <button onClick={() => undo?.() />
  • clear now becomes cleaUndoHistory
- const { clear } = useUndoStore();
+ const { clearUndoHistory } = useUndoStore();

To use the beta: npm i zundo@2.0.0-beta.0

Full Changelog: v1.5.9...v2.0.0-beta.0

v1.5.9

03 Jan 23:13
Compare
Choose a tag to compare

What's Changed

  • Replaced omit with exclude and include by @ivoilic in #33 🎉

Usage

// Only field1 and field2 will be tracked
const useStoreA = create<StoreState>(
  undoMiddleware(
    set => ({ ... }),
    { include: ['field1', 'field2'] }
  )
);

// Everything besides field1 and field2 will be tracked
const useStoreB = create<StoreState>(
  undoMiddleware(
    set => ({ ... }),
    { exclude: ['field1', 'field2'] }
  )
);

New Contributors

Full Changelog: v1.5.8...v1.5.9

v1.5.8

07 Dec 03:02
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.5.7...v1.5.8

v1.5.7

28 Nov 17:54
ebdcfd9
Compare
Choose a tag to compare

Fixed bug in v1.5.2 where users were unable to run npm install zundo@1.5.2. Tried to publish different fixes until finding the correct solution. v1.5.2 through v1.5.6 were published and removed from the npm package registry because they were broken. Sorry for the inconvenience.

What's Changed

Full Changelog: v1.5.2...v1.5.7

v1.5.2

28 Nov 03:51
a32fe90
Compare
Choose a tag to compare

Note: This has been removed from npm due to a bug. Use v1.5.7 instead.

Add workspace configuration and linting to provide an easier experience for contributors!

What's Changed

Full Changelog: v1.5.1...v1.5.2

v1.5.1

19 Nov 03:07
Compare
Choose a tag to compare

What's Changed

Adds a cool-off period option between adding states to the undo stores.

Note: Was having trouble publishing to npm, so version v1.5.0 is the same as v1.5.1

Full Changelog: v1.4.1...v1.5.1

v1.4.1

26 Oct 12:02
Compare
Choose a tag to compare

Bug fix: clear method will correctly cause a re-render

  • Merge pull request #20 from charkour/fix-clear-method 7b55fdc
  • run lint:fix (need to automate this) 8e6fb5b
  • fix clear method 98d0bd7

v1.4.0...v1.4.1

v1.4.0

24 Oct 22:03
Compare
Choose a tag to compare

Add historyDepthLimit to zundo store options.

const useStore = create<StoreState>(
  undoMiddleware(
    set => ({ ... }),
    { historyDepthLimit: 100 }
  )
);
  • Merge pull request #18 from charkour/history-depth c723f95
  • lint and fix 218bede
  • update readme for historydepthlimit a0f7075
  • add historyDepthLimit and some unit tests 1e28d97

v1.3.0...v1.4.0