Skip to content

Releases: charkour/zundo

v1.3.0

24 Oct 02:41
Compare
Choose a tag to compare

Add setIsUndoHistoryEnabled to the returned store from zundo create. This allows users to programmatically ignore or save states in the global store. const { setIsUndoHistoryEnabled } = useStore();

Thanks to @funwithtriangles! πŸŽ‰

  • update readme for setIsUndoHistoryEnabled 6335aaf
  • run lint:fix 7669212
  • Merge pull request #17 from funwithtriangles/feature/enable-disable 26a2081
  • fixed formatting 77ba35e
  • Added setIsUndoHistoryEnabled 005fcd2

v1.2.2...v1.3.0

v1.2.2

24 Oct 02:25
Compare
Choose a tag to compare

Update dev deps and deps. Update readme. Cleanup project repo.

v1.2.1...v1.2.2

v1.2.1

19 Oct 01:32
Compare
Choose a tag to compare

Breaking Change

Update readme to include information about allowUnchanged middleware options.

v1.2.0...v1.2.1

v1.2.0

19 Oct 01:24
Compare
Choose a tag to compare

Breaking Change: New updates to the zundo middleware options. Options now is the structure { omited: string[], allowUnchanged: boolean }. It is used within this context. Thanks @funwithtriangles! πŸŽ‰

const useStore = create(
  undoMiddleware(
    set => ({ ... }),
    { omit: ['ignored'], allowUnchanged: true }
  )
);

This is breaking because in the past, unchanged states were tracked in history. Please let me know if this makes you upset. Sorry in advance. I figured it was okay since not many people use this package.

  • fix linting errors ca845ed
  • lint and autoformat 962631e
  • update lockfile cdbfefc
  • Merge pull request #16 from funwithtriangles/feature/ignore-no-change efa51f4
  • Moved helper function injection to top of function b634403
  • Injecting helper functions at very end of set 729fb15
  • Use lodash.isequal instead of lodash 71b0a31
  • Added "allow unchanged" story 90a2f95
  • Only storing changes if states aren't equal 8a86ed8
  • Updated bears story with "do nothing" 2d300d5

v1.1.2...v1.2.0

v1.1.2

18 Oct 02:34
Compare
Choose a tag to compare

Switch import/export order and fix github workflow

v1.1.1...v1.1.2

v1.1.1

18 Oct 02:19
Compare
Choose a tag to compare

Can pass options through the default create function. Switch to pnpm from npm for dep management.

v1.1.0...v1.1.1

v1.1.0

12 Jul 17:01
Compare
Choose a tag to compare

Add's optional second parameter to undoMiddleware, an options object. Currently only takes { omit: ['string']} which is used to omit fields from being tracked in state.

zustand dep bumped to 3.5.6

  • bump zustand dep ad36e3d
  • Merge pull request #10 from charkour/ignore-fields 2dd17a3
  • make options optional 0638400
  • convert to options object 7c245d2
  • update readme 3c5845a
  • allow ability to omit fields from being tracked in history 18e483e
  • bump zustand version e4162f8

v1.0.0...v1.1.0

v1.0.0

15 May 01:26
Compare
Choose a tag to compare

Version 1.0.0 release! This has some Breaking Changes and also new features!

  • undo has been renamed to undoMiddleware
    - import { undo } from 'zundo';
    + import { undoMiddleware, UndoState } from 'zundo';
  • useUndo() is no longer a hook, the object returned from useUndo() is now part of the store you create
    use like this
  const {
    bears,
    increasePopulation,
    removeAllBears,
    decreasePopulation,
    undo,
    clear,
    redo,
    getState,
  } = store;

New features include:

  • a simplified API

  • the ability to have multiple undoable stores in a single app

  • a create function from zundo to create your undoable stores

  • Update README.md 113f31e

  • Merge pull request #7 from charkour/multiple-undo-stores eaca784

  • update documentation 3861aa5

  • multiple undo stores c65a8ca

  • separate files 15e78f3

  • update zustand dependency 4f6dc47

  • Update README.md 5f772fe

  • inject useUndo into the undo middleware 524478a

  • create undoStore factory 147c08d

v0.4.0...v1.0.0

v0.4.0

21 Apr 01:48
Compare
Choose a tag to compare

Add clear function to clear both previousStates and futureStates

v0.3.0...v0.4.0

v0.3.0

19 Apr 02:05
Compare
Choose a tag to compare

Move zustand to peer dependency. Is this a breaking change?

v0.2.1...v0.3.0