Changelog
27.0.0-next.5 (2021-02-04)
ts-jest
custom AST transformer function signature has changed to
import type { TsCompilerInstance } from 'ts-jest/dist/types'
export function factory(compilerInstance: TsCompilerInstance) {
//...
}
Changelog
27.0.0-next.4 (2021-01-22)
pathRegex
with exclude
(#2295) (f2f99c3)js
files based on checkJs
(#2283) (1e04433)pathRegex
should use exclude
with Glob patterns.js
files, please set checkJs: true
in your tsconfigChangelog
27.0.0-next.2 (2020-12-17)
isolatedModule: true
to have ESM support (#2219) (e101db0), closes #1709TsJestTransformer
to have version checking (#2176) (ca8d7c4)Changelog
27.0.0-alpha.1 (2020-11-26)
isolatedModules: true
and isolatedModule: false
codes are in one single class TsCompiler
which is an instance created in TsJestCompiler
based on config option compiler
with value typescript
or ttypescript
.Changelog
27.0.0-alpha.0 (2020-11-11)
astTransformers
string array (#2129) (1e0b2ce)packageJson
option (#2128) (05916b9)tsConfig
option (#2127) (3cc9b80)packageJson
config option is not used in internal ts-jest
so this option is now removedjest.config.js
/package.json
should change to// jest.config.js
module.exports = {
//...
globals: {
'ts-jest': {
astTransformers: {
before: ['your_before_transformer_path'],
after: ['your_after_transformer_path'],
afterDeclarations: ['your_afterDeclarations_transformer_path'],
}
}
}
}
or
// package.json
{
"jest": {
"globals": {
"ts-jest": {
"astTransformers": {
"before": ["your_before_transformer_path"],
"after": ["your_after_transformer_path"],
"afterDeclarations": ["your_afterDeclarations_transformer_path"]
}
}
}
}
}
jest.config.js
/** @typedef {import('ts-jest')} */
module.exports = {
//...
}
should change to
/** @typedef {import('ts-jest/dist/types')} */
module.exports = {
//...
}
mocked
, createJestPreset
, pathsToModuleNameMapper
from package entry. One should change toimport { mocked, createJestPreset, pathsToModuleNameMapper` } from 'ts-jest/utils'
tsConfig
should change to tsconfig
in your jest.config.js
or package.json