Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eshost

Package Overview
Dependencies
Maintainers
2
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eshost - npm Package Compare versions

Comparing version 4.4.0 to 4.5.0

9

lib/ConsoleAgent.js

@@ -34,3 +34,3 @@ 'use strict';

evalScript(code /*, options = {} */) {
evalScript(code, options = {}) {
let tempfile = temp.path({ suffix: '.js' });

@@ -77,7 +77,8 @@ let temppath = path.dirname(tempfile);

hasDependencies = false;
}
if (options.module || attrs.flags.module ||
hasModuleSpecifier(contents)) {
// When testing module or dynamic import code that imports itself,
// we must copy the test file with its actual name.
}
if (hasModuleSpecifier(contents)) {
tempfile = path.join(temppath, sourcebase);

@@ -84,0 +85,0 @@ }

@@ -9,3 +9,9 @@ 'use strict';

function hasModuleSpecifier(source) {
return /(import|import\(|from)(\s*)'(.*)'|"(.*)";/g.test(source);
const dynamicImport = /import\((\s*)('(.+)'|"(.*)")(\s*)\)/g.exec(source);
const moduleImport = /(import|from)(?:\s*)('(\.\/.*)'|"(\.\/.*)")/g.exec(source);
if ((dynamicImport && dynamicImport.length) ||
(moduleImport && moduleImport.length)) {
return true;
}
return false;
}

@@ -12,0 +18,0 @@

{
"name": "eshost",
"version": "4.4.0",
"version": "4.5.0",
"description": "Invoke ECMAScript scripts in any command line JS engine.",

@@ -5,0 +5,0 @@ "main": "lib/eshost.js",

Sorry, the diff of this file is not supported yet

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