mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
fix: replace is-utf8 with native nodejs functions
Available since nodejs 18.14 https://nodejs.org/docs/latest-v18.x/api/buffer.html#bufferisutf8input
This commit is contained in:
parent
a622d19ba7
commit
6af30f070b
@ -51,7 +51,6 @@
|
|||||||
"https-proxy-agent": "5.0.1",
|
"https-proxy-agent": "5.0.1",
|
||||||
"i18next": "21.10.0",
|
"i18next": "21.10.0",
|
||||||
"iconv-lite": "0.6.3",
|
"iconv-lite": "0.6.3",
|
||||||
"is-utf8": "0.2.1",
|
|
||||||
"js-yaml": "4.1.0",
|
"js-yaml": "4.1.0",
|
||||||
"json-stringify-safe": "5.0.1",
|
"json-stringify-safe": "5.0.1",
|
||||||
"jsonata": "2.0.5",
|
"jsonata": "2.0.5",
|
||||||
@ -123,6 +122,6 @@
|
|||||||
"supertest": "6.3.3"
|
"supertest": "6.3.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.5"
|
"node": ">=18.14"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ module.exports = function(RED) {
|
|||||||
var spawn = require('child_process').spawn;
|
var spawn = require('child_process').spawn;
|
||||||
var exec = require('child_process').exec;
|
var exec = require('child_process').exec;
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var isUtf8 = require('is-utf8');
|
const { isUtf8 } = require('node:buffer');
|
||||||
const isWindows = process.platform === 'win32'
|
const isWindows = process.platform === 'win32'
|
||||||
|
|
||||||
function ExecNode(n) {
|
function ExecNode(n) {
|
||||||
@ -87,7 +87,7 @@ module.exports = function(RED) {
|
|||||||
});
|
});
|
||||||
var cmd = arg.shift();
|
var cmd = arg.shift();
|
||||||
// Since 18.20.2/20.12.2, it is invalid to call spawn on Windows with a .bat/.cmd file
|
// Since 18.20.2/20.12.2, it is invalid to call spawn on Windows with a .bat/.cmd file
|
||||||
// without using shell: true.
|
// without using shell: true.
|
||||||
const opts = isWindows ? { ...node.spawnOpt, shell: true } : node.spawnOpt
|
const opts = isWindows ? { ...node.spawnOpt, shell: true } : node.spawnOpt
|
||||||
/* istanbul ignore else */
|
/* istanbul ignore else */
|
||||||
node.debug(cmd+" ["+arg+"]");
|
node.debug(cmd+" ["+arg+"]");
|
||||||
|
@ -18,7 +18,7 @@ module.exports = function(RED) {
|
|||||||
"use strict";
|
"use strict";
|
||||||
const { getProxyForUrl } = require('./lib/proxyHelper');
|
const { getProxyForUrl } = require('./lib/proxyHelper');
|
||||||
var mqtt = require("mqtt");
|
var mqtt = require("mqtt");
|
||||||
var isUtf8 = require('is-utf8');
|
const { isUtf8 } = require('node:buffer');
|
||||||
var HttpsProxyAgent = require('https-proxy-agent');
|
var HttpsProxyAgent = require('https-proxy-agent');
|
||||||
var url = require('url');
|
var url = require('url');
|
||||||
const knownMediaTypes = {
|
const knownMediaTypes = {
|
||||||
|
@ -24,7 +24,7 @@ module.exports = function(RED) {
|
|||||||
var onHeaders = require('on-headers');
|
var onHeaders = require('on-headers');
|
||||||
var typer = require('content-type');
|
var typer = require('content-type');
|
||||||
var mediaTyper = require('media-typer');
|
var mediaTyper = require('media-typer');
|
||||||
var isUtf8 = require('is-utf8');
|
const { isUtf8 } = require('node:buffer');
|
||||||
var hashSum = require("hash-sum");
|
var hashSum = require("hash-sum");
|
||||||
|
|
||||||
function rawBodyParser(req, res, next) {
|
function rawBodyParser(req, res, next) {
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
"hash-sum": "2.0.0",
|
"hash-sum": "2.0.0",
|
||||||
"hpagent": "1.2.0",
|
"hpagent": "1.2.0",
|
||||||
"https-proxy-agent": "5.0.1",
|
"https-proxy-agent": "5.0.1",
|
||||||
"is-utf8": "0.2.1",
|
|
||||||
"js-yaml": "4.1.0",
|
"js-yaml": "4.1.0",
|
||||||
"media-typer": "1.1.0",
|
"media-typer": "1.1.0",
|
||||||
"mqtt": "5.7.0",
|
"mqtt": "5.7.0",
|
||||||
|
2
packages/node_modules/node-red/package.json
vendored
2
packages/node_modules/node-red/package.json
vendored
@ -48,6 +48,6 @@
|
|||||||
"@node-rs/bcrypt": "1.10.4"
|
"@node-rs/bcrypt": "1.10.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.5"
|
"node": ">=18.14"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user