Socket
Socket
Sign inDemoInstall

ts-jest

Package Overview
Dependencies
479
Maintainers
3
Versions
193
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 26.5.2 to 26.5.3

11

CHANGELOG.md

@@ -0,1 +1,12 @@

## [26.5.3](https://github.com/kulshekhar/ts-jest/compare/v26.5.2...v26.5.3) (2021-03-03)
### Bug Fixes
* **config:** create fallback jest config when jest config is undefined ([#2421](https://github.com/kulshekhar/ts-jest/issues/2421)) ([0fb6b45](https://github.com/kulshekhar/ts-jest/commit/0fb6b45e7dc3dd7588d27f09ac9a8849dff470cb)), closes [#2085](https://github.com/kulshekhar/ts-jest/issues/2085)
* remove `@types/jest` from direct dep ([#2416](https://github.com/kulshekhar/ts-jest/issues/2416)) ([060302e](https://github.com/kulshekhar/ts-jest/commit/060302ed1eb8708df0acd7ab1d613ff06fc08cf3)), closes [#2406](https://github.com/kulshekhar/ts-jest/issues/2406) [#2411](https://github.com/kulshekhar/ts-jest/issues/2411)
* **compiler:** return original file content on emit skip ([#2408](https://github.com/kulshekhar/ts-jest/issues/2408)) ([cfba8f4](https://github.com/kulshekhar/ts-jest/commit/cfba8f423dd59536d8b1e1374ef2b20bff2ed857)), closes [#2407](https://github.com/kulshekhar/ts-jest/issues/2407)
## [26.5.2](https://github.com/kulshekhar/ts-jest/compare/v26.5.1...v26.5.2) (2021-02-21)

@@ -2,0 +13,0 @@

3

dist/compiler/language-service.js

@@ -270,3 +270,4 @@ "use strict";

if (output.emitSkipped) {
throw new Error(messages_1.interpolate("Unable to process '{{file}}'. Please make sure that `outDir` in your tsconfig is neither `''` or `'.'`.", { file: fileName }));
logger.warn(messages_1.interpolate("Unable to process '{{file}}', falling back to original file content. Please make sure that `outDir` in your tsconfig is neither `''` or `'.'`. You can also configure Jest config option `transformIgnorePatterns` to ignore {{file}} from transformation", { file: fileName }));
return [code, '{}'];
}

@@ -273,0 +274,0 @@ if (!output.outputFiles.length) {

@@ -7,3 +7,2 @@ import type { Config } from '@jest/types';

export declare class ConfigSet {
private readonly jestConfig;
private readonly parentLogger?;

@@ -19,3 +18,3 @@ readonly logger: Logger;

protected _overriddenCompilerOptions: Partial<CompilerOptions>;
constructor(jestConfig: Config.ProjectConfig, parentLogger?: Logger | undefined);
constructor(jestConfig: Config.ProjectConfig | undefined, parentLogger?: Logger | undefined);
protected _resolveTsConfig(compilerOptions?: RawCompilerOptions, resolvedConfigFile?: string): Record<string, any>;

@@ -22,0 +21,0 @@ get tsJestDigest(): string;

@@ -122,3 +122,2 @@ "use strict";

var _c, _d, _e, _f;
this.jestConfig = jestConfig;
this.parentLogger = parentLogger;

@@ -145,5 +144,6 @@ this.customTransformers = Object.create(null);

: logger_1.rootLogger.child({ namespace: 'config' });
this.cwd = path_1.normalize((_c = this.jestConfig.cwd) !== null && _c !== void 0 ? _c : process.cwd());
this.rootDir = path_1.normalize((_d = this.jestConfig.rootDir) !== null && _d !== void 0 ? _d : this.cwd);
var tsJestCfg = this.jestConfig.globals && this.jestConfig.globals['ts-jest'];
this._backportJestCfg(jestConfig !== null && jestConfig !== void 0 ? jestConfig : Object.create(null));
this.cwd = path_1.normalize((_c = this._jestCfg.cwd) !== null && _c !== void 0 ? _c : process.cwd());
this.rootDir = path_1.normalize((_d = this._jestCfg.rootDir) !== null && _d !== void 0 ? _d : this.cwd);
var tsJestCfg = this._jestCfg.globals && this._jestCfg.globals['ts-jest'];
var options = tsJestCfg !== null && tsJestCfg !== void 0 ? tsJestCfg : Object.create(null);

@@ -153,3 +153,2 @@ this.compilerModule = importer_1.importer.typescript("Using \"ts-jest\" requires this package to be installed.", (_e = options.compiler) !== null && _e !== void 0 ? _e : 'typescript');

this.logger.debug({ compilerModule: this.compilerModule }, 'normalized compiler module config via ts-jest option');
this._backportJestCfg();
this._matchablePatterns = __spread(this._jestCfg.testMatch, this._jestCfg.testRegex).filter(function (pattern) {

@@ -165,4 +164,4 @@ return pattern instanceof RegExp || typeof pattern === 'string';

}
ConfigSet.prototype._backportJestCfg = function () {
var config = backports_1.backportJestConfig(this.logger, this.jestConfig);
ConfigSet.prototype._backportJestCfg = function (jestCfg) {
var config = backports_1.backportJestConfig(this.logger, jestCfg);
this.logger.debug({ jestConfig: config }, 'normalized jest config');

@@ -169,0 +168,0 @@ this._jestCfg = config;

@@ -18,7 +18,9 @@ "use strict";

var messages_1 = require("./messages");
var constants_1 = require("../constants");
var context = (_a = {}, _a[bs_logger_1.LogContexts.namespace] = 'backports', _a);
exports.backportJestConfig = function (logger, config) {
var _a, _b;
logger.debug(__assign(__assign({}, context), { config: config }), 'backporting config');
var _a = (config || {}).globals, globals = _a === void 0 ? {} : _a;
var _b = globals["ts-jest"], tsJest = _b === void 0 ? {} : _b;
var _c = (config || {}).globals, globals = _c === void 0 ? {} : _c;
var _d = globals["ts-jest"], tsJest = _d === void 0 ? {} : _d;
var mergeTsJest = {};

@@ -89,3 +91,3 @@ var hadWarnings = false;

}
return __assign(__assign({}, config), { globals: __assign(__assign({}, globals), { 'ts-jest': __assign(__assign({}, mergeTsJest), tsJest) }) });
return __assign(__assign({}, config), { testMatch: (_a = config.testMatch) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_JEST_TEST_MATCH, testRegex: (_b = config.testRegex) !== null && _b !== void 0 ? _b : [], globals: __assign(__assign({}, globals), { 'ts-jest': __assign(__assign({}, mergeTsJest), tsJest) }) });
};

@@ -92,0 +94,0 @@ exports.backportTsJestDebugEnvVar = function (logger) {

@@ -1,1 +0,1 @@

export {};
export declare let rootLogger: import("bs-logger/dist/logger").Logger;
{
"name": "ts-jest",
"version": "26.5.2",
"version": "26.5.3",
"main": "dist/index.js",

@@ -61,3 +61,2 @@ "types": "dist/index.d.ts",

"dependencies": {
"@types/jest": "26.x",
"bs-logger": "0.x",

@@ -94,2 +93,3 @@ "buffer-from": "1.x",

"@types/fs-extra": "latest",
"@types/jest": "26.x",
"@types/js-yaml": "latest",

@@ -96,0 +96,0 @@ "@types/json5": "latest",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc