@node-red/util 3.0.0-beta.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/util.js +6 -1
  2. package/package.json +3 -3
package/lib/util.js CHANGED
@@ -641,7 +641,12 @@ function evaluateNodeProperty(value, type, node, msg, callback) {
641
641
  result = Date.now();
642
642
  } else if (type === 'bin') {
643
643
  var data = JSON.parse(value);
644
- result = Buffer.from(data);
644
+ if (Array.isArray(data) || (typeof(data) === "string")) {
645
+ result = Buffer.from(data);
646
+ }
647
+ else {
648
+ throw createError("INVALID_BUFFER_DATA", "Not string or array");
649
+ }
645
650
  } else if (type === 'msg' && msg) {
646
651
  try {
647
652
  result = getMessageProperty(msg,value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-red/util",
3
- "version": "3.0.0-beta.2",
3
+ "version": "3.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,11 +16,11 @@
16
16
  ],
17
17
  "dependencies": {
18
18
  "fs-extra": "10.1.0",
19
- "i18next": "21.8.2",
19
+ "i18next": "21.8.14",
20
20
  "json-stringify-safe": "5.0.1",
21
21
  "jsonata": "1.8.6",
22
22
  "lodash.clonedeep": "^4.5.0",
23
- "moment": "2.29.3",
23
+ "moment": "2.29.4",
24
24
  "moment-timezone": "0.5.34"
25
25
  }
26
26
  }