Socket
Socket
Sign inDemoInstall

ts-jest

Package Overview
Dependencies
Maintainers
3
Versions
199
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-jest - npm Package Compare versions

Comparing version 27.0.0-next.11 to 27.0.0-next.12

14

CHANGELOG.md

@@ -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 @@

2

dist/compiler/compiler-utils.d.ts
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc