Comparing version 5.4.0 to 5.5.0
@@ -249,10 +249,13 @@ const path = require('path'); | ||
const print = options.print; | ||
const specDir = options.specDir; | ||
makeDirStructure(path.join(specDir, 'support/')); | ||
if(!fs.existsSync(path.join(specDir, 'support/jasmine.json'))) { | ||
fs.writeFileSync(path.join(specDir, 'support/jasmine.json'), fs.readFileSync(path.join(__dirname, '../lib/examples/jasmine.json'), 'utf-8')); | ||
const destDir = path.join(options.specDir, 'support/'); | ||
makeDirStructure(destDir); | ||
const destPath = path.join(destDir, 'jasmine.mjs'); | ||
if (fs.existsSync(destPath)) { | ||
print('spec/support/jasmine.mjs already exists in your project.'); | ||
} else { | ||
const contents = fs.readFileSync( | ||
path.join(__dirname, '../lib/examples/jasmine.mjs'), 'utf-8'); | ||
fs.writeFileSync(destPath, contents); | ||
} | ||
else { | ||
print('spec/support/jasmine.json already exists in your project.'); | ||
} | ||
} | ||
@@ -259,0 +262,0 @@ |
@@ -37,3 +37,3 @@ const ExitHandler = require('./exit_handler'); | ||
* const Jasmine = require('jasmine'); | ||
* const jasmine = new Jasmine(); | ||
* const runner = new Jasmine(); | ||
*/ | ||
@@ -40,0 +40,0 @@ class Jasmine extends RunnerBase { |
@@ -105,3 +105,3 @@ const path = require('path'); | ||
for (const ext of ['json', 'js']) { | ||
for (const ext of ['mjs', 'json', 'js']) { | ||
const candidate = `spec/support/jasmine.${ext}`; | ||
@@ -112,2 +112,8 @@ | ||
numFound++; | ||
if (ext === 'mjs') { | ||
break; | ||
} | ||
// Otherwise continue possibly loading other files, for backwards | ||
// compatibility. | ||
} catch (e) { | ||
@@ -114,0 +120,0 @@ if (e.code !== 'MODULE_NOT_FOUND' // CommonJS |
@@ -13,3 +13,3 @@ { | ||
"license": "MIT", | ||
"version": "5.4.0", | ||
"version": "5.5.0", | ||
"repository": { | ||
@@ -36,3 +36,3 @@ "type": "git", | ||
"glob": "^10.2.2", | ||
"jasmine-core": "~5.4.0" | ||
"jasmine-core": "~5.5.0" | ||
}, | ||
@@ -39,0 +39,0 @@ "bin": "./bin/jasmine.js", |
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
79773
2243
+ Addedjasmine-core@5.5.0(transitive)
- Removedjasmine-core@5.4.0(transitive)
Updatedjasmine-core@~5.5.0