This repository has been archived by the owner on Oct 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 222
Remove React 17 compatability from react-testing #2820
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alex-page
force-pushed
the
react-testing-rm-react-17-compat
branch
from
August 21, 2024 08:38
2eb0a8a
to
7af0a84
Compare
alex-page
commented
Aug 21, 2024
} | ||
|
||
export const isLegacyReact = parseInt(React.version, 10) < 18; | ||
|
||
export const act: typeof oldAct = (() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving act
as it is React 18.3.1 and up
https://github.com/facebook/react/blob/main/CHANGELOG.md#1831-april-26-2024
alex-page
force-pushed
the
react-testing-rm-react-17-compat
branch
from
August 21, 2024 08:40
7af0a84
to
a9d6e75
Compare
alex-page
commented
Aug 21, 2024
@@ -0,0 +1,5 @@ | |||
--- | |||
'@shopify/react-testing': major |
There was a problem hiding this comment.
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
force-pushed
the
react-testing-rm-react-17-compat
branch
2 times, most recently
from
August 21, 2024 08:50
cb8890b
to
24fb7ed
Compare
alex-page
force-pushed
the
react-testing-rm-react-17-compat
branch
from
August 21, 2024 09:05
24fb7ed
to
df5d12a
Compare
alex-page
changed the title
Remove react 17 compat from react-testing
Remove React 17 compatability from react-testing
Aug 21, 2024
/snapit |
pandasurplus
approved these changes
Aug 21, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweeeet!
vsumner
approved these changes
Aug 21, 2024
mattkubej
approved these changes
Aug 21, 2024
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.