version-guard
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -74,6 +74,9 @@ /* eslint-disable unicorn/prefer-number-properties */ | ||
) { | ||
var importPath = path.resolve(mainPath, filePath); | ||
// Windows paths needs to be formatted like file:///c:/ | ||
if (importPath[0] !== '/') { | ||
importPath = 'file:///' + importPath.split('\\').join('/'); | ||
} | ||
// We now know its safe to proceed and load the file with the import() method | ||
require('./lib/bridge')( | ||
path.resolve(mainPath, filePath) | ||
); | ||
require('./lib/bridge')(importPath); | ||
} else { | ||
@@ -80,0 +83,0 @@ console.error(packageName + ': Node ' + minMajor + '.' + minMinor + '.0 or greater is required, failing silently.'); |
{ | ||
"name": "version-guard", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Used to ensure modern CLI scripts fail silently on old js versions. Useful for static analysis tools and similar", | ||
@@ -33,5 +33,4 @@ "homepage": "http://github.com/voxpelli/version-guard", | ||
"prepublishOnly": "run-s build", | ||
"test:run": "node test/run.js", | ||
"test-ci": "run-s test:*", | ||
"test": "run-s check test:*" | ||
"test-ci": "node test/run.js", | ||
"test": "run-s check test-ci" | ||
}, | ||
@@ -38,0 +37,0 @@ "keywords": [], |
Sorry, the diff of this file is not supported yet
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
8769
90