@node-red/util
Advanced tools
Comparing version 3.1.7 to 4.0.0-beta.1
@@ -639,3 +639,11 @@ /** | ||
} else if (type === 'date') { | ||
result = Date.now(); | ||
if (!value) { | ||
result = Date.now(); | ||
} else if (value === 'object') { | ||
result = new Date() | ||
} else if (value === 'iso') { | ||
result = (new Date()).toISOString() | ||
} else { | ||
result = moment().format(value) | ||
} | ||
} else if (type === 'bin') { | ||
@@ -773,8 +781,11 @@ var data = JSON.parse(value); | ||
} 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) | ||
}) | ||
} | ||
@@ -781,0 +792,0 @@ |
{ | ||
"name": "@node-red/util", | ||
"version": "3.1.7", | ||
"version": "4.0.0-beta.1", | ||
"license": "Apache-2.0", | ||
@@ -21,3 +21,3 @@ "repository": { | ||
"json-stringify-safe": "5.0.1", | ||
"jsonata": "1.8.7", | ||
"jsonata": "2.0.4", | ||
"lodash.clonedeep": "^4.5.0", | ||
@@ -24,0 +24,0 @@ "moment": "2.29.4", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
76593
1894
2
+ Addedjsonata@2.0.4(transitive)
- Removedjsonata@1.8.7(transitive)
Updatedjsonata@2.0.4