Skip to content

Revert "Declare relative-element under React.JSX to fix React 19 compatibility" #314

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

Merged
merged 1 commit into from
May 6, 2025

Conversation

francinelucca
Copy link
Contributor

Reverts #305

These changes turned out to not be compatible with non-react projects (sample test: primer/view_components#3472)
image

Reverting

@Copilot Copilot AI review requested due to automatic review settings May 6, 2025 14:46
@francinelucca francinelucca requested a review from a team as a code owner May 6, 2025 14:46
@francinelucca
Copy link
Contributor Author

FYI @eramdam

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Reverts recent additions of React JSX type declarations and related peer dependency settings due to compatibility issues with non-React projects.

  • Removes the declare module 'react' JSX extension in relative-time-element-define.ts
  • Deletes @types/react peerDependencies and peerDependenciesMeta entries in package.json

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/relative-time-element-define.ts Stripped out the React JSX declaration and mismatched braces
package.json Removed @types/react peerDependencies and optional metadata
Comments suppressed due to low confidence (1)

src/relative-time-element-define.ts:25

  • The removal of declare module 'react' { and the closing } for the declare global block causes unbalanced braces, leading to a syntax error. Reintroduce the module wrapper and ensure all blocks are properly closed.
namespace JSX {

@francinelucca francinelucca merged commit 8e59fda into main May 6, 2025
4 checks passed
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.

2 participants