jest-config
Advanced tools
Comparing version 28.0.0-alpha.11 to 28.0.0
@@ -18,12 +18,2 @@ 'use strict'; | ||
function _prettyFormat() { | ||
const data = require('pretty-format'); | ||
_prettyFormat = function () { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
function _interopRequireDefault(obj) { | ||
@@ -39,7 +29,2 @@ return obj && obj.__esModule ? obj : {default: obj}; | ||
*/ | ||
const format = value => | ||
(0, _prettyFormat().format)(value, { | ||
min: true | ||
}); | ||
const deprecatedOptions = { | ||
@@ -60,3 +45,3 @@ browser: () => | ||
Please update your configuration.`, | ||
preprocessorIgnorePatterns: options => ` Option ${_chalk().default.bold( | ||
preprocessorIgnorePatterns: _options => ` Option ${_chalk().default.bold( | ||
'"preprocessorIgnorePatterns"' | ||
@@ -67,11 +52,4 @@ )} was replaced by ${_chalk().default.bold( | ||
Jest now treats your current configuration as: | ||
{ | ||
${_chalk().default.bold( | ||
'"transformIgnorePatterns"' | ||
)}: ${_chalk().default.bold(format(options.preprocessorIgnorePatterns))} | ||
} | ||
Please update your configuration.`, | ||
scriptPreprocessor: options => ` Option ${_chalk().default.bold( | ||
scriptPreprocessor: _options => ` Option ${_chalk().default.bold( | ||
'"scriptPreprocessor"' | ||
@@ -82,9 +60,2 @@ )} was replaced by ${_chalk().default.bold( | ||
Jest now treats your current configuration as: | ||
{ | ||
${_chalk().default.bold('"transform"')}: ${_chalk().default.bold( | ||
`{".*": ${format(options.scriptPreprocessor)}}` | ||
)} | ||
} | ||
Please update your configuration.`, | ||
@@ -98,13 +69,6 @@ setupTestFrameworkScriptFile: _options => ` Option ${_chalk().default.bold( | ||
Please update your configuration.`, | ||
testPathDirs: options => ` Option ${_chalk().default.bold( | ||
testPathDirs: _options => ` Option ${_chalk().default.bold( | ||
'"testPathDirs"' | ||
)} was replaced by ${_chalk().default.bold('"roots"')}. | ||
Jest now treats your current configuration as: | ||
{ | ||
${_chalk().default.bold('"roots"')}: ${_chalk().default.bold( | ||
format(options.testPathDirs) | ||
)} | ||
} | ||
Please update your configuration. | ||
@@ -111,0 +75,0 @@ `, |
@@ -459,45 +459,10 @@ 'use strict'; | ||
const normalizePreprocessor = options => { | ||
if (options.scriptPreprocessor && options.transform) { | ||
throw createConfigError(` Options: ${_chalk().default.bold( | ||
'scriptPreprocessor' | ||
)} and ${_chalk().default.bold('transform')} cannot be used together. | ||
Please change your configuration to only use ${_chalk().default.bold( | ||
'transform' | ||
)}.`); | ||
} | ||
if (options.preprocessorIgnorePatterns && options.transformIgnorePatterns) { | ||
throw createConfigError(` Options ${_chalk().default.bold( | ||
'preprocessorIgnorePatterns' | ||
)} and ${_chalk().default.bold( | ||
'transformIgnorePatterns' | ||
)} cannot be used together. | ||
Please change your configuration to only use ${_chalk().default.bold( | ||
'transformIgnorePatterns' | ||
)}.`); | ||
} | ||
if (options.scriptPreprocessor) { | ||
options.transform = { | ||
'.*': options.scriptPreprocessor | ||
}; | ||
} | ||
if (options.preprocessorIgnorePatterns) { | ||
options.transformIgnorePatterns = options.preprocessorIgnorePatterns; | ||
} | ||
delete options.scriptPreprocessor; | ||
delete options.preprocessorIgnorePatterns; | ||
return options; | ||
}; | ||
const normalizeMissingOptions = (options, configPath, projectIndex) => { | ||
if (!options.id) { | ||
options.id = (0, _crypto().createHash)('md5') | ||
options.id = (0, _crypto().createHash)('sha256') | ||
.update(options.rootDir) // In case we load config from some path that has the same root dir | ||
.update(configPath || '') | ||
.update(String(projectIndex)) | ||
.digest('hex'); | ||
.digest('hex') | ||
.substring(0, 32); | ||
} | ||
@@ -701,9 +666,7 @@ | ||
); | ||
let options = normalizePreprocessor( | ||
normalizeReporters( | ||
normalizeMissingOptions( | ||
normalizeRootDir((0, _setFromArgv.default)(initialOptions, argv)), | ||
configPath, | ||
projectIndex | ||
) | ||
let options = normalizeReporters( | ||
normalizeMissingOptions( | ||
normalizeRootDir((0, _setFromArgv.default)(initialOptions, argv)), | ||
configPath, | ||
projectIndex | ||
) | ||
@@ -720,20 +683,2 @@ ); | ||
if ( | ||
options.setupTestFrameworkScriptFile && | ||
options.setupFilesAfterEnv.length > 0 | ||
) { | ||
throw createConfigError(` Options: ${_chalk().default.bold( | ||
'setupTestFrameworkScriptFile' | ||
)} and ${_chalk().default.bold( | ||
'setupFilesAfterEnv' | ||
)} cannot be used together. | ||
Please change your configuration to only use ${_chalk().default.bold( | ||
'setupFilesAfterEnv' | ||
)}.`); | ||
} | ||
if (options.setupTestFrameworkScriptFile) { | ||
options.setupFilesAfterEnv.push(options.setupTestFrameworkScriptFile); | ||
} | ||
options.testEnvironment = (0, _jestResolve().resolveTestEnvironment)({ | ||
@@ -747,7 +692,2 @@ requireResolveFunction: require.resolve, | ||
if (!options.roots && options.testPathDirs) { | ||
options.roots = options.testPathDirs; | ||
delete options.testPathDirs; | ||
} | ||
if (!options.roots) { | ||
@@ -769,3 +709,3 @@ options.roots = [options.rootDir]; | ||
if (error.code === 'MODULE_NOT_FOUND') { | ||
createConfigError( | ||
throw createConfigError( | ||
'jest-jasmine is no longer shipped by default with Jest, you need to install it explicitly or provide an absolute path to Jest' | ||
@@ -772,0 +712,0 @@ ); |
{ | ||
"name": "jest-config", | ||
"version": "28.0.0-alpha.11", | ||
"version": "28.0.0", | ||
"repository": { | ||
@@ -33,5 +33,5 @@ "type": "git", | ||
"@babel/core": "^7.11.6", | ||
"@jest/test-sequencer": "^28.0.0-alpha.11", | ||
"@jest/types": "^28.0.0-alpha.9", | ||
"babel-jest": "^28.0.0-alpha.11", | ||
"@jest/test-sequencer": "^28.0.0", | ||
"@jest/types": "^28.0.0", | ||
"babel-jest": "^28.0.0", | ||
"chalk": "^4.0.0", | ||
@@ -42,13 +42,13 @@ "ci-info": "^3.2.0", | ||
"graceful-fs": "^4.2.9", | ||
"jest-circus": "^28.0.0-alpha.11", | ||
"jest-environment-node": "^28.0.0-alpha.11", | ||
"jest-get-type": "^28.0.0-alpha.3", | ||
"jest-regex-util": "^28.0.0-alpha.6", | ||
"jest-resolve": "^28.0.0-alpha.11", | ||
"jest-runner": "^28.0.0-alpha.11", | ||
"jest-util": "^28.0.0-alpha.9", | ||
"jest-validate": "^28.0.0-alpha.9", | ||
"jest-circus": "^28.0.0", | ||
"jest-environment-node": "^28.0.0", | ||
"jest-get-type": "^28.0.0", | ||
"jest-regex-util": "^28.0.0", | ||
"jest-resolve": "^28.0.0", | ||
"jest-runner": "^28.0.0", | ||
"jest-util": "^28.0.0", | ||
"jest-validate": "^28.0.0", | ||
"micromatch": "^4.0.4", | ||
"parse-json": "^5.2.0", | ||
"pretty-format": "^28.0.0-alpha.9", | ||
"pretty-format": "^28.0.0", | ||
"slash": "^3.0.0", | ||
@@ -71,3 +71,3 @@ "strip-json-comments": "^3.1.1" | ||
}, | ||
"gitHead": "8b4b78759d255746f11e396efe7d06ac93dbd05b" | ||
"gitHead": "8f9b812faf8e4d241d560a8574f0c6ed20a89365" | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
105753
3227
Updated@jest/test-sequencer@^28.0.0
Updated@jest/types@^28.0.0
Updatedbabel-jest@^28.0.0
Updatedjest-circus@^28.0.0
Updatedjest-get-type@^28.0.0
Updatedjest-regex-util@^28.0.0
Updatedjest-resolve@^28.0.0
Updatedjest-runner@^28.0.0
Updatedjest-util@^28.0.0
Updatedjest-validate@^28.0.0
Updatedpretty-format@^28.0.0