-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the logic from @redux-devtools/app into @redux-devtools/app-core (…
…#1655) This change splits out the main logic from the Redux Devtools App into a new core package but keeps the socket connection management in @redux-devtools/app. The aim is to allow for easier reuse of the rest of the app in other envioronments with their own transport methods, such as React Native or Electron.
- Loading branch information
1 parent
a4382ec
commit 96ac1f2
Showing
70 changed files
with
13,805 additions
and
10,438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@redux-devtools/app-core': major | ||
'@redux-devtools/app': minor | ||
--- | ||
|
||
Move the logic from @redux-devtools/app into @redux-devtools/app-core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
build | ||
lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module.exports = { | ||
extends: '../../eslintrc.js.base.json', | ||
overrides: [ | ||
{ | ||
files: ['*.ts', '*.tsx'], | ||
extends: '../../eslintrc.ts.react.base.json', | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
project: true, | ||
}, | ||
}, | ||
{ | ||
files: ['test/**/*.ts', 'test/**/*.tsx'], | ||
extends: '../../eslintrc.ts.react.jest.base.json', | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
project: ['./tsconfig.test.json'], | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2024 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Redux DevTools monitor app core | ||
|
||
The core React component and Redux store for the Redux DevTools monitor app. It is split out to allow you to use it directly for transports other than the standard WebSocket one. | ||
|
||
### Usage | ||
|
||
```js | ||
import { Provider } from 'react-redux'; | ||
import { Persistor } from 'redux-persist'; | ||
import { PersistGate } from 'redux-persist/integration/react'; | ||
import { App } from '@redux-devtools/app-core'; | ||
import { store, persistor } from "./yourStore"; | ||
|
||
export function Root() { | ||
return ( | ||
<Provider store={store}> | ||
<PersistGate loading={null} persistor={persistor!}> | ||
<App /> | ||
</PersistGate> | ||
</Provider> | ||
); | ||
} | ||
``` | ||
|
||
### License | ||
|
||
MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"presets": [ | ||
["@babel/preset-env", { "targets": "defaults", "modules": false }], | ||
"@babel/preset-react", | ||
"@babel/preset-typescript" | ||
], | ||
"plugins": ["@babel/plugin-transform-runtime"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"presets": [ | ||
["@babel/preset-env", { "targets": "defaults" }], | ||
"@babel/preset-react", | ||
"@babel/preset-typescript" | ||
], | ||
"plugins": ["@babel/plugin-transform-runtime"] | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
{ | ||
"name": "@redux-devtools/app-core", | ||
"version": "1.0.0", | ||
"description": "Redux DevTools app core", | ||
"homepage": "https://github.com/reduxjs/redux-devtools/tree/master/packages/redux-devtools-app-core", | ||
"bugs": { | ||
"url": "https://github.com/reduxjs/redux-devtools/issues" | ||
}, | ||
"license": "MIT", | ||
"author": "Mihail Diordiev <zalmoxisus@gmail.com> (https://github.com/zalmoxisus)", | ||
"files": [ | ||
"build", | ||
"lib", | ||
"src", | ||
"umd" | ||
], | ||
"main": "lib/cjs/index.js", | ||
"module": "lib/esm/index.js", | ||
"types": "lib/types/index.d.ts", | ||
"sideEffects": false, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/reduxjs/redux-devtools.git" | ||
}, | ||
"scripts": { | ||
"build": "pnpm run build:cjs && pnpm run build:esm && pnpm run build:types", | ||
"build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs", | ||
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm", | ||
"build:types": "tsc --emitDeclarationOnly", | ||
"clean": "rimraf lib", | ||
"test": "jest", | ||
"lint": "eslint . --ext .ts,.tsx", | ||
"type-check": "tsc --noEmit", | ||
"prepack": "pnpm run clean && pnpm run build", | ||
"prepublish": "pnpm run type-check && pnpm run lint && pnpm run test" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.24.7", | ||
"@redux-devtools/chart-monitor": "^5.0.1", | ||
"@redux-devtools/core": "^4.0.0", | ||
"@redux-devtools/inspector-monitor": "^6.0.0", | ||
"@redux-devtools/inspector-monitor-test-tab": "^4.0.0", | ||
"@redux-devtools/inspector-monitor-trace-tab": "^4.0.0", | ||
"@redux-devtools/log-monitor": "^5.0.0", | ||
"@redux-devtools/rtk-query-monitor": "^5.0.0", | ||
"@redux-devtools/slider-monitor": "^5.0.0", | ||
"@redux-devtools/ui": "^1.3.1", | ||
"d3-state-visualizer": "^3.0.0", | ||
"javascript-stringify": "^2.1.0", | ||
"jsan": "^3.1.14", | ||
"jsondiffpatch": "^0.6.0", | ||
"react-icons": "^5.2.1", | ||
"react-is": "^18.3.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.24.1", | ||
"@babel/core": "^7.24.3", | ||
"@babel/eslint-parser": "^7.24.1", | ||
"@babel/plugin-transform-runtime": "^7.24.3", | ||
"@babel/preset-env": "^7.24.3", | ||
"@babel/preset-react": "^7.24.1", | ||
"@babel/preset-typescript": "^7.24.1", | ||
"@emotion/react": "^11.11.4", | ||
"@rjsf/core": "^4.2.3", | ||
"@testing-library/dom": "^10.1.0", | ||
"@testing-library/jest-dom": "^6.4.5", | ||
"@testing-library/react": "^16.0.0", | ||
"@types/jest": "^29.5.12", | ||
"@types/jsan": "^3.1.5", | ||
"@types/json-schema": "^7.0.15", | ||
"@types/node": "^20.11.30", | ||
"@types/react": "^18.2.72", | ||
"@types/react-dom": "^18.2.22", | ||
"@types/styled-components": "^5.1.34", | ||
"@typescript-eslint/eslint-plugin": "^7.4.0", | ||
"@typescript-eslint/parser": "^7.4.0", | ||
"cross-env": "^7.0.3", | ||
"esbuild": "^0.20.2", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-jest": "^28.6.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-react": "^7.34.2", | ||
"eslint-plugin-react-hooks": "^4.6.2", | ||
"jest": "^29.7.0", | ||
"jest-environment-jsdom": "^29.7.0", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"react-redux": "^8.1.3", | ||
"redux": "^4.2.1", | ||
"redux-persist": "^6.0.0", | ||
"rimraf": "^5.0.7", | ||
"styled-components": "^5.3.11", | ||
"ts-jest": "^29.1.2", | ||
"ts-node": "^10.9.2", | ||
"typescript": "~5.3.3" | ||
}, | ||
"peerDependencies": { | ||
"@emotion/react": "^11.11.4", | ||
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", | ||
"@types/styled-components": "^5.1.34", | ||
"react": "^16.8.4 || ^17.0.0 || ^18.0.0", | ||
"react-dom": "^16.8.4 || ^17.0.0 || ^18.0.0", | ||
"react-redux": "^8.0.0 || ^9.0.0", | ||
"redux": "^4.0.0 || ^5.0.0", | ||
"redux-persist": "^6.0.0", | ||
"styled-components": "^5.3.11" | ||
} | ||
} |
Oops, something went wrong.