mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-10 19:56:54 +03:00
chore(*): upgrade dependencies (#569)
* Making moves * More awesomeness * More * more * More
This commit is contained in:
parent
a1c2f068b5
commit
08ef5bf838
16
package.json
16
package.json
|
@ -2,15 +2,15 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"eslint": "^5.16.0",
|
"eslint": "^7.6.0",
|
||||||
"eslint-config-prettier": "^3.6.0",
|
"eslint-config-prettier": "^6.11.0",
|
||||||
"eslint-plugin-babel": "^5.3.1",
|
"eslint-plugin-babel": "^5.3.1",
|
||||||
"eslint-plugin-prettier": "^3.1.4",
|
"eslint-plugin-prettier": "^3.1.4",
|
||||||
"eslint-plugin-react": "^7.20.5",
|
"eslint-plugin-react": "^7.20.5",
|
||||||
"husky": "^4.2.5",
|
"husky": "^4.2.5",
|
||||||
"jest": "^24.9.0",
|
"jest": "^26.2.2",
|
||||||
"lerna": "^3.22.1",
|
"lerna": "^3.22.1",
|
||||||
"lint-staged": "^8.2.1",
|
"lint-staged": "^10.2.11",
|
||||||
"prettier": "^1.19.1"
|
"prettier": "^1.19.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
"packages/redux-slider-monitor/examples/todomvc"
|
"packages/redux-slider-monitor/examples/todomvc"
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0"
|
"node": ">=10.13.0"
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
|
@ -46,12 +46,10 @@
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{js,jsx}": [
|
"*.{js,jsx}": [
|
||||||
"prettier --write",
|
"prettier --write",
|
||||||
"yarn lint:fix",
|
"yarn lint:fix"
|
||||||
"git add"
|
|
||||||
],
|
],
|
||||||
"*.{json,css,html,md}": [
|
"*.{json,css,html,md}": [
|
||||||
"prettier --write",
|
"prettier --write"
|
||||||
"git add"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,9 +26,8 @@
|
||||||
"map2tree": "^1.3.0"
|
"map2tree": "^1.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"node-libs-browser": "^0.5.3",
|
|
||||||
"webpack": "^4.44.1",
|
"webpack": "^4.44.1",
|
||||||
"webpack-dev-server": "^3.11.0"
|
"webpack-dev-server": "^3.11.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,13 +35,13 @@
|
||||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.10.5",
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||||
"@babel/plugin-proposal-export-default-from": "^7.10.4",
|
"@babel/plugin-proposal-export-default-from": "^7.10.4",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"@babel/preset-react": "^7.10.4",
|
"@babel/preset-react": "^7.10.4",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"rimraf": "^2.7.1",
|
"rimraf": "^3.0.2",
|
||||||
"webpack": "^4.44.1"
|
"webpack": "^4.44.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -34,10 +34,10 @@
|
||||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.10.5",
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"rimraf": "^2.7.1",
|
"rimraf": "^3.0.2",
|
||||||
"webpack": "^4.44.1",
|
"webpack": "^4.44.1",
|
||||||
"webpack-cli": "^3.3.12"
|
"webpack-cli": "^3.3.12"
|
||||||
},
|
},
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "npm run storybook",
|
"start": "npm run storybook",
|
||||||
"build": "rimraf ./lib && babel ./src --out-dir ./lib --ignore tests,stories",
|
"build": "rimraf ./lib && babel ./src --out-dir ./lib --ignore tests,stories",
|
||||||
"lint:css": "stylelint './src/**/styles/*.js'",
|
"lint:css": "stylelint \"./src/**/styles/*.js\"",
|
||||||
"test:update": "npm run jest -- -u",
|
"test:update": "npm run jest -- -u",
|
||||||
"test": "jest --no-cache",
|
"test": "jest --no-cache",
|
||||||
"storybook": "start-storybook -p 9001 -c .storybook -s ./fonts",
|
"storybook": "start-storybook -p 9001 -c .storybook -s ./fonts",
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.10.5",
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||||
"@babel/plugin-proposal-decorators": "^7.10.5",
|
"@babel/plugin-proposal-decorators": "^7.10.5",
|
||||||
"@babel/plugin-proposal-export-default-from": "^7.10.4",
|
"@babel/plugin-proposal-export-default-from": "^7.10.4",
|
||||||
|
@ -43,15 +43,15 @@
|
||||||
"@storybook/react": "4.1.18",
|
"@storybook/react": "4.1.18",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"enzyme": "^3.11.0",
|
"enzyme": "^3.11.0",
|
||||||
"enzyme-adapter-react-16": "^1.15.2",
|
"enzyme-adapter-react-16": "^1.15.3",
|
||||||
"enzyme-to-json": "^3.5.0",
|
"enzyme-to-json": "^3.5.0",
|
||||||
"git-url-parse": "^7.2.0",
|
"git-url-parse": "^11.1.2",
|
||||||
"jest": "^24.9.0",
|
"jest": "^26.2.2",
|
||||||
"jsdom": "^11.12.0",
|
"jsdom": "^16.3.0",
|
||||||
"react": "^16.13.1",
|
"react": "^16.13.1",
|
||||||
"react-dom": "^16.13.1",
|
"react-dom": "^16.13.1",
|
||||||
"react-test-renderer": "^16.13.1",
|
"react-test-renderer": "^16.13.1",
|
||||||
"rimraf": "^2.7.1",
|
"rimraf": "^3.0.2",
|
||||||
"stylelint": "^7.13.0",
|
"stylelint": "^7.13.0",
|
||||||
"stylelint-config-standard": "^15.0.1",
|
"stylelint-config-standard": "^15.0.1",
|
||||||
"stylelint-processor-styled-components": "^0.0.4"
|
"stylelint-processor-styled-components": "^0.0.4"
|
||||||
|
@ -72,7 +72,9 @@
|
||||||
"styled-components": "^2.4.1"
|
"styled-components": "^2.4.1"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"setupFilesAfterEnv": ["<rootDir>/tests/setup.js"]
|
"setupFilesAfterEnv": [
|
||||||
|
"<rootDir>/tests/setup.js"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"main": "lib/index.js"
|
"main": "lib/index.js"
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,17 +7,23 @@ import 'codemirror/mode/javascript/javascript';
|
||||||
describe('Editor', function() {
|
describe('Editor', function() {
|
||||||
const getBoundingClientRect = jest.fn();
|
const getBoundingClientRect = jest.fn();
|
||||||
const getClientRects = jest.fn();
|
const getClientRects = jest.fn();
|
||||||
document.body.createTextRange = function() {
|
|
||||||
return {
|
// See https://github.com/jsdom/jsdom/issues/3002
|
||||||
getBoundingClientRect() {
|
document.createRange = () => {
|
||||||
getBoundingClientRect();
|
const range = new Range();
|
||||||
return {};
|
|
||||||
},
|
range.getBoundingClientRect = getBoundingClientRect;
|
||||||
getClientRects() {
|
|
||||||
getClientRects();
|
range.getClientRects = () => {
|
||||||
return {};
|
getClientRects();
|
||||||
}
|
return {
|
||||||
|
item: () => null,
|
||||||
|
length: 0,
|
||||||
|
[Symbol.iterator]: jest.fn()
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
return range;
|
||||||
};
|
};
|
||||||
const wrapper = mount(<Editor value="var a = 1;" />);
|
const wrapper = mount(<Editor value="var a = 1;" />);
|
||||||
|
|
||||||
|
|
|
@ -31,12 +31,12 @@
|
||||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.10.5",
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"immutable": "^3.8.2",
|
"immutable": "^4.0.0-rc.12",
|
||||||
"jest": "^24.9.0",
|
"jest": "^26.2.2",
|
||||||
"rimraf": "^2.7.1",
|
"rimraf": "^3.0.2",
|
||||||
"webpack": "^4.44.1",
|
"webpack": "^4.44.1",
|
||||||
"webpack-cli": "^3.3.12"
|
"webpack-cli": "^3.3.12"
|
||||||
},
|
},
|
||||||
|
|
|
@ -28,11 +28,11 @@
|
||||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.10.5",
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||||
"@babel/plugin-transform-runtime": "^7.11.0",
|
"@babel/plugin-transform-runtime": "^7.11.0",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"rimraf": "^2.7.1"
|
"rimraf": "^3.0.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"base16": "^1.0.0",
|
"base16": "^1.0.0",
|
||||||
|
|
4
packages/react-base16-styling/src/index.js
vendored
4
packages/react-base16-styling/src/index.js
vendored
|
@ -208,7 +208,9 @@ export const getBase16Theme = (theme, base16Themes) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return theme && theme.hasOwnProperty('base00') ? theme : undefined;
|
return theme && Object.prototype.hasOwnProperty.call(theme, 'base00')
|
||||||
|
? theme
|
||||||
|
: undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const invertTheme = theme => {
|
export const invertTheme = theme => {
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/gaearon/react-hot-boilerplate",
|
"homepage": "https://github.com/gaearon/react-hot-boilerplate",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"@babel/preset-react": "^7.10.4",
|
"@babel/preset-react": "^7.10.4",
|
||||||
|
|
|
@ -40,17 +40,17 @@
|
||||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.10.5",
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"@babel/preset-react": "^7.10.4",
|
"@babel/preset-react": "^7.10.4",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"jest": "^24.9.0",
|
"jest": "^26.2.2",
|
||||||
"react": "^16.13.1",
|
"react": "^16.13.1",
|
||||||
"react-dom": "^16.13.1",
|
"react-dom": "^16.13.1",
|
||||||
"react-test-renderer": "^16.13.1",
|
"react-test-renderer": "^16.13.1",
|
||||||
"rimraf": "^2.7.1",
|
"rimraf": "^3.0.2",
|
||||||
"terser-webpack-plugin": "^1.4.4",
|
"terser-webpack-plugin": "^4.0.0",
|
||||||
"webpack": "^4.44.1",
|
"webpack": "^4.44.1",
|
||||||
"webpack-cli": "^3.3.12"
|
"webpack-cli": "^3.3.12"
|
||||||
},
|
},
|
||||||
|
|
|
@ -32,13 +32,13 @@
|
||||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.10.5",
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||||
"@babel/plugin-proposal-export-default-from": "^7.10.4",
|
"@babel/plugin-proposal-export-default-from": "^7.10.4",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"@babel/preset-react": "^7.10.4",
|
"@babel/preset-react": "^7.10.4",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"rimraf": "^2.7.1"
|
"rimraf": "^3.0.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "^16.3.0",
|
"react": "^16.3.0",
|
||||||
|
|
|
@ -57,8 +57,8 @@
|
||||||
"uuid": "^3.4.0"
|
"uuid": "^3.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"jest": "^24.9.0",
|
"jest": "^26.2.2",
|
||||||
"socketcluster-client": "^14.3.1",
|
"socketcluster-client": "^14.3.1",
|
||||||
"supertest": "^3.4.2"
|
"supertest": "^4.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ describe('Server', function() {
|
||||||
var scServer;
|
var scServer;
|
||||||
beforeAll(function(done) {
|
beforeAll(function(done) {
|
||||||
scServer = childProcess.fork(__dirname + '/../bin/redux-devtools.js');
|
scServer = childProcess.fork(__dirname + '/../bin/redux-devtools.js');
|
||||||
setTimeout(done, 2000);
|
setTimeout(done, 3000);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(function() {
|
afterAll(function() {
|
||||||
|
|
|
@ -39,28 +39,26 @@
|
||||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.10.5",
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"@babel/preset-react": "^7.10.4",
|
"@babel/preset-react": "^7.10.4",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"copy-webpack-plugin": "^4.6.0",
|
"css-loader": "^4.2.1",
|
||||||
"css-loader": "^2.1.1",
|
|
||||||
"enzyme": "^3.11.0",
|
"enzyme": "^3.11.0",
|
||||||
"enzyme-adapter-react-16": "^1.15.2",
|
"enzyme-adapter-react-16": "^1.15.3",
|
||||||
"enzyme-to-json": "^3.5.0",
|
"enzyme-to-json": "^3.5.0",
|
||||||
"file-loader": "^3.0.1",
|
"file-loader": "^6.0.0",
|
||||||
"html-loader": "^0.4.5",
|
"html-loader": "^1.1.0",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
"html-webpack-plugin": "^4.3.0",
|
||||||
"jest": "^24.9.0",
|
"jest": "^26.2.2",
|
||||||
"raw-loader": "^1.0.0",
|
|
||||||
"react": "^16.13.1",
|
"react": "^16.13.1",
|
||||||
"react-dom": "^16.13.1",
|
"react-dom": "^16.13.1",
|
||||||
"redux-logger": "^2.10.2",
|
"redux-logger": "^2.10.2",
|
||||||
"rimraf": "^2.7.1",
|
"rimraf": "^3.0.2",
|
||||||
"style-loader": "^0.13.2",
|
"style-loader": "^1.2.1",
|
||||||
"terser-webpack-plugin": "^1.4.4",
|
"terser-webpack-plugin": "^4.0.0",
|
||||||
"url-loader": "^1.1.2",
|
"url-loader": "^4.1.0",
|
||||||
"webpack": "^4.44.1",
|
"webpack": "^4.44.1",
|
||||||
"webpack-cli": "^3.3.12",
|
"webpack-cli": "^3.3.12",
|
||||||
"webpack-dev-server": "^3.11.0",
|
"webpack-dev-server": "^3.11.0",
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import commitExcessActions from './commitExcessActions';
|
import commitExcessActions from './commitExcessActions';
|
||||||
|
|
||||||
/* eslint-disable import/prefer-default-export */
|
|
||||||
export function recompute(
|
export function recompute(
|
||||||
previousLiftedState,
|
previousLiftedState,
|
||||||
storeState,
|
storeState,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
|
|
||||||
module.exports = (env = {}) => ({
|
module.exports = (env = {}) => ({
|
||||||
|
@ -56,12 +55,7 @@ module.exports = (env = {}) => ({
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: 'assets/index.html'
|
template: 'assets/index.html'
|
||||||
}),
|
})
|
||||||
new CopyWebpackPlugin(
|
|
||||||
env.platform === 'electron'
|
|
||||||
? [{ context: './src/electron', from: '*' }]
|
|
||||||
: []
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: false,
|
minimize: false,
|
||||||
|
|
|
@ -34,13 +34,13 @@
|
||||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.10.5",
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||||
"@babel/plugin-proposal-export-default-from": "^7.10.4",
|
"@babel/plugin-proposal-export-default-from": "^7.10.4",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"@babel/preset-react": "^7.10.4",
|
"@babel/preset-react": "^7.10.4",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"rimraf": "^2.7.1"
|
"rimraf": "^3.0.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "^0.14.9 || ^15.3.0 || ^16.0.0",
|
"react": "^0.14.9 || ^15.3.0 || ^16.0.0",
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.10.5",
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||||
"@babel/plugin-proposal-do-expressions": "^7.10.4",
|
"@babel/plugin-proposal-do-expressions": "^7.10.4",
|
||||||
"@babel/plugin-proposal-export-default-from": "^7.10.4",
|
"@babel/plugin-proposal-export-default-from": "^7.10.4",
|
||||||
|
@ -32,13 +32,11 @@
|
||||||
"@babel/preset-react": "^7.10.4",
|
"@babel/preset-react": "^7.10.4",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"base16": "^1.0.0",
|
"base16": "^1.0.0",
|
||||||
"chokidar": "^2.1.8",
|
"clean-webpack-plugin": "^3.0.0",
|
||||||
"clean-webpack-plugin": "^1.0.1",
|
"cross-env": "^7.0.2",
|
||||||
"cross-env": "^5.2.1",
|
|
||||||
"export-files-webpack-plugin": "^0.0.1",
|
"export-files-webpack-plugin": "^0.0.1",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
"html-webpack-plugin": "^4.3.0",
|
||||||
"lodash.shuffle": "^4.2.0",
|
"lodash.shuffle": "^4.2.0",
|
||||||
"raw-loader": "^1.0.0",
|
|
||||||
"react": "^16.13.1",
|
"react": "^16.13.1",
|
||||||
"react-bootstrap": "^0.30.10",
|
"react-bootstrap": "^0.30.10",
|
||||||
"react-dom": "^16.13.1",
|
"react-dom": "^16.13.1",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var webpack = require('webpack');
|
var webpack = require('webpack');
|
||||||
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
var CleanWebpackPlugin = require('clean-webpack-plugin');
|
var { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||||
var ExportFilesWebpackPlugin = require('export-files-webpack-plugin');
|
var ExportFilesWebpackPlugin = require('export-files-webpack-plugin');
|
||||||
|
|
||||||
var pkg = require('./package.json');
|
var pkg = require('./package.json');
|
||||||
|
@ -23,11 +23,10 @@ module.exports = {
|
||||||
filename: 'js/bundle.js'
|
filename: 'js/bundle.js'
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new CleanWebpackPlugin(isProduction ? ['demo/dist'] : []),
|
new CleanWebpackPlugin(),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
inject: true,
|
inject: true,
|
||||||
template: 'demo/src/index.html',
|
template: 'demo/src/index.html',
|
||||||
filename: 'index.html',
|
|
||||||
package: pkg
|
package: pkg
|
||||||
}),
|
}),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
|
|
|
@ -34,13 +34,13 @@
|
||||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.10.5",
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"expect": "^1.20.2",
|
"expect": "^26.2.0",
|
||||||
"jest": "^24.9.0",
|
"jest": "^26.2.2",
|
||||||
"redux": "^4.0.5",
|
"redux": "^4.0.5",
|
||||||
"rimraf": "^2.7.1",
|
"rimraf": "^3.0.2",
|
||||||
"rxjs": "^6.6.2"
|
"rxjs": "^6.6.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -34,13 +34,13 @@
|
||||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.10.5",
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||||
"@babel/plugin-proposal-export-default-from": "^7.10.4",
|
"@babel/plugin-proposal-export-default-from": "^7.10.4",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"@babel/preset-react": "^7.10.4",
|
"@babel/preset-react": "^7.10.4",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"rimraf": "^2.7.1"
|
"rimraf": "^3.0.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "^16.3.0",
|
"react": "^16.3.0",
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"@babel/preset-react": "^7.10.4",
|
"@babel/preset-react": "^7.10.4",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
|
"raw-loader": "^4.0.1",
|
||||||
"webpack": "^4.44.1",
|
"webpack": "^4.44.1",
|
||||||
"webpack-dev-server": "^3.11.0"
|
"webpack-dev-server": "^3.11.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -31,7 +31,15 @@ module.exports = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.css?$/,
|
test: /\.css?$/,
|
||||||
use: ['style-loader', 'raw-loader']
|
use: [
|
||||||
|
'style-loader',
|
||||||
|
{
|
||||||
|
loader: 'raw-loader',
|
||||||
|
options: {
|
||||||
|
esModule: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,12 +20,11 @@
|
||||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.10.5",
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"@babel/preset-react": "^7.10.4",
|
"@babel/preset-react": "^7.10.4",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"raw-loader": "^1.0.0",
|
|
||||||
"react": "^16.13.1",
|
"react": "^16.13.1",
|
||||||
"react-dom": "^16.13.1",
|
"react-dom": "^16.13.1",
|
||||||
"react-hot-loader": "^3.1.3",
|
"react-hot-loader": "^3.1.3",
|
||||||
|
@ -34,8 +33,8 @@
|
||||||
"redux-devtools": "^3.6.0",
|
"redux-devtools": "^3.6.0",
|
||||||
"redux-devtools-dock-monitor": "^1.1.3",
|
"redux-devtools-dock-monitor": "^1.1.3",
|
||||||
"redux-devtools-log-monitor": "^2.0.0",
|
"redux-devtools-log-monitor": "^2.0.0",
|
||||||
"rimraf": "^2.7.1",
|
"rimraf": "^3.0.2",
|
||||||
"style-loader": "^0.13.2",
|
"style-loader": "^1.2.1",
|
||||||
"todomvc-app-css": "^2.3.0"
|
"todomvc-app-css": "^2.3.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"presets": ["@babel/preset-env", "@babel/preset-react"],
|
"presets": ["@babel/preset-env", "@babel/preset-react"],
|
||||||
"plugins": ["@babel/plugin-proposal-class-properties"]
|
"plugins": ["@babel/plugin-proposal-class-properties", "@babel/plugin-proposal-do-expressions"]
|
||||||
}
|
}
|
||||||
|
|
12
packages/redux-devtools-test-generator/demo/src/index.html
Normal file
12
packages/redux-devtools-test-generator/demo/src/index.html
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
|
||||||
|
<title><%= htmlWebpackPlugin.options.package.name %></title>
|
||||||
|
<meta name="description" content="<%= htmlWebpackPlugin.options.package.description %>">
|
||||||
|
<link href="//maxcdn.bootstrapcdn.com/bootswatch/3.3.5/paper/bootstrap.min.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="root"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
133
packages/redux-devtools-test-generator/demo/src/js/DemoApp.jsx
Normal file
133
packages/redux-devtools-test-generator/demo/src/js/DemoApp.jsx
Normal file
|
@ -0,0 +1,133 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import pkg from '../../../package.json';
|
||||||
|
import { Button, Toolbar, Spacer } from 'devui';
|
||||||
|
import getOptions from './getOptions';
|
||||||
|
import { push as pushRoute } from 'react-router-redux';
|
||||||
|
|
||||||
|
const styles = {
|
||||||
|
wrapper: {
|
||||||
|
height: '100vh',
|
||||||
|
width: '450px',
|
||||||
|
margin: 'auto',
|
||||||
|
textAlign: 'center'
|
||||||
|
},
|
||||||
|
muted: {
|
||||||
|
color: '#CCCCCC'
|
||||||
|
},
|
||||||
|
link: {
|
||||||
|
margin: '0 0.5rem',
|
||||||
|
cursor: 'pointer',
|
||||||
|
display: 'block'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const ROOT = '/'; // process.env.NODE_ENV === 'production' ? '/' : '/';
|
||||||
|
|
||||||
|
class DemoApp extends React.Component {
|
||||||
|
render() {
|
||||||
|
const options = getOptions();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div style={styles.wrapper}>
|
||||||
|
<h3>{pkg.name || <span style={styles.muted}>Package Name</span>}</h3>
|
||||||
|
<h5>
|
||||||
|
{pkg.description || (
|
||||||
|
<span style={styles.muted}>Package Description</span>
|
||||||
|
)}
|
||||||
|
</h5>
|
||||||
|
<Toolbar>
|
||||||
|
<Spacer />
|
||||||
|
<Button onClick={this.props.increment}>Increment</Button>
|
||||||
|
<Button onClick={this.props.push}>Push</Button>
|
||||||
|
<Button onClick={this.props.pop}>Pop</Button>
|
||||||
|
<Button onClick={this.props.replace}>Replace</Button>
|
||||||
|
<Button onClick={this.props.changeNested}>Change Nested</Button>
|
||||||
|
<Spacer />
|
||||||
|
</Toolbar>
|
||||||
|
<Toolbar>
|
||||||
|
<Spacer />
|
||||||
|
<Button onClick={this.props.pushHugeArray}>Push Huge Array</Button>
|
||||||
|
<Button onClick={this.props.addHugeObect}>Add Huge Object</Button>
|
||||||
|
<Button onClick={this.props.hugePayload}>Huge Payload</Button>
|
||||||
|
<Spacer />
|
||||||
|
</Toolbar>
|
||||||
|
<Toolbar>
|
||||||
|
<Spacer />
|
||||||
|
<Button onClick={this.props.addIterator}>Add Iterator</Button>
|
||||||
|
<Button onClick={this.props.addImmutableMap}>
|
||||||
|
Add Immutable Map
|
||||||
|
</Button>
|
||||||
|
<Button onClick={this.props.changeImmutableNested}>
|
||||||
|
Change Immutable Nested
|
||||||
|
</Button>
|
||||||
|
<Spacer />
|
||||||
|
</Toolbar>
|
||||||
|
<Toolbar>
|
||||||
|
<Spacer />
|
||||||
|
<Button onClick={this.props.addRecursive}>Add Recursive</Button>
|
||||||
|
<Button onClick={this.props.addFunction}>Add Function</Button>
|
||||||
|
<Button onClick={this.props.addSymbol}>Add Symbol</Button>
|
||||||
|
<Spacer />
|
||||||
|
</Toolbar>
|
||||||
|
<Toolbar>
|
||||||
|
<Spacer />
|
||||||
|
<Button onClick={this.toggleTimeoutUpdate}>
|
||||||
|
Timeout Update {this.props.timeoutUpdateEnabled ? 'On' : 'Off'}
|
||||||
|
</Button>
|
||||||
|
<Button onClick={this.props.shuffleArray}>Shuffle Array</Button>
|
||||||
|
<Spacer />
|
||||||
|
</Toolbar>
|
||||||
|
<div>
|
||||||
|
{options.useExtension ? (
|
||||||
|
<a href={`${ROOT}`} style={styles.link}>
|
||||||
|
Disable browser extension
|
||||||
|
</a>
|
||||||
|
) : (
|
||||||
|
<a href={`${ROOT}?ext`} style={styles.link}>
|
||||||
|
Use browser extension
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
toggleTimeoutUpdate = () => {
|
||||||
|
const enabled = !this.props.timeoutUpdateEnabled;
|
||||||
|
this.props.toggleTimeoutUpdate(enabled);
|
||||||
|
|
||||||
|
if (enabled) {
|
||||||
|
this.timeout = setInterval(this.props.timeoutUpdate, 1000);
|
||||||
|
} else {
|
||||||
|
clearTimeout(this.timeout);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export default connect(state => state, {
|
||||||
|
toggleTimeoutUpdate: timeoutUpdateEnabled => ({
|
||||||
|
type: 'TOGGLE_TIMEOUT_UPDATE',
|
||||||
|
timeoutUpdateEnabled
|
||||||
|
}),
|
||||||
|
timeoutUpdate: () => ({ type: 'TIMEOUT_UPDATE' }),
|
||||||
|
increment: () => ({ type: 'INCREMENT' }),
|
||||||
|
push: () => ({ type: 'PUSH' }),
|
||||||
|
pop: () => ({ type: 'POP' }),
|
||||||
|
replace: () => ({ type: 'REPLACE' }),
|
||||||
|
changeNested: () => ({ type: 'CHANGE_NESTED' }),
|
||||||
|
pushHugeArray: () => ({ type: 'PUSH_HUGE_ARRAY' }),
|
||||||
|
addIterator: () => ({ type: 'ADD_ITERATOR' }),
|
||||||
|
addHugeObect: () => ({ type: 'ADD_HUGE_OBJECT' }),
|
||||||
|
addRecursive: () => ({ type: 'ADD_RECURSIVE' }),
|
||||||
|
addImmutableMap: () => ({ type: 'ADD_IMMUTABLE_MAP' }),
|
||||||
|
changeImmutableNested: () => ({ type: 'CHANGE_IMMUTABLE_NESTED' }),
|
||||||
|
hugePayload: () => ({
|
||||||
|
type: 'HUGE_PAYLOAD',
|
||||||
|
payload: Array.from({ length: 10000 }).map((_, i) => i)
|
||||||
|
}),
|
||||||
|
addFunction: () => ({ type: 'ADD_FUNCTION' }),
|
||||||
|
addSymbol: () => ({ type: 'ADD_SYMBOL' }),
|
||||||
|
shuffleArray: () => ({ type: 'SHUFFLE_ARRAY' }),
|
||||||
|
pushRoute
|
||||||
|
})(DemoApp);
|
|
@ -0,0 +1,11 @@
|
||||||
|
export default function getOptions() {
|
||||||
|
return {
|
||||||
|
useExtension: window.location.search.indexOf('ext') !== -1,
|
||||||
|
supportImmutable: window.location.search.indexOf('immutable') !== -1,
|
||||||
|
theme: do {
|
||||||
|
const match = window.location.search.match(/theme=([^&]+)/);
|
||||||
|
match ? match[1] : 'inspector';
|
||||||
|
},
|
||||||
|
dark: window.location.search.indexOf('dark') !== -1
|
||||||
|
};
|
||||||
|
}
|
111
packages/redux-devtools-test-generator/demo/src/js/index.js
Normal file
111
packages/redux-devtools-test-generator/demo/src/js/index.js
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
import '@babel/polyfill';
|
||||||
|
import 'devui/lib/presets';
|
||||||
|
import React from 'react';
|
||||||
|
import { render } from 'react-dom';
|
||||||
|
import { Container } from 'devui';
|
||||||
|
import DemoApp from './DemoApp';
|
||||||
|
import { Provider } from 'react-redux';
|
||||||
|
import reducers from './reducers';
|
||||||
|
import { createStore, applyMiddleware, compose, combineReducers } from 'redux';
|
||||||
|
import createLogger from 'redux-logger';
|
||||||
|
import { Router, Route, browserHistory } from 'react-router';
|
||||||
|
import {
|
||||||
|
syncHistoryWithStore,
|
||||||
|
routerReducer,
|
||||||
|
routerMiddleware
|
||||||
|
} from 'react-router-redux';
|
||||||
|
import { createDevTools, persistState } from 'redux-devtools';
|
||||||
|
import DevtoolsInspector from 'redux-devtools-inspector';
|
||||||
|
import DockMonitor from 'redux-devtools-dock-monitor';
|
||||||
|
import getOptions from './getOptions';
|
||||||
|
import TestGenerator from '../../../src';
|
||||||
|
|
||||||
|
function getDebugSessionKey() {
|
||||||
|
const matches = window.location.href.match(/[?&]debug_session=([^&#]+)\b/);
|
||||||
|
return matches && matches.length > 0 ? matches[1] : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const getDevTools = options =>
|
||||||
|
createDevTools(
|
||||||
|
<DockMonitor
|
||||||
|
defaultIsVisible
|
||||||
|
toggleVisibilityKey="ctrl-h"
|
||||||
|
changePositionKey="ctrl-q"
|
||||||
|
changeMonitorKey="ctrl-m"
|
||||||
|
>
|
||||||
|
<DevtoolsInspector
|
||||||
|
theme={options.theme}
|
||||||
|
shouldPersistState
|
||||||
|
invertTheme={!options.dark}
|
||||||
|
supportImmutable={options.supportImmutable}
|
||||||
|
tabs={defaultTabs => [
|
||||||
|
{
|
||||||
|
name: 'Test',
|
||||||
|
component: TestGenerator
|
||||||
|
},
|
||||||
|
...defaultTabs
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</DockMonitor>
|
||||||
|
);
|
||||||
|
|
||||||
|
const ROOT =
|
||||||
|
process.env.NODE_ENV === 'production' ? '/redux-devtools-inspector/' : '/';
|
||||||
|
|
||||||
|
let DevTools = getDevTools(getOptions());
|
||||||
|
|
||||||
|
const reduxRouterMiddleware = routerMiddleware(browserHistory);
|
||||||
|
|
||||||
|
const enhancer = compose(
|
||||||
|
applyMiddleware(createLogger(), reduxRouterMiddleware),
|
||||||
|
(...args) => {
|
||||||
|
const useDevtoolsExtension =
|
||||||
|
!!window.__REDUX_DEVTOOLS_EXTENSION__ && getOptions().useExtension;
|
||||||
|
const instrument = useDevtoolsExtension
|
||||||
|
? window.__REDUX_DEVTOOLS_EXTENSION__()
|
||||||
|
: DevTools.instrument();
|
||||||
|
return instrument(...args);
|
||||||
|
},
|
||||||
|
persistState(getDebugSessionKey())
|
||||||
|
);
|
||||||
|
|
||||||
|
const store = createStore(
|
||||||
|
combineReducers({
|
||||||
|
...reducers,
|
||||||
|
routing: routerReducer
|
||||||
|
}),
|
||||||
|
{},
|
||||||
|
enhancer
|
||||||
|
);
|
||||||
|
|
||||||
|
const history = syncHistoryWithStore(browserHistory, store);
|
||||||
|
|
||||||
|
const handleRouterUpdate = () => {
|
||||||
|
renderApp(getOptions());
|
||||||
|
};
|
||||||
|
|
||||||
|
const router = (
|
||||||
|
<Router history={history} onUpdate={handleRouterUpdate}>
|
||||||
|
<Route path={ROOT} component={DemoApp} />
|
||||||
|
</Router>
|
||||||
|
);
|
||||||
|
|
||||||
|
const renderApp = options => {
|
||||||
|
DevTools = getDevTools(options);
|
||||||
|
const useDevtoolsExtension =
|
||||||
|
!!window.__REDUX_DEVTOOLS_EXTENSION__ && options.useExtension;
|
||||||
|
|
||||||
|
return render(
|
||||||
|
<Provider store={store}>
|
||||||
|
<Container
|
||||||
|
themeData={{ theme: 'default', scheme: 'default', light: true }}
|
||||||
|
>
|
||||||
|
{router}
|
||||||
|
{!useDevtoolsExtension && <DevTools />}
|
||||||
|
</Container>
|
||||||
|
</Provider>,
|
||||||
|
document.getElementById('root')
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
renderApp(getOptions());
|
119
packages/redux-devtools-test-generator/demo/src/js/reducers.js
Normal file
119
packages/redux-devtools-test-generator/demo/src/js/reducers.js
Normal file
|
@ -0,0 +1,119 @@
|
||||||
|
import Immutable from 'immutable';
|
||||||
|
import shuffle from 'lodash.shuffle';
|
||||||
|
|
||||||
|
const NESTED = {
|
||||||
|
long: {
|
||||||
|
nested: [
|
||||||
|
{
|
||||||
|
path: {
|
||||||
|
to: {
|
||||||
|
a: 'key'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const IMMUTABLE_NESTED = Immutable.fromJS(NESTED);
|
||||||
|
|
||||||
|
/* eslint-disable babel/new-cap */
|
||||||
|
|
||||||
|
const IMMUTABLE_MAP = Immutable.Map({
|
||||||
|
map: Immutable.Map({ a: 1, b: 2, c: 3 }),
|
||||||
|
list: Immutable.List(['a', 'b', 'c']),
|
||||||
|
set: Immutable.Set(['a', 'b', 'c']),
|
||||||
|
stack: Immutable.Stack(['a', 'b', 'c']),
|
||||||
|
seq: Immutable.Seq.of(1, 2, 3, 4, 5, 6, 7, 8)
|
||||||
|
});
|
||||||
|
|
||||||
|
/* eslint-enable babel/new-cap */
|
||||||
|
|
||||||
|
const HUGE_ARRAY = Array.from({ length: 5000 }).map((_, key) => ({
|
||||||
|
str: 'key ' + key
|
||||||
|
}));
|
||||||
|
|
||||||
|
const HUGE_OBJECT = Array.from({ length: 5000 }).reduce(
|
||||||
|
(o, _, key) => ((o['key ' + key] = 'item ' + key), o),
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
|
||||||
|
const FUNC = function(a, b, c) {
|
||||||
|
return a + b + c;
|
||||||
|
};
|
||||||
|
|
||||||
|
const RECURSIVE = {};
|
||||||
|
RECURSIVE.obj = RECURSIVE;
|
||||||
|
|
||||||
|
function createIterator() {
|
||||||
|
const iterable = {};
|
||||||
|
iterable[window.Symbol.iterator] = function* iterator() {
|
||||||
|
for (var i = 0; i < 333; i++) {
|
||||||
|
yield 'item ' + i;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return iterable;
|
||||||
|
}
|
||||||
|
|
||||||
|
const DEFAULT_SHUFFLE_ARRAY = [0, 1, null, { id: 1 }, { id: 2 }, 'string'];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
timeoutUpdateEnabled: (state = false, action) =>
|
||||||
|
action.type === 'TOGGLE_TIMEOUT_UPDATE'
|
||||||
|
? action.timeoutUpdateEnabled
|
||||||
|
: state,
|
||||||
|
store: (state = 0, action) =>
|
||||||
|
action.type === 'INCREMENT' ? state + 1 : state,
|
||||||
|
undefined: (state = { val: undefined }) => state,
|
||||||
|
null: (state = null) => state,
|
||||||
|
func: (state = () => {}) => state,
|
||||||
|
array: (state = [], action) =>
|
||||||
|
action.type === 'PUSH'
|
||||||
|
? [...state, Math.random()]
|
||||||
|
: action.type === 'POP'
|
||||||
|
? state.slice(0, state.length - 1)
|
||||||
|
: action.type === 'REPLACE'
|
||||||
|
? [Math.random(), ...state.slice(1)]
|
||||||
|
: state,
|
||||||
|
hugeArrays: (state = [], action) =>
|
||||||
|
action.type === 'PUSH_HUGE_ARRAY' ? [...state, ...HUGE_ARRAY] : state,
|
||||||
|
hugeObjects: (state = [], action) =>
|
||||||
|
action.type === 'ADD_HUGE_OBJECT' ? [...state, HUGE_OBJECT] : state,
|
||||||
|
iterators: (state = [], action) =>
|
||||||
|
action.type === 'ADD_ITERATOR' ? [...state, createIterator()] : state,
|
||||||
|
nested: (state = NESTED, action) =>
|
||||||
|
action.type === 'CHANGE_NESTED'
|
||||||
|
? {
|
||||||
|
...state,
|
||||||
|
long: {
|
||||||
|
nested: [
|
||||||
|
{
|
||||||
|
path: {
|
||||||
|
to: {
|
||||||
|
a: state.long.nested[0].path.to.a + '!'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
: state,
|
||||||
|
recursive: (state = [], action) =>
|
||||||
|
action.type === 'ADD_RECURSIVE' ? [...state, { ...RECURSIVE }] : state,
|
||||||
|
immutables: (state = [], action) =>
|
||||||
|
action.type === 'ADD_IMMUTABLE_MAP' ? [...state, IMMUTABLE_MAP] : state,
|
||||||
|
immutableNested: (state = IMMUTABLE_NESTED, action) =>
|
||||||
|
action.type === 'CHANGE_IMMUTABLE_NESTED'
|
||||||
|
? state.updateIn(
|
||||||
|
['long', 'nested', 0, 'path', 'to', 'a'],
|
||||||
|
str => str + '!'
|
||||||
|
)
|
||||||
|
: state,
|
||||||
|
addFunction: (state = null, action) =>
|
||||||
|
action.type === 'ADD_FUNCTION' ? { f: FUNC } : state,
|
||||||
|
addSymbol: (state = null, action) =>
|
||||||
|
action.type === 'ADD_SYMBOL' ? { s: window.Symbol('symbol') } : state,
|
||||||
|
shuffleArray: (state = DEFAULT_SHUFFLE_ARRAY, action) =>
|
||||||
|
action.type === 'SHUFFLE_ARRAY' ? shuffle(state) : state
|
||||||
|
};
|
|
@ -36,21 +36,23 @@
|
||||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.10.5",
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||||
|
"@babel/plugin-proposal-do-expressions": "^7.10.4",
|
||||||
|
"@babel/polyfill": "^7.10.4",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"@babel/preset-react": "^7.10.4",
|
"@babel/preset-react": "^7.10.4",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"clean-webpack-plugin": "^1.0.1",
|
"clean-webpack-plugin": "^3.0.0",
|
||||||
"css-loader": "^2.1.1",
|
"css-loader": "^4.2.1",
|
||||||
"enzyme": "^3.11.0",
|
"enzyme": "^3.11.0",
|
||||||
"enzyme-adapter-react-16": "^1.15.2",
|
"enzyme-adapter-react-16": "^1.15.3",
|
||||||
"enzyme-to-json": "^3.5.0",
|
"enzyme-to-json": "^3.5.0",
|
||||||
"expect": "^1.20.2",
|
"expect": "^26.2.0",
|
||||||
"export-files-webpack-plugin": "^0.0.1",
|
"export-files-webpack-plugin": "^0.0.1",
|
||||||
"file-loader": "^3.0.1",
|
"file-loader": "^6.0.0",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
"html-webpack-plugin": "^4.3.0",
|
||||||
"jest": "^24.9.0",
|
"jest": "^26.2.2",
|
||||||
"lodash.shuffle": "^4.2.0",
|
"lodash.shuffle": "^4.2.0",
|
||||||
"react-dom": "^16.13.1",
|
"react-dom": "^16.13.1",
|
||||||
"react-redux": "^6.0.1",
|
"react-redux": "^6.0.1",
|
||||||
|
@ -61,9 +63,10 @@
|
||||||
"redux-devtools-dock-monitor": "^1.1.3",
|
"redux-devtools-dock-monitor": "^1.1.3",
|
||||||
"redux-devtools-inspector": "^0.13.0",
|
"redux-devtools-inspector": "^0.13.0",
|
||||||
"redux-logger": "^2.10.2",
|
"redux-logger": "^2.10.2",
|
||||||
"rimraf": "^2.7.1",
|
"rimraf": "^3.0.2",
|
||||||
"style-loader": "^0.13.2",
|
"style-loader": "^1.2.1",
|
||||||
"url-loader": "^1.1.2"
|
"webpack": "^4.44.1",
|
||||||
|
"webpack-dev-server": "^3.11.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"devui": "^1.0.0-4",
|
"devui": "^1.0.0-4",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
const CleanWebpackPlugin = require('clean-webpack-plugin');
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||||
const ExportFilesWebpackPlugin = require('export-files-webpack-plugin');
|
const ExportFilesWebpackPlugin = require('export-files-webpack-plugin');
|
||||||
|
|
||||||
const pkg = require('./package.json');
|
const pkg = require('./package.json');
|
||||||
|
@ -22,11 +22,10 @@ module.exports = {
|
||||||
filename: 'js/bundle.js'
|
filename: 'js/bundle.js'
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new CleanWebpackPlugin(isProduction ? ['demo/dist'] : []),
|
new CleanWebpackPlugin(),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
inject: true,
|
inject: true,
|
||||||
template: 'demo/src/index.html',
|
template: 'demo/src/index.html',
|
||||||
filename: 'index.html',
|
|
||||||
package: pkg
|
package: pkg
|
||||||
}),
|
}),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.10.5",
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||||
"@babel/plugin-proposal-decorators": "^7.10.5",
|
"@babel/plugin-proposal-decorators": "^7.10.5",
|
||||||
"@babel/plugin-transform-runtime": "^7.11.0",
|
"@babel/plugin-transform-runtime": "^7.11.0",
|
||||||
|
@ -30,12 +30,12 @@
|
||||||
"@babel/preset-flow": "^7.10.4",
|
"@babel/preset-flow": "^7.10.4",
|
||||||
"@babel/preset-react": "^7.10.4",
|
"@babel/preset-react": "^7.10.4",
|
||||||
"enzyme": "^3.11.0",
|
"enzyme": "^3.11.0",
|
||||||
"enzyme-adapter-react-16": "^1.15.2",
|
"enzyme-adapter-react-16": "^1.15.3",
|
||||||
"enzyme-to-json": "^3.5.0",
|
"enzyme-to-json": "^3.5.0",
|
||||||
"jest": "^24.9.0",
|
"jest": "^26.2.2",
|
||||||
"react-dom": "^16.13.1",
|
"react-dom": "^16.13.1",
|
||||||
"react-test-renderer": "^16.13.1",
|
"react-test-renderer": "^16.13.1",
|
||||||
"rimraf": "^2.7.1"
|
"rimraf": "^3.0.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/code-frame": "^7.10.4",
|
"@babel/code-frame": "^7.10.4",
|
||||||
|
|
|
@ -36,7 +36,7 @@ function removeCss(document: Document, ref: number) {
|
||||||
function applyStyles(element: HTMLElement, styles: Object) {
|
function applyStyles(element: HTMLElement, styles: Object) {
|
||||||
element.setAttribute('style', '');
|
element.setAttribute('style', '');
|
||||||
for (const key in styles) {
|
for (const key in styles) {
|
||||||
if (!styles.hasOwnProperty(key)) {
|
if (!Object.prototype.hasOwnProperty.call(styles, key)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// $FlowFixMe
|
// $FlowFixMe
|
||||||
|
|
|
@ -25,12 +25,11 @@
|
||||||
"redux-thunk": "^2.3.0"
|
"redux-thunk": "^2.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"@babel/preset-react": "^7.10.4",
|
"@babel/preset-react": "^7.10.4",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"node-libs-browser": "^0.5.3",
|
|
||||||
"redux-devtools": "^3.6.0",
|
"redux-devtools": "^3.6.0",
|
||||||
"redux-devtools-dock-monitor": "^1.1.3",
|
"redux-devtools-dock-monitor": "^1.1.3",
|
||||||
"redux-devtools-log-monitor": "^2.0.0",
|
"redux-devtools-log-monitor": "^2.0.0",
|
||||||
|
|
|
@ -38,18 +38,17 @@
|
||||||
"todomvc-app-css": "^2.3.0"
|
"todomvc-app-css": "^2.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||||
"@babel/plugin-proposal-function-bind": "^7.10.5",
|
"@babel/plugin-proposal-function-bind": "^7.10.5",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"@babel/preset-react": "^7.10.4",
|
"@babel/preset-react": "^7.10.4",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"node-libs-browser": "^0.5.3",
|
"raw-loader": "^4.0.1",
|
||||||
"raw-loader": "^1.0.0",
|
|
||||||
"redux-devtools": "^3.6.0",
|
"redux-devtools": "^3.6.0",
|
||||||
"redux-devtools-dock-monitor": "^1.1.3",
|
"redux-devtools-dock-monitor": "^1.1.3",
|
||||||
"redux-devtools-log-monitor": "^2.0.0",
|
"redux-devtools-log-monitor": "^2.0.0",
|
||||||
"style-loader": "^0.13.1",
|
"style-loader": "^1.2.1",
|
||||||
"webpack": "^4.44.1",
|
"webpack": "^4.44.1",
|
||||||
"webpack-dev-server": "^3.11.0"
|
"webpack-dev-server": "^3.11.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,15 @@ module.exports = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.css?$/,
|
test: /\.css?$/,
|
||||||
loaders: ['style-loader', 'raw-loader']
|
loaders: [
|
||||||
|
'style-loader',
|
||||||
|
{
|
||||||
|
loader: 'raw-loader',
|
||||||
|
options: {
|
||||||
|
esModule: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,17 +34,17 @@
|
||||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.10.5",
|
"@babel/cli": "^7.10.5",
|
||||||
"@babel/core": "^7.11.0",
|
"@babel/core": "^7.11.1",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"@babel/preset-env": "^7.11.0",
|
||||||
"@babel/preset-react": "^7.10.4",
|
"@babel/preset-react": "^7.10.4",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"jest": "^24.9.0",
|
"jest": "^26.2.2",
|
||||||
"react": "^16.13.1",
|
"react": "^16.13.1",
|
||||||
"react-dom": "^16.13.1",
|
"react-dom": "^16.13.1",
|
||||||
"react-redux": "^6.0.1",
|
"react-redux": "^6.0.1",
|
||||||
"redux": "^4.0.5",
|
"redux": "^4.0.5",
|
||||||
"rimraf": "^2.7.1"
|
"rimraf": "^3.0.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "^0.14.9 || ^15.3.0 || ^16.0.0",
|
"react": "^0.14.9 || ^15.3.0 || ^16.0.0",
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"immutable": "^3.8.2"
|
"immutable": "^4.0.0-rc.12"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jsan": "^3.1.13"
|
"jsan": "^3.1.13"
|
||||||
|
|
|
@ -12,7 +12,7 @@ var data = {
|
||||||
repeat: Immutable.Repeat('hi', 100),
|
repeat: Immutable.Repeat('hi', 100),
|
||||||
set: Immutable.Set([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),
|
set: Immutable.Set([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),
|
||||||
orderedSet: Immutable.OrderedSet([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),
|
orderedSet: Immutable.OrderedSet([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),
|
||||||
seq: Immutable.Seq.of(1, 2, 3, 4, 5, 6, 7, 8),
|
seq: Immutable.Seq([1, 2, 3, 4, 5, 6, 7, 8]),
|
||||||
stack: Immutable.Stack.of('a', 'b', 'c')
|
stack: Immutable.Stack.of('a', 'b', 'c')
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user