diff --git a/packages/node_modules/@node-red/registry/lib/library.js b/packages/node_modules/@node-red/registry/lib/library.js index b305456a5..0b242b270 100644 --- a/packages/node_modules/@node-red/registry/lib/library.js +++ b/packages/node_modules/@node-red/registry/lib/library.js @@ -14,7 +14,7 @@ * limitations under the License. **/ -var fs = require('fs-extra'); +var fs = require('fs'); var fspath = require('path'); var runtime; @@ -25,7 +25,7 @@ var exampleFlows = null; async function getFlowsFromPath(path) { var result = {}; var validFiles = []; - return fs.readdir(path).then(files => { + return fs.promises.readdir(path).then(files => { var promises = []; if (files) { files.forEach(function(file) { diff --git a/packages/node_modules/@node-red/util/lib/i18n.js b/packages/node_modules/@node-red/util/lib/i18n.js index 96a66ba1d..ef472c659 100644 --- a/packages/node_modules/@node-red/util/lib/i18n.js +++ b/packages/node_modules/@node-red/util/lib/i18n.js @@ -23,7 +23,7 @@ var i18n = require("i18next"); var path = require("path"); -var fs = require("fs-extra"); +var fs = require("fs"); var defaultLang = "en-US"; @@ -89,7 +89,7 @@ async function readFile(lng, ns) { return resourceCache[ns][lng]; } else if (resourceMap[ns]) { const file = path.join(resourceMap[ns].basedir, lng, resourceMap[ns].file); - const content = await fs.readFile(file, "utf8"); + const content = await fs.promises.readFile(file, "utf8"); resourceCache[ns] = resourceCache[ns] || {}; resourceCache[ns][lng] = JSON.parse(content.replace(/^\uFEFF/, '')); var baseLng = lng.split('-')[0];