chore: bump 'expect' dev dep from v26 to v27 - #8718
Conversation
|
FYI I ran tests locally (with local fix to A) B) C) Error was: None of these test failures appear to be related to the changes in this PR. |
|
Alternate fix, shown in 7e26ebb: add This doesn't seem like an ideal solution, but it decouples this PR from jestjs/jest#11816, which is nice. Edit: No dice, see update below. |
|
Turns out extending ... So I reverted those changes. |
|
Looking for someone who knows the Pavel Feldman (@pavelfeldman), Dmitry Gozman (@dgozman), Andrey Lushnikov (@aslushnikov), Yury Semikhatsky (@yury-s), Joel Einbinder (@JoelEinbinder), Max Schmitt (@mxschmitt) |
1ebc464 to
8957359
Compare
8957359 to
66addfc
Compare
66addfc to
9faa112
Compare
079396e to
1be2db9
Compare
| "allowSyntheticDefaultImports": true, | ||
| }, | ||
| "include": ["**/*.spec.js", "**/*.ts", "index.d.ts"] | ||
| "include": ["**/*.spec.js", "**/*.ts", "index.d.ts"], |
There was a problem hiding this comment.
note: had to be changed because otherwise the stable-test-runner dogfood globals conflicted with the ToT test-runner globals (tests/playwright-test/entry). e.g.:
$ tsc -p . -p ./tests/
types/testExpect.d.ts:42:22 - error TS2320: Interface 'Matchers<R>' cannot simultaneously extend types 'Omit<Matchers<R>, OverriddenExpectProperties1>' and 'Omit<Matchers<R>, OverriddenExpectProperties>'.
Named property 'toThrow' of types 'Omit<Matchers<R>, OverriddenExpectProperties1>' and 'Omit<Matchers<R>, OverriddenExpectProperties>' are not identical.
42 export interface Matchers<R> extends Omit<expect.Matchers<R>, OverriddenExpectProperties1> {
~~~~~~~~
types/testExpect.d.ts:42:22 - error TS2320: Interface 'Matchers<R>' cannot simultaneously extend types 'Omit<Matchers<R>, OverriddenExpectProperties1>' and 'Omit<Matchers<R>, OverriddenExpectProperties>'.
Named property 'toThrowError' of types 'Omit<Matchers<R>, OverriddenExpectProperties1>' and 'Omit<Matchers<R>, OverriddenExpectProperties>' are not identical.
42 export interface Matchers<R> extends Omit<expect.Matchers<R>, OverriddenExpectProperties1> {
~~~~~~~~
Found 2 errors.
error Command failed with exit code 2.
1be2db9 to
b88b9e2
Compare
|
Thank you Michael Rienstra (@mrienstra) for your initiative! |
Motivation: jestjs/jest#11640
This change causes
npm testto fail, because of a problem when runningnpm run check-deps, which runsutils/check_deps.js.More specifically, the function
allowExternalImport/alllowExternalImport(inutils/check_deps.js) -- which was very recently added in #8501 -- is failing, when looking at the usage of theexpectdev dep.I played around a little with
node_modules/expect/package.jsonlocally to see what kinds of changes would resolve this.Looks like removing the
"exports"section does the trick (it was added in jestjs/jest#9921), but that's not much of a solution.Adding:
... Also does the job, but is presumably unnecessarily specific.
Adding:
... Is probably the right solution.
(Bonus: this would also allow removing this existing line:
"./build/utils": "./build/utils.js",)Opened a PR to make this change: jestjs/jest#11816
Just in case there is a better path forward, opening this draft PR to allow conversation to take place both here and in the
jestPR. Max Schmitt (@mxschmitt), Pavel Feldman (@pavelfeldman), thoughts?