Comparing version 27.0.0-next.11 to 27.0.0-next.12
@@ -0,1 +1,15 @@ | ||
# [27.0.0-next.12](https://github.com/kulshekhar/ts-jest/compare/v27.0.0-next.11...v27.0.0-next.12) (2021-05-05) | ||
### Features | ||
* **config:** allow disable sourcemap ([#2544](https://github.com/kulshekhar/ts-jest/issues/2544)) ([47da6ad](https://github.com/kulshekhar/ts-jest/commit/47da6ada5089e58e9bc68ce8e9bc9e17aaa127ae)) | ||
## BREAKING CHANGES | ||
* By default, `ts-jest` will use `sourceMap` option from your `tsconfig`. If users want to have sourcemap on, they need to either remove `sourceMap` or set `sourceMap: true` in `tsconfig` | ||
## [26.5.5](https://github.com/kulshekhar/ts-jest/compare/v26.5.4...v26.5.5) (2021-04-15) | ||
@@ -2,0 +16,0 @@ |
export declare const SOURCE_MAPPING_PREFIX = "sourceMappingURL="; | ||
export declare function updateOutput(outputText: string, normalizedFileName: string, sourceMap: string): string; | ||
export declare function updateOutput(outputText: string, normalizedFileName: string, sourceMap: string | undefined): string; |
@@ -7,5 +7,11 @@ "use strict"; | ||
function updateOutput(outputText, normalizedFileName, sourceMap) { | ||
var base64Map = Buffer.from(updateSourceMap(sourceMap, normalizedFileName), 'utf8').toString('base64'); | ||
var sourceMapContent = "data:application/json;charset=utf-8;base64," + base64Map; | ||
return (outputText.slice(0, outputText.lastIndexOf(exports.SOURCE_MAPPING_PREFIX) + exports.SOURCE_MAPPING_PREFIX.length) + sourceMapContent); | ||
if (sourceMap) { | ||
var base64Map = Buffer.from(updateSourceMap(sourceMap, normalizedFileName), 'utf8').toString('base64'); | ||
var sourceMapContent = "data:application/json;charset=utf-8;base64," + base64Map; | ||
return (outputText.slice(0, outputText.lastIndexOf(exports.SOURCE_MAPPING_PREFIX) + exports.SOURCE_MAPPING_PREFIX.length) + | ||
sourceMapContent); | ||
} | ||
else { | ||
return outputText; | ||
} | ||
} | ||
@@ -12,0 +18,0 @@ exports.updateOutput = updateOutput; |
@@ -135,3 +135,3 @@ "use strict"; | ||
this._logger.warn(messages_1.interpolate("Unable to process '{{file}}', falling back to original file content. You can also configure Jest config option `transformIgnorePatterns` to ignore {{file}} from transformation or make sure that `outDir` in your tsconfig is neither `''` or `'.'`", { file: fileName })); | ||
return compiler_utils_1.updateOutput(fileContent, fileName, '{}'); | ||
return compiler_utils_1.updateOutput(fileContent, fileName, undefined); | ||
} | ||
@@ -144,3 +144,5 @@ } | ||
} | ||
return compiler_utils_1.updateOutput(output.outputFiles[1].text, fileName, output.outputFiles[0].text); | ||
return this._compilerOptions.sourceMap | ||
? compiler_utils_1.updateOutput(output.outputFiles[1].text, fileName, output.outputFiles[0].text) | ||
: compiler_utils_1.updateOutput(output.outputFiles[0].text, fileName, undefined); | ||
} | ||
@@ -147,0 +149,0 @@ else { |
@@ -118,5 +118,3 @@ "use strict"; | ||
this._overriddenCompilerOptions = { | ||
sourceMap: true, | ||
inlineSourceMap: false, | ||
inlineSources: true, | ||
declaration: false, | ||
@@ -279,3 +277,3 @@ noEmit: false, | ||
var e_2, _a, _b; | ||
var _c, _d; | ||
var _c, _d, _e; | ||
var result = this._resolveTsConfig(compilerOptions, resolvedConfigFile); | ||
@@ -311,4 +309,4 @@ var forcedOptions = this._overriddenCompilerOptions; | ||
try { | ||
for (var _e = __values(Object.keys(forcedOptions)), _f = _e.next(); !_f.done; _f = _e.next()) { | ||
var key = _f.value; | ||
for (var _f = __values(Object.keys(forcedOptions)), _g = _f.next(); !_g.done; _g = _f.next()) { | ||
var key = _g.value; | ||
var val = forcedOptions[key]; | ||
@@ -326,3 +324,3 @@ if (val === undefined) { | ||
try { | ||
if (_f && !_f.done && (_a = _e.return)) _a.call(_e); | ||
if (_g && !_g.done && (_a = _f.return)) _a.call(_f); | ||
} | ||
@@ -349,3 +347,5 @@ finally { if (e_2) throw e_2.error; } | ||
} | ||
return __assign(__assign({}, result), { options: __assign(__assign({}, result.options), { module: (_d = result.options.module) !== null && _d !== void 0 ? _d : this.compilerModule.ModuleKind.CommonJS }) }); | ||
var resultOptions = result.options; | ||
var sourceMap = (_d = resultOptions.sourceMap) !== null && _d !== void 0 ? _d : true; | ||
return __assign(__assign({}, result), { options: __assign(__assign({}, resultOptions), { sourceMap: sourceMap, inlineSources: sourceMap, module: (_e = resultOptions.module) !== null && _e !== void 0 ? _e : this.compilerModule.ModuleKind.CommonJS }) }); | ||
}; | ||
@@ -352,0 +352,0 @@ ConfigSet.prototype._resolveTsConfig = function (compilerOptions, resolvedConfigFile) { |
@@ -10,5 +10,5 @@ "use strict"; | ||
exports.VersionCheckers = { | ||
jest: createVersionChecker('jest', ">=27.0.0-next.8 <28"), | ||
jest: createVersionChecker('jest', ">=27.0.0-next.9 <28"), | ||
typescript: createVersionChecker('typescript', ">=3.8 <5"), | ||
babelJest: createVersionChecker('babel-jest', ">=27.0.0-next.8 <28"), | ||
babelJest: createVersionChecker('babel-jest', ">=27.0.0-next.9 <28"), | ||
babelCore: createVersionChecker('@babel/core', ">=7.0.0-beta.0 <8"), | ||
@@ -15,0 +15,0 @@ }; |
{ | ||
"name": "ts-jest", | ||
"version": "27.0.0-next.11", | ||
"version": "27.0.0-next.12", | ||
"main": "dist/index.js", | ||
@@ -70,3 +70,3 @@ "types": "dist/index.d.ts", | ||
"fast-json-stable-stringify": "2.x", | ||
"jest-util": "27.0.0-next.8", | ||
"jest-util": "27.0.0-next.9", | ||
"json5": "2.x", | ||
@@ -80,3 +80,3 @@ "lodash": "4.x", | ||
"peerDependencies": { | ||
"jest": "27.0.0-next.8", | ||
"jest": "27.0.0-next.9", | ||
"typescript": ">=3.8 <5.0" | ||
@@ -94,3 +94,3 @@ }, | ||
"@commitlint/config-angular": "^12.0.0", | ||
"@jest/transform": "27.0.0-next.8", | ||
"@jest/transform": "27.0.0-next.9", | ||
"@jest/types": "27.0.0-next.8", | ||
@@ -106,3 +106,3 @@ "@types/babel__core": "7.x", | ||
"@types/mkdirp": "latest", | ||
"@types/node": "14.x", | ||
"@types/node": "14.14.43", | ||
"@types/node-fetch": "^2.5.8", | ||
@@ -125,6 +125,6 @@ "@types/react": "17.x", | ||
"execa": "latest", | ||
"fs-extra": "9.x", | ||
"fs-extra": "10.x", | ||
"glob-gitignore": "latest", | ||
"husky": "4.x", | ||
"jest": "27.0.0-next.8", | ||
"jest": "27.0.0-next.9", | ||
"js-yaml": "latest", | ||
@@ -131,0 +131,0 @@ "json-schema-to-typescript": "^10.1.4", |
@@ -12,3 +12,3 @@ <h1 align="center">ts-jest</h1> | ||
<a href="https://actions-badge.atrox.dev/kulshekhar/ts-jest/goto?ref=master"><img alt="GitHub actions" src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fkulshekhar%2Fts-jest%2Fbadge%3Fref%3Dmaster&style=flat-square" /> </a> | ||
<a href="https://github.com/kulshekhar/ts-jest/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/ts-jest.svg?style=flat-square" alt="GitHub license"/> </a> | ||
<a href="https://github.com/kulshekhar/ts-jest/blob/master/LICENSE.md"><img src="https://img.shields.io/npm/l/ts-jest.svg?style=flat-square" alt="GitHub license"/> </a> | ||
</p> | ||
@@ -15,0 +15,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
223208
3017
+ Added@types/node@22.7.4(transitive)
+ Addedbrowserslist@4.24.0(transitive)
+ Addedcaniuse-lite@1.0.30001664(transitive)
+ Addedelectron-to-chromium@1.5.29(transitive)
+ Addedjest@27.0.0-next.9(transitive)
+ Addedjest-util@27.0.0-next.9(transitive)
+ Addednwsapi@2.2.13(transitive)
+ Addedupdate-browserslist-db@1.1.1(transitive)
- Removed@types/node@22.5.5(transitive)
- Removedbrowserslist@4.23.3(transitive)
- Removedcaniuse-lite@1.0.30001663(transitive)
- Removedelectron-to-chromium@1.5.27(transitive)
- Removedjest@27.0.0-next.8(transitive)
- Removedjest-util@27.0.0-next.8(transitive)
- Removednwsapi@2.2.12(transitive)
- Removedupdate-browserslist-db@1.1.0(transitive)
Updatedjest-util@27.0.0-next.9