Skip to content

Commit 4290116

Browse files
committed
Revert stringifying Symbols out of the box
As not being reliable in case of constructors. Fix #302
1 parent 5f4dd81 commit 4290116

File tree

4 files changed

+19
-31
lines changed

4 files changed

+19
-31
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@
8181
"react-redux": "^4.4.5",
8282
"redux": "^3.5.2",
8383
"redux-devtools": "^3.3.1",
84-
"redux-devtools-instrument": "^1.7.1",
85-
"remotedev-app": "^0.10.6",
86-
"remotedev-monitor-components": "^0.0.4",
84+
"redux-devtools-instrument": "^1.8.0",
85+
"remotedev-app": "^0.10.7",
86+
"remotedev-monitor-components": "^0.0.5",
8787
"remotedev-serialize": "^0.1.0",
8888
"remotedev-slider": "^1.1.1",
8989
"remotedev-utils": "0.0.1"

src/app/api/index.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,11 @@ function post(message) {
5353
window.postMessage(message, '*');
5454
}
5555

56-
function amendActionType(action, serialize) {
56+
function amendActionType(action) {
5757
if (typeof action === 'string') return { action: { type: action }, timestamp: Date.now() };
5858
if (!action.type) return { action: { type: 'update' }, timestamp: Date.now() };
5959
if (action.action) return action;
60-
return {
61-
action: !serialize && typeof action.type === 'symbol' ?
62-
{ ...action, type: action.type.toString() } : action,
63-
timestamp: Date.now()
64-
};
60+
return { action, timestamp: Date.now() };
6561
}
6662

6763
export function toContentScript(message, serializeState, serializeAction) {
@@ -208,7 +204,7 @@ export function connect(preConfig) {
208204
}
209205
}
210206
else if (config.actionSanitizer) amendedAction = config.actionSanitizer(action);
211-
amendedAction = amendActionType(amendedAction, config.serialize);
207+
amendedAction = amendActionType(amendedAction);
212208
if (latency) {
213209
delayedActions.push(amendedAction);
214210
delayedStates.push(amendedState);

src/app/stores/enhancerStore.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export default function configureStore(next, monitorReducer, config) {
1313
monitorReducer,
1414
{
1515
maxAge: config.maxAge || window.devToolsOptions.maxAge || 50,
16-
stringifyActionTypes: !config.serialize,
1716
shouldCatchErrors: config.shouldCatchErrors || window.shouldCatchErrors,
1817
shouldHotReload: config.shouldHotReload,
1918
shouldRecordChanges: config.shouldRecordChanges,

yarn.lock

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5299,15 +5299,15 @@ redux-devtools-chart-monitor@^1.6.1:
52995299
redux-devtools-themes "^1.0.0"
53005300

53015301
redux-devtools-instrument@^1.0.1:
5302-
version "1.7.0"
5303-
resolved "https://registry.yarnpkg.com/redux-devtools-instrument/-/redux-devtools-instrument-1.7.0.tgz#0b8cdd3f7731dcf4ca6146950cc4966c78a91de5"
5302+
version "1.7.1"
5303+
resolved "https://registry.yarnpkg.com/redux-devtools-instrument/-/redux-devtools-instrument-1.7.1.tgz#30a28b76ac7fcfd0b8d4295ab6178cfc85088f6c"
53045304
dependencies:
53055305
lodash "^4.2.0"
53065306
symbol-observable "^1.0.2"
53075307

5308-
redux-devtools-instrument@^1.7.1:
5309-
version "1.7.1"
5310-
resolved "https://registry.yarnpkg.com/redux-devtools-instrument/-/redux-devtools-instrument-1.7.1.tgz#30a28b76ac7fcfd0b8d4295ab6178cfc85088f6c"
5308+
redux-devtools-instrument@^1.8.0:
5309+
version "1.8.0"
5310+
resolved "https://registry.yarnpkg.com/redux-devtools-instrument/-/redux-devtools-instrument-1.8.0.tgz#db1840ed3d8152af6792913698e3424c119de9aa"
53115311
dependencies:
53125312
lodash "^4.2.0"
53135313
symbol-observable "^1.0.2"
@@ -5405,9 +5405,9 @@ regjsparser@^0.1.4:
54055405
dependencies:
54065406
jsesc "~0.5.0"
54075407

5408-
remotedev-app@^0.10.6:
5409-
version "0.10.6"
5410-
resolved "https://registry.yarnpkg.com/remotedev-app/-/remotedev-app-0.10.6.tgz#1658e7e73ef4d8a5dd7bd8b991817f34a5731751"
5408+
remotedev-app@^0.10.7:
5409+
version "0.10.7"
5410+
resolved "https://registry.yarnpkg.com/remotedev-app/-/remotedev-app-0.10.7.tgz#f5b646851d317b62bce0a890546af556da48cf64"
54115411
dependencies:
54125412
chrome-storage-local "^0.1.6"
54135413
d3-state-visualizer "^1.3.1"
@@ -5426,15 +5426,15 @@ remotedev-app@^0.10.6:
54265426
redux-devtools-log-monitor "^1.2.0"
54275427
redux-devtools-test-generator "^0.4.0"
54285428
redux-devtools-themes "^1.0.0"
5429-
remotedev-inspector-monitor "^0.10.0"
5429+
remotedev-inspector-monitor "^0.10.2"
54305430
remotedev-monitor-components "^0.0.5"
54315431
remotedev-slider "1.1.3"
54325432
socketcluster-client "^5.0.0"
54335433
styled-components "^1.1.1"
54345434

5435-
remotedev-inspector-monitor@^0.10.0:
5436-
version "0.10.1"
5437-
resolved "https://registry.yarnpkg.com/remotedev-inspector-monitor/-/remotedev-inspector-monitor-0.10.1.tgz#fa2d3dd87328a2d4147c006b48ffa540f46faa20"
5435+
remotedev-inspector-monitor@^0.10.2:
5436+
version "0.10.2"
5437+
resolved "https://registry.yarnpkg.com/remotedev-inspector-monitor/-/remotedev-inspector-monitor-0.10.2.tgz#2f6618fc2a2d5aa9d57e97baa21b9cb4f330f638"
54385438
dependencies:
54395439
babel-runtime "^6.3.19"
54405440
dateformat "^1.0.12"
@@ -5448,7 +5448,7 @@ remotedev-inspector-monitor@^0.10.0:
54485448
lodash.debounce "^4.0.3"
54495449
react-base16-styling "^0.4.1"
54505450
react-dragula "^1.1.17"
5451-
react-json-tree "^0.10.0"
5451+
react-json-tree "0.10.0"
54525452
react-pure-render "^1.0.2"
54535453
redux-devtools-themes "^1.0.0"
54545454

@@ -5459,13 +5459,6 @@ remotedev-monitor-components@^0.0.2:
54595459
codemirror "^5.21.0"
54605460
styled-components "^1.1.1"
54615461

5462-
remotedev-monitor-components@^0.0.4:
5463-
version "0.0.4"
5464-
resolved "https://registry.yarnpkg.com/remotedev-monitor-components/-/remotedev-monitor-components-0.0.4.tgz#b782c3992c89367f04af5ca1fc63b81b582c761a"
5465-
dependencies:
5466-
codemirror "^5.21.0"
5467-
styled-components "^1.1.1"
5468-
54695462
remotedev-monitor-components@^0.0.5:
54705463
version "0.0.5"
54715464
resolved "https://registry.yarnpkg.com/remotedev-monitor-components/-/remotedev-monitor-components-0.0.5.tgz#3a8142a0795f4893d665e42e1d4825fe7536104d"

0 commit comments

Comments
 (0)