@bonniernews/wichita
Advanced tools
Comparing version 0.3.2 to 0.4.0
@@ -76,3 +76,3 @@ "use strict"; | ||
const cache = {}; | ||
const {initializeImportMeta} = options; | ||
const {initializeImportMeta, moduleRoute} = options; | ||
@@ -123,2 +123,7 @@ const vmContext = vm.createContext(sandbox, { | ||
const parentFile = referencingModule.url.substring(7); | ||
if (moduleRoute) { | ||
specifier = specifier.replace(moduleRoute, ""); | ||
} | ||
const scriptPath = getFullPath(specifier, parentFile); | ||
@@ -125,0 +130,0 @@ |
{ | ||
"name": "@bonniernews/wichita", | ||
"version": "0.3.2", | ||
"version": "0.4.0", | ||
"description": "Run your es6 modules with imports/exports in a vm sandbox", | ||
@@ -35,4 +35,4 @@ "main": "index.js", | ||
"test": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" mocha", | ||
"test:cov": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" nyc mocha && eslint . --cache && nyc report --reporter=lcov", | ||
"posttest": "eslint . --cache" | ||
"test:cov": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" nyc mocha && eslint . && nyc report --reporter=lcov", | ||
"posttest": "eslint ." | ||
}, | ||
@@ -43,3 +43,3 @@ "engines": { | ||
"devDependencies": { | ||
"@bonniernews/md2html": "0.0.1", | ||
"@bonniernews/md2html": "0.0.2", | ||
"coveralls": "^3.0.2", | ||
@@ -46,0 +46,0 @@ "eslint": "^5.14.1", |
@@ -21,2 +21,3 @@ Wichita - Tallahassee sidekick | ||
- `options`: optional vm context options, passed to `vm.createContext` | ||
- `moduleRoute`: route that will be used when importing modules (optional) | ||
@@ -23,0 +24,0 @@ and returns an api: |
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
9785
125
149