mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-21 17:16:42 +03:00
chore(*): move redux-devtools-app to scoped package (#693)
* stash * more * cli rename * Remove reference * Fix another reference * Fix scripts * Fix package name * Fix tsconfig
This commit is contained in:
parent
85b4b0fb04
commit
0399d306c0
|
@ -7,7 +7,7 @@ Web, Electron and Chrome app for monitoring [remote-redux-devtools](https://gith
|
|||
Also it's a react component you can use to build amazing monitor applications like:
|
||||
|
||||
- [redux-devtools-extension](https://github.com/zalmoxisus/redux-devtools-extension).
|
||||
- [react-native-debugger](https://github.com/jhen0409/react-native-debugger) - Electron app, which already includes `remotedev-server`, `redux-devtools-core` and even React DevTools.
|
||||
- [react-native-debugger](https://github.com/jhen0409/react-native-debugger) - Electron app, which already includes `remotedev-server`, `redux-devtools-app` and even React DevTools.
|
||||
- [remote-redux-devtools-on-debugger](https://github.com/jhen0409/remote-redux-devtools-on-debugger) - Used in React Native debugger as a dock monitor.
|
||||
- [atom-redux-devtools](https://github.com/zalmoxisus/atom-redux-devtools) - Used in Atom editor.
|
||||
- [vscode-redux-devtools](https://github.com/jkzing/vscode-redux-devtools) - Used in Visual Studio Code.
|
||||
|
@ -17,7 +17,7 @@ Also it's a react component you can use to build amazing monitor applications li
|
|||
```js
|
||||
import React from 'react';
|
||||
import ReactDom from 'react-dom';
|
||||
import DevToolsApp from 'redux-devtools-core/lib/app';
|
||||
import DevToolsApp from '@redux-devtools/app';
|
||||
|
||||
ReactDom.render(<App />, document.getElementById('root'));
|
||||
```
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import App from './app';
|
||||
import App from '../src';
|
||||
|
||||
render(<App />, document.getElementById('root'));
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"name": "redux-devtools-core",
|
||||
"name": "@redux-devtools/app",
|
||||
"version": "1.0.0-4",
|
||||
"description": "Reusable functions of Redux DevTools",
|
||||
"homepage": "https://github.com/reduxjs/redux-devtools/tree/master/packages/redux-devtools-core",
|
||||
"description": "Redux DevTools app",
|
||||
"homepage": "https://github.com/reduxjs/redux-devtools/tree/master/packages/redux-devtools-app",
|
||||
"bugs": {
|
||||
"url": "https://github.com/reduxjs/redux-devtools/issues"
|
||||
},
|
||||
|
@ -43,18 +43,14 @@
|
|||
"@redux-devtools/inspector-monitor-test-tab": "^0.6.2",
|
||||
"@redux-devtools/inspector-monitor-trace-tab": "^0.1.3",
|
||||
"@redux-devtools/log-monitor": "^2.1.0",
|
||||
"@redux-devtools/serialize": "^0.2.0",
|
||||
"@redux-devtools/slider-monitor": "^2.0.0-5",
|
||||
"d3-state-visualizer": "^1.3.4",
|
||||
"devui": "^1.0.0-6",
|
||||
"get-params": "^0.1.2",
|
||||
"immutable": "^4.0.0-rc.12",
|
||||
"javascript-stringify": "^2.0.1",
|
||||
"jsan": "^3.1.13",
|
||||
"jsondiffpatch": "^0.4.1",
|
||||
"localforage": "^1.9.0",
|
||||
"lodash": "^4.17.19",
|
||||
"nanoid": "^3.1.12",
|
||||
"prop-types": "^15.7.2",
|
||||
"react-icons": "^3.10.0",
|
||||
"react-is": "^16.13.1",
|
|
@ -3,12 +3,12 @@ import { Provider } from 'react-redux';
|
|||
import { createStore, applyMiddleware } from 'redux';
|
||||
import { mount, ReactWrapper } from 'enzyme';
|
||||
// import { mountToJson } from 'enzyme-to-json';
|
||||
import App from '../src/app/containers/App';
|
||||
import api from '../src/app/middlewares/api';
|
||||
import exportState from '../src/app/middlewares/exportState';
|
||||
import rootReducer from '../src/app/reducers';
|
||||
import { DATA_TYPE_KEY } from '../src/app/constants/dataTypes';
|
||||
import stringifyJSON from '../src/app/utils/stringifyJSON';
|
||||
import App from '../src/containers/App';
|
||||
import api from '../src/middlewares/api';
|
||||
import exportState from '../src/middlewares/exportState';
|
||||
import rootReducer from '../src/reducers';
|
||||
import { DATA_TYPE_KEY } from '../src/constants/dataTypes';
|
||||
import stringifyJSON from '../src/utils/stringifyJSON';
|
||||
|
||||
let wrapper: ReactWrapper<unknown, unknown, Component>;
|
||||
|
7
packages/redux-devtools-app/tsconfig.json
Normal file
7
packages/redux-devtools-app/tsconfig.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"extends": "../../tsconfig.react.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": ["demo", "src"]
|
||||
}
|
|
@ -6,7 +6,7 @@ import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
|
|||
module.exports = (env: { development?: boolean; platform?: string } = {}) => ({
|
||||
mode: env.development ? 'development' : 'production',
|
||||
entry: {
|
||||
app: './src/index',
|
||||
app: './demo/index',
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, `build/${env.platform as string}`),
|
|
@ -5,7 +5,7 @@ import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
|
|||
module.exports = (env: { production?: boolean } = {}) => ({
|
||||
mode: env.production ? 'production' : 'development',
|
||||
entry: {
|
||||
app: ['./src/app/index'],
|
||||
app: ['./src/index'],
|
||||
},
|
||||
output: {
|
||||
library: 'ReduxDevTools',
|
||||
|
@ -13,8 +13,8 @@ module.exports = (env: { production?: boolean } = {}) => ({
|
|||
libraryTarget: 'umd',
|
||||
path: path.resolve(__dirname, 'umd'),
|
||||
filename: env.production
|
||||
? 'redux-devtools-core.min.js'
|
||||
: 'redux-devtools-core.js',
|
||||
? 'redux-devtools-app.min.js'
|
||||
: 'redux-devtools-app.js',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
|
@ -52,7 +52,7 @@
|
|||
"redux": "^4.0.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@redux-devtools/core": "^3.4.0",
|
||||
"@redux-devtools/core": "^3.7.0",
|
||||
"@types/react": "^16.3.18",
|
||||
"react": "^16.3.0",
|
||||
"redux": "^3.4.0 || ^4.0.0"
|
||||
|
|
|
@ -9,13 +9,13 @@ Bridge for remote debugging via [Redux DevTools extension](https://github.com/za
|
|||
with npm:
|
||||
|
||||
```
|
||||
npm install -g redux-devtools-cli
|
||||
npm install -g @redux-devtools/cli
|
||||
```
|
||||
|
||||
or with yarn:
|
||||
|
||||
```
|
||||
yarn global add redux-devtools-cli
|
||||
yarn global add @redux-devtools/cli
|
||||
```
|
||||
|
||||
and start as:
|
||||
|
@ -24,20 +24,20 @@ and start as:
|
|||
redux-devtools --hostname=localhost --port=8000
|
||||
```
|
||||
|
||||
> Note the package is called `redux-devtools-cli` not `redux-devtools` (the latter is a React component).
|
||||
> Note the package is called `@redux-devtools/cli` not `redux-devtools` (the latter is a React component).
|
||||
|
||||
#### Or add in your project
|
||||
|
||||
with npm:
|
||||
|
||||
```
|
||||
npm install --save-dev redux-devtools-cli
|
||||
npm install --save-dev @redux-devtools/cli
|
||||
```
|
||||
|
||||
or with yarn:
|
||||
|
||||
```
|
||||
yarn add --dev redux-devtools-cli
|
||||
yarn add --dev @redux-devtools/cli
|
||||
```
|
||||
|
||||
and add to `package.json`:
|
||||
|
@ -53,7 +53,7 @@ So, you can start redux-devtools server by running `npm run redux-devtools`.
|
|||
##### Import in your `server.js` script you use for starting a development server:
|
||||
|
||||
```js
|
||||
var reduxDevTools = require('redux-devtools-cli');
|
||||
var reduxDevTools = require('@redux-devtools/cli');
|
||||
reduxDevTools({ hostname: 'localhost', port: 8000 });
|
||||
```
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<div id="root"></div>
|
||||
<script src="/react.production.min.js"></script>
|
||||
<script src="/react-dom.production.min.js"></script>
|
||||
<script src="/redux-devtools-core.min.js"></script>
|
||||
<script src="/redux-devtools-app.min.js"></script>
|
||||
<script src="/port.js"></script>
|
||||
<script>
|
||||
ReactDOM.render(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"private": true,
|
||||
"name": "redux-devtools-cli",
|
||||
"name": "@redux-devtools/cli",
|
||||
"version": "0.0.1",
|
||||
"main": "electron.js",
|
||||
"description": "Remote Redux DevTools",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "redux-devtools-cli",
|
||||
"name": "@redux-devtools/cli",
|
||||
"version": "1.0.0-4",
|
||||
"description": "CLI for remote debugging with Redux DevTools.",
|
||||
"homepage": "https://github.com/reduxjs/redux-devtools/tree/master/packages/redux-devtools-cli",
|
||||
|
@ -41,6 +41,7 @@
|
|||
"node": ">=10.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@redux-devtools/app": "^1.0.0-4",
|
||||
"@types/react": "^16.9.46",
|
||||
"apollo-server": "^2.18.2",
|
||||
"apollo-server-express": "^2.18.2",
|
||||
|
@ -59,7 +60,6 @@
|
|||
"open": "^7.1.0",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1",
|
||||
"redux-devtools-core": "^1.0.0-4",
|
||||
"semver": "^7.3.2",
|
||||
"socketcluster": "^14.4.2",
|
||||
"sqlite3": "^5.0.0",
|
||||
|
|
|
@ -3,7 +3,7 @@ import path from 'path';
|
|||
import semver from 'semver';
|
||||
import { Options } from '../options';
|
||||
|
||||
const name = 'redux-devtools-cli';
|
||||
const name = '@redux-devtools/cli';
|
||||
const startFlag = '/* ' + name + ' start */';
|
||||
const endFlag = '/* ' + name + ' end */';
|
||||
const serverFlags: { [moduleName: string]: { [version: string]: string } } = {
|
||||
|
|
|
@ -37,7 +37,7 @@ function routes(
|
|||
|
||||
serveUmdModule('react');
|
||||
serveUmdModule('react-dom');
|
||||
serveUmdModule('redux-devtools-core');
|
||||
serveUmdModule('@redux-devtools/app');
|
||||
|
||||
app.get('/port.js', function (req, res) {
|
||||
res.send(`reduxDevToolsPort = ${options.port!}`);
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
"redux": "^4.0.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@redux-devtools/core": "^3.4.0",
|
||||
"@redux-devtools/core": "^3.7.0",
|
||||
"@types/react": "^16.3.18",
|
||||
"react": "^16.3.0",
|
||||
"redux": "^3.4.0 || ^4.0.0"
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
"seamless-immutable": "^7.1.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@redux-devtools/core": "^3.4.0",
|
||||
"@redux-devtools/core": "^3.7.0",
|
||||
"@types/react": "^16.3.18",
|
||||
"react": "^16.3.0",
|
||||
"redux": "^3.4.0 || ^4.0.0"
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
"redux": "^4.0.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@redux-devtools/core": "^3.4.0",
|
||||
"@redux-devtools/core": "^3.7.0",
|
||||
"@types/react": "^16.3.18",
|
||||
"react": "^16.3.0",
|
||||
"redux": "^3.4.0 || ^4.0.0"
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
"redux": "^4.0.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@redux-devtools/core": "^3.4.0",
|
||||
"@redux-devtools/core": "^3.7.0",
|
||||
"@types/react": "^16.3.18",
|
||||
"react": "^16.3.0",
|
||||
"redux": "^3.4.0 || ^4.0.0"
|
||||
|
|
8
packages/redux-devtools-utils/.babelrc
Normal file
8
packages/redux-devtools-utils/.babelrc
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"presets": [
|
||||
"@babel/preset-env",
|
||||
"@babel/preset-react",
|
||||
"@babel/preset-typescript"
|
||||
],
|
||||
"plugins": ["@babel/plugin-proposal-class-properties"]
|
||||
}
|
1
packages/redux-devtools-utils/.eslintignore
Normal file
1
packages/redux-devtools-utils/.eslintignore
Normal file
|
@ -0,0 +1 @@
|
|||
lib
|
13
packages/redux-devtools-utils/.eslintrc.js
Normal file
13
packages/redux-devtools-utils/.eslintrc.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
module.exports = {
|
||||
extends: '../../.eslintrc',
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts', '*.tsx'],
|
||||
extends: '../../eslintrc.ts.base.json',
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: ['./tsconfig.json'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
21
packages/redux-devtools-utils/LICENSE.md
Normal file
21
packages/redux-devtools-utils/LICENSE.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Mihail Diordiev
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
49
packages/redux-devtools-utils/package.json
Normal file
49
packages/redux-devtools-utils/package.json
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"name": "@redux-devtools/utils",
|
||||
"version": "1.0.0-4",
|
||||
"description": "Reusable functions of Redux DevTools",
|
||||
"homepage": "https://github.com/reduxjs/redux-devtools/tree/master/packages/redux-devtools-utils",
|
||||
"bugs": {
|
||||
"url": "https://github.com/reduxjs/redux-devtools/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": "Mihail Diordiev <zalmoxisus@gmail.com> (https://github.com/zalmoxisus)",
|
||||
"files": [
|
||||
"src",
|
||||
"lib",
|
||||
"umd"
|
||||
],
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/reduxjs/redux-devtools.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run build:types && npm run build:js",
|
||||
"build:types": "tsc --emitDeclarationOnly",
|
||||
"build:js": "babel src --out-dir lib --extensions \".ts\" --source-maps inline",
|
||||
"clean": "rimraf lib",
|
||||
"lint": "eslint . --ext .ts",
|
||||
"lint:fix": "eslint . --ext .ts --fix",
|
||||
"type-check": "tsc --noEmit",
|
||||
"type-check:watch": "npm run type-check -- --watch",
|
||||
"preversion": "npm run type-check && npm run lint",
|
||||
"prepublishOnly": "npm run clean && npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@redux-devtools/core": "^3.7.0",
|
||||
"@redux-devtools/serialize": "^0.2.0",
|
||||
"get-params": "^0.1.2",
|
||||
"immutable": "^4.0.0-rc.12",
|
||||
"jsan": "^3.1.13",
|
||||
"lodash": "^4.17.19",
|
||||
"nanoid": "^3.1.12",
|
||||
"redux": "^4.0.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@redux-devtools/core": "^3.7.0",
|
||||
"immutable": "^4.0.0-rc.12",
|
||||
"redux": "^4.0.5"
|
||||
}
|
||||
}
|
|
@ -1,7 +1,12 @@
|
|||
import mapValues from 'lodash/mapValues';
|
||||
import { PerformAction } from '@redux-devtools/core';
|
||||
import { Action } from 'redux';
|
||||
import { State } from '../app/reducers/instances';
|
||||
|
||||
interface State {
|
||||
actionsById: { [actionId: number]: PerformAction<Action<unknown>> };
|
||||
computedStates: { state: unknown; error?: string }[];
|
||||
stagedActionIds: number[];
|
||||
}
|
||||
|
||||
export const FilterState = {
|
||||
DO_NOT_FILTER: 'DO_NOT_FILTER',
|
|
@ -3,7 +3,13 @@ import jsan from 'jsan';
|
|||
import { immutableSerialize } from '@redux-devtools/serialize';
|
||||
import { Action } from 'redux';
|
||||
import Immutable from 'immutable';
|
||||
import { State } from '../app/reducers/instances';
|
||||
import { PerformAction } from '@redux-devtools/instrument';
|
||||
|
||||
interface State {
|
||||
actionsById: { [actionId: number]: PerformAction<Action<unknown>> };
|
||||
computedStates: { state: unknown; error?: string }[];
|
||||
committedState?: unknown;
|
||||
}
|
||||
|
||||
function deprecate(param: string) {
|
||||
// eslint-disable-next-line no-console
|
Loading…
Reference in New Issue
Block a user