mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-22 01:26:48 +03:00
fix(deps): update dependency jsondiffpatch to ^0.6.0 (#1586)
* fix(deps): update dependency jsondiffpatch to ^0.6.0 * Cleanup renovate.json * Code updates * Update test config --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Nathan Bierema <nbierema@gmail.com>
This commit is contained in:
parent
31aabfa82c
commit
9e4e054f8b
|
@ -6,6 +6,6 @@ module.exports = {
|
|||
'\\.css$': '<rootDir>/test/__mocks__/styleMock.ts',
|
||||
},
|
||||
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)',
|
||||
],
|
||||
};
|
||||
|
|
|
@ -10,6 +10,6 @@ module.exports = {
|
|||
'^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
|
||||
},
|
||||
transformIgnorePatterns: [
|
||||
'node_modules/(?!.pnpm|@babel/code-frame|@babel/highlight|@babel/helper-validator-identifier|chalk|d3|dateformat|delaunator|internmap|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)',
|
||||
],
|
||||
};
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
"d3-state-visualizer": "^2.0.0",
|
||||
"javascript-stringify": "^2.1.0",
|
||||
"jsan": "^3.1.14",
|
||||
"jsondiffpatch": "^0.5.0",
|
||||
"jsondiffpatch": "^0.6.0",
|
||||
"localforage": "^1.10.0",
|
||||
"lodash": "^4.17.21",
|
||||
"react-icons": "^5.0.1",
|
||||
|
|
|
@ -13,7 +13,7 @@ import RawTab from './RawTab';
|
|||
import ChartTab from './ChartTab';
|
||||
import VisualDiffTab from './VisualDiffTab';
|
||||
import { StoreState } from '../../../reducers';
|
||||
import { Delta } from 'jsondiffpatch';
|
||||
import type { Delta } from 'jsondiffpatch';
|
||||
|
||||
type StateProps = ReturnType<typeof mapStateToProps>;
|
||||
type DispatchProps = ResolveThunks<typeof actionCreators>;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
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 { effects, Theme } from '@redux-devtools/ui';
|
||||
|
||||
|
@ -240,7 +241,7 @@ export default class VisualDiffTab extends Component<Props> {
|
|||
let __html: string | undefined;
|
||||
const data = this.props.data;
|
||||
if (data) {
|
||||
__html = formatters.html.format(data, undefined);
|
||||
__html = htmlFormatter.format(data, undefined);
|
||||
}
|
||||
|
||||
return <StyledContainer dangerouslySetInnerHTML={{ __html: __html! }} />;
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
"hex-rgba": "^1.0.2",
|
||||
"immutable": "^4.3.4",
|
||||
"javascript-stringify": "^2.1.0",
|
||||
"jsondiffpatch": "^0.5.0",
|
||||
"jsondiffpatch": "^0.6.0",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"react-base16-styling": "^0.9.1",
|
||||
"react-json-tree": "^0.18.0",
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Base16Theme } from 'redux-devtools-themes';
|
|||
import { Action } from 'redux';
|
||||
import type { LabelRenderer } from 'react-json-tree';
|
||||
import { PerformAction } from '@redux-devtools/core';
|
||||
import { Delta } from 'jsondiffpatch';
|
||||
import type { Delta } from 'jsondiffpatch';
|
||||
import type { JSX } from '@emotion/react/jsx-runtime';
|
||||
import { DEFAULT_STATE, DevtoolsInspectorState } from './redux';
|
||||
import ActionPreviewHeader from './ActionPreviewHeader';
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
LiftedState,
|
||||
} from '@redux-devtools/core';
|
||||
import { Action, Dispatch } from 'redux';
|
||||
import { Delta, DiffContext } from 'jsondiffpatch';
|
||||
import type { Delta, DiffContext } from 'jsondiffpatch';
|
||||
import {
|
||||
createInspectorMonitorThemeFromBase16Theme,
|
||||
resolveBase16Theme,
|
||||
|
@ -154,7 +154,7 @@ export interface DevtoolsInspectorProps<S, A extends Action<string>>
|
|||
select: (state: S) => unknown;
|
||||
theme: Base16ThemeName | Base16Theme;
|
||||
supportImmutable: boolean;
|
||||
diffObjectHash?: (item: unknown, index: number) => string;
|
||||
diffObjectHash?: (item: unknown, index: number | undefined) => string;
|
||||
diffPropertyFilter?: (name: string, context: DiffContext) => boolean;
|
||||
hideMainButtons?: boolean;
|
||||
hideActionButtons?: boolean;
|
||||
|
|
|
@ -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) => {
|
||||
const o = obj as Record<string, unknown>;
|
||||
return (
|
||||
(o === null && '$$null') ||
|
||||
(o && (o.id || o.id === 0) && `$$id:${JSON.stringify(o.id)}`) ||
|
||||
(o && (o._id || o._id === 0) && `$$_id:${JSON.stringify(o._id)}`) ||
|
||||
`$$index:${idx}`;
|
||||
`$$index:${idx}`
|
||||
);
|
||||
};
|
||||
|
||||
const defaultPropertyFilter = (name: string, context: DiffContext) =>
|
||||
typeof context.left[name] !== 'function' &&
|
||||
typeof context.right[name] !== 'function';
|
||||
typeof (context.left as Record<string, unknown>)[name] !== 'function' &&
|
||||
typeof (context.right as Record<string, unknown>)[name] !== 'function';
|
||||
|
||||
const defaultDiffPatcher = new DiffPatcher({
|
||||
arrays: { detectMove: false } as {
|
||||
|
@ -20,7 +25,9 @@ const defaultDiffPatcher = new DiffPatcher({
|
|||
});
|
||||
|
||||
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,
|
||||
) {
|
||||
if (!objectHash && !propertyFilter) {
|
||||
|
|
|
@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|||
import { JSONTree } from 'react-json-tree';
|
||||
import type { LabelRenderer, ShouldExpandNodeInitially } from 'react-json-tree';
|
||||
import { stringify } from 'javascript-stringify';
|
||||
import { Delta } from 'jsondiffpatch';
|
||||
import type { Delta } from 'jsondiffpatch';
|
||||
import { Base16Theme } from 'redux-devtools-themes';
|
||||
import { css } from '@emotion/react';
|
||||
import type { Interpolation, Theme } from '@emotion/react';
|
||||
|
|
|
@ -1043,8 +1043,8 @@ importers:
|
|||
specifier: ^3.1.14
|
||||
version: 3.1.14
|
||||
jsondiffpatch:
|
||||
specifier: ^0.5.0
|
||||
version: 0.5.0
|
||||
specifier: ^0.6.0
|
||||
version: 0.6.0
|
||||
localforage:
|
||||
specifier: ^1.10.0
|
||||
version: 1.10.0
|
||||
|
@ -1612,8 +1612,8 @@ importers:
|
|||
specifier: ^2.1.0
|
||||
version: 2.1.0
|
||||
jsondiffpatch:
|
||||
specifier: ^0.5.0
|
||||
version: 0.5.0
|
||||
specifier: ^0.6.0
|
||||
version: 0.6.0
|
||||
lodash.debounce:
|
||||
specifier: ^4.0.8
|
||||
version: 4.0.8
|
||||
|
@ -10064,6 +10064,10 @@ packages:
|
|||
resolution: {integrity: sha512-Rf3/lB9WkDfIL9eEKaSYKc+1L/rNVYBjThk22JTqQw0YozXarX8YljFAz+HCoC6h4B4KwCMsBPZHaFezwT4BNA==}
|
||||
dev: true
|
||||
|
||||
/@types/diff-match-patch@1.0.36:
|
||||
resolution: {integrity: sha512-xFdR6tkm0MWvBfO8xXCSsinYxHcqkQUlcHeSpMC2ukzOb6lwQAfDmW+Qt0AvlGd8HpsS28qKsB+oPeJn9I39jg==}
|
||||
dev: false
|
||||
|
||||
/@types/doctrine@0.0.3:
|
||||
resolution: {integrity: sha512-w5jZ0ee+HaPOaX25X2/2oGR/7rgAQSYII7X7pp0m9KgBfMP7uKfMfTvcpl5Dj+eDBbpxKGiqE+flqDr6XTd2RA==}
|
||||
dev: true
|
||||
|
@ -12019,6 +12023,7 @@ packages:
|
|||
dependencies:
|
||||
ansi-styles: 4.3.0
|
||||
supports-color: 7.2.0
|
||||
dev: true
|
||||
|
||||
/chalk@4.1.2:
|
||||
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
|
||||
|
@ -16477,15 +16482,15 @@ packages:
|
|||
resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==}
|
||||
dev: true
|
||||
|
||||
/jsondiffpatch@0.5.0:
|
||||
resolution: {integrity: sha512-Quz3MvAwHxVYNXsOByL7xI5EB2WYOeFswqaHIA3qOK3isRWTxiplBEocmmru6XmxDB2L7jDNYtYA4FyimoAFEw==}
|
||||
engines: {node: '>=8.17.0'}
|
||||
/jsondiffpatch@0.6.0:
|
||||
resolution: {integrity: sha512-3QItJOXp2AP1uv7waBkao5nCvhEv+QmJAd38Ybq7wNI74Q+BBmnLn4EDKz6yI9xGAIQoUF87qHt+kc1IVxB4zQ==}
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
chalk: 3.0.0
|
||||
'@types/diff-match-patch': 1.0.36
|
||||
chalk: 5.3.0
|
||||
diff-match-patch: 1.0.5
|
||||
dev: false
|
||||
bundledDependencies: []
|
||||
|
||||
/jsonfile@4.0.0:
|
||||
resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==}
|
||||
|
|
|
@ -22,11 +22,6 @@
|
|||
"matchUpdateTypes": ["major", "minor"],
|
||||
"groupName": "source-map"
|
||||
},
|
||||
{
|
||||
"matchPackageNames": ["jsondiffpatch"],
|
||||
"matchUpdateTypes": ["major", "minor"],
|
||||
"groupName": "jsondiffpatch"
|
||||
},
|
||||
{
|
||||
"matchPackageNames": ["msw"],
|
||||
"groupName": "msw"
|
||||
|
@ -40,16 +35,6 @@
|
|||
],
|
||||
"matchUpdateTypes": ["major"],
|
||||
"groupName": "redux"
|
||||
},
|
||||
{
|
||||
"matchPackageNames": [
|
||||
"socketcluster-client",
|
||||
"@types/socketcluster-client",
|
||||
"socketcluster-server",
|
||||
"@types/socketcluster-server"
|
||||
],
|
||||
"matchUpdateTypes": ["major"],
|
||||
"groupName": "socketcluster"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user