...and breaks typescript in the process since versions 24 and 26 typescript versions are not compatible
If you know how to fix the issue, make a pull request instead.
@types/[email protected] package and had problems.Definitions by: in index.d.ts) so they can respond.the error:
TypeScript error in <my-app>/node_modules/jest-diff/build/diffLines.d.ts(8,13):
'=' expected. TS1005
6 | */
7 | import { Diff } from './cleanupSemantic';
> 8 | import type { DiffOptions } from './types';
| ^
9 | export declare const diffLinesUnified: (aLines: string[], bLines: string[], options?: DiffOptions | undefined) => string;
10 | export declare const diffLinesUnified2: (aLinesDisplay: string[], bLinesDisplay: string[], aLinesCompare: string[], bLinesCompare: string[], options?: DiffOptions | undefined) =>
string;
11 | export declare const diffLinesRaw: (aLines: string[], bLines: string[]) => Diff[];
npm ls jest-diff:
+-- @types/[email protected]
| `-- @types/[email protected]
| `-- [email protected]
also reported in https://github.com/facebook/jest/issues/9986 (but they sent it here)
@types/[email protected] is deprecated because jest-diff provides its own types, which is also why it pulls in the latest of jest-diff.
The version before that is 20.x.x.
Note that the major version doesn't necessarily correlate 1:1 with the version of jest-diff that the types were added.
I know, but I'm not the one importing @types/[email protected] (or @types/[email protected]). I can't fix all my dependencies (at least I prefer not to).
as you can see above @types/[email protected] eventually triggers a dependency on [email protected] this is a bug in the older version (or in definitelyTyped resolution magic) if there is a way to apply a patch it will be the preferable and correct thing IMO, otherwise, I will find a workaround.
Sorry I missed that for some reason - it's definitely not ideal; I'll look into that a bit.
However, I'm curious to whats requiring @types/jest?
cross mentioning https://github.com/microsoft/create-react-app-uifabric/issues/14 :)
step 1: npm ls jest-diff
+-- @types/[email protected]
| -- @types/[email protected]
|-- [email protected]
step2: npm install [email protected]
Can this be fixed quickly? This is a pretty big issue. CRA applications are not compiling and I believe installing [email protected] is the wrong solution. I shouldn't be managing the dependencies of a dependency. And it obviously is a faulty design to import jest-diff@26 for the types of jest-diff@24.

Ditto @rt-synchrogrid given this issue breaks a simple fluent ui react starter app. Happy to test out the dev branch if there is a suggested fix/ or updated TypeScript.
Most helpful comment
step 1: npm ls jest-diff
+-- @types/[email protected]
|
-- @types/[email protected] |-- [email protected]step2: npm install [email protected]