Skip to content

Commit

Permalink
Revert "refactor: import of compareJSON (#814)"
Browse files Browse the repository at this point in the history
This reverts commit 3535a4e.
  • Loading branch information
johannes-vogel committed Oct 1, 2024
1 parent cd271a8 commit 785bf79
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion db-service/lib/deep-queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,20 @@ const { _target_name4 } = require('./SQLService')

const ROOT = Symbol('root')

const { compareJson } = require('@sap/cds/libx/_runtime/common/utils/compareJson')
// REVISIT: remove old path with cds^8
let _compareJson
const compareJson = (...args) => {
if (!_compareJson) {
try {
// new path
_compareJson = require('@sap/cds/libx/_runtime/common/utils/compareJson').compareJson
} catch {
// old path
_compareJson = require('@sap/cds/libx/_runtime/cds-services/services/utils/compareJson').compareJson
}
}
return _compareJson(...args)
}

const handledDeep = Symbol('handledDeep')

Expand Down

0 comments on commit 785bf79

Please sign in to comment.