Upgrading ts-jest 21 to 22
Breaking21.2.4 → 22.4.6Breaking1New4Changed8Fixed2Other1
BreakingUpgrade verdict
1 breaking change.
In plain terms
- The old way of passing TypeScript settings through __TS_CONFIG__ no longer works. Use the tsConfigFile setting instead.
Must act 1 item needs code or config changes
Adds lodash ^4.17.10.
Installs 476 packages in all (was 451).
What you must change
Breaking1
Removes support for the __TS_CONFIG__ option; use tsConfigFile instead.
__TS_CONFIG__tsConfigFileAPI changes
Generated by DepDelta from published .d.ts files. Not mixed with prose notes.
- removed:
function defaultRetrieveFileHandler(path: any): string
- changed:
function install(): void → function install(filePath: string, fileContent: string): any
- changed:
property FullJestConfig.setupTestFrameworkScriptFile: Path → property FullJestConfig.setupTestFrameworkScriptFile: Path | null - changed:
property TsJestConfig.tsConfigFile?: String → property TsJestConfig.tsConfigFile?: string - changed:
type PostProcessHook = (src: string, filename: string, config: JestConfig, transformOptions: TransformOptions) => string → type PostProcessHook = (src: string, filePath: string, config: JestConfig, transformOptions: TransformOptions) => string - added:
property FullJestConfig.cwd: Path - added:
property FullJestConfig.detectLeaks: boolean - added:
property FullJestConfig.displayName: string | null - added:
property FullJestConfig.forceCoverageMatch: Glob[] - added:
property FullJestConfig.restoreMocks: boolean - added:
property FullJestConfig.runner: string - added:
property FullJestConfig.skipNodeResolution: boolean - added:
property FullJestConfig.testEnvironmentOptions: object - added:
property FullJestConfig.testLocationInResults: boolean - added:
property FullJestConfig.watchPathIgnorePatterns: string[] - added:
property TsJestConfig.disableSourceMapSupport?: boolean - added:
property TsJestConfig.enableInternalCache?: boolean - added:
property TsJestConfig.enableTsDiagnostics?: boolean - added:
property TsJestConfig.ignoreCoverageForAllDecorators?: boolean - added:
property TsJestConfig.ignoreCoverageForDecorators?: boolean - added:
property TsJestConfig.useExperimentalLanguageServer?: boolean
- added:
function flushLogs(): void - added:
function logOnce(...thingsToLog: any[]): void
- added:
function postProcessCode(compilerOptions: CompilerOptions, jestConfig: JestConfig, tsJestConfig: TsJestConfig, transformOptions: TransformOptions, transpiledText: string, filePath: string): string
- changed:
function getCacheKey(fileData: string, filePath: Path, configStr: string, options?: TransformOptions): string → function getCacheKey(fileData: string, filePath: Path, jestConfigStr: string, transformOptions?: TransformOptions): string - changed:
function process(src: string, path: Path, config: JestConfig, transformOptions?: TransformOptions): string → function process(src: string, filePath: Path, jestConfig: JestConfig, transformOptions?: TransformOptions): string
- added:
function getJestConfig(root: string): any
- changed:
function transpileIfTypescript(path: any, contents: any, config?: any): any → function transpileIfTypescript(path: any, contents: any, config?: any, rootDir?: string): any
- added:
function transpileTypescript(filePath: string, fileSrc: string, compilerOptions: ts.CompilerOptions, tsJestConfig: TsJestConfig): string
- removed:
function getJestConfig(root: any): any - removed:
function getTSConfig(globals: any, collectCoverage?: boolean): any - removed:
function getTSConfigOptionFromConfig(globals: any): any - changed:
function getTSJestConfig(globals: any): TsJestConfig → function getTSJestConfig(globals: ConfigGlobals): TsJestConfig - changed:
function mockGlobalTSConfigSchema(globals: any): { 'ts-jest': { tsConfigFile: string } } | { __TS_CONFIG__: any } → function mockGlobalTSConfigSchema(globals: any): { 'ts-jest': { tsConfigFile: string } } - added:
const getTSConfig: ((globals: any, rootDir?: string) => tsc.CompilerOptions) & _.MemoizedFunction - added:
function cacheFile(jestConfig: JestConfig, filePath: string, src: string): void - added:
function injectSourcemapHook(filePath: string, typeScriptCode: string, src: string): string - added:
function runTsDiagnostics(filePath: string, compilerOptions: tsc.CompilerOptions): void