json-diff-kit
Advanced tools
Comparing version 1.0.22 to 1.0.23
{ | ||
"name": "json-diff-kit", | ||
"version": "1.0.22", | ||
"version": "1.0.23", | ||
"description": "A better JSON differ & viewer.", | ||
@@ -8,2 +8,5 @@ "main": "dist/cjs/index.js", | ||
"typings": "typings", | ||
"bin": { | ||
"jsondiff": "bin/jsondiff.cjs" | ||
}, | ||
"repository": { | ||
@@ -35,5 +38,7 @@ "type": "git", | ||
"@types/lodash": "^4.14.191", | ||
"@types/node": "^20.11.16", | ||
"@types/prismjs": "^1.26.0", | ||
"@types/react": "^17.0.38", | ||
"@types/react-dom": "^17.0.11", | ||
"@types/terminal-kit": "^2.5.6", | ||
"cross-env": "^7.0.3", | ||
@@ -55,4 +60,7 @@ "fork-me-on-github": "^1.0.6", | ||
"dependencies": { | ||
"commander": "^11.1.0", | ||
"fast-myers-diff": "^3.0.1", | ||
"lodash": "^4.17.21" | ||
"lodash": "^4.17.21", | ||
"prompts": "^2.4.2", | ||
"terminal-kit": "^3.0.1" | ||
}, | ||
@@ -64,3 +72,3 @@ "scripts": { | ||
"build": "cross-env pnpm build:ts && pnpm build:less", | ||
"build:ts": "cross-env rollup -c", | ||
"build:ts": "cross-env rollup -c && rollup -c rollup.config.cli.ts", | ||
"build:less": "cross-env lessc src/viewer.less dist/viewer.css && lessc src/viewer-monokai.less dist/viewer-monokai.css", | ||
@@ -67,0 +75,0 @@ "build:pages": "cross-env NODE_ENV=production BASEDIR=docs rollup -c rollup.config.pages.ts", |
@@ -16,4 +16,5 @@ { | ||
"target": "esnext", | ||
"types": ["node"], | ||
}, | ||
"include": ["src"], | ||
} |
@@ -81,9 +81,2 @@ export interface DifferOptions { | ||
/** | ||
* Whether to ignore the case when comparing keys, default `false`. | ||
* | ||
* Notice: if there are keys with different cases in the same object, the algorithm may fail | ||
* since it's not able to tell which key is the correct one. | ||
*/ | ||
ignoreCaseForKey?: boolean; | ||
/** | ||
* Whether to use recursive equal to compare objects, default `false`. | ||
@@ -117,3 +110,3 @@ * | ||
private arrayDiffFunc; | ||
constructor({ detectCircular, maxDepth, showModifications, arrayDiffMethod, ignoreCase, ignoreCaseForKey, recursiveEqual, }?: DifferOptions); | ||
constructor({ detectCircular, maxDepth, showModifications, arrayDiffMethod, recursiveEqual, }?: DifferOptions); | ||
private detectCircular; | ||
@@ -120,0 +113,0 @@ private sortResultLines; |
@@ -0,0 +0,0 @@ import Differ from './differ'; |
@@ -1,4 +0,2 @@ | ||
interface CmpOptions { | ||
ignoreCase?: boolean; | ||
} | ||
import type { DifferOptions } from '../differ'; | ||
/** | ||
@@ -11,3 +9,3 @@ * The compare function to correct the order for "array" or "object": | ||
*/ | ||
declare const cmp: (a: any, b: any, options: CmpOptions) => number; | ||
declare const cmp: (a: any, b: any, options?: DifferOptions) => number; | ||
export default cmp; |
export {}; |
@@ -0,0 +0,0 @@ /** |
export {}; |
declare const detectCircular: (value: any, map?: Map<any, boolean>) => boolean; | ||
export default detectCircular; |
import type { DifferOptions, DiffResult } from '../differ'; | ||
declare const diffArrayLCS: (arrLeft: any[], arrRight: any[], keyLeft: string, keyRight: string, level: number, options: DifferOptions, linesLeft?: DiffResult[], linesRight?: DiffResult[]) => [DiffResult[], DiffResult[]]; | ||
export default diffArrayLCS; |
import type { DiffResult, DifferOptions } from '../differ'; | ||
declare const diffArrayNormal: (arrLeft: any[], arrRight: any[], keyLeft: string, keyRight: string, level: number, options: DifferOptions, linesLeft?: DiffResult[], linesRight?: DiffResult[]) => [DiffResult[], DiffResult[]]; | ||
export default diffArrayNormal; |
import type { DifferOptions, DiffResult, ArrayDiffFunc } from '../differ'; | ||
declare const diffObject: (lhs: Record<string, any>, rhs: Record<string, any>, level: number, options: DifferOptions, arrayDiffFunc: ArrayDiffFunc) => [DiffResult[], DiffResult[]]; | ||
export default diffObject; |
declare const formatValue: (value: any, depth?: number, pretty?: boolean) => string; | ||
export default formatValue; |
export {}; |
@@ -0,0 +0,0 @@ export interface InlineDiffOptions { |
@@ -0,0 +0,0 @@ import type { DiffResult } from '../differ'; |
declare const getType: (value: any) => "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "null" | "array"; | ||
export default getType; |
export {}; |
import type { DifferOptions } from '../differ'; | ||
declare const isEqual: (a: any, b: any, options: DifferOptions) => boolean; | ||
export default isEqual; |
declare const shallowSimilarity: (left: any, right: any) => number; | ||
export default shallowSimilarity; |
import type { DifferOptions } from '../differ'; | ||
declare const sortInnerArrays: (source: any, options?: DifferOptions) => any; | ||
export default sortInnerArrays; |
export {}; |
import type { DifferOptions } from '../differ'; | ||
declare const sortStrings: (arr: string[], options: DifferOptions) => string[]; | ||
export default sortStrings; |
declare const stringify: (obj: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number, depth?: number) => string; | ||
export default stringify; |
export {}; |
@@ -76,13 +76,2 @@ import * as React from 'react'; | ||
hideUnchangedLines?: HideUnchangedLinesOptions; | ||
/** | ||
* Use virtual list to speed up rendering, default is `false`. | ||
*/ | ||
virtual?: boolean | { | ||
/** @default 'body' */ | ||
scrollContainer?: string; | ||
/** @default 18 */ | ||
itemHeight?: number; | ||
/** @default 26 */ | ||
expandLineHeight?: number; | ||
}; | ||
/** Extra class names */ | ||
@@ -89,0 +78,0 @@ className?: string; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
928513
69
14793
5
28
1
+ Addedcommander@^11.1.0
+ Addedprompts@^2.4.2
+ Addedterminal-kit@^3.0.1
+ Added@cronvel/get-pixels@3.4.1(transitive)
+ Addedchroma-js@2.6.0(transitive)
+ Addedcommander@11.1.0(transitive)
+ Addedcwise-compiler@1.1.3(transitive)
+ Addediota-array@1.0.0(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedjpeg-js@0.4.4(transitive)
+ Addedkleur@3.0.3(transitive)
+ Addedlazyness@1.2.0(transitive)
+ Addedndarray@1.0.19(transitive)
+ Addedndarray-pack@1.2.1(transitive)
+ Addednextgen-events@1.5.3(transitive)
+ Addednode-bitmap@0.0.1(transitive)
+ Addedomggif@1.0.10(transitive)
+ Addedpngjs@6.0.0(transitive)
+ Addedprompts@2.4.2(transitive)
+ Addedsetimmediate@1.0.5(transitive)
+ Addedseventh@0.9.2(transitive)
+ Addedsisteransi@1.0.5(transitive)
+ Addedstring-kit@0.18.3(transitive)
+ Addedterminal-kit@3.1.1(transitive)
+ Addedtree-kit@0.8.7(transitive)
+ Addeduniq@1.0.1(transitive)