diff --git a/src/index.ts b/src/index.ts index 6e5eb70972..7395716a93 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,6 +12,6 @@ export * from './types' export default { createTransformer() { - return new TsJestTransformer(true) + return new TsJestTransformer() }, } diff --git a/src/legacy/ts-jest-transformer.ts b/src/legacy/ts-jest-transformer.ts index eb0aaeb95e..4564f2ddc7 100644 --- a/src/legacy/ts-jest-transformer.ts +++ b/src/legacy/ts-jest-transformer.ts @@ -8,7 +8,7 @@ import { DECLARATION_TYPE_EXT, JS_JSX_REGEX, TS_TSX_REGEX } from '../constants' import type { CompilerInstance, DepGraphInfo, ProjectConfigTsJest, TransformOptionsTsJest } from '../types' import { parse, stringify, JsonableValue, rootLogger } from '../utils' import { importer } from '../utils/importer' -import { Deprecations, Errors, interpolate } from '../utils/messages' +import { Errors, interpolate } from '../utils/messages' import { sha1 } from '../utils/sha1' import { VersionCheckers } from '../utils/version-checkers' @@ -49,12 +49,9 @@ export class TsJestTransformer implements SyncTransformer { private _depGraphs: Map = new Map() private _watchMode = false - constructor(isLegacy = false) { + constructor() { this._logger = rootLogger.child({ namespace: 'ts-jest-transformer' }) VersionCheckers.jest.warn() - if (isLegacy) { - this._logger.warn(Deprecations.LegacyTransformerEntry) - } /** * For some unknown reasons, `this` is undefined in `getCacheKey` and `process` * when running Jest in ESM mode diff --git a/src/utils/messages.ts b/src/utils/messages.ts index ff6ea90e1e..43223df492 100644 --- a/src/utils/messages.ts +++ b/src/utils/messages.ts @@ -39,13 +39,6 @@ export const enum Deprecations { ConfigOption = '"[jest-config].{{oldPath}}" is deprecated, use "[jest-config].{{newPath}}" instead.', ConfigOptionWithNote = '"[jest-config].{{oldPath}}" is deprecated, use "[jest-config].{{newPath}}" instead.\n ↳ {{note}}', ConfigOptionUseBabelRcNote = 'See `babel-jest` related issue: https://github.com/facebook/jest/issues/3845', - LegacyTransformerEntry = `Use 'ts-jest' entry point in v28 will resolve in refactored transformer. If you wish to use legacy transformer, please adjust your Jest 'transform' config. For example: - module.exports = { - transform: { - '^.+\\\\.tsx?$': 'ts-jest/legacy' - } - } - `, } /**