Merge branch 'main' into renovate/msw

This commit is contained in:
Nathan Bierema 2024-01-23 21:48:25 -05:00 committed by GitHub
commit cad3cf145c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 65 additions and 67 deletions

View File

@ -6,6 +6,6 @@ module.exports = {
'\\.css$': '<rootDir>/test/__mocks__/styleMock.ts', '\\.css$': '<rootDir>/test/__mocks__/styleMock.ts',
}, },
transformIgnorePatterns: [ transformIgnorePatterns: [
'node_modules/(?!.pnpm|@babel/code-frame|@babel/highlight|@babel/helper-validator-identifier|chalk|d3|dateformat|delaunator|internmap|nanoid|robust-predicates|uuid)', 'node_modules/(?!.pnpm|@babel/code-frame|@babel/highlight|@babel/helper-validator-identifier|chalk|d3|dateformat|delaunator|internmap|jsondiffpatch|nanoid|robust-predicates|uuid)',
], ],
}; };

View File

@ -38,7 +38,7 @@
"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.12.0", "react-icons": "^5.0.1",
"react-is": "^18.2.0", "react-is": "^18.2.0",
"react-json-tree": "^0.18.0", "react-json-tree": "^0.18.0",
"react-redux": "^8.1.3", "react-redux": "^8.1.3",

View File

@ -14,7 +14,7 @@
"react-bootstrap": "^2.9.2", "react-bootstrap": "^2.9.2",
"react-dock": "^0.6.0", "react-dock": "^0.6.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-icons": "^4.12.0", "react-icons": "^5.0.1",
"react-is": "^18.2.0", "react-is": "^18.2.0",
"styled-components": "^5.3.11" "styled-components": "^5.3.11"
}, },

View File

@ -10,6 +10,6 @@ module.exports = {
'^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }], '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
}, },
transformIgnorePatterns: [ transformIgnorePatterns: [
'node_modules/(?!.pnpm|@babel/code-frame|@babel/highlight|@babel/helper-validator-identifier|chalk|d3|dateformat|delaunator|internmap|nanoid|robust-predicates|uuid)', 'node_modules/(?!.pnpm|@babel/code-frame|@babel/highlight|@babel/helper-validator-identifier|chalk|d3|dateformat|delaunator|internmap|jsondiffpatch|nanoid|robust-predicates|uuid)',
], ],
}; };

View File

@ -54,10 +54,10 @@
"d3-state-visualizer": "^2.0.0", "d3-state-visualizer": "^2.0.0",
"javascript-stringify": "^2.1.0", "javascript-stringify": "^2.1.0",
"jsan": "^3.1.14", "jsan": "^3.1.14",
"jsondiffpatch": "^0.5.0", "jsondiffpatch": "^0.6.0",
"localforage": "^1.10.0", "localforage": "^1.10.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"react-icons": "^4.12.0", "react-icons": "^5.0.1",
"react-is": "^18.2.0", "react-is": "^18.2.0",
"react-redux": "^8.1.3", "react-redux": "^8.1.3",
"redux": "^4.2.1", "redux": "^4.2.1",

View File

@ -13,7 +13,7 @@ import RawTab from './RawTab';
import ChartTab from './ChartTab'; import ChartTab from './ChartTab';
import VisualDiffTab from './VisualDiffTab'; import VisualDiffTab from './VisualDiffTab';
import { StoreState } from '../../../reducers'; import { StoreState } from '../../../reducers';
import { Delta } from 'jsondiffpatch'; import type { Delta } from 'jsondiffpatch';
type StateProps = ReturnType<typeof mapStateToProps>; type StateProps = ReturnType<typeof mapStateToProps>;
type DispatchProps = ResolveThunks<typeof actionCreators>; type DispatchProps = ResolveThunks<typeof actionCreators>;

View File

@ -1,5 +1,6 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Delta, formatters } from 'jsondiffpatch'; import type { Delta } from 'jsondiffpatch';
import * as htmlFormatter from 'jsondiffpatch/formatters/html';
import styled, { ThemedStyledProps } from 'styled-components'; import styled, { ThemedStyledProps } from 'styled-components';
import { effects, Theme } from '@redux-devtools/ui'; import { effects, Theme } from '@redux-devtools/ui';
@ -240,7 +241,7 @@ export default class VisualDiffTab extends Component<Props> {
let __html: string | undefined; let __html: string | undefined;
const data = this.props.data; const data = this.props.data;
if (data) { if (data) {
__html = formatters.html.format(data, undefined); __html = htmlFormatter.format(data, undefined);
} }
return <StyledContainer dangerouslySetInnerHTML={{ __html: __html! }} />; return <StyledContainer dangerouslySetInnerHTML={{ __html: __html! }} />;

View File

@ -49,7 +49,7 @@
"javascript-stringify": "^2.1.0", "javascript-stringify": "^2.1.0",
"jsan": "^3.1.14", "jsan": "^3.1.14",
"object-path": "^0.11.8", "object-path": "^0.11.8",
"react-icons": "^4.12.0", "react-icons": "^5.0.1",
"simple-diff": "^1.7.2" "simple-diff": "^1.7.2"
}, },
"devDependencies": { "devDependencies": {

View File

@ -46,7 +46,7 @@
"hex-rgba": "^1.0.2", "hex-rgba": "^1.0.2",
"immutable": "^4.3.4", "immutable": "^4.3.4",
"javascript-stringify": "^2.1.0", "javascript-stringify": "^2.1.0",
"jsondiffpatch": "^0.5.0", "jsondiffpatch": "^0.6.0",
"lodash.debounce": "^4.0.8", "lodash.debounce": "^4.0.8",
"react-base16-styling": "^0.9.1", "react-base16-styling": "^0.9.1",
"react-json-tree": "^0.18.0", "react-json-tree": "^0.18.0",

View File

@ -3,7 +3,7 @@ import { Base16Theme } from 'redux-devtools-themes';
import { Action } from 'redux'; import { Action } from 'redux';
import type { LabelRenderer } from 'react-json-tree'; import type { LabelRenderer } from 'react-json-tree';
import { PerformAction } from '@redux-devtools/core'; import { PerformAction } from '@redux-devtools/core';
import { Delta } from 'jsondiffpatch'; import type { Delta } from 'jsondiffpatch';
import type { JSX } from '@emotion/react/jsx-runtime'; import type { JSX } from '@emotion/react/jsx-runtime';
import { DEFAULT_STATE, DevtoolsInspectorState } from './redux'; import { DEFAULT_STATE, DevtoolsInspectorState } from './redux';
import ActionPreviewHeader from './ActionPreviewHeader'; import ActionPreviewHeader from './ActionPreviewHeader';

View File

@ -6,7 +6,7 @@ import {
LiftedState, LiftedState,
} from '@redux-devtools/core'; } from '@redux-devtools/core';
import { Action, Dispatch } from 'redux'; import { Action, Dispatch } from 'redux';
import { Delta, DiffContext } from 'jsondiffpatch'; import type { Delta, DiffContext } from 'jsondiffpatch';
import { import {
createInspectorMonitorThemeFromBase16Theme, createInspectorMonitorThemeFromBase16Theme,
resolveBase16Theme, resolveBase16Theme,
@ -154,7 +154,7 @@ export interface DevtoolsInspectorProps<S, A extends Action<string>>
select: (state: S) => unknown; select: (state: S) => unknown;
theme: Base16ThemeName | Base16Theme; theme: Base16ThemeName | Base16Theme;
supportImmutable: boolean; supportImmutable: boolean;
diffObjectHash?: (item: unknown, index: number) => string; diffObjectHash?: (item: unknown, index: number | undefined) => string;
diffPropertyFilter?: (name: string, context: DiffContext) => boolean; diffPropertyFilter?: (name: string, context: DiffContext) => boolean;
hideMainButtons?: boolean; hideMainButtons?: boolean;
hideActionButtons?: boolean; hideActionButtons?: boolean;

View File

@ -1,14 +1,19 @@
import { DiffContext, DiffPatcher } from 'jsondiffpatch'; import { DiffPatcher } from 'jsondiffpatch';
import type { DiffContext } from 'jsondiffpatch';
const defaultObjectHash = (o: any, idx: number) => const defaultObjectHash = (obj: object, idx: number | undefined) => {
(o === null && '$$null') || const o = obj as Record<string, unknown>;
(o && (o.id || o.id === 0) && `$$id:${JSON.stringify(o.id)}`) || return (
(o && (o._id || o._id === 0) && `$$_id:${JSON.stringify(o._id)}`) || (o === null && '$$null') ||
`$$index:${idx}`; (o && (o.id || o.id === 0) && `$$id:${JSON.stringify(o.id)}`) ||
(o && (o._id || o._id === 0) && `$$_id:${JSON.stringify(o._id)}`) ||
`$$index:${idx}`
);
};
const defaultPropertyFilter = (name: string, context: DiffContext) => const defaultPropertyFilter = (name: string, context: DiffContext) =>
typeof context.left[name] !== 'function' && typeof (context.left as Record<string, unknown>)[name] !== 'function' &&
typeof context.right[name] !== 'function'; typeof (context.right as Record<string, unknown>)[name] !== 'function';
const defaultDiffPatcher = new DiffPatcher({ const defaultDiffPatcher = new DiffPatcher({
arrays: { detectMove: false } as { arrays: { detectMove: false } as {
@ -20,7 +25,9 @@ const defaultDiffPatcher = new DiffPatcher({
}); });
export default function createDiffPatcher( export default function createDiffPatcher(
objectHash: ((item: unknown, index: number) => string) | undefined, objectHash:
| ((item: unknown, index: number | undefined) => string)
| undefined,
propertyFilter: ((name: string, context: DiffContext) => boolean) | undefined, propertyFilter: ((name: string, context: DiffContext) => boolean) | undefined,
) { ) {
if (!objectHash && !propertyFilter) { if (!objectHash && !propertyFilter) {

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { JSONTree } from 'react-json-tree'; import { JSONTree } from 'react-json-tree';
import type { LabelRenderer, ShouldExpandNodeInitially } from 'react-json-tree'; import type { LabelRenderer, ShouldExpandNodeInitially } from 'react-json-tree';
import { stringify } from 'javascript-stringify'; import { stringify } from 'javascript-stringify';
import { Delta } from 'jsondiffpatch'; import type { Delta } from 'jsondiffpatch';
import { Base16Theme } from 'redux-devtools-themes'; import { Base16Theme } from 'redux-devtools-themes';
import { css } from '@emotion/react'; import { css } from '@emotion/react';
import type { Interpolation, Theme } from '@emotion/react'; import type { Interpolation, Theme } from '@emotion/react';

View File

@ -23,7 +23,7 @@
"msw": "^2.1.4", "msw": "^2.1.4",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-icons": "^4.12.0", "react-icons": "^5.0.1",
"react-is": "^18.2.0", "react-is": "^18.2.0",
"react-redux": "^8.1.3", "react-redux": "^8.1.3",
"react-router-dom": "^6.21.1", "react-router-dom": "^6.21.1",

View File

@ -52,7 +52,7 @@
"base16": "^1.0.0", "base16": "^1.0.0",
"codemirror": "^5.65.16", "codemirror": "^5.65.16",
"color": "^4.2.3", "color": "^4.2.3",
"react-icons": "^4.12.0", "react-icons": "^5.0.1",
"react-select": "^5.8.0", "react-select": "^5.8.0",
"redux-devtools-themes": "^1.0.0", "redux-devtools-themes": "^1.0.0",
"simple-element-resize-detector": "^1.3.0" "simple-element-resize-detector": "^1.3.0"

View File

@ -51,7 +51,7 @@ exports[`Notification renders with props 1`] = `
fill="none" fill="none"
/> />
<path <path
d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
/> />
</svg> </svg>
</button> </button>

View File

@ -102,8 +102,8 @@ importers:
specifier: ^18.2.0 specifier: ^18.2.0
version: 18.2.0(react@18.2.0) version: 18.2.0(react@18.2.0)
react-icons: react-icons:
specifier: ^4.12.0 specifier: ^5.0.1
version: 4.12.0(react@18.2.0) version: 5.0.1(react@18.2.0)
react-is: react-is:
specifier: ^18.2.0 specifier: ^18.2.0
version: 18.2.0 version: 18.2.0
@ -637,8 +637,8 @@ importers:
specifier: ^18.2.0 specifier: ^18.2.0
version: 18.2.0(react@18.2.0) version: 18.2.0(react@18.2.0)
react-icons: react-icons:
specifier: ^4.12.0 specifier: ^5.0.1
version: 4.12.0(react@18.2.0) version: 5.0.1(react@18.2.0)
react-is: react-is:
specifier: ^18.2.0 specifier: ^18.2.0
version: 18.2.0 version: 18.2.0
@ -1043,8 +1043,8 @@ importers:
specifier: ^3.1.14 specifier: ^3.1.14
version: 3.1.14 version: 3.1.14
jsondiffpatch: jsondiffpatch:
specifier: ^0.5.0 specifier: ^0.6.0
version: 0.5.0 version: 0.6.0
localforage: localforage:
specifier: ^1.10.0 specifier: ^1.10.0
version: 1.10.0 version: 1.10.0
@ -1052,8 +1052,8 @@ importers:
specifier: ^4.17.21 specifier: ^4.17.21
version: 4.17.21 version: 4.17.21
react-icons: react-icons:
specifier: ^4.12.0 specifier: ^5.0.1
version: 4.12.0(react@18.2.0) version: 5.0.1(react@18.2.0)
react-is: react-is:
specifier: ^18.2.0 specifier: ^18.2.0
version: 18.2.0 version: 18.2.0
@ -1612,8 +1612,8 @@ importers:
specifier: ^2.1.0 specifier: ^2.1.0
version: 2.1.0 version: 2.1.0
jsondiffpatch: jsondiffpatch:
specifier: ^0.5.0 specifier: ^0.6.0
version: 0.5.0 version: 0.6.0
lodash.debounce: lodash.debounce:
specifier: ^4.0.8 specifier: ^4.0.8
version: 4.0.8 version: 4.0.8
@ -1730,8 +1730,8 @@ importers:
specifier: ^0.11.8 specifier: ^0.11.8
version: 0.11.8 version: 0.11.8
react-icons: react-icons:
specifier: ^4.12.0 specifier: ^5.0.1
version: 4.12.0(react@18.2.0) version: 5.0.1(react@18.2.0)
simple-diff: simple-diff:
specifier: ^1.7.2 specifier: ^1.7.2
version: 1.7.2 version: 1.7.2
@ -2632,8 +2632,8 @@ importers:
specifier: ^18.2.0 specifier: ^18.2.0
version: 18.2.0(react@18.2.0) version: 18.2.0(react@18.2.0)
react-icons: react-icons:
specifier: ^4.12.0 specifier: ^5.0.1
version: 4.12.0(react@18.2.0) version: 5.0.1(react@18.2.0)
react-is: react-is:
specifier: ^18.2.0 specifier: ^18.2.0
version: 18.2.0 version: 18.2.0
@ -3029,8 +3029,8 @@ importers:
specifier: ^4.2.3 specifier: ^4.2.3
version: 4.2.3 version: 4.2.3
react-icons: react-icons:
specifier: ^4.12.0 specifier: ^5.0.1
version: 4.12.0(react@18.2.0) version: 5.0.1(react@18.2.0)
react-select: react-select:
specifier: ^5.8.0 specifier: ^5.8.0
version: 5.8.0(@types/react@18.2.47)(react-dom@18.2.0)(react@18.2.0) version: 5.8.0(@types/react@18.2.47)(react-dom@18.2.0)(react@18.2.0)
@ -10058,6 +10058,10 @@ packages:
resolution: {integrity: sha512-Rf3/lB9WkDfIL9eEKaSYKc+1L/rNVYBjThk22JTqQw0YozXarX8YljFAz+HCoC6h4B4KwCMsBPZHaFezwT4BNA==} resolution: {integrity: sha512-Rf3/lB9WkDfIL9eEKaSYKc+1L/rNVYBjThk22JTqQw0YozXarX8YljFAz+HCoC6h4B4KwCMsBPZHaFezwT4BNA==}
dev: true dev: true
/@types/diff-match-patch@1.0.36:
resolution: {integrity: sha512-xFdR6tkm0MWvBfO8xXCSsinYxHcqkQUlcHeSpMC2ukzOb6lwQAfDmW+Qt0AvlGd8HpsS28qKsB+oPeJn9I39jg==}
dev: false
/@types/doctrine@0.0.3: /@types/doctrine@0.0.3:
resolution: {integrity: sha512-w5jZ0ee+HaPOaX25X2/2oGR/7rgAQSYII7X7pp0m9KgBfMP7uKfMfTvcpl5Dj+eDBbpxKGiqE+flqDr6XTd2RA==} resolution: {integrity: sha512-w5jZ0ee+HaPOaX25X2/2oGR/7rgAQSYII7X7pp0m9KgBfMP7uKfMfTvcpl5Dj+eDBbpxKGiqE+flqDr6XTd2RA==}
dev: true dev: true
@ -12009,6 +12013,7 @@ packages:
dependencies: dependencies:
ansi-styles: 4.3.0 ansi-styles: 4.3.0
supports-color: 7.2.0 supports-color: 7.2.0
dev: true
/chalk@4.1.2: /chalk@4.1.2:
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
@ -16462,15 +16467,15 @@ packages:
resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==}
dev: true dev: true
/jsondiffpatch@0.5.0: /jsondiffpatch@0.6.0:
resolution: {integrity: sha512-Quz3MvAwHxVYNXsOByL7xI5EB2WYOeFswqaHIA3qOK3isRWTxiplBEocmmru6XmxDB2L7jDNYtYA4FyimoAFEw==} resolution: {integrity: sha512-3QItJOXp2AP1uv7waBkao5nCvhEv+QmJAd38Ybq7wNI74Q+BBmnLn4EDKz6yI9xGAIQoUF87qHt+kc1IVxB4zQ==}
engines: {node: '>=8.17.0'} engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true hasBin: true
dependencies: dependencies:
chalk: 3.0.0 '@types/diff-match-patch': 1.0.36
chalk: 5.3.0
diff-match-patch: 1.0.5 diff-match-patch: 1.0.5
dev: false dev: false
bundledDependencies: []
/jsonfile@4.0.0: /jsonfile@4.0.0:
resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==}
@ -18650,8 +18655,8 @@ packages:
use-sidecar: 1.1.2(@types/react@18.2.47)(react@18.2.0) use-sidecar: 1.1.2(@types/react@18.2.47)(react@18.2.0)
dev: false dev: false
/react-icons@4.12.0(react@18.2.0): /react-icons@5.0.1(react@18.2.0):
resolution: {integrity: sha512-IBaDuHiShdZqmfc/TwHu6+d6k2ltNCf3AszxNmjJc1KUfXdEeRJOKyNvLmAHaarhzGmTSVygNdyu8/opXv2gaw==} resolution: {integrity: sha512-WqLZJ4bLzlhmsvme6iFdgO8gfZP17rfjYEJ2m9RsZjZ+cc4k1hTzknEz63YS1MeT50kVzoa1Nz36f4BEx+Wigw==}
peerDependencies: peerDependencies:
react: '*' react: '*'
dependencies: dependencies:

View File

@ -22,11 +22,6 @@
"matchUpdateTypes": ["major", "minor"], "matchUpdateTypes": ["major", "minor"],
"groupName": "source-map" "groupName": "source-map"
}, },
{
"matchPackageNames": ["jsondiffpatch"],
"matchUpdateTypes": ["major", "minor"],
"groupName": "jsondiffpatch"
},
{ {
"matchPackageNames": ["msw"], "matchPackageNames": ["msw"],
"groupName": "msw" "groupName": "msw"
@ -40,16 +35,6 @@
], ],
"matchUpdateTypes": ["major"], "matchUpdateTypes": ["major"],
"groupName": "redux" "groupName": "redux"
},
{
"matchPackageNames": [
"socketcluster-client",
"@types/socketcluster-client",
"socketcluster-server",
"@types/socketcluster-server"
],
"matchUpdateTypes": ["major"],
"groupName": "socketcluster"
} }
] ]
} }

View File

@ -1,7 +1,7 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "ES2020", "target": "es2020",
"moduleResolution": "Node", "moduleResolution": "bundler",
"declaration": true, "declaration": true,
"strict": true, "strict": true,
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,