From 3afd314f5a8f6e031e6d1a4528e401b90385379e Mon Sep 17 00:00:00 2001 From: Kai Moseley Date: Mon, 7 Aug 2017 08:27:17 +0100 Subject: [PATCH] 1.1.0 --- package-lock.json | 2 +- package.json | 2 +- src/reducers/__tests__/batchUpdates.test.js | 6 +++--- src/reducers/batchUpdates.js | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 379ee21..cdccec6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "redux-scc", - "version": "1.0.1", + "version": "1.1.0", "lockfileVersion": 1, "dependencies": { "abab": { diff --git a/package.json b/package.json index 2f02076..ff99336 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redux-scc", - "version": "1.0.1", + "version": "1.1.0", "description": "Redux store chunk creator", "main": "./lib/index.js", "scripts": { diff --git a/src/reducers/__tests__/batchUpdates.test.js b/src/reducers/__tests__/batchUpdates.test.js index f4da46a..e644eef 100644 --- a/src/reducers/__tests__/batchUpdates.test.js +++ b/src/reducers/__tests__/batchUpdates.test.js @@ -3,7 +3,7 @@ import { getApplicableCombinedActions, createCombinedAction, isCombinedAction, - BATCH_UPDATE, + COMBINED_ACTION, } from '../batchUpdates'; @@ -28,7 +28,7 @@ describe('getApplicableCombinedActions', () => { describe('isCombinedAction', () => { it('should return true if action contains batch action string', () => { - expect(isCombinedAction(`Boop!${ BATCH_UPDATE }`)).toBe(true); + expect(isCombinedAction(`Boop!${ COMBINED_ACTION }`)).toBe(true); }); @@ -48,7 +48,7 @@ describe('createCombinedAction action', () => { it('should return an action with a type including the batch update string and name', () => { expect(createCombinedAction({ name: 'boop!' - }).type).toMatch(new RegExp(`${ BATCH_UPDATE }`)); + }).type).toMatch(new RegExp(`${ COMBINED_ACTION }`)); }); diff --git a/src/reducers/batchUpdates.js b/src/reducers/batchUpdates.js index dbea6cb..c4e1701 100644 --- a/src/reducers/batchUpdates.js +++ b/src/reducers/batchUpdates.js @@ -3,7 +3,7 @@ import keys from 'lodash/fp/keys'; import includes from 'lodash/fp/includes'; import filter from 'lodash/fp/filter'; -export const BATCH_UPDATE = '(redux-scc-batch-action)'; +export const COMBINED_ACTION = '/@@redux-scc-combined-action'; type BatchUpdateInterface = { @@ -22,13 +22,13 @@ export const createCombinedAction = ({ name = '', actions, }: BatchUpdateInterface) => ({ - type: `${ name }${ BATCH_UPDATE }`, + type: `${ name }${ COMBINED_ACTION }`, payload: actions, }); export const isCombinedAction = (actionType: string) => actionType - ? actionType.indexOf(BATCH_UPDATE) > -1 + ? actionType.indexOf(COMBINED_ACTION) > -1 : false;