Changelog
27.0.5 (2021-08-14)
tsConfig
option for ts-jest
config options (#2794) (781710b), closes #2764config:init
genarate invalid type comment (#2773) (ede8a20), closes #2772./
in tsconfig paths
for pathsToModuleNameMapper
(#2797) (42ff5e4), closes #2709Changelog
Changelog
27.0.0 (2021-05-25)
.ts
/.tsx
/.d.ts
files only (#2458) (a89f0e2), closes #2445undefined
(#2433) (c6d6e4c), closes #2085@types/jest
from direct dep (#2409) (8913120), closes #2406 #2411outDir
from compiler source files (#2375) (ec68c74), closes #2350 #2374tsconfig
option (#2383) (584324a), closes #2368astTransformers
value changes (#2345) (d726016)node_modules
when adding ts-jest
(#2263) (8e0675c)TsCompiler
as public api (#2344) (871cd6a)presets
entry point (#2337) (1a3058f)Program
(#2299) (387964f)pathRegex
with exclude
(#2295) (f2f99c3)js
files based on checkJs
(#2283) (1e04433)isolatedModules: false
(#2269) (9bb0c05), closes #1709isolatedModule: true
(#2219) (e101db0), closes #1709TsJestTransformer
to have version checking (#2176) (ca8d7c4)astTransformers
string array (#2129) (1e0b2ce)packageJson
option (#2128) (05916b9)tsConfig
option (#2127) (3cc9b80)ts-jest
will use sourceMap
option from your tsconfig
. If users want to have sourcemap on, they need to set sourceMap: true
in tsconfig
.exports
field to package.json
, see https://nodejs.org/api/packages.html#packages_package_entry_points (#2467) (d3aba3e)ts-jest
custom AST transformer function signature has changed toimport type { TsCompilerInstance } from 'ts-jest/dist/types'
export function factory(compilerInstance: TsCompilerInstance) {
//...
}
pathRegex
should use exclude
with glob
patterns.js
files, please set checkJs: true
in your tsconfig.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
.packageJson
config option is not used in internal ts-jest
so this option is now removed.jest.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
.Changelog
27.0.0-next.12 (2021-05-05)
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