From 93f6d03a1c0f3a74ffce1c1e26800d36ba0e0005 Mon Sep 17 00:00:00 2001 From: pl12133 Date: Thu, 31 Mar 2016 18:02:51 -0400 Subject: [PATCH] Deprecate `distinctState` filter with warning message. Bump version to beta5. --- package.json | 2 +- src/index.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 23b7f0b..df50446 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redux-undo", - "version": "1.0.0-beta4", + "version": "1.0.0-beta5", "description": "simple undo/redo functionality for redux state containers", "main": "lib/index.js", "scripts": { diff --git a/src/index.js b/src/index.js index 938ffaf..024cf19 100644 --- a/src/index.js +++ b/src/index.js @@ -310,6 +310,13 @@ export function isHistory (history) { } // /isHistory +// distinctState helper +export function distinctState () { + console.warning('distinctState is deprecated in beta4 and newer. The distinctState behavior is now default, which means only actions resulting in a new state are recorded. See https://github.com/omnidan/redux-undo#filtering-actions for more details.') + return () => true +} +// /distinctState + // includeAction helper export function includeAction (rawActions) { const actions = parseActions(rawActions)