@bonniernews/wichita
Advanced tools
Comparing version 0.6.0 to 0.7.0
15
index.js
@@ -85,4 +85,6 @@ "use strict"; | ||
if (script) { | ||
const identifier = `file://${mainPath}`; | ||
mainModule = new vm.SourceTextModule(script, { | ||
url: `file://${mainPath}`, | ||
identifier, | ||
url: identifier, // pre node v12.12 | ||
context: vmContext, | ||
@@ -97,3 +99,5 @@ initializeImportMeta, | ||
await mainModule.instantiate(); | ||
if (mainModule.instantiate) { | ||
await mainModule.instantiate(); // pre node v12.12 | ||
} | ||
@@ -114,4 +118,6 @@ return mainModule.evaluate().then((result) => { | ||
const identifier = `file://${scriptPath}`; | ||
const module = new vm.SourceTextModule(source, { | ||
url: `file://${scriptPath}`, | ||
identifier, | ||
url: identifier, // pre node v12.12 | ||
context, | ||
@@ -127,3 +133,4 @@ initializeImportMeta | ||
async function linker(specifier, referencingModule) { | ||
const parentFile = referencingModule.url.substring(7); | ||
const {url, identifier} = referencingModule; | ||
const parentFile = (url || identifier).substring(7); | ||
@@ -130,0 +137,0 @@ if (moduleRoute) { |
{ | ||
"name": "@bonniernews/wichita", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "Run your es6 modules with imports/exports in a vm sandbox", | ||
@@ -43,3 +43,3 @@ "main": "index.js", | ||
"@bonniernews/md2html": "0.0.8", | ||
"eslint": "^5.16.0", | ||
"eslint": "^6.5.1", | ||
"mocha": "^6.1.4", | ||
@@ -46,0 +46,0 @@ "nyc": "^14.1.1", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
10239
133
0