Skip to content

[7.17] Upgrade to Jest 29 (#143319)#158607

Merged
Ikuni17 merged 16 commits intoelastic:7.17from
Ikuni17:backport/7.17/pr-143319
Jun 9, 2023
Merged

[7.17] Upgrade to Jest 29 (#143319)#158607
Ikuni17 merged 16 commits intoelastic:7.17from
Ikuni17:backport/7.17/pr-143319

Conversation

@Ikuni17
Copy link
Copy Markdown
Contributor

@Ikuni17 Ikuni17 commented May 26, 2023

Closes #157436

Unblocks: #157111

Backport

This will backport the following commits from main to 7.17:

Questions ?

Please refer to the Backport tool documentation

@Ikuni17 Ikuni17 added the backport This PR is a backport of another PR label May 26, 2023
@Ikuni17 Ikuni17 enabled auto-merge (squash) May 26, 2023 23:36
@Ikuni17 Ikuni17 mentioned this pull request May 26, 2023
@Ikuni17 Ikuni17 disabled auto-merge May 26, 2023 23:36
@Ikuni17 Ikuni17 self-assigned this May 26, 2023
@Ikuni17 Ikuni17 requested review from jbudz and mistic May 26, 2023 23:42
@Ikuni17
Copy link
Copy Markdown
Contributor Author

Ikuni17 commented May 26, 2023

@jbudz @mistic I know backports usually don't require reviews, but this seems is a significant change with a large merge conflict. I expect it will require more commits and fixing. Any advice would be appreciated.

@Ikuni17
Copy link
Copy Markdown
Contributor Author

Ikuni17 commented May 30, 2023

@elasticmachine merge upstream

@Ikuni17
Copy link
Copy Markdown
Contributor Author

Ikuni17 commented May 30, 2023

@jbudz @mistic

After some digging, it looks like the minimum version of TS for Jest 28+ is 4.3 and 7.17 is still on 4.1.3.

https://jestjs.io/docs/28.x/upgrading-to-jest28#compatibility

This is leading to type failures in the Checks and Check Types steps. I'm guessing this is also leading to slightly different transpilation and the snapshots failing.

I do not know the scope of upgrading TS. I tried to look at some previous PRs, but they all were incremental upgrades to TS version so it is hard for me to gauge the entire upgrade. Is this something we should continue?

@mistic
Copy link
Copy Markdown
Contributor

mistic commented Jun 1, 2023

@Ikuni17 The TS 4.3.5 upgrade backport PR was merged. I just updated this branch with the latest changes in the upstream so I think you can now proceed 😃

@mistic
Copy link
Copy Markdown
Contributor

mistic commented Jun 1, 2023

@Ikuni17 I tested locally and the remaining of the errors go away if we upgrade the jest related stuff into 29.5.0. I believe somehow in the jest setup we have on 7.17 the expect override we are doing with serializers are not being applied and the latest version fixed that.

@Ikuni17
Copy link
Copy Markdown
Contributor Author

Ikuni17 commented Jun 1, 2023

@mistic ok, i'll bump everything to 29.5.0

@elastic elastic deleted a comment from kibana-ci Jun 2, 2023
@Ikuni17 Ikuni17 force-pushed the backport/7.17/pr-143319 branch from dddb96e to 6aab1d2 Compare June 2, 2023 22:24
@Ikuni17 Ikuni17 closed this Jun 5, 2023
@Ikuni17 Ikuni17 force-pushed the backport/7.17/pr-143319 branch from 6aab1d2 to 817e888 Compare June 5, 2023 22:34
@elastic elastic deleted a comment from kibana-ci Jun 5, 2023
chore(NA): bump jest to v28

chore(NA): bump jest to v28

chore(NA): bump jest to v28

chore(NA): bump jest to v28

fix(NA): types

Revert "fix(NA): types"

This reverts commit b8de19630c2fd1ee17fec7c1357a83e1857b0ab1.

chore(NA): old lib versions

chore(NA): update testing-library/react

chore(NA): fix type errors

chore(NA): update testing-library dom

chore(NA): replace jest-transform by raw transform

chore(NA): eslint fix

chore(NA): add types/react-dom resolution

fix(NA): jest test timers

fix(NA): sense_editor tests

chore(NA): eslint fix
@Ikuni17 Ikuni17 reopened this Jun 5, 2023
@elastic elastic deleted a comment from kibana-ci Jun 6, 2023
@elastic elastic deleted a comment from kibana-ci Jun 6, 2023
@elastic elastic deleted a comment from kibana-ci Jun 6, 2023
@elastic elastic deleted a comment from kibana-ci Jun 6, 2023
@elastic elastic deleted a comment from kibana-ci Jun 7, 2023
@elastic elastic deleted a comment from kibana-ci Jun 8, 2023
@Ikuni17
Copy link
Copy Markdown
Contributor Author

Ikuni17 commented Jun 8, 2023

@elasticmachine merge upstream

@elastic elastic deleted a comment from kibana-ci Jun 8, 2023
Copy link
Copy Markdown
Contributor

@mistic mistic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, removing the extra resolutions will be looked at if/when we upgrade into jest 29.5.0

@elastic elastic deleted a comment from kibana-ci Jun 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants