Skip to content
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

Add switch React version #44

Merged
merged 31 commits into from
Mar 31, 2024
Merged

Add switch React version #44

merged 31 commits into from
Mar 31, 2024

Conversation

compulim
Copy link
Owner

@compulim compulim commented Mar 31, 2024

Changelog

Please copy and paste new entries from CHANGELOG.md here.

Changed

  • Updated pull request validation to test against various React versions, in PR #44
    • Moved from JSX Runtime to JSX Classic to support testing against React 16

Specific changes

Please list each individual specific change in this pull request.

  • Added strategy.matrix.react-version to pull request validation to test against 16.9.0, 17.0.0, 18.0.0 and current (as committed)
  • Moved from JSX Runtime to JSX Classic to support older version of React
  • Added NPM scripts switch:react:* to temporarily switch React versions by manually modifying dependencies

Designs

The added switch:react:* scripts are one-way door. After the switch, the modified files including package-lock.json must be discarded and never committed to the repository.

We are using --legacy-peer-deps during the switch. Otherwise, NPM will pick up the latest possible version, instead of honoring the specified version. In other words, without --legacy-peer-deps, it will install latest available react@18.2.0 at the root /node_modules/react/ as it is required by @fluentui/* (>=16.8.0 <19.0.0) thru /packages/pages/. And NPM will leave react@16.9.0 under individual /packages/*/node_modules/.

@compulim compulim marked this pull request as ready for review March 31, 2024 14:22
@compulim compulim merged commit 8f08c43 into main Mar 31, 2024
14 checks passed
@compulim compulim deleted the feat-switch-react-version branch March 31, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant