Comparing version 8.1.0 to 8.2.0
@@ -14,5 +14,7 @@ 'use strict'; | ||
function hasModuleSpecifier(source) { | ||
const realmImportValue = /importValue\((\s*)(('(.+)'|"(.*)"))(\s*),/g.exec(source); | ||
const dynamicImport = /import\((\s*)('(.+)'|"(.*)")(\s*)\)/g.exec(source); | ||
const moduleImport = /(import|from)(?:\s*)('(\.\/.*)'|"(\.\/.*)")/g.exec(source); | ||
if ((dynamicImport && dynamicImport.length) || | ||
if ((realmImportValue && realmImportValue.length) || | ||
(dynamicImport && dynamicImport.length) || | ||
(moduleImport && moduleImport.length)) { | ||
@@ -32,3 +34,9 @@ return true; | ||
if (dependencySuffixes.test(line)) { | ||
let parsed = /(import|import\(|from)(\s*)('(.*?)'|"(.*?)")/g.exec(line); | ||
let parsedDynamicOrStaticImport = /(import|import\(|from)(\s*)('(.*?)'|"(.*?)")/g.exec(line); | ||
let parsedRealmImportValue = /importValue\((\s*)(('(.+)'|"(.*)"))(\s*),/g.exec(line); | ||
let parsed = parsedDynamicOrStaticImport && parsedDynamicOrStaticImport.length | ||
? parsedDynamicOrStaticImport | ||
: parsedRealmImportValue; | ||
if (parsed && parsed.length) { | ||
@@ -35,0 +43,0 @@ for (let entry of parsed) { |
{ | ||
"name": "eshost", | ||
"version": "8.1.0", | ||
"version": "8.2.0", | ||
"description": "Invoke ECMAScript scripts in any command line JS engine.", | ||
@@ -5,0 +5,0 @@ "main": "lib/eshost.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
586518
87
3495