Merge branch 'main' into patch-1

This commit is contained in:
Nathan Bierema 2022-10-29 15:36:21 -04:00 committed by GitHub
commit 486b9b4b79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
149 changed files with 7656 additions and 6575 deletions

View File

@ -1,5 +0,0 @@
---
'@redux-devtools/extension': patch
---
Fix type for serialize option

View File

@ -1,5 +0,0 @@
---
'@redux-devtools/rtk-query-monitor': minor
---
feat(rtk-query): add Data tab to rtk-query-monitor #1126 #1129

View File

@ -1,5 +0,0 @@
---
'rtk-query-demo': patch
---
fix: rtk-query-monitor demo not working #1126 #1129

View File

@ -1,5 +0,0 @@
---
'remotedev-redux-devtools-extension': patch
---
bump min popup window width to 760px #1126 #1129

View File

@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: nrwl/nx-set-shas@v2 - uses: nrwl/nx-set-shas@v3
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:

View File

@ -1,5 +1,11 @@
# remotedev-redux-devtools-extension # remotedev-redux-devtools-extension
## 3.0.14
### Patch Changes
- 24f60a7a: bump min popup window width to 760px #1126 #1129
## 3.0.13 ## 3.0.13
### Patch Changes ### Patch Changes

View File

@ -57,7 +57,7 @@ const composeEnhancers =
compose; compose;
``` ```
> For TypeScript use [`redux-devtools-extension` npm package](#13-use-redux-devtools-extension-package-from-npm), which contains all the definitions, or just use `(window as any)` (see [Recipes](/docs/Recipes.md#using-in-a-typescript-project) for an example). > For TypeScript use [`redux-devtools-extension` npm package](#13-use-redux-devtoolsextension-package-from-npm), which contains all the definitions, or just use `(window as any)` (see [Recipes](/docs/Recipes.md#using-in-a-typescript-project) for an example).
```js ```js
const composeEnhancers = (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; const composeEnhancers = (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;

View File

@ -5,4 +5,5 @@ module.exports = {
moduleNameMapper: { moduleNameMapper: {
'\\.css$': '<rootDir>/test/__mocks__/styleMock.ts', '\\.css$': '<rootDir>/test/__mocks__/styleMock.ts',
}, },
resolver: '<rootDir>/jestResolver.js',
}; };

15
extension/jestResolver.js Normal file
View File

@ -0,0 +1,15 @@
module.exports = (path, options) => {
return options.defaultResolver(path, {
...options,
packageFilter: (pkg) => {
if (pkg.name === 'nanoid') {
pkg.exports['.'].browser = pkg.exports['.'].require;
}
if (pkg.name === 'uuid' && pkg.version.startsWith('8.')) {
delete pkg.exports;
delete pkg.module;
}
return pkg;
},
});
};

View File

@ -1,7 +1,7 @@
{ {
"private": true, "private": true,
"name": "remotedev-redux-devtools-extension", "name": "remotedev-redux-devtools-extension",
"version": "3.0.13", "version": "3.0.14",
"description": "Redux Developer Tools for debugging application state changes.", "description": "Redux Developer Tools for debugging application state changes.",
"homepage": "https://github.com/reduxjs/redux-devtools/tree/master/extension", "homepage": "https://github.com/reduxjs/redux-devtools/tree/master/extension",
"license": "MIT", "license": "MIT",
@ -43,56 +43,57 @@
"lodash": "^4.17.21", "lodash": "^4.17.21",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-icons": "^4.4.0", "react-icons": "^4.6.0",
"react-is": "^18.2.0", "react-is": "^18.2.0",
"react-json-tree": "^0.17.0", "react-json-tree": "^0.17.0",
"react-redux": "^8.0.2", "react-redux": "^8.0.4",
"redux": "^4.2.0", "redux": "^4.2.0",
"redux-persist": "^6.0.0", "redux-persist": "^6.0.0",
"styled-components": "^5.3.5" "styled-components": "^5.3.6"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.18.5", "@babel/core": "^7.19.3",
"@babel/preset-env": "^7.18.2", "@babel/preset-env": "^7.19.4",
"@babel/preset-react": "^7.17.12", "@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.17.12", "@babel/preset-typescript": "^7.18.6",
"@babel/register": "^7.17.7", "@babel/register": "^7.18.9",
"@testing-library/jest-dom": "^5.16.4", "@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.3.0", "@testing-library/react": "^13.4.0",
"@types/chrome": "^0.0.191", "@types/chrome": "^0.0.198",
"@types/lodash": "^4.14.182", "@types/lodash": "^4.14.186",
"@types/react": "^18.0.14", "@types/react": "^18.0.21",
"@types/react-dom": "^18.0.5", "@types/react-dom": "^18.0.6",
"@types/styled-components": "^5.1.25", "@types/styled-components": "^5.1.26",
"babel-loader": "^8.2.5", "babel-loader": "^9.0.0",
"bestzip": "^2.2.1", "bestzip": "^2.2.1",
"chromedriver": "^102.0.0", "chromedriver": "^106.0.1",
"copy-webpack-plugin": "^11.0.0", "copy-webpack-plugin": "^11.0.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"css-loader": "^6.7.1", "css-loader": "^6.7.1",
"electron": "^19.0.6", "electron": "^21.1.1",
"eslint": "^8.18.0", "eslint": "^8.25.0",
"eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.26.0", "eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.0", "eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-react": "^7.30.1", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"fork-ts-checker-webpack-plugin": "^7.2.11", "fork-ts-checker-webpack-plugin": "^7.2.13",
"immutable": "^4.1.0", "immutable": "^4.1.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"jest-environment-jsdom": "^29.2.2",
"path-browserify": "^1.0.1", "path-browserify": "^1.0.1",
"pug-html-loader": "^1.1.5", "pug-html-loader": "^1.1.5",
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
"react-transform-catch-errors": "^1.0.2", "react-transform-catch-errors": "^1.0.2",
"react-transform-hmr": "^1.0.4", "react-transform-hmr": "^1.0.4",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"selenium-webdriver": "^4.3.0", "selenium-webdriver": "^4.5.0",
"sinon-chrome": "^3.0.1", "sinon-chrome": "^3.0.1",
"style-loader": "^3.3.1", "style-loader": "^3.3.1",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"typescript": "~4.7.4", "typescript": "~4.8.4",
"webpack": "^5.73.0", "webpack": "^5.74.0",
"webpack-cli": "^4.10.0" "webpack-cli": "^4.10.0"
} }
} }

View File

@ -19,8 +19,8 @@ import {
} from '@redux-devtools/app'; } from '@redux-devtools/app';
import { GoRadioTower } from 'react-icons/go'; import { GoRadioTower } from 'react-icons/go';
import { MdBorderBottom, MdBorderLeft, MdBorderRight } from 'react-icons/md'; import { MdBorderBottom, MdBorderLeft, MdBorderRight } from 'react-icons/md';
import { Position } from '../api/openWindow'; import type { Position } from '../pageScript/api/openWindow';
import { SingleMessage } from '../middlewares/api'; import type { SingleMessage } from '../background/store/apiMiddleware';
type StateProps = ReturnType<typeof mapStateToProps>; type StateProps = ReturnType<typeof mapStateToProps>;
type DispatchProps = ResolveThunks<typeof actionCreators>; type DispatchProps = ResolveThunks<typeof actionCreators>;

View File

@ -1,15 +0,0 @@
import {
Action,
createStore,
PreloadedState,
Reducer,
StoreEnhancer,
} from 'redux';
export default function configureStore<S, A extends Action<unknown>>(
reducer: Reducer<S, A>,
initialState: PreloadedState<S> | undefined,
enhance: () => StoreEnhancer
) {
return createStore(reducer, initialState, enhance());
}

View File

@ -1,11 +1,9 @@
import { Store } from 'redux'; import { Store } from 'redux';
import configureStore, { import configureStore, { BackgroundAction } from './store/backgroundStore';
BackgroundAction,
} from '../../../app/stores/backgroundStore';
import openDevToolsWindow, { DevToolsPosition } from './openWindow'; import openDevToolsWindow, { DevToolsPosition } from './openWindow';
import { createMenu, removeMenu } from './contextMenus'; import { createMenu, removeMenu } from './contextMenus';
import syncOptions from '../options/syncOptions'; import syncOptions from '../options/syncOptions';
import { BackgroundState } from '../../../app/reducers/background'; import { BackgroundState } from './store/backgroundReducer';
declare global { declare global {
interface Window { interface Window {

View File

@ -15,28 +15,23 @@ import syncOptions, {
Options, Options,
OptionsMessage, OptionsMessage,
SyncOptions, SyncOptions,
} from '../../browser/extension/options/syncOptions'; } from '../../options/syncOptions';
import openDevToolsWindow, { import openDevToolsWindow, { DevToolsPosition } from '../openWindow';
DevToolsPosition, import { getReport } from '../logging';
} from '../../browser/extension/background/openWindow';
import { getReport } from '../../browser/extension/background/logging';
import { Action, Dispatch, MiddlewareAPI } from 'redux'; import { Action, Dispatch, MiddlewareAPI } from 'redux';
import { import type {
ContentScriptToBackgroundMessage, ContentScriptToBackgroundMessage,
SplitMessage, SplitMessage,
} from '../../browser/extension/inject/contentScript'; } from '../../contentScript';
import { import type {
ErrorMessage, ErrorMessage,
PageScriptToContentScriptMessageForwardedToMonitors, PageScriptToContentScriptMessageForwardedToMonitors,
PageScriptToContentScriptMessageWithoutDisconnectOrInitInstance, PageScriptToContentScriptMessageWithoutDisconnectOrInitInstance,
} from '../api'; } from '../../pageScript/api';
import { LiftedState } from '@redux-devtools/instrument'; import { LiftedState } from '@redux-devtools/instrument';
import { import type { BackgroundAction, LiftedActionAction } from './backgroundStore';
BackgroundAction, import type { Position } from '../../pageScript/api/openWindow';
LiftedActionAction, import type { BackgroundState } from './backgroundReducer';
} from '../stores/backgroundStore';
import { Position } from '../api/openWindow';
import { BackgroundState } from '../reducers/background';
interface TabMessageBase { interface TabMessageBase {
readonly type: string; readonly type: string;

View File

@ -1,6 +1,6 @@
import { combineReducers, Reducer } from 'redux'; import { combineReducers, Reducer } from 'redux';
import { instances, InstancesState } from '@redux-devtools/app'; import { instances, InstancesState } from '@redux-devtools/app';
import { BackgroundAction } from '../../stores/backgroundStore'; import type { BackgroundAction } from './backgroundStore';
export interface BackgroundState { export interface BackgroundState {
readonly instances: InstancesState; readonly instances: InstancesState;

View File

@ -5,8 +5,8 @@ import {
LIFTED_ACTION, LIFTED_ACTION,
StoreActionWithoutLiftedAction, StoreActionWithoutLiftedAction,
} from '@redux-devtools/app'; } from '@redux-devtools/app';
import rootReducer, { BackgroundState } from '../reducers/background'; import rootReducer, { BackgroundState } from './backgroundReducer';
import api, { CONNECTED, DISCONNECTED } from '../middlewares/api'; import api, { CONNECTED, DISCONNECTED } from './apiMiddleware';
interface LiftedActionActionBase { interface LiftedActionActionBase {
action?: DispatchAction | string | CustomAction; action?: DispatchAction | string | CustomAction;

View File

@ -3,12 +3,12 @@ import {
getOptionsFromBg, getOptionsFromBg,
isAllowed, isAllowed,
} from '../options/syncOptions'; } from '../options/syncOptions';
import { TabMessage } from '../../../app/middlewares/api'; import type { TabMessage } from '../background/store/apiMiddleware';
import { import type {
PageScriptToContentScriptMessage, PageScriptToContentScriptMessage,
PageScriptToContentScriptMessageWithoutDisconnect, PageScriptToContentScriptMessageWithoutDisconnect,
PageScriptToContentScriptMessageWithoutDisconnectOrInitInstance, PageScriptToContentScriptMessageWithoutDisconnectOrInitInstance,
} from '../../../app/api'; } from '../pageScript/api';
import { Action } from 'redux'; import { Action } from 'redux';
import { import {
CustomAction, CustomAction,

View File

@ -1,15 +1,15 @@
doctype html doctype html
html html
head head
meta(charset='UTF-8') meta(charset='UTF-8')
title Redux DevTools title Redux DevTools
include ./includes/style.pug include ../style.pug
style. style.
body { body {
min-height: 100px; min-height: 100px;
} }
body body
#root #root
script(src='/devpanel.bundle.js') script(src='/devpanel.bundle.js')

View File

@ -3,13 +3,13 @@ import { createRoot, Root } from 'react-dom/client';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import { Persistor } from 'redux-persist'; import { Persistor } from 'redux-persist';
import { REMOVE_INSTANCE, StoreAction } from '@redux-devtools/app'; import { REMOVE_INSTANCE, StoreAction } from '@redux-devtools/app';
import App from '../../../app/containers/App'; import App from '../app/App';
import configureStore from '../../../app/stores/panelStore'; import configureStore from './store/panelStore';
import '../../views/devpanel.pug'; import './devpanel.pug';
import { Action, Store } from 'redux'; import { Action, Store } from 'redux';
import { PanelMessage } from '../../../app/middlewares/api'; import type { PanelMessage } from '../background/store/apiMiddleware';
import { StoreStateWithoutSocket } from '../../../app/reducers/panel'; import type { StoreStateWithoutSocket } from './store/panelReducer';
import { PersistGate } from 'redux-persist/integration/react'; import { PersistGate } from 'redux-persist/integration/react';
const position = location.hash; const position = location.hash;

View File

@ -2,8 +2,8 @@ import { createStore, applyMiddleware, Reducer } from 'redux';
import localForage from 'localforage'; import localForage from 'localforage';
import { persistReducer, persistStore } from 'redux-persist'; import { persistReducer, persistStore } from 'redux-persist';
import { exportStateMiddleware, StoreAction } from '@redux-devtools/app'; import { exportStateMiddleware, StoreAction } from '@redux-devtools/app';
import panelDispatcher from '../middlewares/panelSync'; import panelDispatcher from './panelSyncMiddleware';
import rootReducer, { StoreStateWithoutSocket } from '../reducers/panel'; import rootReducer, { StoreStateWithoutSocket } from './panelReducer';
const persistConfig = { const persistConfig = {
key: 'redux-devtools', key: 'redux-devtools',

View File

@ -1,10 +1,10 @@
doctype html doctype html
html html
head head
meta(charset='UTF-8') meta(charset='UTF-8')
title Redux DevTools title Redux DevTools
body body
#root #root
script(src='/devtools.bundle.js') script(src='/devtools.bundle.js')

View File

@ -1,4 +1,4 @@
import '../../views/devtools.pug'; import './devtools.pug';
function createPanel(url: string) { function createPanel(url: string) {
chrome.devtools.panels.create( chrome.devtools.panels.create(

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { FilterState } from '../../../app/api/filters'; import { FilterState } from '../pageScript/api/filters';
import { OptionsProps } from './Options'; import { OptionsProps } from './Options';
export default ({ options, saveOption }: OptionsProps) => { export default ({ options, saveOption }: OptionsProps) => {

View File

@ -3,7 +3,7 @@ import { createRoot } from 'react-dom/client';
import OptionsComponent from './Options'; import OptionsComponent from './Options';
import { Options } from './syncOptions'; import { Options } from './syncOptions';
import '../../views/options.pug'; import './options.pug';
chrome.runtime.getBackgroundPage((background) => { chrome.runtime.getBackgroundPage((background) => {
const syncOptions = background!.syncOptions; const syncOptions = background!.syncOptions;

View File

@ -1,93 +1,93 @@
doctype html doctype html
html html
head head
meta(charset='UTF-8') meta(charset='UTF-8')
title Redux DevTools Options title Redux DevTools Options
style. style.
body { body {
padding: 2px; padding: 2px;
min-width: 380px; min-width: 380px;
} }
.option-group { .option-group {
/* Reset the default fieldset styles */ /* Reset the default fieldset styles */
margin: initial; margin: initial;
border: initial; border: initial;
padding: initial; padding: initial;
} }
.option-group + .option-group { .option-group + .option-group {
margin-top: 30px; margin-top: 30px;
} }
.option-group__title { .option-group__title {
/* Reset the default legend styles */ /* Reset the default legend styles */
margin: initial; margin: initial;
padding: initial; padding: initial;
margin-bottom: 8px; margin-bottom: 8px;
font-weight: bold; font-weight: bold;
font-size: 30px; font-size: 30px;
} }
.option + .option { .option + .option {
margin-top: 5px; margin-top: 5px;
} }
.option__textarea { .option__textarea {
margin-top: 2px; margin-top: 2px;
width: 300px; width: 300px;
min-height: 50px; min-height: 50px;
} }
.option__hint { .option__hint {
margin-top: 2px; margin-top: 2px;
font-size: 10px; font-size: 10px;
} }
.option__textarea + .option__hint { .option__textarea + .option__hint {
margin-top: -2px; margin-top: -2px;
} }
/* Checkbox and radio styling */ /* Checkbox and radio styling */
.option_type_checkbox .option__element, .option_type_checkbox .option__element,
.option_type_radio .option__element { .option_type_radio .option__element {
vertical-align: bottom; vertical-align: bottom;
} }
.option_type_checkbox .option__label, .option_type_checkbox .option__label,
.option_type_radio .option__label { .option_type_radio .option__label {
margin-left: 4px; margin-left: 4px;
} }
.option_type_checkbox .option__textarea, .option_type_checkbox .option__textarea,
.option_type_checkbox .option__hint, .option_type_checkbox .option__hint,
.option_type_radio .option__textarea, .option_type_radio .option__textarea,
.option_type_radio .option__hint { .option_type_radio .option__hint {
margin-left: 20px; margin-left: 20px;
} }
/* Checkbox styling */ /* Checkbox styling */
.option_type_checkbox .option__element { .option_type_checkbox .option__element {
/* Checkboxes in Chrome are 2px narrower than radio buttons. /* Checkboxes in Chrome are 2px narrower than radio buttons.
These margins align them. */ These margins align them. */
margin-left: 1px; margin-left: 1px;
/* ...margin-right is 2px instead of 1px /* ...margin-right is 2px instead of 1px
because both radios and checkboxes have initial margin-right of 1px */ because both radios and checkboxes have initial margin-right of 1px */
margin-right: 2px; margin-right: 2px;
} }
/* Value-based styling */ /* Value-based styling */
.option_value_max-age { .option_value_max-age {
margin-left: 20px; margin-left: 20px;
} }
.option_value_max-age .option__element { .option_value_max-age .option__element {
width: 50px; width: 50px;
} }
body body
#root #root
script(src='/options.bundle.js') script(src='/options.bundle.js')

View File

@ -1,4 +1,4 @@
import { FilterState, FilterStateValue } from '../../../app/api/filters'; import { FilterState, FilterStateValue } from '../pageScript/api/filters';
export interface Options { export interface Options {
readonly useEditor: number; readonly useEditor: number;

View File

@ -1,9 +1,6 @@
import jsan from 'jsan'; import jsan from 'jsan';
import { immutableSerialize } from '@redux-devtools/serialize'; import { immutableSerialize } from '@redux-devtools/serialize';
import { import type { Config, SerializeWithImmutable } from '../index';
Config,
SerializeWithImmutable,
} from '../../browser/extension/inject/pageScript';
import Immutable from 'immutable'; import Immutable from 'immutable';
import { LiftedState } from '@redux-devtools/instrument'; import { LiftedState } from '@redux-devtools/instrument';
import { Action } from 'redux'; import { Action } from 'redux';

View File

@ -5,15 +5,15 @@ import { getActionsArray, getLocalFilter } from '@redux-devtools/utils';
import { isFiltered, PartialLiftedState } from './filters'; import { isFiltered, PartialLiftedState } from './filters';
import importState from './importState'; import importState from './importState';
import generateId from './generateInstanceId'; import generateId from './generateInstanceId';
import { Config } from '../../browser/extension/inject/pageScript'; import type { Config } from '../index';
import { Action } from 'redux'; import { Action } from 'redux';
import { LiftedState, PerformAction } from '@redux-devtools/instrument'; import { LiftedState, PerformAction } from '@redux-devtools/instrument';
import { LibConfig } from '@redux-devtools/app'; import { LibConfig } from '@redux-devtools/app';
import { import type {
ContentScriptToPageScriptMessage, ContentScriptToPageScriptMessage,
ListenerMessage, ListenerMessage,
} from '../../browser/extension/inject/contentScript'; } from '../../contentScript';
import { Position } from './openWindow'; import type { Position } from './openWindow';
const listeners: { const listeners: {
[instanceId: string]: [instanceId: string]:

View File

@ -1,5 +1,5 @@
import { Action } from 'redux'; import { Action } from 'redux';
import { PageScriptToContentScriptMessage } from './index'; import type { PageScriptToContentScriptMessage } from './index';
export type Position = 'left' | 'right' | 'bottom' | 'panel' | 'remote'; export type Position = 'left' | 'right' | 'bottom' | 'panel' | 'remote';

View File

@ -1,7 +1,7 @@
import { Action, compose, Reducer, StoreEnhancerStoreCreator } from 'redux'; import { Action, compose, Reducer, StoreEnhancerStoreCreator } from 'redux';
import { instrument } from '@redux-devtools/instrument'; import { instrument } from '@redux-devtools/instrument';
import { persistState } from '@redux-devtools/core'; import { persistState } from '@redux-devtools/core';
import { ConfigWithExpandedMaxAge } from '../../browser/extension/inject/pageScript'; import type { ConfigWithExpandedMaxAge } from './index';
export function getUrlParam(key: string) { export function getUrlParam(key: string) {
const matches = window.location.href.match( const matches = window.location.href.match(

View File

@ -27,19 +27,19 @@ import {
LibConfig, LibConfig,
Features, Features,
} from '@redux-devtools/app'; } from '@redux-devtools/app';
import configureStore, { getUrlParam } from '../../../app/stores/enhancerStore'; import configureStore, { getUrlParam } from './enhancerStore';
import { isAllowed, Options } from '../options/syncOptions'; import { isAllowed, Options } from '../options/syncOptions';
import Monitor from '../../../app/service/Monitor'; import Monitor from './Monitor';
import { import {
noFiltersApplied, noFiltersApplied,
isFiltered, isFiltered,
filterState, filterState,
startingFrom, startingFrom,
} from '../../../app/api/filters'; } from './api/filters';
import notifyErrors from '../../../app/api/notifyErrors'; import notifyErrors from './api/notifyErrors';
import importState from '../../../app/api/importState'; import importState from './api/importState';
import openWindow, { Position } from '../../../app/api/openWindow'; import openWindow, { Position } from './api/openWindow';
import generateId from '../../../app/api/generateInstanceId'; import generateId from './api/generateInstanceId';
import { import {
toContentScript, toContentScript,
sendMessage, sendMessage,
@ -51,8 +51,8 @@ import {
Serialize, Serialize,
StructuralPerformAction, StructuralPerformAction,
ConnectResponse, ConnectResponse,
} from '../../../app/api'; } from './api';
import { ContentScriptToPageScriptMessage } from './contentScript'; import type { ContentScriptToPageScriptMessage } from '../contentScript';
type EnhancedStoreWithInitialDispatch< type EnhancedStoreWithInitialDispatch<
S, S,
@ -539,10 +539,14 @@ function __REDUX_DEVTOOLS_EXTENSION__<S, A extends Action<unknown>>(
return next(reducer_, initialState_); return next(reducer_, initialState_);
} }
store = stores[instanceId] = configureStore(next, monitor.reducer, { store = stores[instanceId] = configureStore(
...config, next as StoreEnhancerStoreCreator,
maxAge: getMaxAge as any, monitor.reducer,
})(reducer_, initialState_) as any; {
...config,
maxAge: getMaxAge as any,
}
)(reducer_, initialState_) as any;
if (isInIframe()) setTimeout(init, 3000); if (isInIframe()) setTimeout(init, 3000);
else init(); else init();

View File

@ -2,7 +2,7 @@ import React from 'react';
import { createRoot } from 'react-dom/client'; import { createRoot } from 'react-dom/client';
import { Root } from '@redux-devtools/app'; import { Root } from '@redux-devtools/app';
import '../../views/remote.pug'; import './remote.pug';
chrome.storage.local.get( chrome.storage.local.get(
{ {

View File

@ -1,11 +1,11 @@
doctype html doctype html
html html
head head
meta(charset='UTF-8') meta(charset='UTF-8')
title RemoteDev title RemoteDev
include ./includes/style.pug include ../style.pug
body body
#root #root
script(src='/remote.bundle.js') script(src='/remote.bundle.js')

View File

@ -3,11 +3,11 @@ import { createRoot } from 'react-dom/client';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react'; import { PersistGate } from 'redux-persist/integration/react';
import { UPDATE_STATE } from '@redux-devtools/app'; import { UPDATE_STATE } from '@redux-devtools/app';
import App from '../../../app/containers/App'; import App from '../app/App';
import configureStore from '../../../app/stores/windowStore'; import configureStore from './store/windowStore';
import { MonitorMessage } from '../../../app/middlewares/api'; import type { MonitorMessage } from '../background/store/apiMiddleware';
import '../../views/window.pug'; import './window.pug';
const position = location.hash; const position = location.hash;

View File

@ -6,10 +6,10 @@ import {
LIFTED_ACTION, LIFTED_ACTION,
SET_PERSIST, SET_PERSIST,
} from '@redux-devtools/app'; } from '@redux-devtools/app';
import { import type {
ExpandedUpdateStateAction, ExpandedUpdateStateAction,
WindowStoreAction, WindowStoreAction,
} from '../../stores/windowStore'; } from './windowStore';
export default function instances( export default function instances(
state = instancesInitialState, state = instancesInitialState,

View File

@ -9,8 +9,8 @@ import {
theme, theme,
StoreState, StoreState,
} from '@redux-devtools/app'; } from '@redux-devtools/app';
import instances from './instances'; import instances from './instancesReducer';
import { WindowStoreAction } from '../../stores/windowStore'; import type { WindowStoreAction } from './windowStore';
const rootReducer: Reducer<StoreState, WindowStoreAction> = const rootReducer: Reducer<StoreState, WindowStoreAction> =
combineReducers<StoreState>({ combineReducers<StoreState>({

View File

@ -17,12 +17,15 @@ import {
StoreState, StoreState,
UpdateStateAction, UpdateStateAction,
} from '@redux-devtools/app'; } from '@redux-devtools/app';
import syncStores from '../middlewares/windowSync'; import syncStores from './windowSyncMiddleware';
import instanceSelector from '../middlewares/instanceSelector'; import instanceSelector from './instanceSelectorMiddleware';
import rootReducer from '../reducers/window'; import rootReducer from './windowReducer';
import { BackgroundState } from '../reducers/background'; import type { BackgroundState } from '../../background/store/backgroundReducer';
import { BackgroundAction } from './backgroundStore'; import type { BackgroundAction } from '../../background/store/backgroundStore';
import { EmptyUpdateStateAction, NAAction } from '../middlewares/api'; import type {
EmptyUpdateStateAction,
NAAction,
} from '../../background/store/apiMiddleware';
export interface ExpandedUpdateStateAction extends UpdateStateAction { export interface ExpandedUpdateStateAction extends UpdateStateAction {
readonly instances: InstancesState; readonly instances: InstancesState;

View File

@ -7,9 +7,9 @@ import {
UPDATE_STATE, UPDATE_STATE,
} from '@redux-devtools/app'; } from '@redux-devtools/app';
import { Dispatch, MiddlewareAPI, Store } from 'redux'; import { Dispatch, MiddlewareAPI, Store } from 'redux';
import { BackgroundState } from '../reducers/background'; import type { BackgroundState } from '../../background/store/backgroundReducer';
import { WindowStoreAction } from '../stores/windowStore'; import type { WindowStoreAction } from './windowStore';
import { BackgroundAction } from '../stores/backgroundStore'; import type { BackgroundAction } from '../../background/store/backgroundStore';
const syncStores = const syncStores =
(baseStore: Store<BackgroundState, BackgroundAction>) => (baseStore: Store<BackgroundState, BackgroundAction>) =>

View File

@ -1,17 +1,17 @@
doctype html doctype html
html html
head head
meta(charset='UTF-8') meta(charset='UTF-8')
title Redux DevTools title Redux DevTools
include ./includes/style.pug include ../style.pug
body body
#root #root
div(style='position: relative') div(style='position: relative')
img( img(
src='/img/loading.svg', src='/img/loading.svg',
height=300, width=350, height=300, width=350,
style='position: absolute; top: 50%; left: 50%; margin-top: -175px; margin-left: -175px;' style='position: absolute; top: 50%; left: 50%; margin-top: -175px; margin-left: -175px;'
) )
script(src='/window.bundle.js') script(src='/window.bundle.js')

View File

@ -1,8 +1,8 @@
import React from 'react'; import React from 'react';
import { render, screen, within } from '@testing-library/react'; import { render, screen, within } from '@testing-library/react';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import configureStore from '../../../src/app/stores/windowStore'; import configureStore from '../../../src/window/store/windowStore';
import App from '../../../src/app/containers/App'; import App from '../../../src/app/App';
Object.defineProperty(window, 'matchMedia', { Object.defineProperty(window, 'matchMedia', {
writable: true, writable: true,
@ -18,7 +18,7 @@ Object.defineProperty(window, 'matchMedia', {
})), })),
}); });
const { store } = configureStore(store); const { store } = configureStore();
describe('App container', () => { describe('App container', () => {
it("should render inspector monitor's component", () => { it("should render inspector monitor's component", () => {

View File

@ -1,5 +1,5 @@
import { insertScript, listenMessage } from '../../utils/inject'; import { insertScript, listenMessage } from '../../utils/inject';
import '../../../src/browser/extension/inject/pageScript'; import '../../../src/pageScript';
describe('API', () => { describe('API', () => {
it('should get window.__REDUX_DEVTOOLS_EXTENSION__ function', () => { it('should get window.__REDUX_DEVTOOLS_EXTENSION__ function', () => {

View File

@ -1,7 +1,7 @@
import '@babel/polyfill'; import '@babel/polyfill';
import { createStore, compose } from 'redux'; import { createStore, compose } from 'redux';
import { insertScript, listenMessage } from '../../utils/inject'; import { insertScript, listenMessage } from '../../utils/inject';
import '../../../src/browser/extension/inject/pageScript'; import '../../../src/pageScript';
function counter(state = 0, action) { function counter(state = 0, action) {
switch (action.type) { switch (action.type) {

View File

@ -3,21 +3,30 @@ import webpack from 'webpack';
import CopyPlugin from 'copy-webpack-plugin'; import CopyPlugin from 'copy-webpack-plugin';
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
const extpath = path.join(__dirname, '../src/browser/extension/');
const mock = `${extpath}chromeAPIMock`;
const baseConfig = (params) => ({ const baseConfig = (params) => ({
// devtool: 'source-map', // devtool: 'source-map',
mode: params.mode, mode: params.mode,
entry: params.input || { entry: params.input || {
background: [mock, `${extpath}background/index`], background: [
options: [mock, `${extpath}options/index`], path.resolve(__dirname, '../src/chromeApiMock'),
window: [`${extpath}window/index`], path.resolve(__dirname, '../src/background/index'),
remote: [`${extpath}window/remote`], ],
devpanel: [mock, `${extpath}devpanel/index`], options: [
devtools: [`${extpath}devtools/index`], path.resolve(__dirname, '../src/chromeApiMock'),
content: [mock, `${extpath}inject/contentScript`], path.resolve(__dirname, '../src/options/index'),
pagewrap: [`${extpath}inject/pageScriptWrap`], ],
window: [path.resolve(__dirname, '../src/window/index')],
remote: [path.resolve(__dirname, '../src/remote/index')],
devpanel: [
path.resolve(__dirname, '../src/chromeApiMock'),
path.resolve(__dirname, '../src/devpanel/index'),
],
devtools: [path.resolve(__dirname, '../src/devtools/index')],
content: [
path.resolve(__dirname, '../src/chromeApiMock'),
path.resolve(__dirname, '../src/contentScript/index'),
],
pagewrap: [path.resolve(__dirname, '../src/pageScriptWrap')],
...params.inputExtra, ...params.inputExtra,
}, },
output: { output: {

View File

@ -5,7 +5,7 @@ import baseConfig from './base.config';
let config = baseConfig({ let config = baseConfig({
mode: 'development', mode: 'development',
inputExtra: { inputExtra: {
page: [path.join(__dirname, '../src/browser/extension/inject/pageScript')], page: [path.join(__dirname, '../src/pageScript')],
}, },
output: { path: path.join(__dirname, '../dev') }, output: { path: path.join(__dirname, '../dev') },
globals: { globals: {
@ -15,10 +15,7 @@ let config = baseConfig({
}, },
plugins: [new webpack.NoEmitOnErrorsPlugin()], plugins: [new webpack.NoEmitOnErrorsPlugin()],
copy: true, copy: true,
manifestJsonPath: path.join( manifestJsonPath: path.join(__dirname, '../chrome/manifest.json'),
__dirname,
'../src/browser/extension/manifest.json'
),
}); });
config.watch = true; config.watch = true;

View File

@ -4,7 +4,7 @@ import baseConfig from './base.config';
export default baseConfig({ export default baseConfig({
mode: 'production', mode: 'production',
inputExtra: { inputExtra: {
page: [path.join(__dirname, '../src/browser/extension/inject/pageScript')], page: [path.join(__dirname, '../src/pageScript')],
}, },
output: { path: path.join(__dirname, '../build/extension') }, output: { path: path.join(__dirname, '../build/extension') },
globals: { globals: {
@ -13,8 +13,5 @@ export default baseConfig({
}, },
}, },
copy: true, copy: true,
manifestJsonPath: path.join( manifestJsonPath: path.join(__dirname, '../chrome/manifest.json'),
__dirname,
'../src/browser/extension/manifest.json'
),
}); });

View File

@ -10,8 +10,5 @@ export default baseConfig({
}, },
}, },
copy: true, copy: true,
manifestJsonPath: path.join( manifestJsonPath: path.join(__dirname, '../firefox/manifest.json'),
__dirname,
'../src/browser/firefox/manifest.json'
),
}); });

View File

@ -4,7 +4,7 @@ import baseConfig from './base.config';
export default baseConfig({ export default baseConfig({
mode: 'production', mode: 'production',
input: { input: {
page: [path.join(__dirname, '../src/browser/extension/inject/pageScript')], page: [path.join(__dirname, '../src/pageScript')],
}, },
output: { path: path.join(__dirname, '../build/tmp') }, output: { path: path.join(__dirname, '../build/tmp') },
globals: { globals: {

View File

@ -1,21 +1,21 @@
{ {
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"@babel/core": "^7.18.5", "@babel/core": "^7.19.3",
"@babel/eslint-parser": "^7.18.2", "@babel/eslint-parser": "^7.19.1",
"@changesets/cli": "^2.23.0", "@changesets/cli": "^2.25.0",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/parser": "^5.40.1",
"eslint": "^8.18.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^26.5.3", "eslint-plugin-jest": "^27.1.2",
"eslint-plugin-react": "^7.30.1", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"prettier": "2.7.1", "prettier": "2.7.1",
"typescript": "~4.7.4", "typescript": "~4.8.4",
"nx": "^14.3.6", "nx": "^15.0.0",
"@nrwl/nx-cloud": "^14.1.2" "@nrwl/nx-cloud": "^15.0.0"
}, },
"scripts": { "scripts": {
"format": "prettier --write .", "format": "prettier --write .",
@ -39,7 +39,7 @@
"packages/redux-devtools-rtk-query-monitor/demo", "packages/redux-devtools-rtk-query-monitor/demo",
"packages/redux-devtools-slider-monitor/examples/todomvc" "packages/redux-devtools-slider-monitor/examples/todomvc"
], ],
"packageManager": "pnpm@7.3.0", "packageManager": "pnpm@7.13.5",
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"@babel/highlight>chalk": "Methuselah96/chalk#v2-without-process" "@babel/highlight>chalk": "Methuselah96/chalk#v2-without-process"

View File

@ -29,22 +29,22 @@
"map2tree": "^2.1.0" "map2tree": "^2.1.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.18.5", "@babel/core": "^7.19.3",
"@babel/preset-env": "^7.18.2", "@babel/preset-env": "^7.19.4",
"@babel/preset-typescript": "^7.17.12", "@babel/preset-typescript": "^7.18.6",
"@types/node": "^16.11.41", "@types/node": "^18.11.7",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/parser": "^5.40.1",
"babel-loader": "^8.2.5", "babel-loader": "^9.0.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^8.18.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"fork-ts-checker-webpack-plugin": "^7.2.11", "fork-ts-checker-webpack-plugin": "^7.2.13",
"html-webpack-plugin": "^5.5.0", "html-webpack-plugin": "^5.5.0",
"ts-node": "^10.8.1", "ts-node": "^10.9.1",
"typescript": "~4.7.4", "typescript": "~4.8.4",
"webpack": "^5.73.0", "webpack": "^5.74.0",
"webpack-cli": "^4.10.0", "webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.9.2" "webpack-dev-server": "^4.11.1"
} }
} }

View File

@ -42,7 +42,7 @@
"prepublish": "pnpm run type-check && pnpm run lint" "prepublish": "pnpm run type-check && pnpm run lint"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.19.4",
"@types/d3": "^3.5.47", "@types/d3": "^3.5.47",
"d3": "^3.5.17", "d3": "^3.5.17",
"d3tooltip": "^2.1.0", "d3tooltip": "^2.1.0",
@ -51,26 +51,26 @@
"ramda": "^0.28.0" "ramda": "^0.28.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.17.10", "@babel/cli": "^7.19.3",
"@babel/core": "^7.18.5", "@babel/core": "^7.19.3",
"@babel/eslint-parser": "^7.18.2", "@babel/eslint-parser": "^7.19.1",
"@babel/plugin-transform-runtime": "^7.18.5", "@babel/plugin-transform-runtime": "^7.19.1",
"@babel/preset-env": "^7.18.2", "@babel/preset-env": "^7.19.4",
"@babel/preset-typescript": "^7.17.12", "@babel/preset-typescript": "^7.18.6",
"@rollup/plugin-babel": "^5.3.1", "@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-commonjs": "^22.0.1", "@rollup/plugin-commonjs": "^23.0.0",
"@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-node-resolve": "^15.0.0",
"@types/node": "^16.11.41", "@rollup/plugin-terser": "^0.1.0",
"@types/ramda": "^0.28.14", "@types/node": "^18.11.7",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@types/ramda": "^0.28.16",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.40.1",
"eslint": "^8.18.0", "@typescript-eslint/parser": "^5.40.1",
"eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^2.75.7", "rollup": "^3.2.3",
"rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.34.1",
"rollup-plugin-typescript2": "^0.32.1",
"tslib": "^2.4.0", "tslib": "^2.4.0",
"typescript": "~4.7.4" "typescript": "~4.8.4"
} }
} }

View File

@ -2,7 +2,7 @@ import typescript from 'rollup-plugin-typescript2';
import resolve from '@rollup/plugin-node-resolve'; import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs'; import commonjs from '@rollup/plugin-commonjs';
import babel from '@rollup/plugin-babel'; import babel from '@rollup/plugin-babel';
import { terser } from 'rollup-plugin-terser'; import terser from '@rollup/plugin-terser';
const config = [ const config = [
{ {

View File

@ -38,33 +38,33 @@
"prepublish": "pnpm run type-check && pnpm run lint" "prepublish": "pnpm run type-check && pnpm run lint"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.19.4",
"ramda": "^0.28.0" "ramda": "^0.28.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.17.10", "@babel/cli": "^7.19.3",
"@babel/core": "^7.18.5", "@babel/core": "^7.19.3",
"@babel/eslint-parser": "^7.18.2", "@babel/eslint-parser": "^7.19.1",
"@babel/plugin-transform-runtime": "^7.18.5", "@babel/plugin-transform-runtime": "^7.19.1",
"@babel/preset-env": "^7.18.2", "@babel/preset-env": "^7.19.4",
"@babel/preset-typescript": "^7.17.12", "@babel/preset-typescript": "^7.18.6",
"@rollup/plugin-babel": "^5.3.1", "@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-commonjs": "^22.0.1", "@rollup/plugin-commonjs": "^23.0.0",
"@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-terser": "^0.1.0",
"@types/d3": "^3.5.47", "@types/d3": "^3.5.47",
"@types/node": "^16.11.41", "@types/node": "^18.11.7",
"@types/ramda": "^0.28.14", "@types/ramda": "^0.28.16",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/parser": "^5.40.1",
"d3": "^3.5.17", "d3": "^3.5.17",
"eslint": "^8.18.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^2.75.7", "rollup": "^3.2.3",
"rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.34.1",
"rollup-plugin-typescript2": "^0.32.1",
"tslib": "^2.4.0", "tslib": "^2.4.0",
"typescript": "~4.7.4" "typescript": "~4.8.4"
}, },
"peerDependencies": { "peerDependencies": {
"@types/d3": "^3.5.47", "@types/d3": "^3.5.47",

View File

@ -2,7 +2,7 @@ import typescript from 'rollup-plugin-typescript2';
import resolve from '@rollup/plugin-node-resolve'; import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs'; import commonjs from '@rollup/plugin-commonjs';
import babel from '@rollup/plugin-babel'; import babel from '@rollup/plugin-babel';
import { terser } from 'rollup-plugin-terser'; import terser from '@rollup/plugin-terser';
const config = [ const config = [
{ {

View File

@ -1,8 +1,6 @@
module.exports = { module.exports = {
preset: 'ts-jest', preset: 'ts-jest',
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
}; };

View File

@ -42,35 +42,35 @@
"prepublish": "pnpm run type-check && pnpm run lint && pnpm run test" "prepublish": "pnpm run type-check && pnpm run lint && pnpm run test"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.19.4",
"lodash": "^4.17.21" "lodash": "^4.17.21"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.17.10", "@babel/cli": "^7.19.3",
"@babel/core": "^7.18.5", "@babel/core": "^7.19.3",
"@babel/eslint-parser": "^7.18.2", "@babel/eslint-parser": "^7.19.1",
"@babel/plugin-transform-runtime": "^7.18.5", "@babel/plugin-transform-runtime": "^7.19.1",
"@babel/preset-env": "^7.18.2", "@babel/preset-env": "^7.19.4",
"@babel/preset-typescript": "^7.17.12", "@babel/preset-typescript": "^7.18.6",
"@rollup/plugin-babel": "^5.3.1", "@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-commonjs": "^22.0.1", "@rollup/plugin-commonjs": "^23.0.0",
"@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-node-resolve": "^15.0.0",
"@types/jest": "^27.5.2", "@rollup/plugin-terser": "^0.1.0",
"@types/lodash": "^4.14.182", "@types/jest": "^29.2.0",
"@types/node": "^16.11.41", "@types/lodash": "^4.14.186",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@types/node": "^18.11.7",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.40.1",
"eslint": "^8.18.0", "@typescript-eslint/parser": "^5.40.1",
"eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^26.5.3", "eslint-plugin-jest": "^27.1.2",
"immutable": "^4.1.0", "immutable": "^4.1.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^2.75.7", "rollup": "^3.2.3",
"rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.34.1",
"rollup-plugin-typescript2": "^0.32.1", "ts-jest": "^29.0.3",
"ts-jest": "^27.1.5",
"tslib": "^2.4.0", "tslib": "^2.4.0",
"typescript": "~4.7.4" "typescript": "~4.8.4"
} }
} }

View File

@ -2,7 +2,7 @@ import typescript from 'rollup-plugin-typescript2';
import resolve from '@rollup/plugin-node-resolve'; import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs'; import commonjs from '@rollup/plugin-commonjs';
import babel from '@rollup/plugin-babel'; import babel from '@rollup/plugin-babel';
import { terser } from 'rollup-plugin-terser'; import terser from '@rollup/plugin-terser';
const config = [ const config = [
{ {

View File

@ -1,9 +1,7 @@
module.exports = { module.exports = {
preset: 'ts-jest', preset: 'ts-jest',
testEnvironment: 'jsdom', testEnvironment: 'jsdom',
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
}; };

View File

@ -39,32 +39,33 @@
"prepublish": "pnpm run type-check && pnpm run lint && pnpm run test" "prepublish": "pnpm run type-check && pnpm run lint && pnpm run test"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.19.4",
"@types/base16": "^1.0.2", "@types/base16": "^1.0.2",
"@types/lodash": "^4.14.182", "@types/lodash": "^4.14.186",
"base16": "^1.0.0", "base16": "^1.0.0",
"color": "^4.2.3", "color": "^4.2.3",
"csstype": "^3.1.0", "csstype": "^3.1.1",
"lodash.curry": "^4.1.1" "lodash.curry": "^4.1.1"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.17.10", "@babel/cli": "^7.19.3",
"@babel/core": "^7.18.5", "@babel/core": "^7.19.3",
"@babel/eslint-parser": "^7.18.2", "@babel/eslint-parser": "^7.19.1",
"@babel/plugin-transform-runtime": "^7.18.5", "@babel/plugin-transform-runtime": "^7.19.1",
"@babel/preset-env": "^7.18.2", "@babel/preset-env": "^7.19.4",
"@babel/preset-typescript": "^7.17.12", "@babel/preset-typescript": "^7.18.6",
"@types/color": "^3.0.3", "@types/color": "^3.0.3",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/lodash.curry": "^4.1.7", "@types/lodash.curry": "^4.1.7",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/parser": "^5.40.1",
"eslint": "^8.18.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^26.5.3", "eslint-plugin-jest": "^27.1.2",
"jest": "^27.5.1", "jest": "^29.2.2",
"jest-environment-jsdom": "^29.2.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"typescript": "~4.7.4" "typescript": "~4.8.4"
} }
} }

View File

@ -11,36 +11,36 @@
}, },
"dependencies": { "dependencies": {
"react": "^18.2.0", "react": "^18.2.0",
"react-bootstrap": "^2.4.0", "react-bootstrap": "^2.5.0",
"react-dock": "^0.6.0", "react-dock": "^0.6.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-icons": "^4.4.0", "react-icons": "^4.6.0",
"react-is": "^18.2.0", "react-is": "^18.2.0",
"styled-components": "^5.3.5" "styled-components": "^5.3.6"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.18.5", "@babel/core": "^7.19.3",
"@babel/preset-env": "^7.18.2", "@babel/preset-env": "^7.19.4",
"@babel/preset-react": "^7.17.12", "@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.17.12", "@babel/preset-typescript": "^7.18.6",
"@types/node": "^16.11.41", "@types/node": "^18.11.7",
"@types/react": "^18.0.14", "@types/react": "^18.0.21",
"@types/react-dom": "^18.0.5", "@types/react-dom": "^18.0.6",
"@types/styled-components": "^5.1.25", "@types/styled-components": "^5.1.26",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/parser": "^5.40.1",
"babel-loader": "^8.2.5", "babel-loader": "^9.0.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^8.18.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-react": "^7.30.1", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"fork-ts-checker-webpack-plugin": "^7.2.11", "fork-ts-checker-webpack-plugin": "^7.2.13",
"html-webpack-plugin": "^5.5.0", "html-webpack-plugin": "^5.5.0",
"ts-node": "^10.8.1", "ts-node": "^10.9.1",
"typescript": "~4.7.4", "typescript": "~4.8.4",
"webpack": "^5.73.0", "webpack": "^5.74.0",
"webpack-cli": "^4.10.0", "webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.9.2" "webpack-dev-server": "^4.11.1"
} }
} }

View File

@ -1,9 +1,7 @@
module.exports = { module.exports = {
preset: 'ts-jest', preset: 'ts-jest',
testEnvironment: 'jsdom', testEnvironment: 'jsdom',
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
}; };

View File

@ -39,37 +39,38 @@
"prepublish": "pnpm run type-check && pnpm run lint && pnpm run test" "prepublish": "pnpm run type-check && pnpm run lint && pnpm run test"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.19.4",
"@types/lodash": "^4.14.182", "@types/lodash": "^4.14.186",
"@types/prop-types": "^15.7.5", "@types/prop-types": "^15.7.5",
"lodash.debounce": "^4.0.8", "lodash.debounce": "^4.0.8",
"prop-types": "^15.8.1" "prop-types": "^15.8.1"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.17.10", "@babel/cli": "^7.19.3",
"@babel/core": "^7.18.5", "@babel/core": "^7.19.3",
"@babel/eslint-parser": "^7.18.2", "@babel/eslint-parser": "^7.19.1",
"@babel/plugin-transform-runtime": "^7.18.5", "@babel/plugin-transform-runtime": "^7.19.1",
"@babel/preset-env": "^7.18.2", "@babel/preset-env": "^7.19.4",
"@babel/preset-react": "^7.17.12", "@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.17.12", "@babel/preset-typescript": "^7.18.6",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/lodash.debounce": "^4.0.7", "@types/lodash.debounce": "^4.0.7",
"@types/react": "^18.0.14", "@types/react": "^18.0.21",
"@types/react-test-renderer": "^18.0.0", "@types/react-test-renderer": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/parser": "^5.40.1",
"eslint": "^8.18.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^26.5.3", "eslint-plugin-jest": "^27.1.2",
"eslint-plugin-react": "^7.30.1", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"jest-environment-jsdom": "^29.2.2",
"react": "^18.2.0", "react": "^18.2.0",
"react-test-renderer": "^18.2.0", "react-test-renderer": "^18.2.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"typescript": "~4.7.4" "typescript": "~4.8.4"
}, },
"peerDependencies": { "peerDependencies": {
"@types/react": "^16.3.0 || ^17.0.0 || ^18.0.0", "@types/react": "^16.3.0 || ^17.0.0 || ^18.0.0",

View File

@ -34,7 +34,7 @@ Check out [examples](examples) directory for more details.
This component now uses [react-base16-styling](https://github.com/reduxjs/redux-devtools/tree/main/packages/react-base16-styling) module, which allows to customize component via `theme` property, which can be the following: This component now uses [react-base16-styling](https://github.com/reduxjs/redux-devtools/tree/main/packages/react-base16-styling) module, which allows to customize component via `theme` property, which can be the following:
- [base16](http://chriskempson.com/projects/base16/) theme data. [The example theme data can be found here](https://github.com/gaearon/redux-devtools/tree/75322b15ee7ba03fddf10ac3399881e302848874/src/react/themes). - [base16](https://github.com/chriskempson/base16) theme data. [The example theme data can be found here](https://github.com/gaearon/redux-devtools/tree/75322b15ee7ba03fddf10ac3399881e302848874/src/react/themes).
- object that contains style objects, strings (that treated as classnames) or functions. A function is used to extend its first argument `{ style, className }` and should return an object with the same structure. Other arguments depend on particular context (and should be described here). See [createStylingFromTheme.js](https://github.com/reduxjs/redux-devtools/blob/main/packages/react-json-tree/src/createStylingFromTheme.ts) for the list of styling object keys. Also, this object can extend `base16` theme via `extend` property. - object that contains style objects, strings (that treated as classnames) or functions. A function is used to extend its first argument `{ style, className }` and should return an object with the same structure. Other arguments depend on particular context (and should be described here). See [createStylingFromTheme.js](https://github.com/reduxjs/redux-devtools/blob/main/packages/react-json-tree/src/createStylingFromTheme.ts) for the list of styling object keys. Also, this object can extend `base16` theme via `extend` property.
Every theme has a light version, which is enabled with `invertTheme` prop. Every theme has a light version, which is enabled with `invertTheme` prop.

View File

@ -26,27 +26,27 @@
"react-json-tree": "^0.17.0" "react-json-tree": "^0.17.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.18.5", "@babel/core": "^7.19.3",
"@babel/preset-env": "^7.18.2", "@babel/preset-env": "^7.19.4",
"@babel/preset-react": "^7.17.12", "@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.17.12", "@babel/preset-typescript": "^7.18.6",
"@types/node": "^16.11.41", "@types/node": "^18.11.7",
"@types/react": "^18.0.14", "@types/react": "^18.0.21",
"@types/react-dom": "^18.0.5", "@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/parser": "^5.40.1",
"babel-loader": "^8.2.5", "babel-loader": "^9.0.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^8.18.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-react": "^7.30.1", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"fork-ts-checker-webpack-plugin": "^7.2.11", "fork-ts-checker-webpack-plugin": "^7.2.13",
"html-webpack-plugin": "^5.5.0", "html-webpack-plugin": "^5.5.0",
"ts-node": "^10.8.1", "ts-node": "^10.9.1",
"typescript": "~4.7.4", "typescript": "~4.8.4",
"webpack": "^5.73.0", "webpack": "^5.74.0",
"webpack-cli": "^4.10.0", "webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.9.2" "webpack-dev-server": "^4.11.1"
} }
} }

View File

@ -1,8 +1,6 @@
module.exports = { module.exports = {
preset: 'ts-jest', preset: 'ts-jest',
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
}; };

View File

@ -45,44 +45,44 @@
"prepublish": "pnpm run type-check && pnpm run lint && pnpm run test" "prepublish": "pnpm run type-check && pnpm run lint && pnpm run test"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.19.4",
"@types/lodash": "^4.14.182", "@types/lodash": "^4.14.186",
"@types/prop-types": "^15.7.5", "@types/prop-types": "^15.7.5",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
"react-base16-styling": "^0.9.1" "react-base16-styling": "^0.9.1"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.17.10", "@babel/cli": "^7.19.3",
"@babel/core": "^7.18.5", "@babel/core": "^7.19.3",
"@babel/eslint-parser": "^7.18.2", "@babel/eslint-parser": "^7.19.1",
"@babel/plugin-transform-runtime": "^7.18.5", "@babel/plugin-transform-runtime": "^7.19.1",
"@babel/preset-env": "^7.18.2", "@babel/preset-env": "^7.19.4",
"@babel/preset-react": "^7.17.12", "@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.17.12", "@babel/preset-typescript": "^7.18.6",
"@rollup/plugin-babel": "^5.3.1", "@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-commonjs": "^22.0.1", "@rollup/plugin-commonjs": "^23.0.0",
"@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-node-resolve": "^15.0.0",
"@types/jest": "^27.5.2", "@rollup/plugin-terser": "^0.1.0",
"@types/node": "^16.11.41", "@types/jest": "^29.2.0",
"@types/react": "^18.0.14", "@types/node": "^18.11.7",
"@types/react": "^18.0.21",
"@types/react-test-renderer": "^18.0.0", "@types/react-test-renderer": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/parser": "^5.40.1",
"eslint": "^8.18.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^26.5.3", "eslint-plugin-jest": "^27.1.2",
"eslint-plugin-react": "^7.30.1", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"react": "^18.2.0", "react": "^18.2.0",
"react-test-renderer": "^18.2.0", "react-test-renderer": "^18.2.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^2.75.7", "rollup": "^3.2.3",
"rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.34.1",
"rollup-plugin-typescript2": "^0.32.1", "ts-jest": "^29.0.3",
"ts-jest": "^27.1.5",
"tslib": "^2.4.0", "tslib": "^2.4.0",
"typescript": "~4.7.4" "typescript": "~4.8.4"
}, },
"peerDependencies": { "peerDependencies": {
"@types/react": "^16.3.0 || ^17.0.0 || ^18.0.0", "@types/react": "^16.3.0 || ^17.0.0 || ^18.0.0",

View File

@ -2,7 +2,7 @@ import typescript from 'rollup-plugin-typescript2';
import resolve from '@rollup/plugin-node-resolve'; import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs'; import commonjs from '@rollup/plugin-commonjs';
import babel from '@rollup/plugin-babel'; import babel from '@rollup/plugin-babel';
import { terser } from 'rollup-plugin-terser'; import terser from '@rollup/plugin-terser';
const config = [ const config = [
{ {

View File

@ -5,9 +5,8 @@ module.exports = {
moduleNameMapper: { moduleNameMapper: {
'\\.css$': '<rootDir>/test/__mocks__/styleMock.ts', '\\.css$': '<rootDir>/test/__mocks__/styleMock.ts',
}, },
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
resolver: '<rootDir>/jestResolver.js',
}; };

View File

@ -0,0 +1,15 @@
module.exports = (path, options) => {
return options.defaultResolver(path, {
...options,
packageFilter: (pkg) => {
if (pkg.name === 'nanoid') {
pkg.exports['.'].browser = pkg.exports['.'].require;
}
if (pkg.name === 'uuid' && pkg.version.startsWith('8.')) {
delete pkg.exports;
delete pkg.module;
}
return pkg;
},
});
};

View File

@ -29,9 +29,9 @@
"build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs", "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs",
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm", "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly", "build:types": "tsc --emitDeclarationOnly",
"build:web": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack --env platform=web --progress", "build:web": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack --env platform=web",
"build:umd": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack --progress --config webpack.config.umd.ts", "build:umd": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack --config webpack.config.umd.ts",
"build:umd:min": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack --env production --progress --config webpack.config.umd.ts", "build:umd:min": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack --env production --config webpack.config.umd.ts",
"clean": "rimraf build lib umd", "clean": "rimraf build lib umd",
"test": "jest", "test": "jest",
"lint": "eslint . --ext .ts,.tsx", "lint": "eslint . --ext .ts,.tsx",
@ -40,7 +40,7 @@
"prepublish": "pnpm run type-check && pnpm run lint && pnpm run test" "prepublish": "pnpm run type-check && pnpm run lint && pnpm run test"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.19.4",
"@redux-devtools/chart-monitor": "^3.0.0", "@redux-devtools/chart-monitor": "^3.0.0",
"@redux-devtools/core": "^3.13.0", "@redux-devtools/core": "^3.13.0",
"@redux-devtools/inspector-monitor": "^3.0.0", "@redux-devtools/inspector-monitor": "^3.0.0",
@ -50,7 +50,7 @@
"@redux-devtools/rtk-query-monitor": "^3.0.0", "@redux-devtools/rtk-query-monitor": "^3.0.0",
"@redux-devtools/slider-monitor": "^4.0.0", "@redux-devtools/slider-monitor": "^4.0.0",
"@redux-devtools/ui": "^1.3.0", "@redux-devtools/ui": "^1.3.0",
"@reduxjs/toolkit": "^1.8.2", "@reduxjs/toolkit": "^1.8.6",
"@types/prop-types": "^15.7.5", "@types/prop-types": "^15.7.5",
"d3-state-visualizer": "^1.6.0", "d3-state-visualizer": "^1.6.0",
"javascript-stringify": "^2.1.0", "javascript-stringify": "^2.1.0",
@ -59,66 +59,67 @@
"localforage": "^1.10.0", "localforage": "^1.10.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
"react-icons": "^4.4.0", "react-icons": "^4.6.0",
"react-is": "^18.2.0", "react-is": "^18.2.0",
"react-redux": "^8.0.2", "react-redux": "^8.0.4",
"redux": "^4.2.0", "redux": "^4.2.0",
"redux-persist": "^6.0.0", "redux-persist": "^6.0.0",
"socketcluster-client": "^16.1.1" "socketcluster-client": "^17.1.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.17.10", "@babel/cli": "^7.19.3",
"@babel/core": "^7.18.5", "@babel/core": "^7.19.3",
"@babel/eslint-parser": "^7.18.2", "@babel/eslint-parser": "^7.19.1",
"@babel/plugin-transform-runtime": "^7.18.5", "@babel/plugin-transform-runtime": "^7.19.1",
"@babel/preset-env": "^7.18.2", "@babel/preset-env": "^7.19.4",
"@babel/preset-react": "^7.17.12", "@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.17.12", "@babel/preset-typescript": "^7.18.6",
"@rjsf/core": "^4.2.0", "@rjsf/core": "^4.2.3",
"@testing-library/jest-dom": "^5.16.4", "@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.3.0", "@testing-library/react": "^13.4.0",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/jsan": "^3.1.2", "@types/jsan": "^3.1.2",
"@types/json-schema": "^7.0.11", "@types/json-schema": "^7.0.11",
"@types/lodash": "^4.14.182", "@types/lodash": "^4.14.186",
"@types/node": "^16.11.41", "@types/node": "^18.11.7",
"@types/react": "^18.0.14", "@types/react": "^18.0.21",
"@types/react-dom": "^18.0.5", "@types/react-dom": "^18.0.6",
"@types/socketcluster-client": "^16.0.0", "@types/socketcluster-client": "^16.0.0",
"@types/styled-components": "^5.1.25", "@types/styled-components": "^5.1.26",
"@types/testing-library__jest-dom": "^5.14.5", "@types/testing-library__jest-dom": "^5.14.5",
"@types/webpack-env": "^1.17.0", "@types/webpack-env": "^1.18.0",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/parser": "^5.40.1",
"babel-loader": "^8.2.5", "babel-loader": "^9.0.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"css-loader": "^6.7.1", "css-loader": "^6.7.1",
"eslint": "^8.18.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^26.5.3", "eslint-plugin-jest": "^27.1.2",
"eslint-plugin-react": "^7.30.1", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"fork-ts-checker-webpack-plugin": "^7.2.11", "fork-ts-checker-webpack-plugin": "^7.2.13",
"html-loader": "^3.1.2", "html-loader": "^4.2.0",
"html-webpack-plugin": "^5.5.0", "html-webpack-plugin": "^5.5.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"jest-environment-jsdom": "^29.2.2",
"path-browserify": "^1.0.1", "path-browserify": "^1.0.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"style-loader": "^3.3.1", "style-loader": "^3.3.1",
"styled-components": "^5.3.5", "styled-components": "^5.3.6",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"ts-node": "^10.8.1", "ts-node": "^10.9.1",
"typescript": "~4.7.4", "typescript": "~4.8.4",
"webpack": "^5.73.0", "webpack": "^5.74.0",
"webpack-cli": "^4.10.0", "webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.9.2" "webpack-dev-server": "^4.11.1"
}, },
"peerDependencies": { "peerDependencies": {
"@types/react": "^16.3.0 || ^17.0.0 || ^18.0.0", "@types/react": "^16.3.0 || ^17.0.0 || ^18.0.0",
"@types/styled-components": "^5.1.25", "@types/styled-components": "^5.1.26",
"react": "^16.3.0 || ^17.0.0 || ^18.0.0", "react": "^16.3.0 || ^17.0.0 || ^18.0.0",
"styled-components": "^5.3.5" "styled-components": "^5.3.6"
} }
} }

View File

@ -39,7 +39,7 @@
"prepublish": "pnpm run type-check && pnpm run lint" "prepublish": "pnpm run type-check && pnpm run lint"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.19.4",
"@types/prop-types": "^15.7.5", "@types/prop-types": "^15.7.5",
"@types/redux-devtools-themes": "^1.0.0", "@types/redux-devtools-themes": "^1.0.0",
"d3-state-visualizer": "^1.6.0", "d3-state-visualizer": "^1.6.0",
@ -48,25 +48,25 @@
"redux-devtools-themes": "^1.0.0" "redux-devtools-themes": "^1.0.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.17.10", "@babel/cli": "^7.19.3",
"@babel/core": "^7.18.5", "@babel/core": "^7.19.3",
"@babel/eslint-parser": "^7.18.2", "@babel/eslint-parser": "^7.19.1",
"@babel/plugin-transform-runtime": "^7.18.5", "@babel/plugin-transform-runtime": "^7.19.1",
"@babel/preset-env": "^7.18.2", "@babel/preset-env": "^7.19.4",
"@babel/preset-react": "^7.17.12", "@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.17.12", "@babel/preset-typescript": "^7.18.6",
"@redux-devtools/core": "^3.13.1", "@redux-devtools/core": "^3.13.1",
"@types/react": "^18.0.14", "@types/react": "^18.0.21",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/parser": "^5.40.1",
"eslint": "^8.18.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-react": "^7.30.1", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"react": "^18.2.0", "react": "^18.2.0",
"redux": "^4.2.0", "redux": "^4.2.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"typescript": "~4.7.4" "typescript": "~4.8.4"
}, },
"peerDependencies": { "peerDependencies": {
"@redux-devtools/core": "^3.13.1", "@redux-devtools/core": "^3.13.1",

View File

@ -1,8 +1,6 @@
module.exports = { module.exports = {
preset: 'ts-jest', preset: 'ts-jest',
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
}; };

View File

@ -41,57 +41,57 @@
}, },
"dependencies": { "dependencies": {
"@redux-devtools/app": "^2.1.3", "@redux-devtools/app": "^2.1.3",
"@types/react": "^18.0.14", "@types/react": "^18.0.21",
"apollo-server-express": "^3.9.0", "apollo-server-express": "^3.10.3",
"body-parser": "^1.20.0", "body-parser": "^1.20.1",
"chalk": "^4.1.2", "chalk": "^4.1.2",
"cors": "^2.8.5", "cors": "^2.8.5",
"cross-spawn": "^7.0.3", "cross-spawn": "^7.0.3",
"electron": "^19.0.6", "electron": "^21.1.1",
"express": "^4.18.1", "express": "^4.18.2",
"getport": "^0.1.0", "getport": "^0.1.0",
"graphql": "^16.5.0", "graphql": "^16.6.0",
"knex": "^2.1.0", "knex": "^2.3.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"minimist": "^1.2.6", "minimist": "^1.2.7",
"morgan": "^1.10.0", "morgan": "^1.10.0",
"open": "^8.4.0", "open": "^8.4.0",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-is": "^18.2.0", "react-is": "^18.2.0",
"semver": "^7.3.7", "semver": "^7.3.8",
"socketcluster-server": "^16.2.1", "socketcluster-server": "^17.2.0",
"sqlite3": "^5.0.8", "sqlite3": "^5.1.2",
"styled-components": "^5.3.5", "styled-components": "^5.3.6",
"uuid": "^8.3.2" "uuid": "^9.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/body-parser": "^1.19.2", "@types/body-parser": "^1.19.2",
"@types/cors": "^2.8.12", "@types/cors": "^2.8.12",
"@types/cross-spawn": "^6.0.2", "@types/cross-spawn": "^6.0.2",
"@types/express": "^4.17.13", "@types/express": "^4.17.14",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/lodash": "^4.14.182", "@types/lodash": "^4.14.186",
"@types/minimist": "^1.2.2", "@types/minimist": "^1.2.2",
"@types/morgan": "^1.9.3", "@types/morgan": "^1.9.3",
"@types/node": "^16.11.41", "@types/node": "^18.11.7",
"@types/semver": "^7.3.10", "@types/semver": "^7.3.12",
"@types/socketcluster-client": "^16.0.0", "@types/socketcluster-client": "^16.0.0",
"@types/socketcluster-server": "^16.1.0", "@types/socketcluster-server": "^16.1.0",
"@types/styled-components": "^5.1.25", "@types/styled-components": "^5.1.26",
"@types/supertest": "^2.0.12", "@types/supertest": "^2.0.12",
"@types/uuid": "^8.3.4", "@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/parser": "^5.40.1",
"eslint": "^8.18.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^26.5.3", "eslint-plugin-jest": "^27.1.2",
"jest": "^27.5.1", "jest": "^29.2.2",
"ncp": "^2.0.0", "ncp": "^2.0.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"socketcluster-client": "^16.1.1", "socketcluster-client": "^17.1.0",
"supertest": "^6.2.3", "supertest": "^6.3.0",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"typescript": "~4.7.4" "typescript": "~4.8.4"
} }
} }

View File

@ -41,33 +41,33 @@
"prepublish": "pnpm run type-check && pnpm run lint" "prepublish": "pnpm run type-check && pnpm run lint"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.19.4",
"@types/prop-types": "^15.7.5", "@types/prop-types": "^15.7.5",
"parse-key": "^0.2.1", "parse-key": "^0.2.1",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
"react-dock": "^0.6.0" "react-dock": "^0.6.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.17.10", "@babel/cli": "^7.19.3",
"@babel/core": "^7.18.5", "@babel/core": "^7.19.3",
"@babel/eslint-parser": "^7.18.2", "@babel/eslint-parser": "^7.19.1",
"@babel/plugin-transform-runtime": "^7.18.5", "@babel/plugin-transform-runtime": "^7.19.1",
"@babel/preset-env": "^7.18.2", "@babel/preset-env": "^7.19.4",
"@babel/preset-react": "^7.17.12", "@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.17.12", "@babel/preset-typescript": "^7.18.6",
"@redux-devtools/core": "^3.13.1", "@redux-devtools/core": "^3.13.1",
"@types/parse-key": "^0.2.0", "@types/parse-key": "^0.2.0",
"@types/react": "^18.0.14", "@types/react": "^18.0.21",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/parser": "^5.40.1",
"eslint": "^8.18.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-react": "^7.30.1", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"react": "^18.2.0", "react": "^18.2.0",
"redux": "^4.2.0", "redux": "^4.2.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"typescript": "~4.7.4" "typescript": "~4.8.4"
}, },
"peerDependencies": { "peerDependencies": {
"@redux-devtools/core": "^3.13.1", "@redux-devtools/core": "^3.13.1",

View File

@ -1,5 +1,11 @@
# Change Log # Change Log
## 3.2.3
### Patch Changes
- 6cf1865f: Fix type for serialize option
## 3.2.2 ## 3.2.2
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@redux-devtools/extension", "name": "@redux-devtools/extension",
"version": "3.2.2", "version": "3.2.3",
"description": "Wrappers for Redux DevTools Extension.", "description": "Wrappers for Redux DevTools Extension.",
"homepage": "https://github.com/reduxjs/redux-devtools/tree/master/packages/redux-devtools-extension", "homepage": "https://github.com/reduxjs/redux-devtools/tree/master/packages/redux-devtools-extension",
"license": "MIT", "license": "MIT",
@ -29,23 +29,23 @@
"prepublish": "pnpm run type-check && pnpm run lint" "prepublish": "pnpm run type-check && pnpm run lint"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.19.4",
"immutable": "^4.0.0" "immutable": "^4.1.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.17.10", "@babel/cli": "^7.19.3",
"@babel/core": "^7.18.5", "@babel/core": "^7.19.3",
"@babel/eslint-parser": "^7.18.2", "@babel/eslint-parser": "^7.19.1",
"@babel/plugin-transform-runtime": "^7.18.5", "@babel/plugin-transform-runtime": "^7.19.1",
"@babel/preset-env": "^7.18.2", "@babel/preset-env": "^7.19.4",
"@babel/preset-typescript": "^7.17.12", "@babel/preset-typescript": "^7.18.6",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/parser": "^5.40.1",
"eslint": "^8.18.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"redux": "^4.2.0", "redux": "^4.2.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"typescript": "~4.7.4" "typescript": "~4.8.4"
}, },
"peerDependencies": { "peerDependencies": {
"redux": "^3.1.0 || ^4.0.0" "redux": "^3.1.0 || ^4.0.0"

View File

@ -8,7 +8,7 @@ const objectKeys =
return keys; return keys;
}; };
export default function assign<T, K extends keyof T>( export default function assign<T extends object, K extends keyof T>(
obj: T, obj: T,
newKey: K, newKey: K,
newValue: T[K] newValue: T[K]

View File

@ -20,40 +20,40 @@
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-is": "^18.2.0", "react-is": "^18.2.0",
"react-redux": "^8.0.2", "react-redux": "^8.0.4",
"react-router-dom": "^6.3.0", "react-router-dom": "^6.4.2",
"redux": "^4.2.0", "redux": "^4.2.0",
"redux-logger": "^3.0.6", "redux-logger": "^3.0.6",
"styled-components": "^5.3.5" "styled-components": "^5.3.6"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.18.5", "@babel/core": "^7.19.3",
"@babel/preset-env": "^7.18.2", "@babel/preset-env": "^7.19.4",
"@babel/preset-react": "^7.17.12", "@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.17.12", "@babel/preset-typescript": "^7.18.6",
"@types/lodash.shuffle": "^4.2.7", "@types/lodash.shuffle": "^4.2.7",
"@types/node": "^16.11.41", "@types/node": "^18.11.7",
"@types/react": "^18.0.14", "@types/react": "^18.0.21",
"@types/react-dom": "^18.0.5", "@types/react-dom": "^18.0.6",
"@types/redux-logger": "^3.0.9", "@types/redux-logger": "^3.0.9",
"@types/styled-components": "^5.1.25", "@types/styled-components": "^5.1.26",
"@types/webpack-env": "^1.17.0", "@types/webpack-env": "^1.18.0",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/parser": "^5.40.1",
"babel-loader": "^8.2.5", "babel-loader": "^9.0.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"css-loader": "^6.7.1", "css-loader": "^6.7.1",
"eslint": "^8.18.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-react": "^7.30.1", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"fork-ts-checker-webpack-plugin": "^7.2.11", "fork-ts-checker-webpack-plugin": "^7.2.13",
"html-webpack-plugin": "^5.5.0", "html-webpack-plugin": "^5.5.0",
"style-loader": "^3.3.1", "style-loader": "^3.3.1",
"ts-node": "^10.8.1", "ts-node": "^10.9.1",
"typescript": "~4.7.4", "typescript": "~4.8.4",
"webpack": "^5.73.0", "webpack": "^5.74.0",
"webpack-cli": "^4.10.0", "webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.9.2" "webpack-dev-server": "^4.11.1"
} }
} }

View File

@ -4,9 +4,8 @@ module.exports = {
moduleNameMapper: { moduleNameMapper: {
'\\.css$': '<rootDir>/test/__mocks__/styleMock.ts', '\\.css$': '<rootDir>/test/__mocks__/styleMock.ts',
}, },
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
resolver: '<rootDir>/jestResolver.js',
}; };

View File

@ -0,0 +1,11 @@
module.exports = (path, options) => {
return options.defaultResolver(path, {
...options,
packageFilter: (pkg) => {
if (pkg.name === 'nanoid') {
pkg.exports['.'].browser = pkg.exports['.'].require;
}
return pkg;
},
});
};

Some files were not shown because too many files have changed in this diff Show More