Repository URL to install this package:
|
Version:
0.6.0 ▾
|
esbuild from peer dependency (#3360) (8c8c1ca), closes #3346.cjs extension (#3361) (5e5ac4a), closes #3335afterProcess hook (#3132) (2b6b86e)esbuild as optional peer dependency (#3129) (20258de)processAsync and getCacheKeyAsync (#3047) (571a880)ts-jest public apis from index.js (#3080) (53175dd), closes #3045mocked util function (#3102) (55e69f1)compiler option (#3087) (cc42daf)path-mapping AST transformer (#3088) (d8f6b96)factory API for hoisting AST transformer (#3058) (a72f51d)path-mapping AST transformer is deprecated and will be removed in v28.0.0. One should use an alternative one like https://github.com/LeDDGroup/typescript-transform-paths instead.mocked function is deprecated and will be removed in v28.0.0. The function has been integrated into jest-mock package as a part of Jest 27.4.0, see https://github.com/facebook/jest/pull/12089. One should use the one from Jest insteadtsConfig 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 #2709@types/jest as optional peerDependencies to solve yarn 2 (#2756) (5fbf43e)babel-jest as optional peerDependencies to solve yarn 2 (#2751) (8bede2e)name and version into cache key (#2755) (310fb9a), closes #2753npx ts-jest:init (#2742) (f51ba05)TS_JEST to allow detecting of ts-jest (#2717) (56c137a), closes #2716exclude should only exclude files which match glob values (#2637) (c5ce979), closes #2634testMatch if old jest config contains it (#2618) (c568f49), closes #2616isolatedModules: false use updated compiler options (#2628) (348e30f), closes #2629presets (#2624) (0ea025e), closes #2623.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.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 tsconfigexports field to package.json, see https://nodejs.org/api/packages.html#packages_package_entry_points (#2467) (d3aba3e)undefined (#2433) (c6d6e4c), closes #2085@types/jest from direct dep (#2409) (8913120), closes #2406 #2411@types/jest from direct dep (#2416) (060302e), closes #2406 #2411outDir from compiler source files (#2375) (ec68c74), closes #2350 #2374tsconfig option (#2383) (584324a), closes #2368outDir from compiler source files (#2376) (9034677), closes #2350 #2374matchTestFilePath before setupTsJestCfg (#2373) (c427fea), closes #2371tsconfig/tsConfig option (#2377) (d4f6aff), closes #2368TsCompiler as public api (#2344) (871cd6a)presets entry point (#2337) (1a3058f)presets entry point (#2341) (e12b004), closes #2325ts-jest custom AST transformer function signature has changed to
import type { TsCompilerInstance } from 'ts-jest/dist/types'
export function factory(compilerInstance: TsCompilerInstance) {
//...
}
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 tsconfigisolatedModule: true to have ESM support (#2219) (e101db0), closes #1709TsJestTransformer to have version checking (#2176) (ca8d7c4)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.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.babelrc file path before attempting to read it (#2071) (681bfef), closes #2064tsConfig in favor of tsconfig (#1997)packageJson since internal codes don't use it anymore (#2034)MaybeMockedConstructor returns T (#1976) (b7712b2)path.join and add check on prefix ends with / (#1989) (3d9035b), closes #1982pathsToModuleNameMapper resolve path mapping with path.join (#1969) (81fce4c), closes #1968jest-util version at 26.1.0 (#1914) (f00414c), closes #1913@jest/globals (#1937) (0e5be15), closes #1593path-mapping custom AST transformer (#1927) (3325186)after and afterDeclarations AST transformers (#1831) (be20a7c)TS_JEST_DISABLE_VER_CHECKER (#1821) (e6b42fc), closes #1774resolveModuleNames TypeScript API to get resolved modules for test files (#1784) (5f26054), closes #1747tsconfig change (#1788) (6948855)isolatedModules: false (#1786) (7f731ed)globsToMatcher from jest-util (#1754) (44f3913)mapRoot is set (#1741) (01ac417), closes #1718target version doesn't match with recommended NodeJs version (#1678) (085bdf5)pathsToModuleNameMapper (#1690) (a727bd5)undefined for getScriptVersion when a file doesn't exist in memory cache (#1641) (6851b8e)projectReferences (#1614) (74b92d3)include value of tsconfig to empty array (#1606) (8a29aaa)projectReferences work with isolatedModules: false (#1541) (3e8efbe)files provided by tsconfig (#1562) (a9f02bd)testMatchPatterns contain RegExp instance or string type values (#1569) (7f85bab)tsconfig alias to tsConfig option (#1565) (c10eb6d)ConfigGlobals interface of @jest/types (#1592) (4526392)isolatedModules: false (#1558) (85c09e3)jest need to be defined in files option of tsconfig.For example:
// tsconfig.json
{
// ...other configs
"files": [
"my-custom-typings.d.ts",
"my-global-module.ts"
]
}
incremental and compilerHost options are no longer available. Please remove it from your ts-jest config.files provided by tsconfig (#1562) (907a280)testMatchPatterns contain RegExp instance or string type values (#1569) (7f85bab)jest need to be defined in files option of tsconfig.For example
// tsconfig.json
{
// ...other configs
"files": [
"my-custom-typings.d.ts".
"my-global-module.ts"
]
}
compilerHost and incremental options are no longer availableprojectReferences work with isolatedModules: true (#1527) (aa6b74c)LanguageService updated with test file information before getting diagnostics for test file (#1507) (311eaeb)outDir when allowJs is true and no outDir in tsconfig (#1502) (1a287ad)jest-config to dependencies list (6d9e0d8)TROUBLESHOOTING (96cd9b3)Program via ConfigSet TsCompiler (#1433) (7153246)ci (b87198d)