-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: upgrade app-runtime React version to v18 #1387
Conversation
01899b7
to
1806c7d
Compare
"@dhis2/cli-app-scripts": "^10.2.0", | ||
"@dhis2/cli-style": "^10.4.3", | ||
"@dhis2/cli-app-scripts": "^12.0.0-alpha.21", | ||
"@dhis2/cli-style": "10.4.3", |
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.
this needs to be a fixed version - the latest version that works with TypeScript doesn't work for the setup we have here with nested tsconfig, I will create a separate ticket and investigate it
54216aa
to
e8d5953
Compare
@@ -109,9 +110,11 @@ describe('debouncing state changes', () => { | |||
// Immediately, nothing should happen | |||
expect(result.current.online).toBe(true) | |||
|
|||
await wait(1000) |
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 had to add a couple of explict waits here in place of the previous timeouts .. I think this is equivalent of the previous tests, but maybe we can rewrite the tests with fake timers or something in the near future
) | ||
expect(getByTestId(/loading-mask/)).toBeInTheDocument() | ||
expect(getByTestId(/section-rc/)).toBeInTheDocument() | ||
it.skip('handles a successful recording', async (done) => { |
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 couldn't get the tests in this file to pass - not sure I understand how they worked before .. I'd need some help here
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.
Approved for merging to alpha for manual testing
- Still needs looking at automated tests (and
cli-style
config?) - Also at React-Query version: v3 doesn't seem to support React v18
# [3.11.0-alpha.1](v3.10.4-alpha.1...v3.11.0-alpha.1) (2024-11-21) ### Features * upgrade app-runtime React version to v18 ([#1387](#1387)) ([0e4a3d5](0e4a3d5))
# [3.11.0-alpha.1](v3.10.4-alpha.1...v3.11.0-alpha.1) (2024-11-26) ### Bug Fixes * **cacheable-section:** synchronously flush recording state for UI consistency ([04bc604](04bc604)) * add endpoint to text plain matchers ([#1390](#1390)) ([de8fbec](de8fbec)) * expand FetchErrorDetails type ([#1389](#1389)) ([78ad0b3](78ad0b3)) * handle alert returned async by parentAlertsAdd [LIBS-695] ([#1388](#1388)) ([bba9c23](bba9c23)) * **cacheable-section:** stable references to avoid loops [LIBS-642] ([#1385](#1385)) ([31562e9](31562e9)) * update plugin sizing definition ([#1383](#1383)) ([38c09b9](38c09b9)) * **deps:** remove cli-app-scripts peer dep [LIBS-587] ([#1379](#1379)) ([9e22e88](9e22e88)) * **deps:** update cli-app-scripts for package/types race condition ([dee6795](dee6795)) ### Features * fixed dimensions efficiency ([#1386](#1386)) ([b56ad2d](b56ad2d)) * upgrade app-runtime React version to v18 ([#1387](#1387)) ([0e4a3d5](0e4a3d5))
# [3.12.0-alpha.1](v3.11.3...v3.12.0-alpha.1) (2024-11-27) ### Bug Fixes * **cacheable-section:** synchronously flush recording state for UI consistency ([#1394](#1394)) ([50d216c](50d216c)) * **deps:** remove cli-app-scripts peer dep ([7764439](7764439)) * **deps:** update cli-app-scripts for package/types race condition ([7980364](7980364)) ### Features * upgrade app-runtime React version to v18 ([#1387](#1387)) ([0e4a3d5](0e4a3d5))
🎉 This PR is included in version 3.12.0-alpha.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
# [3.12.0](v3.11.3...v3.12.0) (2024-12-04) ### Bug Fixes * **cacheable-section:** synchronously flush recording state for UI consistency ([#1394](#1394)) ([50d216c](50d216c)) * **deps:** remove cli-app-scripts peer dep ([7764439](7764439)) * **deps:** update cli-app-scripts for package/types race condition ([7980364](7980364)) ### Features * upgrade app-runtime React version to v18 ([#1387](#1387)) ([0e4a3d5](0e4a3d5)) * upgrade react query to v4 ([#1395](#1395)) ([8b02fdf](8b02fdf))
🎉 This PR is included in version 3.12.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Upgrades the runtime to use react 18. Implements https://dhis2.atlassian.net/browse/LIBS-708
This is not stictly necessary for using React 18, because apps bootstrapped from app-scripts resolves the version of React in the shell, but it generates a lot of warnings. As usual, updating the version of react was easy (a peer dependency here), but updating the tests is the hard part.
I also tried to update cli-style as part of this change, to use the "native" way of linting typescript projects, but ran into problems with how this project is setup with nested tsconfigs.