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 6262- ` [jest-config] ` Support ` coverageReporters ` in project config ([ #14697 ] ( https://github.com/jestjs/jest/pull/14830 ) )
6363- ` [jest-config] ` Allow ` reporters ` in project config ([ #14768 ] ( https://github.com/jestjs/jest/pull/14768 ) )
6464- ` [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 ) )
6566- ` [jest-each] ` Allow ` $keypath ` templates with ` null ` or ` undefined ` values ([ #14831 ] ( https://github.com/jestjs/jest/pull/14831 ) )
6667- ` [@jest/expect-utils] ` Fix comparison of ` DataView ` ([ #14408 ] ( https://github.com/jestjs/jest/pull/14408 ) )
6768- ` [@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 = (
3838 options : NewCacheKeyOptions ,
3939) => string ;
4040
41- type GetCacheKeyFunction = OldGetCacheKeyFunction | NewGetCacheKeyFunction ;
41+ type GetCacheKeyFunction = OldGetCacheKeyFunction & NewGetCacheKeyFunction ;
4242
4343const { NODE_ENV , BABEL_ENV } = process . env ;
4444
@@ -65,7 +65,7 @@ function getCacheKeyFunction(
6565 globalCacheKey : string ,
6666 length : number ,
6767) : GetCacheKeyFunction {
68- return ( sourceText , sourcePath , configString , options ) => {
68+ return ( ( sourceText , sourcePath , configString , options ) => {
6969 // Jest 27 passes a single options bag which contains `configString` rather than as a separate argument.
7070 // We can hide that API difference, though, so this module is usable for both jest@<27 and jest@>=27
7171 const inferredOptions = options || configString ;
@@ -81,7 +81,7 @@ function getCacheKeyFunction(
8181 . update ( instrument ? 'instrument' : '' )
8282 . digest ( 'hex' )
8383 . slice ( 0 , length ) ;
84- } ;
84+ } ) as GetCacheKeyFunction ;
8585}
8686
8787/**
You can’t perform that action at this time.
0 commit comments