Socket
Socket
Sign inDemoInstall

@node-red/registry

Package Overview
Dependencies
Maintainers
2
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@node-red/registry - npm Package Compare versions

Comparing version 4.0.0-beta.2 to 4.0.0-beta.3

19

lib/externalModules.js

@@ -31,7 +31,2 @@ // This module handles the management of modules required by the runtime and flows.

let IMPORT_SUPPORTED = true;
const nodeVersionParts = process.versions.node.split(".").map(v => parseInt(v));
if (nodeVersionParts[0] < 12 || (nodeVersionParts[0] === 12 && nodeVersionParts[1] < 17)) {
IMPORT_SUPPORTED = false;
}

@@ -114,14 +109,2 @@ function getInstallDir() {

function importModule(module) {
if (!IMPORT_SUPPORTED) {
// On Node < 12.17 - fall back to try a require
return new Promise((resolve, reject) => {
try {
const mod = requireModule(module);
resolve(mod);
} catch(err) {
reject(err);
}
});
}
if (!registryUtil.checkModuleAllowed( module, null,installAllowList,installDenyList)) {

@@ -278,3 +261,3 @@ const e = new Error("Module not allowed");

log.trace(NPM_COMMAND + JSON.stringify(args));
return exec.run(NPM_COMMAND, args, { cwd: installDir },true)
return exec.run(NPM_COMMAND, args, { cwd: installDir, shell: true },true)
} else {

@@ -281,0 +264,0 @@ log.trace("skipping npm install");

19

lib/installer.js

@@ -28,10 +28,13 @@ /**

const child_process = require('child_process');
const npmCommand = process.platform === 'win32' ? 'npm.cmd' : 'npm';
let installerEnabled = false;
const plugins = require("./plugins");
const isWindows = process.platform === 'win32'
const npmCommand = isWindows ? 'npm.cmd' : 'npm';
let installerEnabled = false;
let settings;
const moduleRe = /^(@[^/@]+?[/])?[^/@]+?$/;
const slashRe = process.platform === "win32" ? /\\|[/]/ : /[/]/;
const slashRe = isWindows ? /\\|[/]/ : /[/]/;
const pkgurlRe = /^(https?|git(|\+https?|\+ssh|\+file)):\/\//;

@@ -231,3 +234,3 @@ const localtgzRe = /^([a-zA-Z]:|\/).+tgz$/;

log.trace(npmCommand + JSON.stringify(args));
return exec.run(npmCommand,args,{ cwd: installDir}, true)
return exec.run(npmCommand,args,{ cwd: installDir, shell: true }, true)
} else {

@@ -267,3 +270,3 @@ log.trace("skipping npm install");

if (err.hook === "postInstall") {
return exec.run(npmCommand,["remove",module],{ cwd: installDir}, false).finally(() => {
return exec.run(npmCommand,["remove",module],{ cwd: installDir, shell: true }, false).finally(() => {
throw e;

@@ -372,3 +375,3 @@ })

return new Promise((resolve, reject) => {
child_process.execFile(npmCommand,['info','--json',installName],function(err,stdout,stderr) {
child_process.execFile(npmCommand,['info','--json',installName],{ shell: true },function(err,stdout,stderr) {
try {

@@ -532,3 +535,3 @@ if (!stdout) {

log.trace(npmCommand + JSON.stringify(args));
return exec.run(npmCommand,args,{ cwd: installDir}, true)
return exec.run(npmCommand,args,{ cwd: installDir, shell: true }, true)
} else {

@@ -600,3 +603,3 @@ log.trace("skipping npm uninstall");

return new Promise(resolve => {
child_process.execFile(npmCommand,['-v'],function(err,stdout) {
child_process.execFile(npmCommand,['-v'],{ shell: true },function(err,stdout) {
if (err) {

@@ -603,0 +606,0 @@ log.info(log._("server.palette-editor.npm-not-found"));

@@ -91,3 +91,3 @@ function getSubflowType(subflow) {

switch(prop.type) {
case "str": this[prop.name] = prop.value||""; break;
case "str": case "conf-type": this[prop.name] = prop.value||""; break;
case "bool": this[prop.name] = (typeof prop.value === 'boolean')?prop.value:prop.value === "true" ; break;

@@ -94,0 +94,0 @@ case "num": this[prop.name] = (typeof prop.value === 'number')?prop.value:Number(prop.value); break;

{
"name": "@node-red/registry",
"version": "4.0.0-beta.2",
"version": "4.0.0-beta.3",
"license": "Apache-2.0",

@@ -19,9 +19,9 @@ "main": "./lib/index.js",

"dependencies": {
"@node-red/util": "4.0.0-beta.2",
"@node-red/util": "4.0.0-beta.3",
"clone": "2.1.2",
"fs-extra": "11.1.1",
"semver": "7.5.4",
"tar": "6.1.13",
"tar": "6.2.1",
"uglify-js": "3.17.4"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc