Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: kulshekhar/ts-jest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v26.5.0
Choose a base ref
...
head repository: kulshekhar/ts-jest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v26.5.1
Choose a head ref
  • 3 commits
  • 7 files changed
  • 1 contributor

Commits on Feb 8, 2021

  1. Copy the full SHA
    f4f5d32 View commit details

Commits on Feb 9, 2021

  1. Copy the full SHA
    e12b004 View commit details
  2. Copy the full SHA
    1965e20 View commit details
Showing with 51 additions and 4 deletions.
  1. +1 −0 .eslintignore
  2. +29 −0 CHANGELOG.md
  3. +1 −1 package.json
  4. +8 −0 presets/index.d.ts
  5. +1 −1 src/cli/helpers/presets.ts
  6. +1 −2 src/presets/create-jest-preset.ts
  7. +10 −0 src/types.ts
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -5,5 +5,6 @@ e2e/__workdir_synlink__/
e2e/__external-repos__/
coverage/
docs/
presets/index.d.ts
*.config.js
.eslintrc.js
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
## [26.5.1](https://github.com/kulshekhar/ts-jest/compare/v26.5.0...v26.5.1) (2021-02-09)


### Features

* **config:** support typed config options for jest config typescript ([#2336](https://github.com/kulshekhar/ts-jest/issues/2336)) ([f4f5d32](https://github.com/kulshekhar/ts-jest/commit/f4f5d3205d1c80e545a32c02c6a66e7e91386f7f))
* **presets:** add typing for `presets` entry point ([#2341](https://github.com/kulshekhar/ts-jest/issues/2341)) ([e12b004](https://github.com/kulshekhar/ts-jest/commit/e12b004dcc5848d5ae0638e885147c54e11cc72b)), closes [#2325](https://github.com/kulshekhar/ts-jest/issues/2325)



# [26.5.0](https://github.com/kulshekhar/ts-jest/compare/v26.5.0...v26.4.4) (2021-01-29)


### Bug Fixes

* reduce size of `node_modules` when adding `ts-jest` ([#2309](https://github.com/kulshekhar/ts-jest/issues/2309)) ([6bf2e8a](https://github.com/kulshekhar/ts-jest/commit/b8d5d2090567f23947d9efd87f5f869b16bf2e8a))


### Features

* introduce `exclude` to exclude files from diagnostics ([#2308](https://github.com/kulshekhar/ts-jest/issues/2308)) ([cd82fd3](https://github.com/kulshekhar/ts-jest/commit/0c555c250774a7fd9e356cf20a3d8b693cd82fd3))


### DEPRECATIONS

* **config**: deprecate `pathRegex` in favor of `exclude` ([#2308](https://github.com/kulshekhar/ts-jest/issues/2308)) ([cd82fd3](https://github.com/kulshekhar/ts-jest/commit/0c555c250774a7fd9e356cf20a3d8b693cd82fd3))



## [26.4.4](https://github.com/kulshekhar/ts-jest/compare/v26.4.3...v26.4.4) (2020-11-08)


2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-jest",
"version": "26.4.4",
"version": "26.5.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"bin": {
8 changes: 8 additions & 0 deletions presets/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { TsJestPresets } from '../dist/types'

declare const _default: {
defaults: TsJestPresets;
jsWithTs: TsJestPresets;
jsWithBabel: TsJestPresets;
};
export = _default;
2 changes: 1 addition & 1 deletion src/cli/helpers/presets.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { TsJestPresets } from '../../presets/create-jest-preset'
import type { TsJestPresets } from '../../types'

/** @internal */
export const enum JestPresetNames {
3 changes: 1 addition & 2 deletions src/presets/create-jest-preset.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import type { Config } from '@jest/types'

import type { TsJestPresets } from '../types'
import { rootLogger } from '../utils/logger'

const logger = rootLogger.child({ namespace: 'jest-preset' })

export type TsJestPresets = Pick<Config.InitialOptions, 'moduleFileExtensions' | 'transform' | 'testMatch'>

interface CreateJestPresetOptions {
allowJs?: boolean
}
10 changes: 10 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -154,6 +154,16 @@ export interface TsJestGlobalOptions {
stringifyContentPathRegex?: string | RegExp
}

export interface GlobalConfigTsJest extends Config.ConfigGlobals {
'ts-jest': TsJestGlobalOptions
}

export interface InitialOptionsTsJest extends Config.InitialOptions {
globals?: GlobalConfigTsJest
}

export type TsJestPresets = Pick<Config.InitialOptions, 'moduleFileExtensions' | 'transform' | 'testMatch'>

interface TsJestConfig$tsConfig$file {
kind: 'file'
value: string | undefined