Comparing version 1.1.4 to 1.1.5
@@ -17,3 +17,5 @@ #! /usr/bin/env node | ||
if (isEs6) { | ||
import('file://' + path.resolve(path.join(process.cwd(), process.argv[2]))).then((userModule) => { | ||
// This branch is only supported in Node versions that support native ES6 import | ||
var es6Import = require('./es6import.js') | ||
es6Import('file://' + path.resolve(path.join(process.cwd(), process.argv[2]))).then(userModule => { | ||
executeInModule(userModule, process.argv[3], params); | ||
@@ -31,5 +33,5 @@ }); | ||
if (!userMod[fnName]) { | ||
throw new Error(`Function ${fnName} is not present or exported from module ${userMod}`); | ||
throw new Error(`Function ${fnName} is not present or exported from module`); | ||
} | ||
userMod[fnName](...fnParams); | ||
} |
@@ -17,3 +17,5 @@ #! /usr/bin/env node --max-old-space-size=4096 | ||
if (isEs6) { | ||
import('file://' + path.resolve(path.join(process.cwd(), process.argv[2]))).then((userModule) => { | ||
// This branch is only supported in Node versions that support native ES6 import | ||
var es6Import = require('./es6import.js') | ||
es6Import('file://' + path.resolve(path.join(process.cwd(), process.argv[2]))).then(userModule => { | ||
executeInModule(userModule, process.argv[3], params); | ||
@@ -31,5 +33,5 @@ }); | ||
if (!userMod[fnName]) { | ||
throw new Error(`Function ${fnName} is not present or exported from module ${userMod}`); | ||
throw new Error(`Function ${fnName} is not present or exported from module`); | ||
} | ||
userMod[fnName](...fnParams); | ||
} |
@@ -7,5 +7,3 @@ { | ||
}, | ||
"dependencies": {}, | ||
"description": "Run exported function from package.json scripts", | ||
"devDependencies": {}, | ||
"directories": {}, | ||
@@ -16,3 +14,3 @@ "license": "ISC", | ||
{ | ||
"name": "rockclimber", | ||
"name": "DVLP", | ||
"email": "pawel@dvlp.co" | ||
@@ -22,3 +20,2 @@ } | ||
"name": "run-func", | ||
"optionalDependencies": {}, | ||
"readme": "README.md", | ||
@@ -28,3 +25,3 @@ "scripts": { | ||
}, | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"repository": { | ||
@@ -31,0 +28,0 @@ "type": "git", |
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
3468
7
70