Skip to content

Conversation

felix-ebert
Copy link

Description

This PR updates the peer dependency constraints for React and React-DOM to support React 19.x versions. The changes modify both the main package.json and the React flavor template to expand the accepted React version range from >=16.8.0 <19 to >=16.8.0 <20, enabling compatibility with React 19 while maintaining backward compatibility with all previously supported React versions.

Motivation and Context

Fixes #10243

How Has This Been Tested?

  • Ran the full unit test suite (npm run test:unit)
  • All 795 tests passed, 12 skipped (no failures)

Checklist

My PR contains...

  • No code changes (src/ is unmodified: changes to documentation, CI, metadata, etc.)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fixes (non-breaking change which fixes an issue)
  • Improvements (misc. changes to existing features)
  • Features (non-breaking change which adds functionality)

My changes...

  • are breaking changes to a public API (config options, System API, major UI change, etc).
  • are breaking changes to a private API (Redux, component props, utility functions, etc.).
  • are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc).
  • are not breaking changes.

Documentation

  • My changes do not require a change to the project documentation.
  • My changes require a change to the project documentation.
  • If yes to above: I have updated the documentation accordingly.

Automated tests

  • My changes can not or do not need to be tested.
  • My changes can and should be tested by unit and/or integration tests.
  • If yes to above: I have added tests to cover my changes.
  • If yes to above: I have taken care to cover edge cases in my tests.
  • All new and existing tests passed.

- Updated peer dependencies to support React 19.x
- Changed React constraint from '>=16.8.0 <19' to '>=16.8.0 <20'
- Updated both main package.json and React flavor template
- All existing tests pass with React 19 support

Fixes swagger-api#10243
@felix-ebert felix-ebert marked this pull request as ready for review August 5, 2025 10:21
@HaakonW
Copy link

HaakonW commented Aug 15, 2025

Nice to see the bump! Out of curiosity, has this been tested on React 19 yet, or is this mainly a peer dependency update for now?

@cka121
Copy link
Contributor

cka121 commented Aug 19, 2025

Hi @felix-ebert, Thank You for this PR. However, with changes in package.json will also require change in its lock file. Can you please update that too.

@glowcloud
Copy link
Contributor

Hi @felix-ebert,

Thanks again for your contribution! I've created a superseding PR that includes your changes with proper attribution and updates the package-lock.

@glowcloud glowcloud closed this Aug 27, 2025
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.

React 19 Compatibility with swagger-ui-react
5 participants