mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge pull request #4590 from node-red/jsonata-update
Upgrade to JSONata 2.x
This commit is contained in:
13
packages/node_modules/@node-red/util/lib/util.js
vendored
13
packages/node_modules/@node-red/util/lib/util.js
vendored
@@ -777,12 +777,15 @@ function evaluateJSONataExpression(expr,msg,callback) {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
log.warn('Deprecated API warning: Calls to RED.util.evaluateJSONataExpression must include a callback. '+
|
||||
'This will not be optional in Node-RED 4.0. Please identify the node from the following stack '+
|
||||
'and check for an update on npm. If none is available, please notify the node author.')
|
||||
log.warn(new Error().stack)
|
||||
const error = new Error('Calls to RED.util.evaluateJSONataExpression must include a callback.')
|
||||
throw error
|
||||
}
|
||||
return expr.evaluate(context, bindings, callback);
|
||||
|
||||
expr.evaluate(context, bindings).then(result => {
|
||||
callback(null, result)
|
||||
}).catch(err => {
|
||||
callback(err)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -18,7 +18,7 @@
|
||||
"fs-extra": "11.1.1",
|
||||
"i18next": "21.10.0",
|
||||
"json-stringify-safe": "5.0.1",
|
||||
"jsonata": "1.8.6",
|
||||
"jsonata": "2.0.4",
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
"moment": "2.29.4",
|
||||
"moment-timezone": "0.5.43"
|
||||
|
Reference in New Issue
Block a user