Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Remove React 17 compatability from react-testing #2820

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

alex-page
Copy link
Member

@alex-page alex-page commented Aug 21, 2024

Description

When using vitest many errors are outputted to the console when using React 18. Since #2787 shipped and we no longer support React 17 this PR cleans up some of the compat functions that are no longer necessary.

@alex-page alex-page requested a review from a team as a code owner August 21, 2024 08:37
@alex-page alex-page force-pushed the react-testing-rm-react-17-compat branch from 2eb0a8a to 7af0a84 Compare August 21, 2024 08:38
}

export const isLegacyReact = parseInt(React.version, 10) < 18;

export const act: typeof oldAct = (() => {
Copy link
Member Author

@alex-page alex-page Aug 21, 2024

Choose a reason for hiding this comment

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

@alex-page alex-page force-pushed the react-testing-rm-react-17-compat branch from 7af0a84 to a9d6e75 Compare August 21, 2024 08:40
@@ -0,0 +1,5 @@
---
'@shopify/react-testing': major
Copy link
Member Author

@alex-page alex-page Aug 21, 2024

Choose a reason for hiding this comment

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

I flagged this change as a major as it deletes backwards compatibility

@alex-page alex-page force-pushed the react-testing-rm-react-17-compat branch 2 times, most recently from cb8890b to 24fb7ed Compare August 21, 2024 08:50
@alex-page alex-page force-pushed the react-testing-rm-react-17-compat branch from 24fb7ed to df5d12a Compare August 21, 2024 09:05
@alex-page alex-page changed the title Remove react 17 compat from react-testing Remove React 17 compatability from react-testing Aug 21, 2024
@alex-page
Copy link
Member Author

/snapit

Copy link

@pandasurplus pandasurplus left a comment

Choose a reason for hiding this comment

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

Sweeeet!

@sam-b-rose sam-b-rose merged commit e79c3ad into main Aug 21, 2024
5 checks passed
@sam-b-rose sam-b-rose deleted the react-testing-rm-react-17-compat branch August 21, 2024 19:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants