Skip to content

Commit bfdf176

Browse files
authored
Downgrade jsondiffpatcher to v0.5.0 prior becoming ESM only (#1964)
* fix: downgrade jsondiffpatcher further * fix: add renovate entry
1 parent f27d3a8 commit bfdf176

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

.renovaterc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
{
2424
"matchPackageNames": ["jsondiffpatch"],
25-
"allowedVersions": "<= 0.6.0"
25+
"allowedVersions": "<= 0.5.0"
2626
}
2727
],
2828
"lockFileMaintenance": {

packages/sync-actions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
},
4141
"dependencies": {
4242
"fast-equals": "^2.0.0",
43-
"jsondiffpatch": "0.6.0",
43+
"jsondiffpatch": "0.5.0",
4444
"lodash.flatten": "^4.4.0",
4545
"lodash.foreach": "^4.5.0",
4646
"lodash.intersection": "^4.4.0",

packages/sync-actions/src/utils/diffpatcher.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as jsondiffpatch from 'jsondiffpatch'
1+
import { DiffPatcher } from 'jsondiffpatch/dist/jsondiffpatch.cjs'
22

33
export function objectHash(obj, index) {
44
const objIndex = `$$index:${index}`
@@ -7,7 +7,7 @@ export function objectHash(obj, index) {
77
: objIndex
88
}
99

10-
const diffpatcher = jsondiffpatch.create({
10+
const diffpatcher = new DiffPatcher({
1111
objectHash,
1212
arrays: {
1313
// detect items moved inside the array

pnpm-lock.yaml

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)