Comparing version 3.6.2 to 3.6.3
@@ -131,3 +131,7 @@ var path = require('path'), | ||
loadConfig(jasmine, env, print); | ||
jasmine.execute(env.files, env.filter); | ||
jasmine.execute(env.files, env.filter) | ||
.catch(function(error) { | ||
console.error(error); | ||
process.exit(1); | ||
}); | ||
} | ||
@@ -134,0 +138,0 @@ |
@@ -11,3 +11,17 @@ module.exports = Loader; | ||
if (path.endsWith('.mjs')) { | ||
return this.import_(path); | ||
// The ES module spec requires import paths to be valid URLs. As of v14, | ||
// Node enforces this on Windows but not on other OSes. | ||
const url = `file://${path}`; | ||
return this.import_(url).catch(function(e) { | ||
if (e.message.indexOf(path) !== -1 || e.stack.indexOf(path) !== -1) { | ||
return Promise.reject(e); | ||
} else { | ||
// When an ES module has a syntax error, the resulting exception does not | ||
// include the filename. Add it. We lose the stack trace in the process, | ||
// but the stack trace is usually not useful since it contains only frames | ||
// from the Node module loader. | ||
const updatedError = new Error(`While loading ${path}: ${e.constructor.name}: ${e.message}`); | ||
return Promise.reject(updatedError); | ||
} | ||
}); | ||
} else { | ||
@@ -14,0 +28,0 @@ return new Promise(resolve => { |
@@ -12,3 +12,3 @@ { | ||
"license": "MIT", | ||
"version": "3.6.2", | ||
"version": "3.6.3", | ||
"repository": { | ||
@@ -19,3 +19,3 @@ "type": "git", | ||
"scripts": { | ||
"test": "./bin/jasmine.js", | ||
"test": "node ./bin/jasmine.js", | ||
"posttest": "eslint \"bin/**/*.js\" \"lib/**/*.js\" \"spec/**/*.js\"" | ||
@@ -36,2 +36,5 @@ }, | ||
}, | ||
"engines": { | ||
"node": "^10 || ^12 || ^14" | ||
}, | ||
"eslintConfig": { | ||
@@ -38,0 +41,0 @@ "parserOptions": { |
@@ -1,2 +0,2 @@ | ||
[![Build Status](https://travis-ci.org/jasmine/jasmine-npm.png?branch=main)](https://travis-ci.org/jasmine/jasmine-npm) | ||
[![Build Status](https://travis-ci.com/jasmine/jasmine-npm.png?branch=main)](https://travis-ci.com/jasmine/jasmine-npm) | ||
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjasmine%2Fjasmine-npm.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjasmine%2Fjasmine-npm?ref=badge_shield) | ||
@@ -3,0 +3,0 @@ |
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
32529
17
827