mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-11 08:42:22 +03:00
Compare commits
105 Commits
remotedev-
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
7a48268a74 | ||
|
fa20f09fc1 | ||
|
1e0d09251b | ||
|
2b7e1b890a | ||
|
119864cd95 | ||
|
dfa6c937c3 | ||
|
8b554db5bf | ||
|
842419b802 | ||
|
1e3fb5e27a | ||
|
da5e9f0c1a | ||
|
54c40135e5 | ||
|
61632768a7 | ||
|
585d6b9220 | ||
|
6468c48b75 | ||
|
41f3c1a7b6 | ||
|
c82e511929 | ||
|
832f4dc195 | ||
|
4b35476610 | ||
|
7873dd23ae | ||
|
9444ca7e87 | ||
|
b2f01026cb | ||
|
04c234dd49 | ||
|
c394803622 | ||
|
fd56ac7d92 | ||
|
65dce0864e | ||
|
e02cfd327c | ||
|
9ddcef672f | ||
|
3f52f16473 | ||
|
9f12777827 | ||
|
5dc8611c38 | ||
|
1c5df1ee32 | ||
|
3fc48a226b | ||
|
17b55ef99f | ||
|
73a01cc5a7 | ||
|
07e8f2c3ad | ||
|
8c563d71bb | ||
|
d730ea185f | ||
|
6df66b7320 | ||
|
3c90662cfa | ||
|
763bf937a4 | ||
|
8ec2b303ee | ||
|
91f21b2ffc | ||
|
ff60266836 | ||
|
6830118951 | ||
|
cc7ec13fb9 | ||
|
e46bbcaef3 | ||
|
4a8fbc675a | ||
|
c9bed44e0e | ||
|
750046c4d9 | ||
|
f42403c579 | ||
|
519ec090c6 | ||
|
4e71048997 | ||
|
5b33056bc5 | ||
|
da0051706e | ||
|
6ea51af67c | ||
|
9a46407254 | ||
|
07bd4476b2 | ||
|
b9993eb5f7 | ||
|
5228d46328 | ||
|
2002a81071 | ||
|
c065b03caa | ||
|
81a9ee33cc | ||
|
3c47910110 | ||
|
1c6f45fb47 | ||
|
054b27a9f8 | ||
|
415257cd41 | ||
|
14201108e7 | ||
|
90737b7e26 | ||
|
54c6f26c81 | ||
|
6e400f68b3 | ||
|
2c65192b4f | ||
|
88a02a8332 | ||
|
04858cd514 | ||
|
b25bf1304b | ||
|
41fae27637 | ||
|
fdce076757 | ||
|
b934e80d23 | ||
|
50d7682776 | ||
|
344387c9c6 | ||
|
80c570d6d0 | ||
|
aca0cd09a1 | ||
|
75dbf74963 | ||
|
997f7b636d | ||
|
eb3ac09b03 | ||
|
3c39eb49f2 | ||
|
61c09e1cc3 | ||
|
f1d61580a8 | ||
|
c5aef77b85 | ||
|
908e1c11bd | ||
|
d591c18fc8 | ||
|
bc4b0755c3 | ||
|
2c8f0a0544 | ||
|
68d4440e38 | ||
|
c52962d532 | ||
|
18b86498e2 | ||
|
01ee4e99be | ||
|
c133d59461 | ||
|
fd9f9504f0 | ||
|
e49708d831 | ||
|
f64cbda982 | ||
|
abd03a70c7 | ||
|
b3e8f209fd | ||
|
238a38fb21 | ||
|
76183cfa43 | ||
|
9fa9a6ff79 |
10
.changeset/bright-sheep-joke.md
Normal file
10
.changeset/bright-sheep-joke.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
'@redux-devtools/app-core': major
|
||||
'@redux-devtools/app': major
|
||||
'@redux-devtools/inspector-monitor-test-tab': major
|
||||
'@redux-devtools/rtk-query-monitor': major
|
||||
'@redux-devtools/slider-monitor': major
|
||||
'@redux-devtools/ui': major
|
||||
---
|
||||
|
||||
Replace styled-components with Emotion
|
7
.github/workflows/CI.yml
vendored
7
.github/workflows/CI.yml
vendored
|
@ -8,14 +8,11 @@ on:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: 'ubuntu-22.04'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: nrwl/nx-set-shas@v4
|
||||
- uses: pnpm/action-setup@v2
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
|
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
@ -10,7 +10,7 @@ permissions: write-all
|
|||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: 'ubuntu-22.04'
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v4
|
||||
|
@ -18,7 +18,7 @@ jobs:
|
|||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
|
|
|
@ -24,7 +24,7 @@ It can be used as a browser extension (for [Chrome](https://chrome.google.com/we
|
|||
|
||||
## Development
|
||||
|
||||
This is a monorepo powered by [pnpm](https://pnpm.io/) and [Nx](https://nx.dev/). [Install pnpm](https://pnpm.io/installation) and run `pnpm install` to get started. Each package's dependencies need to be built before the package itself can be built. You can either build all the packages (i.e., `pnpm run build:all`) or use Nx commands to build only the packages necessary for the packages you're working on (i.e., `pnpm nx build remotedev-redux-devtools-extension`).
|
||||
This is a monorepo powered by [pnpm](https://pnpm.io/). [Install pnpm](https://pnpm.io/installation) and run `pnpm install` to get started. Each package's dependencies need to be built before the package itself can be built. You can either build all the packages (i.e., `pnpm run build:all`) or use pnpm workspace commands to build only the packages necessary for the packages you're working on (i.e., `pnpm --filter "remotedev-redux-devtools-extension" build`).
|
||||
|
||||
## Backers
|
||||
|
||||
|
|
43
eslint.js.react.jest.config.base.mjs
Normal file
43
eslint.js.react.jest.config.base.mjs
Normal file
|
@ -0,0 +1,43 @@
|
|||
import eslint from '@eslint/js';
|
||||
import react from 'eslint-plugin-react';
|
||||
import { fixupPluginRules } from '@eslint/compat';
|
||||
import eslintPluginReactHooks from 'eslint-plugin-react-hooks';
|
||||
import jest from 'eslint-plugin-jest';
|
||||
import eslintConfigPrettier from 'eslint-config-prettier';
|
||||
|
||||
export default [
|
||||
{
|
||||
files: ['test/**/*.js', 'test/**/*.jsx'],
|
||||
...eslint.configs.recommended,
|
||||
},
|
||||
{
|
||||
files: ['test/**/*.js', 'test/**/*.jsx'],
|
||||
...react.configs.flat.recommended,
|
||||
},
|
||||
{
|
||||
files: ['test/**/*.js', 'test/**/*.jsx'],
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['test/**/*.js', 'test/**/*.jsx'],
|
||||
plugins: {
|
||||
'react-hooks': fixupPluginRules(eslintPluginReactHooks),
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['test/**/*.js', 'test/**/*.jsx'],
|
||||
...jest.configs['flat/recommended'],
|
||||
},
|
||||
{
|
||||
files: ['test/**/*.js', 'test/**/*.jsx'],
|
||||
...jest.configs['jest/style'],
|
||||
},
|
||||
{
|
||||
files: ['test/**/*.js', 'test/**/*.jsx'],
|
||||
...eslintConfigPrettier,
|
||||
},
|
||||
];
|
|
@ -1,3 +0,0 @@
|
|||
node_modules
|
||||
dist
|
||||
examples
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"root": true,
|
||||
"extends": "eslint-config-airbnb",
|
||||
"globals": {
|
||||
"chrome": true,
|
||||
"__DEVELOPMENT__": true
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true
|
||||
},
|
||||
"rules": {
|
||||
"react/jsx-uses-react": 2,
|
||||
"react/jsx-uses-vars": 2,
|
||||
"react/react-in-jsx-scope": 2,
|
||||
"react/jsx-quotes": 0,
|
||||
"block-scoped-var": 0,
|
||||
"padded-blocks": 0,
|
||||
"quotes": [1, "single"],
|
||||
"comma-style": [2, "last"],
|
||||
"no-use-before-define": [0, "nofunc"],
|
||||
"func-names": 0,
|
||||
"prefer-const": 0,
|
||||
"comma-dangle": 0,
|
||||
"id-length": 0,
|
||||
"indent": [2, 2, { "SwitchCase": 1 }],
|
||||
"new-cap": [2, { "capIsNewExceptions": ["Test"] }],
|
||||
"default-case": 0
|
||||
},
|
||||
"plugins": ["react"]
|
||||
}
|
|
@ -1,5 +1,70 @@
|
|||
# remotedev-redux-devtools-extension
|
||||
|
||||
## 3.2.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @redux-devtools/app@6.2.2
|
||||
|
||||
## 3.2.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [91f21b2]
|
||||
- @redux-devtools/core@4.1.1
|
||||
- @redux-devtools/slider-monitor@5.1.1
|
||||
- @redux-devtools/utils@3.1.1
|
||||
- @redux-devtools/app@6.2.1
|
||||
|
||||
## 3.2.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6830118]
|
||||
- react-json-tree@0.20.0
|
||||
- @redux-devtools/app@6.2.0
|
||||
- @redux-devtools/slider-monitor@6.0.0
|
||||
- @redux-devtools/ui@1.4.0
|
||||
- @redux-devtools/core@4.1.0
|
||||
- @redux-devtools/utils@4.0.0
|
||||
|
||||
## 3.2.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b25bf13: Send state from background when monitor connects
|
||||
|
||||
## 3.2.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 50d7682: Fix DevTools from losing connection
|
||||
|
||||
## 3.2.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- eb3ac09: Add logging to background service worker
|
||||
|
||||
## 3.2.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- f1d6158: Fix mocking Chrome API for Electron
|
||||
|
||||
## 3.2.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fd9f950: Fix monitoring on opening panel
|
||||
- e49708d: Fix manifest.json for Edge
|
||||
|
||||
## 3.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- abd03a7: Fix: only send data to extension if DevTools are open
|
||||
|
||||
## 3.2.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "3.2.0",
|
||||
"version": "3.2.10",
|
||||
"name": "Redux DevTools",
|
||||
"description": "Redux DevTools for debugging application's state changes.",
|
||||
"homepage_url": "https://github.com/reduxjs/redux-devtools",
|
||||
|
|
|
@ -51,7 +51,6 @@ _number_ - maximum stack trace frames to be stored (in case `trace` option was p
|
|||
_boolean_ or _object_ which contains:
|
||||
|
||||
- **options** `object or boolean`:
|
||||
|
||||
- `undefined` - will use regular `JSON.stringify` to send data (it's the fast mode).
|
||||
- `false` - will handle also circular references.
|
||||
- `true` - will handle also date, regex, undefined, primitives, error objects, symbols, maps, sets and functions.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "3.2.0",
|
||||
"version": "3.2.10",
|
||||
"name": "Redux DevTools",
|
||||
"description": "Redux DevTools for debugging application's state changes.",
|
||||
"homepage_url": "https://github.com/reduxjs/redux-devtools",
|
||||
|
@ -28,8 +28,7 @@
|
|||
"128": "img/logo/128x128.png"
|
||||
},
|
||||
"options_ui": {
|
||||
"page": "options.html",
|
||||
"chrome_style": true
|
||||
"page": "options.html"
|
||||
},
|
||||
"background": {
|
||||
"service_worker": "background.bundle.js"
|
||||
|
|
38
extension/eslint.config.mjs
Normal file
38
extension/eslint.config.mjs
Normal file
|
@ -0,0 +1,38 @@
|
|||
import globals from 'globals';
|
||||
import eslintJs from '../eslint.js.config.base.mjs';
|
||||
import eslintTsReact from '../eslint.ts.react.config.base.mjs';
|
||||
import eslintJsReactJest from '../eslint.js.react.jest.config.base.mjs';
|
||||
|
||||
export default [
|
||||
...eslintJs,
|
||||
...eslintTsReact(import.meta.dirname),
|
||||
...eslintJsReactJest,
|
||||
{
|
||||
ignores: [
|
||||
'chrome',
|
||||
'dist',
|
||||
'edge',
|
||||
'examples',
|
||||
'firefox',
|
||||
'test/electron/fixture/dist',
|
||||
],
|
||||
},
|
||||
{
|
||||
files: ['build.mjs'],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.nodeBuiltin,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['test/**/*.js', 'test/**/*.jsx'],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
EUI: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "3.2.0",
|
||||
"version": "3.2.10",
|
||||
"name": "Redux DevTools",
|
||||
"manifest_version": 3,
|
||||
"description": "Redux Developer Tools for debugging application state changes.",
|
||||
|
|
|
@ -3,9 +3,9 @@ module.exports = {
|
|||
testPathIgnorePatterns: ['<rootDir>/examples'],
|
||||
testEnvironment: 'jsdom',
|
||||
moduleNameMapper: {
|
||||
'\\.css$': '<rootDir>/test/__mocks__/styleMock.ts',
|
||||
'\\.css$': '<rootDir>/test/__mocks__/styleMock.js',
|
||||
},
|
||||
transformIgnorePatterns: [
|
||||
'node_modules/(?!.pnpm|@babel/code-frame|@babel/highlight|@babel/helper-validator-identifier|chalk|d3|dateformat|delaunator|internmap|jsondiffpatch|lodash-es|nanoid|robust-predicates|uuid)',
|
||||
'node_modules/(?!.pnpm|@babel/code-frame|@babel/highlight|@babel/helper-validator-identifier|chalk|color|d3|dateformat|delaunator|internmap|jsondiffpatch|lodash-es|nanoid|robust-predicates|uuid)',
|
||||
],
|
||||
};
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"private": true,
|
||||
"name": "remotedev-redux-devtools-extension",
|
||||
"version": "3.2.0",
|
||||
"version": "3.2.10",
|
||||
"description": "Redux Developer Tools for debugging application state changes.",
|
||||
"homepage": "https://github.com/reduxjs/redux-devtools/tree/master/extension",
|
||||
"license": "MIT",
|
||||
|
@ -16,70 +16,65 @@
|
|||
"build:examples": "babel-node examples/buildAll.js",
|
||||
"clean": "rimraf dist && rimraf chrome/dist && rimraf edge/dist && rimraf firefox/dist",
|
||||
"test:app": "cross-env BABEL_ENV=test jest test/app",
|
||||
"test:chrome": "jest test/chrome",
|
||||
"test:chrome": "cross-env SE_FORCE_BROWSER_DOWNLOAD=true jest test/chrome",
|
||||
"build:test:electron:fixture": "webpack --config test/electron/fixture/webpack.config.js",
|
||||
"test:electron": "pnpm run build:test:electron:fixture && jest test/electron",
|
||||
"test": "pnpm run test:app && pnpm run test:chrome && pnpm run test:electron",
|
||||
"build:test:electron:fixture": "webpack --config test/electron/fixture/webpack.config.js",
|
||||
"lint": "eslint .",
|
||||
"type-check": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.13.0",
|
||||
"@redux-devtools/app": "^6.1.0",
|
||||
"@redux-devtools/core": "^4.0.0",
|
||||
"@redux-devtools/instrument": "^2.1.0",
|
||||
"@redux-devtools/serialize": "^0.4.1",
|
||||
"@redux-devtools/slider-monitor": "^5.0.1",
|
||||
"@redux-devtools/ui": "^1.3.2",
|
||||
"@redux-devtools/utils": "^3.0.0",
|
||||
"@reduxjs/toolkit": "^2.2.7",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.0",
|
||||
"@redux-devtools/app": "workspace:^",
|
||||
"@redux-devtools/core": "workspace:^",
|
||||
"@redux-devtools/instrument": "workspace:^",
|
||||
"@redux-devtools/serialize": "workspace:^",
|
||||
"@redux-devtools/slider-monitor": "workspace:^",
|
||||
"@redux-devtools/ui": "workspace:^",
|
||||
"@redux-devtools/utils": "workspace:^",
|
||||
"@reduxjs/toolkit": "^2.8.2",
|
||||
"@types/jsan": "^3.1.5",
|
||||
"jsan": "^3.1.14",
|
||||
"localforage": "^1.10.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-icons": "^5.2.1",
|
||||
"react-is": "^18.3.1",
|
||||
"react-json-tree": "^0.19.0",
|
||||
"react-redux": "^9.1.2",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react-icons": "^5.5.0",
|
||||
"react-is": "^19.1.0",
|
||||
"react-json-tree": "workspace:^",
|
||||
"react-redux": "^9.2.0",
|
||||
"redux": "^5.0.1",
|
||||
"redux-persist": "^6.0.0",
|
||||
"styled-components": "^5.3.11"
|
||||
"redux-persist": "^6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-react": "^7.24.7",
|
||||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@babel/register": "^7.24.6",
|
||||
"@babel/core": "^7.27.4",
|
||||
"@babel/preset-env": "^7.27.2",
|
||||
"@babel/preset-react": "^7.27.1",
|
||||
"@babel/preset-typescript": "^7.27.1",
|
||||
"@babel/register": "^7.27.1",
|
||||
"@testing-library/dom": "^10.4.0",
|
||||
"@testing-library/jest-dom": "^6.4.8",
|
||||
"@testing-library/react": "^16.0.0",
|
||||
"@types/chrome": "^0.0.269",
|
||||
"@testing-library/jest-dom": "^6.6.3",
|
||||
"@testing-library/react": "^16.3.0",
|
||||
"@types/chrome": "^0.0.326",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@types/styled-components": "^5.1.34",
|
||||
"@types/react": "^19.1.8",
|
||||
"@types/react-dom": "^19.1.6",
|
||||
"chromedriver": "^126.0.5",
|
||||
"cross-env": "^7.0.3",
|
||||
"electron": "^31.3.1",
|
||||
"esbuild": "^0.23.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-jsx-a11y": "^6.9.0",
|
||||
"eslint-plugin-react": "^7.35.0",
|
||||
"eslint-plugin-react-hooks": "^4.6.2",
|
||||
"immutable": "^4.3.7",
|
||||
"jest": "^29.7.0",
|
||||
"jest-environment-jsdom": "^29.7.0",
|
||||
"electron": "^31.7.7",
|
||||
"esbuild": "^0.25.5",
|
||||
"globals": "^16.2.0",
|
||||
"immutable": "^5.1.3",
|
||||
"jest": "^30.0.2",
|
||||
"jest-environment-jsdom": "^30.0.2",
|
||||
"pug": "^3.0.3",
|
||||
"rimraf": "^6.0.1",
|
||||
"selenium-webdriver": "^4.23.0",
|
||||
"selenium-webdriver": "^4.33.0",
|
||||
"sinon-chrome": "^3.0.1",
|
||||
"ts-jest": "^29.2.4",
|
||||
"typescript": "~5.5.4",
|
||||
"webpack": "^5.93.0",
|
||||
"webpack-cli": "^5.1.4"
|
||||
"ts-jest": "^29.4.0",
|
||||
"typescript": "~5.8.3",
|
||||
"webpack": "^5.99.9",
|
||||
"webpack-cli": "^6.0.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,25 +29,21 @@ interface OwnProps {
|
|||
}
|
||||
type Props = StateProps & DispatchProps & OwnProps;
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
isElectron?: boolean;
|
||||
}
|
||||
}
|
||||
const isElectron = navigator.userAgent.includes('Electron');
|
||||
|
||||
function sendMessage(message: SingleMessage) {
|
||||
chrome.runtime.sendMessage(message);
|
||||
async function sendMessage(message: SingleMessage) {
|
||||
await chrome.runtime.sendMessage(message);
|
||||
}
|
||||
|
||||
class Actions extends Component<Props> {
|
||||
openWindow = (position: Position) => {
|
||||
sendMessage({ type: 'OPEN', position });
|
||||
openWindow = async (position: Position) => {
|
||||
await sendMessage({ type: 'OPEN', position });
|
||||
};
|
||||
openOptionsPage = () => {
|
||||
if (navigator.userAgent.indexOf('Firefox') !== -1) {
|
||||
sendMessage({ type: 'OPEN_OPTIONS' });
|
||||
openOptionsPage = async () => {
|
||||
if (navigator.userAgent.includes('Firefox')) {
|
||||
await sendMessage({ type: 'OPEN_OPTIONS' });
|
||||
} else {
|
||||
chrome.runtime.openOptionsPage();
|
||||
await chrome.runtime.openOptionsPage();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -89,7 +85,7 @@ class Actions extends Component<Props> {
|
|||
{features.import && <ImportButton />}
|
||||
{position &&
|
||||
(position !== '#popup' ||
|
||||
navigator.userAgent.indexOf('Firefox') !== -1) && <PrintButton />}
|
||||
navigator.userAgent.includes('Firefox')) && <PrintButton />}
|
||||
<Divider />
|
||||
<MonitorSelector />
|
||||
<Divider />
|
||||
|
@ -98,19 +94,19 @@ class Actions extends Component<Props> {
|
|||
<DispatcherButton dispatcherIsOpen={this.props.dispatcherIsOpen} />
|
||||
)}
|
||||
<Divider />
|
||||
{!window.isElectron && (
|
||||
{!isElectron && (
|
||||
<Button
|
||||
onClick={() => {
|
||||
this.openWindow('window');
|
||||
onClick={async () => {
|
||||
await this.openWindow('window');
|
||||
}}
|
||||
>
|
||||
<MdOutlineWindow />
|
||||
</Button>
|
||||
)}
|
||||
{!window.isElectron && (
|
||||
{!isElectron && (
|
||||
<Button
|
||||
onClick={() => {
|
||||
this.openWindow('remote');
|
||||
onClick={async () => {
|
||||
await this.openWindow('remote');
|
||||
}}
|
||||
>
|
||||
<GoBroadcast />
|
||||
|
|
|
@ -27,6 +27,7 @@ class App extends Component<Props> {
|
|||
<a
|
||||
href="https://github.com/zalmoxisus/redux-devtools-extension#usage"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
the instructions
|
||||
</a>
|
||||
|
|
|
@ -6,7 +6,7 @@ export function createMenu() {
|
|||
{ id: 'devtools-remote', title: 'Open Remote DevTools' },
|
||||
];
|
||||
|
||||
let shortcuts: { [commandName: string]: string | undefined } = {};
|
||||
const shortcuts: { [commandName: string]: string | undefined } = {};
|
||||
chrome.commands.getAll((commands) => {
|
||||
for (const { name, shortcut } of commands) {
|
||||
shortcuts[name!] = shortcut;
|
||||
|
@ -22,8 +22,8 @@ export function createMenu() {
|
|||
});
|
||||
}
|
||||
|
||||
export function removeMenu() {
|
||||
chrome.contextMenus.removeAll();
|
||||
export async function removeMenu() {
|
||||
await chrome.contextMenus.removeAll();
|
||||
}
|
||||
|
||||
chrome.contextMenus.onClicked.addListener(({ menuItemId }) => {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import '../chromeApiMock';
|
||||
import configureStore from './store/backgroundStore';
|
||||
import openDevToolsWindow, { DevToolsPosition } from './openWindow';
|
||||
import { createMenu, removeMenu } from './contextMenus';
|
||||
|
@ -14,7 +15,7 @@ chrome.commands.onCommand.addListener((shortcut) => {
|
|||
|
||||
// Disable the action by default and create the context menu when installed
|
||||
chrome.runtime.onInstalled.addListener(() => {
|
||||
chrome.action.disable();
|
||||
void chrome.action.disable();
|
||||
|
||||
getOptions((option) => {
|
||||
if (option.showContextMenus) createMenu();
|
||||
|
@ -25,6 +26,13 @@ chrome.runtime.onInstalled.addListener(() => {
|
|||
chrome.storage.onChanged.addListener((changes) => {
|
||||
if (changes.showContextMenus) {
|
||||
if (changes.showContextMenus.newValue) createMenu();
|
||||
else removeMenu();
|
||||
else void removeMenu();
|
||||
}
|
||||
});
|
||||
|
||||
// https://developer.chrome.com/docs/extensions/develop/migrate/to-service-workers#keep_a_service_worker_alive_continuously
|
||||
setInterval(
|
||||
() =>
|
||||
void chrome.storage.local.set({ 'last-heartbeat': new Date().getTime() }),
|
||||
20000,
|
||||
);
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
export type DevToolsPosition = 'devtools-window' | 'devtools-remote';
|
||||
|
||||
let windows: { [K in DevToolsPosition]?: number } = {};
|
||||
const windows: { [K in DevToolsPosition]?: number } = {};
|
||||
|
||||
export default function openDevToolsWindow(position: DevToolsPosition) {
|
||||
if (!windows[position]) {
|
||||
createWindow(position);
|
||||
} else {
|
||||
chrome.windows.update(windows[position]!, { focused: true }, () => {
|
||||
chrome.windows.update(windows[position], { focused: true }, () => {
|
||||
if (chrome.runtime.lastError) createWindow(position);
|
||||
});
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ function createWindow(position: DevToolsPosition) {
|
|||
const url = chrome.runtime.getURL(getPath(position));
|
||||
chrome.windows.create({ type: 'popup', url }, (win) => {
|
||||
windows[position] = win!.id;
|
||||
if (navigator.userAgent.indexOf('Firefox') !== -1) {
|
||||
chrome.windows.update(win!.id!, { focused: true });
|
||||
if (navigator.userAgent.includes('Firefox')) {
|
||||
void chrome.windows.update(win!.id!, { focused: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -29,6 +29,6 @@ function getPath(position: DevToolsPosition) {
|
|||
case 'devtools-remote':
|
||||
return 'remote.html';
|
||||
default:
|
||||
throw new Error(`Unrecognized position: ${position}`);
|
||||
throw new Error('Unrecognized position');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -161,10 +161,6 @@ export type UpdateStateRequest<S, A extends Action<string>> =
|
|||
| SerializedActionMessage
|
||||
| SerializedStateMessage<S, A>;
|
||||
|
||||
export interface EmptyUpdateStateAction {
|
||||
readonly type: typeof UPDATE_STATE;
|
||||
}
|
||||
|
||||
interface UpdateStateAction<S, A extends Action<string>> {
|
||||
readonly type: typeof UPDATE_STATE;
|
||||
request: UpdateStateRequest<S, A>;
|
||||
|
@ -213,11 +209,6 @@ export type PanelMessage<S, A extends Action<string>> =
|
|||
export type PanelMessageWithSplitAction<S, A extends Action<string>> =
|
||||
| PanelMessage<S, A>
|
||||
| SplitUpdateStateAction<S, A>;
|
||||
export type MonitorMessage =
|
||||
| NAAction
|
||||
| ErrorMessage
|
||||
| EmptyUpdateStateAction
|
||||
| SetPersistAction;
|
||||
|
||||
type TabPort = Omit<chrome.runtime.Port, 'postMessage'> & {
|
||||
postMessage: (message: TabMessage) => void;
|
||||
|
@ -227,20 +218,15 @@ type PanelPort = Omit<chrome.runtime.Port, 'postMessage'> & {
|
|||
message: PanelMessageWithSplitAction<S, A>,
|
||||
) => void;
|
||||
};
|
||||
type MonitorPort = Omit<chrome.runtime.Port, 'postMessage'> & {
|
||||
postMessage: (message: MonitorMessage) => void;
|
||||
};
|
||||
|
||||
export const CONNECTED = 'socket/CONNECTED';
|
||||
export const DISCONNECTED = 'socket/DISCONNECTED';
|
||||
const connections: {
|
||||
readonly tab: { [K in number | string]: TabPort };
|
||||
readonly panel: { [K in number | string]: PanelPort };
|
||||
readonly monitor: { [K in number | string]: MonitorPort };
|
||||
} = {
|
||||
tab: {},
|
||||
panel: {},
|
||||
monitor: {},
|
||||
};
|
||||
const chunks: {
|
||||
[instanceId: string]: PageScriptToContentScriptMessageForwardedToMonitors<
|
||||
|
@ -262,16 +248,10 @@ type MonitorAction<S, A extends Action<string>> =
|
|||
// Chrome message limit is 64 MB, but we're using 32 MB to include other object's parts
|
||||
const maxChromeMsgSize = 32 * 1024 * 1024;
|
||||
|
||||
// TODO Clean up args
|
||||
function toMonitors<S, A extends Action<string>>(
|
||||
action: MonitorAction<S, A>,
|
||||
tabId?: string | number,
|
||||
verbose?: boolean,
|
||||
) {
|
||||
for (const port of [
|
||||
...Object.values(connections.monitor),
|
||||
...Object.values(connections.panel),
|
||||
]) {
|
||||
function toMonitors<S, A extends Action<string>>(action: MonitorAction<S, A>) {
|
||||
console.log(`Message to monitors: ${action.type}`);
|
||||
|
||||
for (const port of Object.values(connections.panel)) {
|
||||
try {
|
||||
port.postMessage(action);
|
||||
} catch (err) {
|
||||
|
@ -337,19 +317,15 @@ interface ImportMessage {
|
|||
type ToContentScriptMessage = ImportMessage | LiftedActionAction;
|
||||
|
||||
function toContentScript(messageBody: ToContentScriptMessage) {
|
||||
console.log(`Message to tab ${messageBody.id}: ${messageBody.message}`);
|
||||
|
||||
if (messageBody.message === 'DISPATCH') {
|
||||
const { message, action, id, instanceId, state } = messageBody;
|
||||
connections.tab[id!].postMessage({
|
||||
type: message,
|
||||
action,
|
||||
state: nonReduxDispatch(
|
||||
store,
|
||||
message,
|
||||
instanceId,
|
||||
action as AppDispatchAction,
|
||||
state,
|
||||
),
|
||||
id: instanceId.toString().replace(/^[^\/]+\//, ''),
|
||||
state: nonReduxDispatch(store, message, instanceId, action, state),
|
||||
id: instanceId.toString().replace(/^[^/]+\//, ''),
|
||||
});
|
||||
} else if (messageBody.message === 'IMPORT') {
|
||||
const { message, action, id, instanceId, state } = messageBody;
|
||||
|
@ -363,7 +339,7 @@ function toContentScript(messageBody: ToContentScriptMessage) {
|
|||
action as unknown as AppDispatchAction,
|
||||
state,
|
||||
),
|
||||
id: instanceId.toString().replace(/^[^\/]+\//, ''),
|
||||
id: instanceId.toString().replace(/^[^/]+\//, ''),
|
||||
});
|
||||
} else if (messageBody.message === 'ACTION') {
|
||||
const { message, action, id, instanceId, state } = messageBody;
|
||||
|
@ -377,7 +353,7 @@ function toContentScript(messageBody: ToContentScriptMessage) {
|
|||
action as unknown as AppDispatchAction,
|
||||
state,
|
||||
),
|
||||
id: instanceId.toString().replace(/^[^\/]+\//, ''),
|
||||
id: instanceId.toString().replace(/^[^/]+\//, ''),
|
||||
});
|
||||
} else if (messageBody.message === 'EXPORT') {
|
||||
const { message, action, id, instanceId, state } = messageBody;
|
||||
|
@ -391,11 +367,11 @@ function toContentScript(messageBody: ToContentScriptMessage) {
|
|||
action as unknown as AppDispatchAction,
|
||||
state,
|
||||
),
|
||||
id: instanceId.toString().replace(/^[^\/]+\//, ''),
|
||||
id: instanceId.toString().replace(/^[^/]+\//, ''),
|
||||
});
|
||||
} else {
|
||||
const { message, action, id, instanceId, state } = messageBody;
|
||||
connections.tab[id!].postMessage({
|
||||
connections.tab[id].postMessage({
|
||||
type: message,
|
||||
action,
|
||||
state: nonReduxDispatch(
|
||||
|
@ -405,28 +381,19 @@ function toContentScript(messageBody: ToContentScriptMessage) {
|
|||
action as AppDispatchAction,
|
||||
state,
|
||||
),
|
||||
id: (instanceId as number).toString().replace(/^[^\/]+\//, ''),
|
||||
id: (instanceId as number).toString().replace(/^[^/]+\//, ''),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function toAllTabs(msg: TabMessage) {
|
||||
console.log(`Message to all tabs: ${msg.type}`);
|
||||
|
||||
for (const tabPort of Object.values(connections.tab)) {
|
||||
tabPort.postMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
function monitorInstances(shouldMonitor: boolean, id?: string) {
|
||||
const action = {
|
||||
type: shouldMonitor ? ('START' as const) : ('STOP' as const),
|
||||
};
|
||||
if (id) {
|
||||
if (connections.tab[id]) connections.tab[id].postMessage(action);
|
||||
} else {
|
||||
toAllTabs(action);
|
||||
}
|
||||
}
|
||||
|
||||
function getReducerError() {
|
||||
const instancesState = store.getState().instances;
|
||||
const payload = instancesState.states[instancesState.current];
|
||||
|
@ -438,11 +405,11 @@ function getReducerError() {
|
|||
function togglePersist() {
|
||||
const state = store.getState();
|
||||
if (state.instances.persisted) {
|
||||
Object.keys(state.instances.connections).forEach((id) => {
|
||||
for (const id of Object.keys(state.instances.connections)) {
|
||||
if (connections.tab[id]) return;
|
||||
store.dispatch({ type: REMOVE_INSTANCE, id });
|
||||
toMonitors({ type: 'NA', id });
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -468,6 +435,7 @@ function messaging<S, A extends Action<string>>(
|
|||
sender: chrome.runtime.MessageSender,
|
||||
) {
|
||||
let tabId = getId(sender);
|
||||
console.log(`Message from tab ${tabId}: ${request.type ?? request.split}`);
|
||||
if (!tabId) return;
|
||||
if (sender.frameId) tabId = `${tabId}-${sender.frameId}`;
|
||||
|
||||
|
@ -478,7 +446,7 @@ function messaging<S, A extends Action<string>>(
|
|||
return;
|
||||
}
|
||||
if (request.type === 'OPEN_OPTIONS') {
|
||||
chrome.runtime.openOptionsPage();
|
||||
void chrome.runtime.openOptionsPage();
|
||||
return;
|
||||
}
|
||||
if (request.type === 'OPTIONS') {
|
||||
|
@ -499,12 +467,12 @@ function messaging<S, A extends Action<string>>(
|
|||
}
|
||||
if (request.type === 'ERROR') {
|
||||
if (request.payload) {
|
||||
toMonitors(request, tabId);
|
||||
toMonitors(request);
|
||||
return;
|
||||
}
|
||||
if (!request.message) return;
|
||||
const reducerError = getReducerError();
|
||||
chrome.notifications.create('app-error', {
|
||||
void chrome.notifications.create('app-error', {
|
||||
type: 'basic',
|
||||
title: reducerError
|
||||
? 'An error occurred in the reducer'
|
||||
|
@ -541,19 +509,17 @@ function messaging<S, A extends Action<string>>(
|
|||
}
|
||||
store.dispatch(action);
|
||||
|
||||
if (request.type === 'EXPORT') {
|
||||
toMonitors(action, tabId, true);
|
||||
} else {
|
||||
toMonitors(action, tabId);
|
||||
}
|
||||
toMonitors(action);
|
||||
}
|
||||
|
||||
function disconnect(
|
||||
type: 'tab' | 'monitor' | 'panel',
|
||||
type: 'tab' | 'panel',
|
||||
id: number | string,
|
||||
listener?: (message: any, port: chrome.runtime.Port) => void,
|
||||
listener: (message: any, port: chrome.runtime.Port) => void,
|
||||
) {
|
||||
return function disconnectListener() {
|
||||
console.log(`Disconnected from ${type} ${id}`);
|
||||
|
||||
const p = connections[type][id];
|
||||
if (listener && p) p.onMessage.removeListener(listener);
|
||||
if (p) p.onDisconnect.removeListener(disconnectListener);
|
||||
|
@ -565,7 +531,7 @@ function disconnect(
|
|||
}
|
||||
} else {
|
||||
monitors--;
|
||||
if (!monitors) monitorInstances(false);
|
||||
if (monitors === 0) toAllTabs({ type: 'STOP' });
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -578,16 +544,17 @@ function onConnect<S, A extends Action<string>>(port: chrome.runtime.Port) {
|
|||
|
||||
if (port.name === 'tab') {
|
||||
id = getId(port.sender!);
|
||||
console.log(`Connected to tab ${id}`);
|
||||
if (port.sender!.frameId) id = `${id}-${port.sender!.frameId}`;
|
||||
connections.tab[id] = port;
|
||||
listener = (msg: ContentScriptToBackgroundMessage<S, A> | 'heartbeat') => {
|
||||
if (msg === 'heartbeat') return;
|
||||
listener = (msg: ContentScriptToBackgroundMessage<S, A>) => {
|
||||
console.log(`Message from tab ${id}: ${msg.name}`);
|
||||
if (msg.name === 'INIT_INSTANCE') {
|
||||
if (typeof id === 'number') {
|
||||
chrome.action.enable(id);
|
||||
chrome.action.setIcon({ tabId: id, path: 'img/logo/38x38.png' });
|
||||
void chrome.action.enable(id);
|
||||
void chrome.action.setIcon({ tabId: id, path: 'img/logo/38x38.png' });
|
||||
}
|
||||
port.postMessage({ type: 'START' });
|
||||
if (monitors > 0) port.postMessage({ type: 'START' });
|
||||
|
||||
const state = store.getState();
|
||||
if (state.instances.persisted) {
|
||||
|
@ -613,28 +580,45 @@ function onConnect<S, A extends Action<string>>(port: chrome.runtime.Port) {
|
|||
port.onMessage.addListener(listener);
|
||||
port.onDisconnect.addListener(disconnect('tab', id, listener));
|
||||
} else if (port.name && port.name.indexOf('monitor') === 0) {
|
||||
id = getId(port.sender!, port.name);
|
||||
connections.monitor[id] = port;
|
||||
monitorInstances(true);
|
||||
listener = (msg: BackgroundAction | 'heartbeat') => {
|
||||
if (msg === 'heartbeat') return;
|
||||
store.dispatch(msg);
|
||||
};
|
||||
port.onMessage.addListener(listener);
|
||||
monitors++;
|
||||
port.onDisconnect.addListener(disconnect('monitor', id));
|
||||
} else {
|
||||
// devpanel
|
||||
id = port.name || port.sender!.frameId!;
|
||||
id = getId(port.sender!, port.name);
|
||||
console.log(`Connected to monitor ${id}`);
|
||||
connections.panel[id] = port;
|
||||
monitorInstances(true, port.name);
|
||||
monitors++;
|
||||
listener = (msg: BackgroundAction | 'heartbeat') => {
|
||||
if (msg === 'heartbeat') return;
|
||||
toAllTabs({ type: 'START' });
|
||||
listener = (msg: BackgroundAction) => {
|
||||
console.log(`Message from monitor ${id}: ${msg.type}`);
|
||||
store.dispatch(msg);
|
||||
};
|
||||
port.onMessage.addListener(listener);
|
||||
port.onDisconnect.addListener(disconnect('panel', id, listener));
|
||||
|
||||
const { current } = store.getState().instances;
|
||||
if (current !== 'default') {
|
||||
const connectionId = Object.entries(
|
||||
store.getState().instances.connections,
|
||||
).find(([, instanceIds]) => instanceIds.includes(current))?.[0];
|
||||
const options = store.getState().instances.options[current];
|
||||
const state = store.getState().instances.states[current];
|
||||
const { actionsById, computedStates, committedState, ...rest } = state;
|
||||
toMonitors({
|
||||
type: UPDATE_STATE,
|
||||
request: {
|
||||
type: 'STATE',
|
||||
payload: rest as Omit<
|
||||
LiftedState<S, A, unknown>,
|
||||
'actionsById' | 'computedStates' | 'committedState'
|
||||
>,
|
||||
source: '@devtools-page',
|
||||
instanceId:
|
||||
typeof current === 'number' ? current.toString() : current,
|
||||
actionsById: stringifyJSON(actionsById, options.serialize),
|
||||
computedStates: stringifyJSON(computedStates, options.serialize),
|
||||
committedState: typeof committedState !== 'undefined',
|
||||
},
|
||||
id: connectionId ?? current,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -644,10 +628,11 @@ chrome.runtime.onMessage.addListener(messaging);
|
|||
chrome.runtime.onMessageExternal.addListener(messaging);
|
||||
|
||||
chrome.notifications.onClicked.addListener((id) => {
|
||||
chrome.notifications.clear(id);
|
||||
void chrome.notifications.clear(id);
|
||||
openDevToolsWindow('devtools-window');
|
||||
});
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
const api: Middleware<{}, BackgroundState, Dispatch<BackgroundAction>> =
|
||||
(store) => (next) => (untypedAction) => {
|
||||
const action = untypedAction as BackgroundAction;
|
||||
|
|
|
@ -1,34 +1,50 @@
|
|||
// Mock not supported chrome.* API for Firefox and Electron
|
||||
|
||||
window.isElectron =
|
||||
window.navigator && window.navigator.userAgent.indexOf('Electron') !== -1;
|
||||
|
||||
const isFirefox = navigator.userAgent.indexOf('Firefox') !== -1;
|
||||
const isElectron = navigator.userAgent.includes('Electron');
|
||||
const isFirefox = navigator.userAgent.includes('Firefox');
|
||||
|
||||
// Background page only
|
||||
if (
|
||||
(window.isElectron &&
|
||||
location.pathname === '/_generated_background_page.html') ||
|
||||
(isElectron && location.pathname === '/background.bundle.js') ||
|
||||
isFirefox
|
||||
) {
|
||||
(chrome.runtime as any).onConnectExternal = {
|
||||
addListener() {},
|
||||
addListener() {
|
||||
// do nothing.
|
||||
},
|
||||
};
|
||||
(chrome.runtime as any).onMessageExternal = {
|
||||
addListener() {},
|
||||
addListener() {
|
||||
// do nothing.
|
||||
},
|
||||
};
|
||||
|
||||
if (window.isElectron) {
|
||||
if (isElectron) {
|
||||
(chrome.notifications as any) = {
|
||||
onClicked: {
|
||||
addListener() {},
|
||||
addListener() {
|
||||
// do nothing.
|
||||
},
|
||||
},
|
||||
create() {
|
||||
// do nothing.
|
||||
},
|
||||
clear() {
|
||||
// do nothing.
|
||||
},
|
||||
create() {},
|
||||
clear() {},
|
||||
};
|
||||
(chrome.contextMenus as any) = {
|
||||
onClicked: {
|
||||
addListener() {},
|
||||
addListener() {
|
||||
// do nothing.
|
||||
},
|
||||
},
|
||||
};
|
||||
(chrome.commands as any) = {
|
||||
onCommand: {
|
||||
addListener() {
|
||||
// do nothing.
|
||||
},
|
||||
},
|
||||
};
|
||||
} else {
|
||||
|
@ -39,34 +55,39 @@ if (
|
|||
}
|
||||
}
|
||||
|
||||
if (window.isElectron) {
|
||||
if (isElectron) {
|
||||
if (!chrome.storage.local || !chrome.storage.local.remove) {
|
||||
(chrome.storage as any).local = {
|
||||
set(obj: any, callback: any) {
|
||||
Object.keys(obj).forEach((key) => {
|
||||
localStorage.setItem(key, obj[key]);
|
||||
});
|
||||
set(items: { [key: string]: string }, callback: () => void) {
|
||||
for (const [key, value] of Object.entries(items)) {
|
||||
localStorage.setItem(key, value);
|
||||
}
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
get(obj: any, callback: any) {
|
||||
const result: any = {};
|
||||
Object.keys(obj).forEach((key) => {
|
||||
result[key] = localStorage.getItem(key) || obj[key];
|
||||
});
|
||||
get(
|
||||
keys: { [key: string]: any },
|
||||
callback: (items: { [key: string]: any }) => void,
|
||||
) {
|
||||
const result = Object.fromEntries(
|
||||
Object.entries(keys).map(([key, value]) => [
|
||||
key,
|
||||
localStorage.getItem(key) ?? value,
|
||||
]),
|
||||
);
|
||||
if (callback) {
|
||||
callback(result);
|
||||
}
|
||||
},
|
||||
// Electron ~ 1.4.6
|
||||
remove(items: any, callback: any) {
|
||||
if (Array.isArray(items)) {
|
||||
items.forEach((name) => {
|
||||
localStorage.removeItem(name);
|
||||
});
|
||||
remove(keys: string | string[], callback: () => void) {
|
||||
if (Array.isArray(keys)) {
|
||||
for (const key of keys) {
|
||||
localStorage.removeItem(key);
|
||||
}
|
||||
} else {
|
||||
localStorage.removeItem(items);
|
||||
localStorage.removeItem(keys);
|
||||
}
|
||||
if (callback) {
|
||||
callback();
|
||||
|
@ -76,17 +97,17 @@ if (window.isElectron) {
|
|||
}
|
||||
// Avoid error: chrome.runtime.sendMessage is not supported responseCallback
|
||||
const originSendMessage = (chrome.runtime as any).sendMessage;
|
||||
chrome.runtime.sendMessage = function () {
|
||||
(chrome.runtime as any).sendMessage = function (...args: unknown[]) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
return originSendMessage(...arguments);
|
||||
return originSendMessage(...args);
|
||||
}
|
||||
if (typeof arguments[arguments.length - 1] === 'function') {
|
||||
Array.prototype.pop.call(arguments);
|
||||
if (typeof args[arguments.length - 1] === 'function') {
|
||||
Array.prototype.pop.call(args);
|
||||
}
|
||||
return originSendMessage(...arguments);
|
||||
return originSendMessage(...args);
|
||||
};
|
||||
}
|
||||
|
||||
if (isFirefox || window.isElectron) {
|
||||
if (isFirefox || isElectron) {
|
||||
(chrome.storage as any).sync = chrome.storage.local;
|
||||
}
|
||||
|
|
|
@ -254,7 +254,7 @@ function tryCatch<S, A extends Action<string>>(
|
|||
}
|
||||
newArgs[key as keyof typeof newArgs] = arg;
|
||||
});
|
||||
fn(newArgs as any);
|
||||
fn(newArgs as SplitMessage);
|
||||
for (let i = 0; i < toSplit.length; i++) {
|
||||
for (let j = 0; j < toSplit[i][1].length; j += maxChromeMsgSize) {
|
||||
fn({
|
||||
|
@ -343,7 +343,3 @@ function handleMessages<S, A extends Action<string>>(
|
|||
prefetchOptions();
|
||||
|
||||
window.addEventListener('message', handleMessages, false);
|
||||
|
||||
setInterval(() => {
|
||||
bg?.postMessage('heartbeat');
|
||||
}, 15000);
|
||||
|
|
|
@ -36,7 +36,7 @@ let persistor: Persistor | undefined;
|
|||
let bgConnection: chrome.runtime.Port;
|
||||
let naTimeout: NodeJS.Timeout;
|
||||
|
||||
const isChrome = navigator.userAgent.indexOf('Firefox') === -1;
|
||||
const isChrome = !navigator.userAgent.includes('Firefox');
|
||||
|
||||
function renderNodeAtRoot(node: ReactNode) {
|
||||
if (currentRoot) currentRoot.unmount();
|
||||
|
@ -67,6 +67,7 @@ function renderNA() {
|
|||
<a
|
||||
href="https://github.com/zalmoxisus/redux-devtools-extension#usage"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
the instructions
|
||||
</a>
|
||||
|
@ -87,6 +88,7 @@ function renderNA() {
|
|||
<a
|
||||
href="https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/Troubleshooting.md#access-file-url-file"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
See details
|
||||
</a>
|
||||
|
@ -116,10 +118,6 @@ function init() {
|
|||
}
|
||||
bgConnection = chrome.runtime.connect({ name });
|
||||
|
||||
setInterval(() => {
|
||||
bgConnection.postMessage('heartbeat');
|
||||
}, 15000);
|
||||
|
||||
bgConnection.onMessage.addListener(
|
||||
<S, A extends Action<string>>(
|
||||
message: PanelMessageWithSplitAction<S, A>,
|
||||
|
@ -143,12 +141,18 @@ function init() {
|
|||
}
|
||||
|
||||
if (request.split === 'chunk') {
|
||||
if ((splitMessage as Record<string, unknown>)[request.chunk[0]]) {
|
||||
(splitMessage as Record<string, unknown>)[request.chunk[0]] +=
|
||||
request.chunk[1];
|
||||
if (
|
||||
(splitMessage as unknown as Record<string, string>)[
|
||||
request.chunk[0]
|
||||
]
|
||||
) {
|
||||
(splitMessage as unknown as Record<string, string>)[
|
||||
request.chunk[0]
|
||||
] += request.chunk[1];
|
||||
} else {
|
||||
(splitMessage as Record<string, unknown>)[request.chunk[0]] =
|
||||
request.chunk[1];
|
||||
(splitMessage as unknown as Record<string, string>)[
|
||||
request.chunk[0]
|
||||
] = request.chunk[1];
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ function getCurrentTabId(next: (tabId: number) => void) {
|
|||
|
||||
function panelDispatcher(
|
||||
bgConnection: chrome.runtime.Port,
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
): Middleware<{}, StoreState, Dispatch<StoreAction>> {
|
||||
let autoselected = false;
|
||||
|
||||
|
|
|
@ -2,5 +2,7 @@ chrome.devtools.panels.create(
|
|||
'Redux',
|
||||
'img/logo/scalable.png',
|
||||
'devpanel.html',
|
||||
() => {},
|
||||
() => {
|
||||
// do nothing.
|
||||
},
|
||||
);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import { OptionsProps } from './Options';
|
||||
|
||||
export default ({ options, saveOption }: OptionsProps) => {
|
||||
export default function AllowToRunGroup({ options, saveOption }: OptionsProps) {
|
||||
const AllowToRunState = {
|
||||
EVERYWHERE: true,
|
||||
ON_SPECIFIC_URLS: false,
|
||||
|
@ -50,4 +50,4 @@ export default ({ options, saveOption }: OptionsProps) => {
|
|||
</div>
|
||||
</fieldset>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
import React from 'react';
|
||||
import { OptionsProps } from './Options';
|
||||
|
||||
export default ({ options, saveOption }: OptionsProps) => {
|
||||
export default function ContextMenuGroup({
|
||||
options,
|
||||
saveOption,
|
||||
}: OptionsProps) {
|
||||
return (
|
||||
<fieldset className="option-group">
|
||||
<legend className="option-group__title">Context Menu</legend>
|
||||
|
@ -23,4 +26,4 @@ export default ({ options, saveOption }: OptionsProps) => {
|
|||
</div>
|
||||
</fieldset>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import { OptionsProps } from './Options';
|
||||
|
||||
export default ({ options, saveOption }: OptionsProps) => {
|
||||
export default function EditorGroup({ options, saveOption }: OptionsProps) {
|
||||
const EditorState = {
|
||||
BROWSER: 0,
|
||||
EXTERNAL: 1,
|
||||
|
@ -21,7 +21,7 @@ export default ({ options, saveOption }: OptionsProps) => {
|
|||
onChange={() => saveOption('useEditor', EditorState.BROWSER)}
|
||||
/>
|
||||
<label className="option__label" htmlFor="editor-browser">
|
||||
{navigator.userAgent.indexOf('Firefox') !== -1
|
||||
{navigator.userAgent.includes('Firefox')
|
||||
? "Don't open in external editor"
|
||||
: "Use browser's debugger (from browser devpanel only)"}
|
||||
</label>
|
||||
|
@ -80,4 +80,4 @@ export default ({ options, saveOption }: OptionsProps) => {
|
|||
</div>
|
||||
</fieldset>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import { FilterState } from '../pageScript/api/filters';
|
||||
import { OptionsProps } from './Options';
|
||||
|
||||
export default ({ options, saveOption }: OptionsProps) => {
|
||||
export default function FilterGroup({ options, saveOption }: OptionsProps) {
|
||||
return (
|
||||
<fieldset className="option-group">
|
||||
<legend className="option-group__title">
|
||||
|
@ -68,4 +68,4 @@ export default ({ options, saveOption }: OptionsProps) => {
|
|||
</div>
|
||||
</fieldset>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
import React from 'react';
|
||||
import { OptionsProps } from './Options';
|
||||
|
||||
export default ({ options, saveOption }: OptionsProps) => {
|
||||
export default function MiscellaneousGroup({
|
||||
options,
|
||||
saveOption,
|
||||
}: OptionsProps) {
|
||||
return (
|
||||
<fieldset className="option-group">
|
||||
<legend className="option-group__title">Miscellaneous</legend>
|
||||
|
@ -47,4 +50,4 @@ export default ({ options, saveOption }: OptionsProps) => {
|
|||
</div>
|
||||
</fieldset>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -14,34 +14,38 @@ export interface OptionsProps {
|
|||
) => void;
|
||||
}
|
||||
|
||||
export default (props: OptionsProps) => (
|
||||
<div>
|
||||
<EditorGroup {...props} />
|
||||
<FilterGroup {...props} />
|
||||
<AllowToRunGroup {...props} />
|
||||
<MiscellaneousGroup {...props} />
|
||||
<ContextMenuGroup {...props} />
|
||||
<div style={{ color: 'red' }}>
|
||||
<br />
|
||||
<hr />
|
||||
Setting options here is discouraged, and will not be possible in the next
|
||||
major release. Please{' '}
|
||||
<a
|
||||
href="https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md"
|
||||
target="_blank"
|
||||
style={{ color: 'red' }}
|
||||
>
|
||||
specify them as parameters
|
||||
</a>
|
||||
. See{' '}
|
||||
<a
|
||||
href="https://github.com/zalmoxisus/redux-devtools-extension/issues/296"
|
||||
target="_blank"
|
||||
style={{ color: 'red' }}
|
||||
>
|
||||
the issue
|
||||
</a>{' '}
|
||||
for more details.
|
||||
export default function OptionsComponent(props: OptionsProps) {
|
||||
return (
|
||||
<div>
|
||||
<EditorGroup {...props} />
|
||||
<FilterGroup {...props} />
|
||||
<AllowToRunGroup {...props} />
|
||||
<MiscellaneousGroup {...props} />
|
||||
<ContextMenuGroup {...props} />
|
||||
<div style={{ color: 'red' }}>
|
||||
<br />
|
||||
<hr />
|
||||
Setting options here is discouraged, and will not be possible in the
|
||||
next major release. Please{' '}
|
||||
<a
|
||||
href="https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
style={{ color: 'red' }}
|
||||
>
|
||||
specify them as parameters
|
||||
</a>
|
||||
. See{' '}
|
||||
<a
|
||||
href="https://github.com/zalmoxisus/redux-devtools-extension/issues/296"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
style={{ color: 'red' }}
|
||||
>
|
||||
the issue
|
||||
</a>{' '}
|
||||
for more details.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
|
||||
subscribeToOptions((options) => {
|
||||
const message: OptionsMessage = { type: 'OPTIONS', options };
|
||||
chrome.runtime.sendMessage(message);
|
||||
void chrome.runtime.sendMessage(message);
|
||||
});
|
||||
|
||||
const renderOptions = (options: Options) => {
|
||||
|
|
|
@ -46,9 +46,9 @@ export const saveOption = <K extends keyof Options>(
|
|||
key: K,
|
||||
value: Options[K],
|
||||
) => {
|
||||
let obj: { [K1 in keyof Options]?: Options[K1] } = {};
|
||||
const obj: { [K1 in keyof Options]?: Options[K1] } = {};
|
||||
obj[key] = value;
|
||||
chrome.storage.sync.set(obj);
|
||||
void chrome.storage.sync.set(obj);
|
||||
options![key] = value;
|
||||
for (const subscriber of subscribers) {
|
||||
subscriber(options!);
|
||||
|
@ -99,7 +99,10 @@ export const getOptions = (callback: (options: Options) => void) => {
|
|||
}
|
||||
};
|
||||
|
||||
export const prefetchOptions = () => getOptions(() => {});
|
||||
export const prefetchOptions = () =>
|
||||
getOptions(() => {
|
||||
// do nothing.
|
||||
});
|
||||
|
||||
export const subscribeToOptions = (callback: (options: Options) => void) => {
|
||||
subscribers = subscribers.concat(callback);
|
||||
|
|
|
@ -26,8 +26,7 @@ export function isFiltered<A extends Action<string>>(
|
|||
) {
|
||||
if (
|
||||
noFiltersApplied(localFilter) ||
|
||||
(typeof action !== 'string' &&
|
||||
typeof (action.type as string).match !== 'function')
|
||||
(typeof action !== 'string' && typeof action.type.match !== 'function')
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ export default function importState<S, A extends Action<string>>(
|
|||
| LiftedState<S, A, unknown> = parse(state) as
|
||||
| ParsedSerializedLiftedState
|
||||
| LiftedState<S, A, unknown>;
|
||||
let preloadedState =
|
||||
const preloadedState =
|
||||
'payload' in parsedSerializedLiftedState &&
|
||||
parsedSerializedLiftedState.preloadedState
|
||||
? (parse(parsedSerializedLiftedState.preloadedState) as S)
|
||||
|
|
|
@ -222,6 +222,7 @@ function post<S, A extends Action<string>>(
|
|||
|
||||
function getStackTrace(
|
||||
config: Config,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
||||
toExcludeFromTrace: Function | undefined,
|
||||
) {
|
||||
if (!config.trace) return undefined;
|
||||
|
@ -248,6 +249,7 @@ function getStackTrace(
|
|||
typeof Error.stackTraceLimit !== 'number' ||
|
||||
Error.stackTraceLimit > traceLimit!
|
||||
) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||
const frames = stack!.split('\n');
|
||||
if (frames.length > traceLimit!) {
|
||||
stack = frames
|
||||
|
@ -265,10 +267,11 @@ function amendActionType<A extends Action<string>>(
|
|||
| StructuralPerformAction<A>[]
|
||||
| string,
|
||||
config: Config,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
||||
toExcludeFromTrace: Function | undefined,
|
||||
): StructuralPerformAction<A> {
|
||||
let timestamp = Date.now();
|
||||
let stack = getStackTrace(config, toExcludeFromTrace);
|
||||
const timestamp = Date.now();
|
||||
const stack = getStackTrace(config, toExcludeFromTrace);
|
||||
if (typeof action === 'string') {
|
||||
return { action: { type: action } as A, timestamp, stack };
|
||||
}
|
||||
|
@ -595,7 +598,11 @@ export function connect(preConfig: Config): ConnectResponse {
|
|||
};
|
||||
|
||||
const sendDelayed = throttle(() => {
|
||||
sendMessage(delayedActions, delayedStates as any, config);
|
||||
sendMessage(
|
||||
delayedActions,
|
||||
delayedStates as unknown as LiftedState<unknown, Action<string>, unknown>,
|
||||
config,
|
||||
);
|
||||
delayedActions = [];
|
||||
delayedStates = [];
|
||||
}, latency);
|
||||
|
|
|
@ -10,7 +10,7 @@ function createExpBackoffTimer(step: number) {
|
|||
return 0;
|
||||
}
|
||||
// Calculate next timeout
|
||||
let timeout = Math.pow(2, count - 1);
|
||||
const timeout = Math.pow(2, count - 1);
|
||||
if (count < 5) count += 1;
|
||||
return timeout * step;
|
||||
};
|
||||
|
|
|
@ -4,8 +4,8 @@ import { persistState } from '@redux-devtools/core';
|
|||
import type { ConfigWithExpandedMaxAge } from './index';
|
||||
|
||||
export function getUrlParam(key: string) {
|
||||
const matches = window.location.href.match(
|
||||
new RegExp(`[?&]${key}=([^&#]+)\\b`),
|
||||
const matches = new RegExp(`[?&]${key}=([^&#]+)\\b`).exec(
|
||||
window.location.href,
|
||||
);
|
||||
return matches && matches.length > 0 ? matches[1] : null;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ type EnhancedStoreWithInitialDispatch<
|
|||
> = EnhancedStore<S, A, MonitorState> & { initialDispatch: Dispatch<A> };
|
||||
|
||||
const source = '@devtools-page';
|
||||
let stores: {
|
||||
const stores: {
|
||||
[K in string | number]: EnhancedStoreWithInitialDispatch<
|
||||
unknown,
|
||||
Action<string>,
|
||||
|
@ -167,7 +167,7 @@ function __REDUX_DEVTOOLS_EXTENSION__<S, A extends Action<string>>(
|
|||
const localFilter = getLocalFilter(config);
|
||||
const serializeState = getSerializeParameter(config);
|
||||
const serializeAction = getSerializeParameter(config);
|
||||
let { stateSanitizer, actionSanitizer, predicate, latency = 500 } = config;
|
||||
const { stateSanitizer, actionSanitizer, predicate, latency = 500 } = config;
|
||||
|
||||
// Deprecate actionsWhitelist and actionsBlacklist
|
||||
if (config.actionsWhitelist) {
|
||||
|
@ -447,7 +447,7 @@ function __REDUX_DEVTOOLS_EXTENSION__<S, A extends Action<string>>(
|
|||
liftedAction?: LiftedAction<S, A, unknown>,
|
||||
liftedState?: LiftedState<S, A, unknown> | undefined,
|
||||
) => {
|
||||
let m = (config && config.maxAge) || window.devToolsOptions.maxAge || 50;
|
||||
const m = (config && config.maxAge) || window.devToolsOptions.maxAge || 50;
|
||||
if (
|
||||
!liftedAction ||
|
||||
noFiltersApplied(localFilter) ||
|
||||
|
@ -464,10 +464,7 @@ function __REDUX_DEVTOOLS_EXTENSION__<S, A extends Action<string>>(
|
|||
if (filteredActionIds.length >= m) {
|
||||
const stagedActionIds = liftedState!.stagedActionIds;
|
||||
let i = 1;
|
||||
while (
|
||||
maxAge > m &&
|
||||
filteredActionIds.indexOf(stagedActionIds[i]) === -1
|
||||
) {
|
||||
while (maxAge > m && !filteredActionIds.includes(stagedActionIds[i])) {
|
||||
maxAge--;
|
||||
i++;
|
||||
}
|
||||
|
@ -539,7 +536,7 @@ function __REDUX_DEVTOOLS_EXTENSION__<S, A extends Action<string>>(
|
|||
...config,
|
||||
maxAge: getMaxAge as any,
|
||||
}) as any
|
||||
)(reducer_, initialState_) as any;
|
||||
)(reducer_, initialState_);
|
||||
|
||||
if (isInIframe()) setTimeout(init, 3000);
|
||||
else init();
|
||||
|
@ -591,18 +588,18 @@ export type InferComposedStoreExt<StoreEnhancers> = StoreEnhancers extends [
|
|||
? HeadStoreEnhancer extends StoreEnhancer<infer StoreExt>
|
||||
? StoreExt & InferComposedStoreExt<RestStoreEnhancers>
|
||||
: never
|
||||
: {};
|
||||
: // eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||
{};
|
||||
|
||||
const extensionCompose =
|
||||
(config: Config) =>
|
||||
<StoreEnhancers extends readonly StoreEnhancer[]>(
|
||||
...funcs: StoreEnhancers
|
||||
): StoreEnhancer<InferComposedStoreExt<StoreEnhancers>> => {
|
||||
// @ts-ignore FIXME
|
||||
// @ts-expect-error FIXME
|
||||
return (...args) => {
|
||||
const instanceId = generateId(config.instanceId);
|
||||
return [preEnhancer(instanceId), ...funcs].reduceRight(
|
||||
// @ts-ignore FIXME
|
||||
(composed, f) => f(composed),
|
||||
__REDUX_DEVTOOLS_EXTENSION__({ ...config, instanceId })(...args),
|
||||
);
|
||||
|
|
1
extension/test/__mocks__/styleMock.js
Normal file
1
extension/test/__mocks__/styleMock.js
Normal file
|
@ -0,0 +1 @@
|
|||
module.exports = {};
|
|
@ -1 +0,0 @@
|
|||
export default {};
|
|
@ -71,6 +71,7 @@ describe('Chrome extension', function () {
|
|||
});
|
||||
|
||||
Object.keys(switchMonitorTests).forEach((description) =>
|
||||
// eslint-disable-next-line jest/expect-expect,jest/valid-title
|
||||
it(description, () => switchMonitorTests[description](driver)),
|
||||
);
|
||||
});
|
||||
|
|
|
@ -6,7 +6,7 @@ import chromedriver from 'chromedriver';
|
|||
import { switchMonitorTests, delay } from '../utils/e2e';
|
||||
|
||||
const devPanelPath =
|
||||
'chrome-extension://lmhkpmbekcpmknklioeibfkpmmfibljd/window.html';
|
||||
'chrome-extension://lmhkpmbekcpmknklioeibfkpmmfibljd/devpanel.html';
|
||||
|
||||
describe('DevTools panel for Electron', function () {
|
||||
let driver;
|
||||
|
@ -76,7 +76,8 @@ describe('DevTools panel for Electron', function () {
|
|||
expect(className).not.toMatch(/hidden/); // not hidden
|
||||
});
|
||||
|
||||
it.skip('should have Redux DevTools UI on current tab', async () => {
|
||||
// eslint-disable-next-line jest/expect-expect
|
||||
it('should have Redux DevTools UI on current tab', async () => {
|
||||
await driver
|
||||
.switchTo()
|
||||
.frame(
|
||||
|
@ -87,7 +88,7 @@ describe('DevTools panel for Electron', function () {
|
|||
await delay(1000);
|
||||
});
|
||||
|
||||
it.skip('should contain INIT action', async () => {
|
||||
it('should contain INIT action', async () => {
|
||||
const element = await driver.wait(
|
||||
webdriver.until.elementLocated(
|
||||
webdriver.By.xpath('//div[@data-testid="actionListRows"]'),
|
||||
|
@ -99,7 +100,7 @@ describe('DevTools panel for Electron', function () {
|
|||
expect(val).toMatch(/@@INIT/);
|
||||
});
|
||||
|
||||
it.skip("should contain Inspector monitor's component", async () => {
|
||||
it("should contain Inspector monitor's component", async () => {
|
||||
const val = await driver
|
||||
.findElement(webdriver.By.xpath('//div[@data-testid="inspector"]'))
|
||||
.getText();
|
||||
|
@ -107,9 +108,11 @@ describe('DevTools panel for Electron', function () {
|
|||
});
|
||||
|
||||
Object.keys(switchMonitorTests).forEach((description) =>
|
||||
it.skip(description, () => switchMonitorTests[description](driver)),
|
||||
// eslint-disable-next-line jest/expect-expect,jest/valid-title
|
||||
it(description, () => switchMonitorTests[description](driver)),
|
||||
);
|
||||
|
||||
// eslint-disable-next-line jest/no-commented-out-tests
|
||||
/* it('should be no logs in console of main window', async () => {
|
||||
const handles = await driver.getAllWindowHandles();
|
||||
await driver.switchTo().window(handles[1]); // Change to main window
|
||||
|
|
40
nx.json
40
nx.json
|
@ -1,40 +0,0 @@
|
|||
{
|
||||
"extends": "nx/presets/npm.json",
|
||||
"npmScope": "undetermined",
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"runner": "nx/tasks-runners/default",
|
||||
"options": {
|
||||
"cacheableOperations": ["build", "test", "lint", "package", "prepare"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"targetDependencies": {
|
||||
"build": [
|
||||
{
|
||||
"target": "build",
|
||||
"projects": "dependencies"
|
||||
}
|
||||
],
|
||||
"prepare": [
|
||||
{
|
||||
"target": "prepare",
|
||||
"projects": "dependencies"
|
||||
}
|
||||
],
|
||||
"package": [
|
||||
{
|
||||
"target": "package",
|
||||
"projects": "dependencies"
|
||||
}
|
||||
]
|
||||
},
|
||||
"affected": {
|
||||
"defaultBase": "main"
|
||||
},
|
||||
"pluginsConfig": {
|
||||
"@nrwl/js": {
|
||||
"analyzeSourceFiles": false
|
||||
}
|
||||
}
|
||||
}
|
53
package.json
53
package.json
|
@ -1,43 +1,28 @@
|
|||
{
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@changesets/cli": "^2.27.7",
|
||||
"@eslint/compat": "^1.1.1",
|
||||
"@eslint/js": "^8.57.0",
|
||||
"@nrwl/nx-cloud": "^19.0.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-jest": "^28.7.0",
|
||||
"eslint-plugin-react": "^7.35.0",
|
||||
"eslint-plugin-react-hooks": "^4.6.2",
|
||||
"jest": "^29.7.0",
|
||||
"nx": "^19.5.6",
|
||||
"prettier": "3.3.3",
|
||||
"typescript": "~5.5.4",
|
||||
"typescript-eslint": "^8.0.1"
|
||||
"@babel/core": "^7.27.4",
|
||||
"@changesets/cli": "^2.29.5",
|
||||
"@eslint/compat": "^1.3.0",
|
||||
"@eslint/js": "^9.29.0",
|
||||
"eslint": "^9.29.0",
|
||||
"eslint-config-prettier": "^10.1.5",
|
||||
"eslint-plugin-jest": "^29.0.1",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"jest": "^30.0.2",
|
||||
"prettier": "3.6.0",
|
||||
"typescript": "~5.8.3",
|
||||
"typescript-eslint": "^8.35.0"
|
||||
},
|
||||
"scripts": {
|
||||
"format": "prettier --write .",
|
||||
"format:check": "prettier --check .",
|
||||
"build:all": "nx run-many --target=build --all --parallel=1",
|
||||
"lint:all": "nx run-many --target=lint --all --parallel=1",
|
||||
"test:all": "nx run-many --target=test --all --parallel=1",
|
||||
"clean:all": "nx run-many --target=clean --all --parallel=1",
|
||||
"release": "pnpm build:all && changeset publish"
|
||||
"build:all": "pnpm --recursive run build",
|
||||
"lint:all": "pnpm --recursive run lint",
|
||||
"test:all": "pnpm --recursive run test",
|
||||
"clean:all": "pnpm --recursive run clean",
|
||||
"release": "pnpm build:all && pnpm publish -r"
|
||||
},
|
||||
"workspaces": [
|
||||
"extension",
|
||||
"packages/*",
|
||||
"packages/d3-state-visualizer/examples/tree",
|
||||
"packages/react-dock/demo",
|
||||
"packages/react-json-tree/examples",
|
||||
"packages/redux-devtools/examples/counter",
|
||||
"packages/redux-devtools/examples/todomvc",
|
||||
"packages/redux-devtools-inspector-monitor/demo",
|
||||
"packages/redux-devtools-inspector-monitor-test-tab/demo",
|
||||
"packages/redux-devtools-rtk-query-monitor/demo",
|
||||
"packages/redux-devtools-slider-monitor/examples/todomvc"
|
||||
],
|
||||
"packageManager": "pnpm@8.15.9"
|
||||
"packageManager": "pnpm@10.12.3"
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
### Major Changes
|
||||
|
||||
- b323f77d: Upgrade D3
|
||||
|
||||
- Remove UMD build.
|
||||
- Split `style` option into `chartStyles`, `nodeStyleOptions`, `textStyleOptions`, and `linkStyles`.
|
||||
- The shape of the argument passed to the `onClickText` option has been updated.
|
||||
|
|
|
@ -25,22 +25,22 @@
|
|||
"type-check": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"d3-state-visualizer": "^3.0.0",
|
||||
"map2tree": "^4.0.0"
|
||||
"d3-state-visualizer": "workspace:^",
|
||||
"map2tree": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@types/node": "^20.14.14",
|
||||
"babel-loader": "^9.1.3",
|
||||
"@babel/core": "^7.27.4",
|
||||
"@babel/preset-env": "^7.27.2",
|
||||
"@babel/preset-typescript": "^7.27.1",
|
||||
"@types/node": "^22.15.32",
|
||||
"babel-loader": "^10.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
||||
"html-webpack-plugin": "^5.6.0",
|
||||
"fork-ts-checker-webpack-plugin": "^9.1.0",
|
||||
"html-webpack-plugin": "^5.6.3",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "~5.5.4",
|
||||
"webpack": "^5.93.0",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^5.0.4"
|
||||
"typescript": "~5.8.3",
|
||||
"webpack": "^5.99.9",
|
||||
"webpack-cli": "^6.0.1",
|
||||
"webpack-dev-server": "^5.2.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,14 +39,14 @@
|
|||
"dependencies": {
|
||||
"@types/d3": "^7.4.3",
|
||||
"d3": "^7.9.0",
|
||||
"d3tooltip": "^4.0.0",
|
||||
"d3tooltip": "workspace:^",
|
||||
"deepmerge": "^4.3.1",
|
||||
"map2tree": "^4.0.0",
|
||||
"ramda": "^0.30.1"
|
||||
"map2tree": "workspace:^",
|
||||
"ramda": "^0.31.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/ramda": "^0.30.1",
|
||||
"@types/ramda": "^0.30.2",
|
||||
"rimraf": "^6.0.1",
|
||||
"typescript": "~5.5.4"
|
||||
"typescript": "~5.8.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
### Major Changes
|
||||
|
||||
- b323f77d: Upgrade D3
|
||||
|
||||
- Remove UMD build.
|
||||
- Upgrade d3 peer dependency from v3 to v7.
|
||||
- Remove `attr` configuration method.
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"@types/d3": "^7.4.3",
|
||||
"d3": "^7.9.0",
|
||||
"rimraf": "^6.0.1",
|
||||
"typescript": "~5.5.4"
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/d3": "^7.4.3",
|
||||
|
|
|
@ -40,12 +40,12 @@
|
|||
"lodash-es": "^4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"immutable": "^4.3.7",
|
||||
"jest": "^29.7.0",
|
||||
"immutable": "^5.1.3",
|
||||
"jest": "^30.0.2",
|
||||
"rimraf": "^6.0.1",
|
||||
"ts-jest": "^29.2.4",
|
||||
"typescript": "~5.5.4"
|
||||
"ts-jest": "^29.4.0",
|
||||
"typescript": "~5.8.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,19 +36,19 @@
|
|||
"prepublish": "pnpm run lint && pnpm run test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/lodash": "^4.17.7",
|
||||
"color": "^4.2.3",
|
||||
"@types/lodash": "^4.17.18",
|
||||
"color": "^5.0.0",
|
||||
"csstype": "^3.1.3",
|
||||
"lodash-es": "^4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/color": "^3.0.6",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/color": "^4.2.0",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"jest": "^29.7.0",
|
||||
"jest-environment-jsdom": "^29.7.0",
|
||||
"jest": "^30.0.2",
|
||||
"jest-environment-jsdom": "^30.0.2",
|
||||
"rimraf": "^6.0.1",
|
||||
"ts-jest": "^29.2.4",
|
||||
"typescript": "~5.5.4"
|
||||
"ts-jest": "^29.4.0",
|
||||
"typescript": "~5.8.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# Change Log
|
||||
|
||||
## 0.8.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 6830118: Add React 19 to peer deps
|
||||
|
||||
## 0.7.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
# react-dock-demo
|
||||
|
||||
## 0.1.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6830118]
|
||||
- react-dock@0.8.0
|
||||
|
||||
## 0.1.6
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"private": true,
|
||||
"name": "react-dock-demo",
|
||||
"version": "0.1.6",
|
||||
"version": "0.1.7",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"start": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack serve --open",
|
||||
|
@ -10,31 +10,30 @@
|
|||
"type-check": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^18.3.1",
|
||||
"react-bootstrap": "^2.10.4",
|
||||
"react-dock": "^0.7.0",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-icons": "^5.2.1",
|
||||
"react-is": "^18.3.1",
|
||||
"styled-components": "^5.3.11"
|
||||
"@emotion/styled": "^11.14.0",
|
||||
"react": "^19.1.0",
|
||||
"react-bootstrap": "^2.10.10",
|
||||
"react-dock": "workspace:^",
|
||||
"react-dom": "^19.1.0",
|
||||
"react-icons": "^5.5.0",
|
||||
"react-is": "^19.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-react": "^7.24.7",
|
||||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@types/node": "^20.14.14",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@types/styled-components": "^5.1.34",
|
||||
"babel-loader": "^9.1.3",
|
||||
"@babel/core": "^7.27.4",
|
||||
"@babel/preset-env": "^7.27.2",
|
||||
"@babel/preset-react": "^7.27.1",
|
||||
"@babel/preset-typescript": "^7.27.1",
|
||||
"@types/node": "^22.15.32",
|
||||
"@types/react": "^19.1.8",
|
||||
"@types/react-dom": "^19.1.6",
|
||||
"babel-loader": "^10.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
||||
"html-webpack-plugin": "^5.6.0",
|
||||
"fork-ts-checker-webpack-plugin": "^9.1.0",
|
||||
"html-webpack-plugin": "^5.6.3",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "~5.5.4",
|
||||
"webpack": "^5.93.0",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^5.0.4"
|
||||
"typescript": "~5.8.3",
|
||||
"webpack": "^5.99.9",
|
||||
"webpack-cli": "^6.0.1",
|
||||
"webpack-dev-server": "^5.2.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|||
import Button from 'react-bootstrap/Button';
|
||||
import Form from 'react-bootstrap/Form';
|
||||
import { BsX } from 'react-icons/bs';
|
||||
import styled from 'styled-components';
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
import { Dock } from 'react-dock';
|
||||
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
import eslintJs from '../../eslint.js.config.base.mjs';
|
||||
import eslintTsReact from '../../eslint.ts.react.config.base.mjs';
|
||||
import eslintTsReactJest from '../../eslint.ts.react.jest.config.base.mjs';
|
||||
|
||||
export default [
|
||||
...eslintJs,
|
||||
...eslintTsReact(import.meta.dirname),
|
||||
...eslintTsReactJest(import.meta.dirname),
|
||||
{
|
||||
ignores: ['demo', 'lib'],
|
||||
},
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
module.exports = {
|
||||
testEnvironment: 'jsdom',
|
||||
extensionsToTreatAsEsm: ['.ts', '.tsx'],
|
||||
moduleNameMapper: {
|
||||
'^(\\.{1,2}/.*)\\.js$': '$1',
|
||||
},
|
||||
transform: {
|
||||
'^.+\\.tsx?$': [
|
||||
'ts-jest',
|
||||
{ tsconfig: 'tsconfig.test.json', useESM: true },
|
||||
],
|
||||
},
|
||||
};
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "react-dock",
|
||||
"version": "0.7.0",
|
||||
"version": "0.8.0",
|
||||
"description": "Resizable dockable react component",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
@ -29,30 +29,23 @@
|
|||
"scripts": {
|
||||
"build": "tsc",
|
||||
"clean": "rimraf lib",
|
||||
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
||||
"lint": "eslint .",
|
||||
"type-check": "tsc --noEmit",
|
||||
"prepack": "pnpm run clean && pnpm run build",
|
||||
"prepublish": "pnpm run lint && pnpm run test"
|
||||
"prepublish": "pnpm run lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"lodash-es": "^4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-test-renderer": "^18.3.0",
|
||||
"jest": "^29.7.0",
|
||||
"jest-environment-jsdom": "^29.7.0",
|
||||
"react": "^18.3.1",
|
||||
"react-test-renderer": "^18.3.1",
|
||||
"@types/react": "^19.1.8",
|
||||
"react": "^19.1.0",
|
||||
"rimraf": "^6.0.1",
|
||||
"ts-jest": "^29.2.4",
|
||||
"typescript": "~5.5.4"
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^16.3.0 || ^17.0.0 || ^18.0.0",
|
||||
"react": "^16.3.0 || ^17.0.0 || ^18.0.0"
|
||||
"@types/react": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react": "^16.3.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -228,12 +228,12 @@ interface Props {
|
|||
dockHiddenStyle?: React.CSSProperties | null;
|
||||
duration: number;
|
||||
children?:
|
||||
| React.FunctionComponent<{
|
||||
| ((params: {
|
||||
position: 'left' | 'right' | 'top' | 'bottom';
|
||||
isResizing: boolean | undefined;
|
||||
size: number;
|
||||
isVisible: boolean | undefined;
|
||||
}>
|
||||
}) => ReactNode)
|
||||
| ReactNode;
|
||||
}
|
||||
|
||||
|
@ -363,14 +363,7 @@ export default class Dock extends Component<Props, State> {
|
|||
/>
|
||||
<div style={styles.dockContent}>
|
||||
{typeof children === 'function'
|
||||
? (
|
||||
children as React.FunctionComponent<{
|
||||
position: 'left' | 'right' | 'top' | 'bottom';
|
||||
isResizing: boolean | undefined;
|
||||
size: number;
|
||||
isVisible: boolean | undefined;
|
||||
}>
|
||||
)({
|
||||
? children({
|
||||
position,
|
||||
isResizing,
|
||||
size,
|
||||
|
|
|
@ -39,7 +39,8 @@ const prefixes = ['Moz', 'Webkit', 'ms', 'O'];
|
|||
function prefixProp<Value>(key: string, value: Value) {
|
||||
return prefixes.reduce<{ [key: string]: Value }>(
|
||||
(obj, pre) => (
|
||||
(obj[pre + key[0].toUpperCase() + key.substr(1)] = value), obj
|
||||
(obj[pre + key[0].toUpperCase() + key.substr(1)] = value),
|
||||
obj
|
||||
),
|
||||
{},
|
||||
);
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
import React from 'react';
|
||||
import TestRenderer from 'react-test-renderer/shallow';
|
||||
import Dock from '../src/Dock.js';
|
||||
|
||||
describe('Dock component', function () {
|
||||
it('should have shallow rendering', function () {
|
||||
const renderer = TestRenderer.createRenderer();
|
||||
const DockEl = <Dock />;
|
||||
renderer.render(DockEl);
|
||||
|
||||
const result = renderer.getRenderOutput();
|
||||
|
||||
expect(DockEl.props).toEqual({
|
||||
position: 'left',
|
||||
zIndex: 99999999,
|
||||
fluid: true,
|
||||
defaultSize: 0.3,
|
||||
dimMode: 'opaque',
|
||||
duration: 200,
|
||||
});
|
||||
expect(result.type).toBe('div');
|
||||
});
|
||||
});
|
|
@ -1,5 +1,11 @@
|
|||
# Change Log
|
||||
|
||||
## 0.20.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 6830118: Add React 19 to peer deps
|
||||
|
||||
## 0.19.0
|
||||
|
||||
### Minor Changes
|
||||
|
@ -16,7 +22,6 @@
|
|||
### Major Changes
|
||||
|
||||
- 81926f32: Remove UNSAFE method from react-json-tree
|
||||
|
||||
- Replace `shouldExpandNode` with `shouldExpandNodeInitially`. This function is now only called when a node in the tree is first rendered, when before it would update the expanded state of the node if the results of calling `shouldExpandNode` changed between renders. There is no way to replicate the old behavior exactly, but the new behavior is the intended behavior for the use cases within Redux DevTools. Please open an issue if you need a way to programatically control the expanded state of nodes.
|
||||
- Bump the minimum React version from `16.3.0` to `16.8.0` so that `react-json-tree` can use hooks.
|
||||
- Tightened TypeScript prop types to use `unknown` instead of `any` where possible and make the key path array `readonly`.
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
# react-json-tree-example
|
||||
|
||||
## 1.1.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6830118]
|
||||
- react-json-tree@0.20.0
|
||||
|
||||
## 1.1.9
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"private": true,
|
||||
"name": "react-json-tree-example",
|
||||
"version": "1.1.9",
|
||||
"version": "1.1.10",
|
||||
"description": "React-Json-Tree example",
|
||||
"homepage": "https://github.com/reduxjs/redux-devtools/tree/master/packages/react-json-tree/examples",
|
||||
"bugs": {
|
||||
|
@ -19,28 +19,28 @@
|
|||
"type-check": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"immutable": "^4.3.7",
|
||||
"react": "^18.3.1",
|
||||
"react-base16-styling": "^0.10.0",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-json-tree": "^0.19.0"
|
||||
"immutable": "^5.1.3",
|
||||
"react": "^19.1.0",
|
||||
"react-base16-styling": "workspace:^",
|
||||
"react-dom": "^19.1.0",
|
||||
"react-json-tree": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-react": "^7.24.7",
|
||||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@types/node": "^20.14.14",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"babel-loader": "^9.1.3",
|
||||
"@babel/core": "^7.27.4",
|
||||
"@babel/preset-env": "^7.27.2",
|
||||
"@babel/preset-react": "^7.27.1",
|
||||
"@babel/preset-typescript": "^7.27.1",
|
||||
"@types/node": "^22.15.32",
|
||||
"@types/react": "^19.1.8",
|
||||
"@types/react-dom": "^19.1.6",
|
||||
"babel-loader": "^10.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
||||
"html-webpack-plugin": "^5.6.0",
|
||||
"fork-ts-checker-webpack-plugin": "^9.1.0",
|
||||
"html-webpack-plugin": "^5.6.3",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "~5.5.4",
|
||||
"webpack": "^5.93.0",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^5.0.4"
|
||||
"typescript": "~5.8.3",
|
||||
"webpack": "^5.99.9",
|
||||
"webpack-cli": "^6.0.1",
|
||||
"webpack-dev-server": "^5.2.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "react-json-tree",
|
||||
"version": "0.19.0",
|
||||
"version": "0.20.0",
|
||||
"description": "React JSON Viewer Component, Extracted from redux-devtools",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
@ -40,22 +40,20 @@
|
|||
"prepublish": "pnpm run lint && pnpm run test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/lodash": "^4.17.7",
|
||||
"react-base16-styling": "^0.10.0"
|
||||
"@types/lodash": "^4.17.18",
|
||||
"react-base16-styling": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-test-renderer": "^18.3.0",
|
||||
"jest": "^29.7.0",
|
||||
"react": "^18.3.1",
|
||||
"react-test-renderer": "^18.3.1",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/react": "^19.1.8",
|
||||
"jest": "^30.0.2",
|
||||
"react": "^19.1.0",
|
||||
"rimraf": "^6.0.1",
|
||||
"ts-jest": "^29.2.4",
|
||||
"typescript": "~5.5.4"
|
||||
"ts-jest": "^29.4.0",
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
||||
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
import React from 'react';
|
||||
import TestRenderer from 'react-test-renderer/shallow';
|
||||
|
||||
import { JSONTree } from '../src/index.js';
|
||||
import JSONNode from '../src/JSONNode.js';
|
||||
|
||||
const BASIC_DATA = { a: 1, b: 'c' };
|
||||
|
||||
function render(component: React.ReactElement) {
|
||||
const renderer = TestRenderer.createRenderer();
|
||||
renderer.render(component);
|
||||
return renderer.getRenderOutput();
|
||||
}
|
||||
|
||||
describe('JSONTree', () => {
|
||||
it('should render basic tree', () => {
|
||||
const result = render(<JSONTree data={BASIC_DATA} />);
|
||||
|
||||
expect(result.type).toBe('ul');
|
||||
expect(result.props.children.type.name).toBe(JSONNode.name);
|
||||
});
|
||||
});
|
|
@ -1,5 +1,45 @@
|
|||
# @redux-devtools/app-core
|
||||
|
||||
## 1.1.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [17b55ef]
|
||||
- @redux-devtools/rtk-query-monitor@5.2.0
|
||||
|
||||
## 1.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [91f21b2]
|
||||
- @redux-devtools/core@4.1.1
|
||||
- @redux-devtools/chart-monitor@5.1.1
|
||||
- @redux-devtools/inspector-monitor@6.1.1
|
||||
- @redux-devtools/inspector-monitor-test-tab@4.1.1
|
||||
- @redux-devtools/inspector-monitor-trace-tab@4.1.1
|
||||
- @redux-devtools/log-monitor@5.1.1
|
||||
- @redux-devtools/rtk-query-monitor@5.1.1
|
||||
- @redux-devtools/slider-monitor@5.1.1
|
||||
|
||||
## 1.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 6830118: Add React 19 to peer deps
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6830118]
|
||||
- @redux-devtools/chart-monitor@6.0.0
|
||||
- @redux-devtools/inspector-monitor-test-tab@5.0.0
|
||||
- @redux-devtools/inspector-monitor-trace-tab@5.0.0
|
||||
- @redux-devtools/inspector-monitor@7.0.0
|
||||
- @redux-devtools/log-monitor@6.0.0
|
||||
- @redux-devtools/rtk-query-monitor@6.0.0
|
||||
- @redux-devtools/slider-monitor@6.0.0
|
||||
- @redux-devtools/ui@1.4.0
|
||||
- @redux-devtools/core@4.1.0
|
||||
|
||||
## 1.0.0
|
||||
|
||||
### Major Changes
|
||||
|
|
|
@ -10,6 +10,6 @@ module.exports = {
|
|||
'^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
|
||||
},
|
||||
transformIgnorePatterns: [
|
||||
'node_modules/(?!.pnpm|@babel/code-frame|@babel/highlight|@babel/helper-validator-identifier|chalk|d3|dateformat|delaunator|internmap|jsondiffpatch|lodash-es|nanoid|robust-predicates|uuid)',
|
||||
'node_modules/(?!.pnpm|@babel/code-frame|@babel/highlight|@babel/helper-validator-identifier|chalk|color|d3|dateformat|delaunator|internmap|jsondiffpatch|lodash-es|nanoid|robust-predicates|uuid)',
|
||||
],
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@redux-devtools/app-core",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.2",
|
||||
"description": "Redux DevTools app core",
|
||||
"homepage": "https://github.com/reduxjs/redux-devtools/tree/master/packages/redux-devtools-app-core",
|
||||
"bugs": {
|
||||
|
@ -35,69 +35,67 @@
|
|||
"prepublish": "pnpm run type-check && pnpm run lint && pnpm run test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.25.0",
|
||||
"@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",
|
||||
"@babel/runtime": "^7.27.6",
|
||||
"@redux-devtools/chart-monitor": "workspace:^",
|
||||
"@redux-devtools/core": "workspace:^",
|
||||
"@redux-devtools/inspector-monitor": "workspace:^",
|
||||
"@redux-devtools/inspector-monitor-test-tab": "workspace:^",
|
||||
"@redux-devtools/inspector-monitor-trace-tab": "workspace:^",
|
||||
"@redux-devtools/log-monitor": "workspace:^",
|
||||
"@redux-devtools/rtk-query-monitor": "workspace:^",
|
||||
"@redux-devtools/slider-monitor": "workspace:^",
|
||||
"@redux-devtools/ui": "workspace:^",
|
||||
"d3-state-visualizer": "workspace:^",
|
||||
"javascript-stringify": "^2.1.0",
|
||||
"jsan": "^3.1.14",
|
||||
"jsondiffpatch": "^0.6.0",
|
||||
"react-icons": "^5.2.1",
|
||||
"react-is": "^18.3.1"
|
||||
"jsondiffpatch": "^0.7.3",
|
||||
"react-icons": "^5.5.0",
|
||||
"react-is": "^19.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.24.8",
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/eslint-parser": "^7.25.1",
|
||||
"@babel/plugin-transform-runtime": "^7.24.7",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-react": "^7.24.7",
|
||||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@emotion/react": "^11.13.0",
|
||||
"@reduxjs/toolkit": "^2.2.7",
|
||||
"@rjsf/core": "^4.2.3",
|
||||
"@babel/cli": "^7.27.2",
|
||||
"@babel/core": "^7.27.4",
|
||||
"@babel/eslint-parser": "^7.27.5",
|
||||
"@babel/plugin-transform-runtime": "^7.27.4",
|
||||
"@babel/preset-env": "^7.27.2",
|
||||
"@babel/preset-react": "^7.27.1",
|
||||
"@babel/preset-typescript": "^7.27.1",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.0",
|
||||
"@reduxjs/toolkit": "^2.8.2",
|
||||
"@rjsf/core": "^5.24.12",
|
||||
"@testing-library/dom": "^10.4.0",
|
||||
"@testing-library/jest-dom": "^6.4.8",
|
||||
"@testing-library/react": "^16.0.0",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@testing-library/jest-dom": "^6.6.3",
|
||||
"@testing-library/react": "^16.3.0",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/jsan": "^3.1.5",
|
||||
"@types/json-schema": "^7.0.15",
|
||||
"@types/node": "^20.14.14",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@types/styled-components": "^5.1.34",
|
||||
"@types/node": "^22.15.32",
|
||||
"@types/react": "^19.1.8",
|
||||
"@types/react-dom": "^19.1.6",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild": "^0.23.0",
|
||||
"jest": "^29.7.0",
|
||||
"jest-environment-jsdom": "^29.7.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-redux": "^9.1.2",
|
||||
"esbuild": "^0.25.5",
|
||||
"jest": "^30.0.2",
|
||||
"jest-environment-jsdom": "^30.0.2",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react-redux": "^9.2.0",
|
||||
"redux": "^5.0.1",
|
||||
"redux-persist": "^6.0.0",
|
||||
"rimraf": "^6.0.1",
|
||||
"styled-components": "^5.3.11",
|
||||
"ts-jest": "^29.2.4",
|
||||
"ts-jest": "^29.4.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "~5.5.4"
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@emotion/react": "^11.13.0",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.0",
|
||||
"@reduxjs/toolkit": "^1.0.0 || ^2.0.0",
|
||||
"@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",
|
||||
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.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"
|
||||
"redux-persist": "^6.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ interface ChangeThemeFormData {
|
|||
readonly colorPreference: 'auto' | 'light' | 'dark';
|
||||
}
|
||||
interface ChangeThemeData {
|
||||
readonly formData: ChangeThemeFormData;
|
||||
readonly formData?: ChangeThemeFormData;
|
||||
}
|
||||
export interface ChangeThemeAction {
|
||||
readonly type: typeof CHANGE_THEME;
|
||||
|
@ -64,7 +64,7 @@ export interface ChangeThemeAction {
|
|||
readonly colorPreference: 'auto' | 'light' | 'dark';
|
||||
}
|
||||
export function changeTheme(data: ChangeThemeData): ChangeThemeAction {
|
||||
return { type: CHANGE_THEME, ...data.formData };
|
||||
return { type: CHANGE_THEME, ...data.formData! };
|
||||
}
|
||||
|
||||
interface ChangeStateTreeSettingsFormData {
|
||||
|
@ -73,7 +73,7 @@ interface ChangeStateTreeSettingsFormData {
|
|||
}
|
||||
|
||||
interface ChangeStateTreeSettingsData {
|
||||
readonly formData: ChangeStateTreeSettingsFormData;
|
||||
readonly formData?: ChangeStateTreeSettingsFormData;
|
||||
}
|
||||
|
||||
export interface ChangeStateTreeSettingsAction {
|
||||
|
@ -85,7 +85,7 @@ export interface ChangeStateTreeSettingsAction {
|
|||
export function changeStateTreeSettings(
|
||||
data: ChangeStateTreeSettingsData,
|
||||
): ChangeStateTreeSettingsAction {
|
||||
return { type: CHANGE_STATE_TREE_SETTINGS, ...data.formData };
|
||||
return { type: CHANGE_STATE_TREE_SETTINGS, ...data.formData! };
|
||||
}
|
||||
|
||||
export interface InitMonitorAction {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Component } from 'react';
|
||||
import { withTheme } from 'styled-components';
|
||||
import { withTheme } from '@emotion/react';
|
||||
import { LiftedAction, LiftedState } from '@redux-devtools/core';
|
||||
import { Action } from 'redux';
|
||||
import getMonitor from '../utils/getMonitor';
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
// Based on https://github.com/YoruNoHikage/redux-devtools-dispatch
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { Button, Select, Editor, Toolbar } from '@redux-devtools/ui';
|
||||
import styled from '@emotion/styled';
|
||||
import {
|
||||
Button,
|
||||
Select,
|
||||
Editor,
|
||||
Toolbar,
|
||||
Base16Theme,
|
||||
} from '@redux-devtools/ui';
|
||||
import { connect, ResolveThunks } from 'react-redux';
|
||||
import { dispatchRemotely } from '../../actions';
|
||||
import { Options } from '../../reducers/instances';
|
||||
|
@ -12,7 +18,7 @@ export const DispatcherContainer = styled.div`
|
|||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
padding-top: 2px;
|
||||
background: ${(props) => props.theme.base01};
|
||||
background: ${(props: { theme?: Base16Theme }) => props.theme!.base01};
|
||||
`;
|
||||
|
||||
export const CodeContainer = styled.div`
|
||||
|
@ -24,7 +30,7 @@ export const CodeContainer = styled.div`
|
|||
export const ActionContainer = styled.div`
|
||||
display: table;
|
||||
width: 100%;
|
||||
color: ${(props) => props.theme.base06};
|
||||
color: ${(props: { theme?: Base16Theme }) => props.theme!.base06};
|
||||
|
||||
> div {
|
||||
display: table-row;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component, RefCallback } from 'react';
|
||||
import { connect, ResolveThunks } from 'react-redux';
|
||||
import { withTheme } from 'styled-components';
|
||||
import { withTheme } from '@emotion/react';
|
||||
import { tree } from 'd3-state-visualizer';
|
||||
import type { HierarchyPointNode, Node, Options } from 'd3-state-visualizer';
|
||||
import { getPath } from '../ChartMonitorWrapper';
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import React, { Component } from 'react';
|
||||
import type { Delta } from 'jsondiffpatch';
|
||||
import * as htmlFormatter from 'jsondiffpatch/formatters/html';
|
||||
import styled, { ThemedStyledProps } from 'styled-components';
|
||||
import { effects, Theme } from '@redux-devtools/ui';
|
||||
import styled from '@emotion/styled';
|
||||
import { Base16Theme, effects } from '@redux-devtools/ui';
|
||||
|
||||
export const StyledContainer = styled.div`
|
||||
.jsondiffpatch-delta {
|
||||
|
@ -19,8 +19,7 @@ export const StyledContainer = styled.div`
|
|||
padding: 2px 3px;
|
||||
border-radius: 3px;
|
||||
position: relative;
|
||||
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
|
||||
color: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base07};
|
||||
color: ${(props: { theme?: Base16Theme }) => props.theme!.base07};
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
@ -44,25 +43,22 @@ export const StyledContainer = styled.div`
|
|||
.jsondiffpatch-modified .jsondiffpatch-right-value:before {
|
||||
vertical-align: top;
|
||||
padding: 2px;
|
||||
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
|
||||
color: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base0E};
|
||||
color: ${(props) => props.theme.base0E};
|
||||
content: ' => ';
|
||||
}
|
||||
|
||||
.jsondiffpatch-added .jsondiffpatch-value pre,
|
||||
.jsondiffpatch-modified .jsondiffpatch-right-value pre,
|
||||
.jsondiffpatch-textdiff-added {
|
||||
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
|
||||
background: ${(props: ThemedStyledProps<{}, Theme>) =>
|
||||
effects.color(props.theme.base0B, 'alpha', 0.2)};
|
||||
background: ${(props: { theme?: Base16Theme }) =>
|
||||
effects.color(props.theme!.base0B, 'alpha', 0.2)};
|
||||
}
|
||||
|
||||
.jsondiffpatch-deleted pre,
|
||||
.jsondiffpatch-modified .jsondiffpatch-left-value pre,
|
||||
.jsondiffpatch-textdiff-deleted {
|
||||
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
|
||||
background: ${(props: ThemedStyledProps<{}, Theme>) =>
|
||||
effects.color(props.theme.base08, 'alpha', 0.2)};
|
||||
background: ${(props: { theme?: Base16Theme }) =>
|
||||
effects.color(props.theme!.base08, 'alpha', 0.2)};
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
|
@ -129,14 +125,12 @@ export const StyledContainer = styled.div`
|
|||
padding: 2px 0;
|
||||
padding-right: 5px;
|
||||
vertical-align: top;
|
||||
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
|
||||
color: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base0D};
|
||||
color: ${(props) => props.theme.base0D};
|
||||
}
|
||||
|
||||
.jsondiffpatch-property-name:after {
|
||||
content: ': ';
|
||||
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
|
||||
color: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base07};
|
||||
color: ${(props) => props.theme.base07};
|
||||
}
|
||||
|
||||
.jsondiffpatch-child-node-type-array > .jsondiffpatch-property-name:after {
|
||||
|
@ -172,8 +166,7 @@ export const StyledContainer = styled.div`
|
|||
}
|
||||
|
||||
.jsondiffpatch-value pre:after {
|
||||
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
|
||||
color: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base07};
|
||||
color: ${(props) => props.theme.base07};
|
||||
content: ',';
|
||||
}
|
||||
|
||||
|
@ -196,8 +189,7 @@ export const StyledContainer = styled.div`
|
|||
|
||||
.jsondiffpatch-moved .jsondiffpatch-moved-destination {
|
||||
display: inline-block;
|
||||
${/* eslint-disable-next-line @typescript-eslint/no-empty-object-type */ ''}
|
||||
background: ${(props: ThemedStyledProps<{}, Theme>) => props.theme.base0A};
|
||||
background: ${(props) => props.theme.base0A};
|
||||
}
|
||||
|
||||
.jsondiffpatch-moved .jsondiffpatch-moved-destination:before {
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
import React, { Component } from 'react';
|
||||
import styled, { withTheme } from 'styled-components';
|
||||
import styled from '@emotion/styled';
|
||||
import { withTheme } from '@emotion/react';
|
||||
import { SliderMonitor } from '@redux-devtools/slider-monitor';
|
||||
import { LiftedAction } from '@redux-devtools/core';
|
||||
import { Action } from 'redux';
|
||||
import { ThemeFromProvider } from '@redux-devtools/ui';
|
||||
import { Base16Theme, ThemeFromProvider } from '@redux-devtools/ui';
|
||||
import { State } from '../../reducers/instances';
|
||||
|
||||
const SliderWrapper = styled.div`
|
||||
border-color: ${(props) => props.theme.base02};
|
||||
border-color: ${(props: { theme?: Base16Theme }) => props.theme!.base02};
|
||||
border-style: solid;
|
||||
border-width: 1px 0;
|
||||
`;
|
||||
|
|
|
@ -1,5 +1,29 @@
|
|||
# Change Log
|
||||
|
||||
## 6.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @redux-devtools/app-core@1.1.2
|
||||
|
||||
## 6.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @redux-devtools/app-core@1.1.1
|
||||
|
||||
## 6.2.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 6830118: Add React 19 to peer deps
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6830118]
|
||||
- @redux-devtools/app-core@1.1.0
|
||||
- @redux-devtools/ui@1.4.0
|
||||
|
||||
## 6.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -11,6 +11,7 @@ Also it's a react component you can use to build amazing monitor applications li
|
|||
- [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.
|
||||
- [intellij-redux-devtools](https://github.com/takanuva15/intellij-redux-devtools) - Used in IntelliJ IDEA.
|
||||
|
||||
### Usage
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@redux-devtools/app",
|
||||
"version": "6.1.0",
|
||||
"version": "6.2.2",
|
||||
"description": "Redux DevTools app",
|
||||
"homepage": "https://github.com/reduxjs/redux-devtools/tree/master/packages/redux-devtools-app",
|
||||
"bugs": {
|
||||
|
@ -39,63 +39,59 @@
|
|||
"prepublish": "pnpm run type-check && pnpm run lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@redux-devtools/app-core": "^1.0.0",
|
||||
"@redux-devtools/ui": "^1.3.2",
|
||||
"@redux-devtools/app-core": "workspace:^",
|
||||
"@redux-devtools/ui": "workspace:^",
|
||||
"localforage": "^1.10.0",
|
||||
"jsan": "^3.1.14",
|
||||
"lodash": "^4.17.21",
|
||||
"react-redux": "^9.1.2",
|
||||
"react-redux": "^9.2.0",
|
||||
"redux": "^5.0.1",
|
||||
"redux-persist": "^6.0.0",
|
||||
"socketcluster-client": "^19.2.1"
|
||||
"socketcluster-client": "^19.2.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.24.8",
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/eslint-parser": "^7.25.1",
|
||||
"@babel/plugin-transform-runtime": "^7.24.7",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-react": "^7.24.7",
|
||||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@emotion/react": "^11.13.0",
|
||||
"@reduxjs/toolkit": "^2.2.7",
|
||||
"@rjsf/core": "^4.2.3",
|
||||
"@babel/cli": "^7.27.2",
|
||||
"@babel/core": "^7.27.4",
|
||||
"@babel/eslint-parser": "^7.27.5",
|
||||
"@babel/plugin-transform-runtime": "^7.27.4",
|
||||
"@babel/preset-env": "^7.27.2",
|
||||
"@babel/preset-react": "^7.27.1",
|
||||
"@babel/preset-typescript": "^7.27.1",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.0",
|
||||
"@reduxjs/toolkit": "^2.8.2",
|
||||
"@rjsf/core": "^5.24.12",
|
||||
"@types/jsan": "^3.1.5",
|
||||
"@types/json-schema": "^7.0.15",
|
||||
"@types/lodash": "^4.17.7",
|
||||
"@types/node": "^20.14.14",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@types/node": "^22.15.32",
|
||||
"@types/react": "^19.1.8",
|
||||
"@types/react-dom": "^19.1.6",
|
||||
"@types/socketcluster-client": "^19.1.0",
|
||||
"@types/styled-components": "^5.1.34",
|
||||
"@types/webpack-env": "^1.18.5",
|
||||
"babel-loader": "^9.1.3",
|
||||
"@types/webpack-env": "^1.18.8",
|
||||
"babel-loader": "^10.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"css-loader": "^7.1.2",
|
||||
"esbuild": "^0.23.0",
|
||||
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
||||
"globals": "^15.9.0",
|
||||
"esbuild": "^0.25.5",
|
||||
"fork-ts-checker-webpack-plugin": "^9.1.0",
|
||||
"globals": "^16.2.0",
|
||||
"html-loader": "^5.1.0",
|
||||
"html-webpack-plugin": "^5.6.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"html-webpack-plugin": "^5.6.3",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"rimraf": "^6.0.1",
|
||||
"style-loader": "^4.0.0",
|
||||
"styled-components": "^5.3.11",
|
||||
"ts-jest": "^29.2.4",
|
||||
"ts-jest": "^29.4.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "~5.5.4",
|
||||
"webpack": "^5.93.0",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^5.0.4"
|
||||
"typescript": "~5.8.3",
|
||||
"webpack": "^5.99.9",
|
||||
"webpack-cli": "^6.0.1",
|
||||
"webpack-dev-server": "^5.2.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@emotion/react": "^11.13.0",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.0",
|
||||
"@reduxjs/toolkit": "^1.0.0 || ^2.0.0",
|
||||
"@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",
|
||||
"styled-components": "^5.3.11"
|
||||
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
import React, { Component } from 'react';
|
||||
import { connect, ResolveThunks } from 'react-redux';
|
||||
import { Container, Form } from '@redux-devtools/ui';
|
||||
import {
|
||||
JSONSchema7Definition,
|
||||
JSONSchema7Type,
|
||||
JSONSchema7TypeName,
|
||||
} from 'json-schema';
|
||||
import { JSONSchema7Definition, JSONSchema7TypeName } from 'json-schema';
|
||||
import { ConnectionType, saveSocketSettings } from '../../actions';
|
||||
import { StoreState } from '../../reducers';
|
||||
import { ConnectionStateOptions } from '../../reducers/connection';
|
||||
import { IChangeEvent, ISubmitEvent } from '@rjsf/core';
|
||||
import { IChangeEvent } from '@rjsf/core';
|
||||
|
||||
declare module 'json-schema' {
|
||||
export interface JSONSchema7 {
|
||||
|
@ -104,13 +100,13 @@ export class Connection extends Component<Props, State> {
|
|||
}
|
||||
}
|
||||
|
||||
handleSave = (data: ISubmitEvent<FormData>) => {
|
||||
this.props.saveSettings(data.formData);
|
||||
handleSave = (data: IChangeEvent<FormData>) => {
|
||||
this.props.saveSettings(data.formData!);
|
||||
this.setState({ changed: false });
|
||||
};
|
||||
|
||||
handleChange = (data: IChangeEvent<FormData>) => {
|
||||
const formData = data.formData;
|
||||
const formData = data.formData!;
|
||||
const type = formData.type;
|
||||
if (type !== this.state.type) {
|
||||
this.setState(this.setFormData(type, true));
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import difference from 'lodash/difference';
|
||||
import omit from 'lodash/omit';
|
||||
import {
|
||||
DispatchAction,
|
||||
InstancesState,
|
||||
|
@ -11,10 +9,18 @@ import { Dispatch, MiddlewareAPI } from 'redux';
|
|||
import { StoreActionWithoutLiftedAction } from '../actions';
|
||||
|
||||
export function sweep(state: State): State {
|
||||
const skippedActionIdsSet = new Set(state.skippedActionIds);
|
||||
|
||||
return {
|
||||
...state,
|
||||
actionsById: omit(state.actionsById, state.skippedActionIds),
|
||||
stagedActionIds: difference(state.stagedActionIds, state.skippedActionIds),
|
||||
actionsById: Object.fromEntries(
|
||||
Object.entries(state.actionsById).filter(
|
||||
([actionId]) => !skippedActionIdsSet.has(parseInt(actionId, 10)),
|
||||
),
|
||||
),
|
||||
stagedActionIds: state.stagedActionIds.filter(
|
||||
(actionId) => !skippedActionIdsSet.has(actionId),
|
||||
),
|
||||
skippedActionIds: [],
|
||||
currentStateIndex: Math.min(
|
||||
state.currentStateIndex,
|
||||
|
|
|
@ -1,5 +1,23 @@
|
|||
# Change Log
|
||||
|
||||
## 5.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [91f21b2]
|
||||
- @redux-devtools/core@4.1.1
|
||||
|
||||
## 5.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 6830118: Add React 19 to peer deps
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6830118]
|
||||
- @redux-devtools/core@4.1.0
|
||||
|
||||
## 5.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
@ -48,7 +66,6 @@
|
|||
### Major Changes
|
||||
|
||||
- b323f77d: Upgrade D3
|
||||
|
||||
- Split `style` option into `chartStyles`, `nodeStyleOptions`, `textStyleOptions`, and `linkStyles`.
|
||||
- The shape of the argument passed to the `onClickText` option has been updated.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@redux-devtools/chart-monitor",
|
||||
"version": "5.0.2",
|
||||
"version": "5.1.1",
|
||||
"description": "Chart monitor for Redux DevTools",
|
||||
"keywords": [
|
||||
"redux",
|
||||
|
@ -39,30 +39,30 @@
|
|||
"prepublish": "pnpm run type-check && pnpm run lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.25.0",
|
||||
"d3-state-visualizer": "^3.0.0",
|
||||
"@babel/runtime": "^7.27.6",
|
||||
"d3-state-visualizer": "workspace:^",
|
||||
"deepmerge": "^4.3.1",
|
||||
"react-base16-styling": "^0.10.0"
|
||||
"react-base16-styling": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.24.8",
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/eslint-parser": "^7.25.1",
|
||||
"@babel/plugin-transform-runtime": "^7.24.7",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-react": "^7.24.7",
|
||||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@redux-devtools/core": "^4.0.0",
|
||||
"@types/react": "^18.3.3",
|
||||
"react": "^18.3.1",
|
||||
"@babel/cli": "^7.27.2",
|
||||
"@babel/core": "^7.27.4",
|
||||
"@babel/eslint-parser": "^7.27.5",
|
||||
"@babel/plugin-transform-runtime": "^7.27.4",
|
||||
"@babel/preset-env": "^7.27.2",
|
||||
"@babel/preset-react": "^7.27.1",
|
||||
"@babel/preset-typescript": "^7.27.1",
|
||||
"@redux-devtools/core": "workspace:^",
|
||||
"@types/react": "^19.1.8",
|
||||
"react": "^19.1.0",
|
||||
"redux": "^5.0.1",
|
||||
"rimraf": "^6.0.1",
|
||||
"typescript": "~5.5.4"
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@redux-devtools/core": "^4.0.0",
|
||||
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
||||
"react": "^16.8.4 || ^17.0.0 || ^18.0.0",
|
||||
"@redux-devtools/core": "workspace:^",
|
||||
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"redux": "^3.4.0 || ^4.0.0 || ^5.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,24 @@
|
|||
# Change Log
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @redux-devtools/app@6.2.2
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @redux-devtools/app@6.2.1
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6830118]
|
||||
- @redux-devtools/app@6.2.0
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@redux-devtools/cli",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.3",
|
||||
"description": "CLI for remote debugging with Redux DevTools.",
|
||||
"homepage": "https://github.com/reduxjs/redux-devtools/tree/master/packages/redux-devtools-cli",
|
||||
"bugs": {
|
||||
|
@ -41,56 +41,56 @@
|
|||
"node": ">= 18.12.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@apollo/server": "^4.10.5",
|
||||
"@emotion/react": "^11.13.0",
|
||||
"@redux-devtools/app": "^6.0.0",
|
||||
"@reduxjs/toolkit": "^2.2.7",
|
||||
"@types/react": "^18.3.3",
|
||||
"body-parser": "^1.20.2",
|
||||
"chalk": "^5.3.0",
|
||||
"@apollo/server": "^4.12.2",
|
||||
"@as-integrations/express5": "^1.1.0",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.0",
|
||||
"@redux-devtools/app": "workspace:^",
|
||||
"@reduxjs/toolkit": "^2.8.2",
|
||||
"@types/react": "^19.1.8",
|
||||
"body-parser": "^2.2.0",
|
||||
"chalk": "^5.4.1",
|
||||
"cors": "^2.8.5",
|
||||
"cross-spawn": "^7.0.3",
|
||||
"electron": "^31.3.1",
|
||||
"express": "^4.19.2",
|
||||
"cross-spawn": "^7.0.6",
|
||||
"electron": "^31.7.7",
|
||||
"express": "^5.1.0",
|
||||
"get-port": "^7.1.0",
|
||||
"graphql": "^16.9.0",
|
||||
"graphql": "^16.11.0",
|
||||
"knex": "^3.1.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"minimist": "^1.2.8",
|
||||
"morgan": "^1.10.0",
|
||||
"open": "^10.1.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-is": "^18.3.1",
|
||||
"semver": "^7.6.3",
|
||||
"socketcluster-server": "^19.1.0",
|
||||
"open": "^10.1.2",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react-is": "^19.1.0",
|
||||
"semver": "^7.7.2",
|
||||
"socketcluster-server": "^19.2.0",
|
||||
"sqlite3": "^5.1.7",
|
||||
"styled-components": "^5.3.11",
|
||||
"uuid": "^10.0.0"
|
||||
"uuid": "^11.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/body-parser": "^1.19.5",
|
||||
"@types/cors": "^2.8.17",
|
||||
"@types/body-parser": "^1.19.6",
|
||||
"@types/cors": "^2.8.19",
|
||||
"@types/cross-spawn": "^6.0.6",
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/express": "^5.0.3",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/minimist": "^1.2.5",
|
||||
"@types/morgan": "^1.9.9",
|
||||
"@types/node": "^20.14.14",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@types/morgan": "^1.9.10",
|
||||
"@types/node": "^22.15.32",
|
||||
"@types/semver": "^7.7.0",
|
||||
"@types/socketcluster-client": "^19.1.0",
|
||||
"@types/socketcluster-server": "^19.0.1",
|
||||
"@types/styled-components": "^5.1.34",
|
||||
"@types/supertest": "^6.0.2",
|
||||
"@types/supertest": "^6.0.3",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"globals": "^15.9.0",
|
||||
"jest": "^29.7.0",
|
||||
"globals": "^16.2.0",
|
||||
"jest": "^30.0.2",
|
||||
"ncp": "^2.0.0",
|
||||
"rimraf": "^6.0.1",
|
||||
"socketcluster-client": "^19.2.1",
|
||||
"supertest": "^7.0.0",
|
||||
"ts-jest": "^29.2.4",
|
||||
"typescript": "~5.5.4"
|
||||
"socketcluster-client": "^19.2.7",
|
||||
"supertest": "^7.1.1",
|
||||
"ts-jest": "^29.4.0",
|
||||
"typescript": "~5.8.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ export default async function (argv: { [arg: string]: any }): Promise<{
|
|||
const agServer = socketClusterServer.attach(httpServer, options);
|
||||
|
||||
const app = express();
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
httpServer.on('request', app);
|
||||
const store = createStore(options);
|
||||
app.use(routes(options, store, agServer));
|
||||
|
@ -76,7 +77,7 @@ export default async function (argv: { [arg: string]: any }): Promise<{
|
|||
});
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.error(error); // eslint-disable-line no-console
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +111,7 @@ export default async function (argv: { [arg: string]: any }): Promise<{
|
|||
request.end(data);
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.error(error); // eslint-disable-line no-console
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
@ -118,7 +119,6 @@ export default async function (argv: { [arg: string]: any }): Promise<{
|
|||
for await (const data of socket.listener('disconnect')) {
|
||||
const channel = agServer.exchange.channel('sc-' + socket.id);
|
||||
channel.unsubscribe();
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
void agServer.exchange.transmitPublish(channelToEmit!, {
|
||||
id: socket.id,
|
||||
type: 'DISCONNECTED',
|
||||
|
|
|
@ -62,13 +62,14 @@ function routes(
|
|||
'/graphql',
|
||||
cors<cors.CorsRequest>(),
|
||||
bodyParser.json(),
|
||||
// @ts-expect-error https://github.com/apollo-server-integrations/apollo-server-integration-express5/issues/9
|
||||
expressMiddleware(server, {
|
||||
context: () => Promise.resolve({ store }),
|
||||
}),
|
||||
);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error); // eslint-disable-line no-console
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
serveUmdModule('react');
|
||||
|
@ -76,10 +77,9 @@ function routes(
|
|||
serveUmdModule('@redux-devtools/app');
|
||||
|
||||
app.get('/port.js', function (req, res) {
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||
res.send(`reduxDevToolsPort = ${options.port}`);
|
||||
});
|
||||
app.get('*', function (req, res) {
|
||||
app.get('/{*splat}', function (req, res) {
|
||||
res.sendFile(
|
||||
path.join(
|
||||
path.dirname(fileURLToPath(import.meta.url)),
|
||||
|
@ -93,7 +93,10 @@ function routes(
|
|||
app.use(bodyParser.urlencoded({ limit: limit, extended: false }));
|
||||
|
||||
app.post('/', function (req, res) {
|
||||
if (!req.body) return res.status(404).end();
|
||||
if (!req.body) {
|
||||
res.status(404).end();
|
||||
return;
|
||||
}
|
||||
switch (req.body.op) {
|
||||
case 'get':
|
||||
store
|
||||
|
@ -102,7 +105,7 @@ function routes(
|
|||
res.send(r || {});
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.error(error); // eslint-disable-line no-console
|
||||
console.error(error);
|
||||
res.sendStatus(500);
|
||||
});
|
||||
break;
|
||||
|
@ -113,7 +116,7 @@ function routes(
|
|||
res.send(r);
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.error(error); // eslint-disable-line no-console
|
||||
console.error(error);
|
||||
res.sendStatus(500);
|
||||
});
|
||||
break;
|
||||
|
@ -131,7 +134,7 @@ function routes(
|
|||
});
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.error(error); // eslint-disable-line no-console
|
||||
console.error(error);
|
||||
res.status(500).send({});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,5 +1,24 @@
|
|||
# Change Log
|
||||
|
||||
## 4.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [91f21b2]
|
||||
- @redux-devtools/core@4.1.1
|
||||
|
||||
## 4.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 6830118: Add React 19 to peer deps
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6830118]
|
||||
- react-dock@0.8.0
|
||||
- @redux-devtools/core@4.1.0
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@redux-devtools/dock-monitor",
|
||||
"version": "4.0.1",
|
||||
"version": "4.1.1",
|
||||
"description": "A resizable and movable dock for Redux DevTools monitors",
|
||||
"keywords": [
|
||||
"redux",
|
||||
|
@ -41,30 +41,30 @@
|
|||
"prepublish": "pnpm run type-check && pnpm run lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.25.0",
|
||||
"@babel/runtime": "^7.27.6",
|
||||
"parse-key": "^0.2.1",
|
||||
"react-dock": "^0.7.0"
|
||||
"react-dock": "workspace:^"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.24.8",
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/eslint-parser": "^7.25.1",
|
||||
"@babel/plugin-transform-runtime": "^7.24.7",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-react": "^7.24.7",
|
||||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@redux-devtools/core": "^4.0.0",
|
||||
"@babel/cli": "^7.27.2",
|
||||
"@babel/core": "^7.27.4",
|
||||
"@babel/eslint-parser": "^7.27.5",
|
||||
"@babel/plugin-transform-runtime": "^7.27.4",
|
||||
"@babel/preset-env": "^7.27.2",
|
||||
"@babel/preset-react": "^7.27.1",
|
||||
"@babel/preset-typescript": "^7.27.1",
|
||||
"@redux-devtools/core": "workspace:^",
|
||||
"@types/parse-key": "^0.2.2",
|
||||
"@types/react": "^18.3.3",
|
||||
"react": "^18.3.1",
|
||||
"@types/react": "^19.1.8",
|
||||
"react": "^19.1.0",
|
||||
"redux": "^5.0.1",
|
||||
"rimraf": "^6.0.1",
|
||||
"typescript": "~5.5.4"
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@redux-devtools/core": "^4.0.0",
|
||||
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
||||
"react": "^16.8.4 || ^17.0.0 || ^18.0.0",
|
||||
"@redux-devtools/core": "workspace:^",
|
||||
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"redux": "^3.4.0 || ^4.0.0 || ^5.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,19 +29,18 @@
|
|||
"prepublish": "pnpm run type-check && pnpm run lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.25.0",
|
||||
"immutable": "^4.3.7"
|
||||
"@babel/runtime": "^7.27.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.24.8",
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/eslint-parser": "^7.25.1",
|
||||
"@babel/plugin-transform-runtime": "^7.24.7",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@babel/cli": "^7.27.2",
|
||||
"@babel/core": "^7.27.4",
|
||||
"@babel/eslint-parser": "^7.27.5",
|
||||
"@babel/plugin-transform-runtime": "^7.27.4",
|
||||
"@babel/preset-env": "^7.27.2",
|
||||
"@babel/preset-typescript": "^7.27.1",
|
||||
"redux": "^5.0.1",
|
||||
"rimraf": "^6.0.1",
|
||||
"typescript": "~5.5.4"
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"redux": "^3.1.0 || ^4.0.0 || ^5.0.0"
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import type Immutable from 'immutable';
|
||||
import { compose } from 'redux';
|
||||
import type { Action, ActionCreator, StoreEnhancer } from 'redux';
|
||||
|
||||
|
@ -74,11 +73,11 @@ export interface EnhancerOptions {
|
|||
* Just pass the Immutable library. It will support all ImmutableJS structures. You can even export them into a file and get them back.
|
||||
* The only exception is `Record` class, for which you should pass this in addition the references to your classes in `refs`.
|
||||
*/
|
||||
immutable?: typeof Immutable;
|
||||
immutable?: unknown;
|
||||
/**
|
||||
* ImmutableJS `Record` classes used to make possible restore its instances back when importing, persisting...
|
||||
*/
|
||||
refs?: Immutable.Record.Factory<any>[];
|
||||
refs?: (new (data: any) => unknown)[];
|
||||
};
|
||||
/**
|
||||
* function which takes `action` object and id number as arguments, and should return `action` object back.
|
||||
|
|
|
@ -1,5 +1,23 @@
|
|||
# Change Log
|
||||
|
||||
## 4.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @redux-devtools/inspector-monitor@6.1.1
|
||||
|
||||
## 4.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 6830118: Add React 19 to peer deps
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6830118]
|
||||
- @redux-devtools/inspector-monitor@7.0.0
|
||||
- @redux-devtools/ui@1.4.0
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
|
|
@ -1,5 +1,26 @@
|
|||
# test-demo
|
||||
|
||||
## 0.1.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [91f21b2]
|
||||
- @redux-devtools/core@4.1.1
|
||||
- @redux-devtools/dock-monitor@4.1.1
|
||||
- @redux-devtools/inspector-monitor@6.1.1
|
||||
- @redux-devtools/inspector-monitor-test-tab@4.1.1
|
||||
|
||||
## 0.1.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6830118]
|
||||
- @redux-devtools/dock-monitor@5.0.0
|
||||
- @redux-devtools/inspector-monitor-test-tab@5.0.0
|
||||
- @redux-devtools/inspector-monitor@7.0.0
|
||||
- @redux-devtools/ui@1.4.0
|
||||
- @redux-devtools/core@4.1.0
|
||||
|
||||
## 0.1.15
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"private": true,
|
||||
"name": "test-demo",
|
||||
"version": "0.1.15",
|
||||
"version": "0.1.17",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"start": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack serve --open",
|
||||
|
@ -10,45 +10,44 @@
|
|||
"type-check": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.13.0",
|
||||
"@redux-devtools/core": "^4.0.0",
|
||||
"@redux-devtools/dock-monitor": "^4.0.0",
|
||||
"@redux-devtools/inspector-monitor": "^6.0.0",
|
||||
"@redux-devtools/inspector-monitor-test-tab": "^4.0.0",
|
||||
"@redux-devtools/ui": "^1.3.0",
|
||||
"immutable": "^4.3.7",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.0",
|
||||
"@redux-devtools/core": "workspace:^",
|
||||
"@redux-devtools/dock-monitor": "workspace:^",
|
||||
"@redux-devtools/inspector-monitor": "workspace:^",
|
||||
"@redux-devtools/inspector-monitor-test-tab": "workspace:^",
|
||||
"@redux-devtools/ui": "workspace:^",
|
||||
"immutable": "^5.1.3",
|
||||
"lodash.shuffle": "^4.2.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-is": "^18.3.1",
|
||||
"react-redux": "^9.1.2",
|
||||
"react-router-dom": "^6.26.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react-is": "^19.1.0",
|
||||
"react-redux": "^9.2.0",
|
||||
"react-router-dom": "^7.6.2",
|
||||
"redux": "^5.0.1",
|
||||
"redux-logger": "^3.0.6",
|
||||
"styled-components": "^5.3.11"
|
||||
"redux-logger": "^3.0.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-react": "^7.24.7",
|
||||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@babel/core": "^7.27.4",
|
||||
"@babel/preset-env": "^7.27.2",
|
||||
"@babel/preset-react": "^7.27.1",
|
||||
"@babel/preset-typescript": "^7.27.1",
|
||||
"@types/lodash.shuffle": "^4.2.9",
|
||||
"@types/node": "^20.14.14",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@types/node": "^22.15.32",
|
||||
"@types/react": "^19.1.8",
|
||||
"@types/react-dom": "^19.1.6",
|
||||
"@types/redux-logger": "^3.0.13",
|
||||
"@types/styled-components": "^5.1.34",
|
||||
"@types/webpack-env": "^1.18.5",
|
||||
"babel-loader": "^9.1.3",
|
||||
"@types/webpack-env": "^1.18.8",
|
||||
"babel-loader": "^10.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"css-loader": "^7.1.2",
|
||||
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
||||
"html-webpack-plugin": "^5.6.0",
|
||||
"fork-ts-checker-webpack-plugin": "^9.1.0",
|
||||
"html-webpack-plugin": "^5.6.3",
|
||||
"style-loader": "^4.0.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "~5.5.4",
|
||||
"webpack": "^5.93.0",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^5.0.4"
|
||||
"typescript": "~5.8.3",
|
||||
"webpack": "^5.99.9",
|
||||
"webpack-cli": "^6.0.1",
|
||||
"webpack-dev-server": "^5.2.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ interface Props
|
|||
}
|
||||
|
||||
function DemoApp(props: Props) {
|
||||
const timeout = useRef<number | undefined>();
|
||||
const timeout = useRef<number | undefined>(undefined);
|
||||
const location = useLocation();
|
||||
|
||||
const options = getOptions(location);
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
import Immutable from 'immutable';
|
||||
import {
|
||||
fromJS,
|
||||
Map as ImmutableMap,
|
||||
List,
|
||||
Set as ImmutableSet,
|
||||
Stack,
|
||||
Seq,
|
||||
} from 'immutable';
|
||||
import shuffle from 'lodash.shuffle';
|
||||
import { combineReducers, Reducer } from 'redux';
|
||||
|
||||
|
@ -18,17 +25,14 @@ const NESTED = {
|
|||
},
|
||||
};
|
||||
|
||||
const IMMUTABLE_NESTED = Immutable.fromJS(NESTED) as Immutable.Map<
|
||||
unknown,
|
||||
unknown
|
||||
>;
|
||||
const IMMUTABLE_NESTED = fromJS(NESTED) as ImmutableMap<unknown, unknown>;
|
||||
|
||||
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([1, 2, 3, 4, 5, 6, 7, 8]),
|
||||
const IMMUTABLE_MAP = ImmutableMap({
|
||||
map: ImmutableMap({ a: 1, b: 2, c: 3 }),
|
||||
list: List(['a', 'b', 'c']),
|
||||
set: ImmutableSet(['a', 'b', 'c']),
|
||||
stack: Stack(['a', 'b', 'c']),
|
||||
seq: Seq([1, 2, 3, 4, 5, 6, 7, 8]),
|
||||
});
|
||||
|
||||
const HUGE_ARRAY = Array.from({ length: 5000 }).map((_, key) => ({
|
||||
|
@ -37,7 +41,8 @@ const HUGE_ARRAY = Array.from({ length: 5000 }).map((_, key) => ({
|
|||
|
||||
const HUGE_OBJECT = Array.from({ length: 5000 }).reduce(
|
||||
(o: { [key: string]: string }, _, key) => (
|
||||
(o[`key ${key}`] = `item ${key}`), o
|
||||
(o[`key ${key}`] = `item ${key}`),
|
||||
o
|
||||
),
|
||||
{},
|
||||
);
|
||||
|
|
|
@ -8,5 +8,5 @@ module.exports = {
|
|||
'^.+\\.jsx?$': 'babel-jest',
|
||||
'^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
|
||||
},
|
||||
transformIgnorePatterns: ['node_modules/(?!.pnpm|lodash-es|nanoid)'],
|
||||
transformIgnorePatterns: ['node_modules/(?!.pnpm|color|lodash-es|nanoid)'],
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@redux-devtools/inspector-monitor-test-tab",
|
||||
"version": "4.0.0",
|
||||
"version": "4.1.1",
|
||||
"description": "Generate tests for redux devtools.",
|
||||
"keywords": [
|
||||
"redux",
|
||||
|
@ -43,50 +43,50 @@
|
|||
"prepublish": "pnpm run type-check && pnpm run lint && pnpm run test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.25.0",
|
||||
"@redux-devtools/ui": "^1.3.1",
|
||||
"@babel/runtime": "^7.27.6",
|
||||
"@redux-devtools/ui": "workspace:^",
|
||||
"es6template": "^1.0.5",
|
||||
"javascript-stringify": "^2.1.0",
|
||||
"jsan": "^3.1.14",
|
||||
"object-path": "^0.11.8",
|
||||
"react-icons": "^5.2.1",
|
||||
"react-icons": "^5.5.0",
|
||||
"simple-diff": "^1.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.24.8",
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/eslint-parser": "^7.25.1",
|
||||
"@babel/plugin-transform-runtime": "^7.24.7",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-react": "^7.24.7",
|
||||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@emotion/react": "^11.13.0",
|
||||
"@redux-devtools/core": "^4.0.0",
|
||||
"@redux-devtools/inspector-monitor": "^6.0.0",
|
||||
"@babel/cli": "^7.27.2",
|
||||
"@babel/core": "^7.27.4",
|
||||
"@babel/eslint-parser": "^7.27.5",
|
||||
"@babel/plugin-transform-runtime": "^7.27.4",
|
||||
"@babel/preset-env": "^7.27.2",
|
||||
"@babel/preset-react": "^7.27.1",
|
||||
"@babel/preset-typescript": "^7.27.1",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.0",
|
||||
"@redux-devtools/core": "workspace:^",
|
||||
"@redux-devtools/inspector-monitor": "workspace:^",
|
||||
"@testing-library/dom": "^10.4.0",
|
||||
"@testing-library/react": "^16.0.0",
|
||||
"@testing-library/react": "^16.3.0",
|
||||
"@types/es6template": "^1.0.5",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/jsan": "^3.1.5",
|
||||
"@types/object-path": "^0.11.4",
|
||||
"@types/react": "^18.3.3",
|
||||
"jest": "^29.7.0",
|
||||
"jest-environment-jsdom": "^29.7.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"@types/react": "^19.1.8",
|
||||
"jest": "^30.0.2",
|
||||
"jest-environment-jsdom": "^30.0.2",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"redux": "^5.0.1",
|
||||
"rimraf": "^6.0.1",
|
||||
"ts-jest": "^29.2.4",
|
||||
"typescript": "~5.5.4"
|
||||
"ts-jest": "^29.4.0",
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@emotion/react": "^11.13.0",
|
||||
"@redux-devtools/inspector-monitor": "^6.0.0",
|
||||
"@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",
|
||||
"redux": "^3.4.0 || ^4.0.0 || ^5.0.0",
|
||||
"styled-components": "^5.3.11"
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.0",
|
||||
"@redux-devtools/inspector-monitor": "workspace:^",
|
||||
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"redux": "^3.4.0 || ^4.0.0 || ^5.0.0"
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user