File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
packages/jest-create-cache-key-function/src Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 62
62
- ` [jest-config] ` Support ` coverageReporters ` in project config ([ #14697 ] ( https://github.com/jestjs/jest/pull/14830 ) )
63
63
- ` [jest-config] ` Allow ` reporters ` in project config ([ #14768 ] ( https://github.com/jestjs/jest/pull/14768 ) )
64
64
- ` [jest-config] ` Allow Node16/NodeNext/Bundler ` moduleResolution ` in project's tsconfig ([ #14739 ] ( https://github.com/jestjs/jest/pull/14739 ) )
65
+ - ` [@jest/create-cache-key-function] ` Correct the return type of ` createCacheKey ` ([ #15159 ] ( https://github.com/jestjs/jest/pull/15159 ) )
65
66
- ` [jest-each] ` Allow ` $keypath ` templates with ` null ` or ` undefined ` values ([ #14831 ] ( https://github.com/jestjs/jest/pull/14831 ) )
66
67
- ` [@jest/expect-utils] ` Fix comparison of ` DataView ` ([ #14408 ] ( https://github.com/jestjs/jest/pull/14408 ) )
67
68
- ` [@jest/expect-utils] ` [ ** BREAKING** ] exclude non-enumerable in object matching ([ #14670 ] ( https://github.com/jestjs/jest/pull/14670 ) )
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ type NewGetCacheKeyFunction = (
38
38
options : NewCacheKeyOptions ,
39
39
) => string ;
40
40
41
- type GetCacheKeyFunction = OldGetCacheKeyFunction | NewGetCacheKeyFunction ;
41
+ type GetCacheKeyFunction = OldGetCacheKeyFunction & NewGetCacheKeyFunction ;
42
42
43
43
const { NODE_ENV , BABEL_ENV } = process . env ;
44
44
@@ -65,7 +65,7 @@ function getCacheKeyFunction(
65
65
globalCacheKey : string ,
66
66
length : number ,
67
67
) : GetCacheKeyFunction {
68
- return ( sourceText , sourcePath , configString , options ) => {
68
+ return ( ( sourceText , sourcePath , configString , options ) => {
69
69
// Jest 27 passes a single options bag which contains `configString` rather than as a separate argument.
70
70
// We can hide that API difference, though, so this module is usable for both jest@<27 and jest@>=27
71
71
const inferredOptions = options || configString ;
@@ -81,7 +81,7 @@ function getCacheKeyFunction(
81
81
. update ( instrument ? 'instrument' : '' )
82
82
. digest ( 'hex' )
83
83
. slice ( 0 , length ) ;
84
- } ;
84
+ } ) as GetCacheKeyFunction ;
85
85
}
86
86
87
87
/**
You can’t perform that action at this time.
0 commit comments