Skip to content

Conversation

@eramdam
Copy link
Contributor

@eramdam eramdam commented Jan 16, 2025

Fixes #304

I had to add a @ts-expect-error comment since otherwise the typechecker would complain about missing react as a dependency.

Fixes github#304

I had to add a `@ts-expect-error` comment since otherwise the typechecker would complain about missing `react` as a dependency.
@eramdam eramdam requested a review from a team as a code owner January 16, 2025 20:00
@keithamus
Copy link
Contributor

@github/primer you'll need to integrate this to check whether or not this is viable for the monolith. Please do not merge before checking this, otherwise we'll have to revert.

@keithamus
Copy link
Contributor

@eramdam looks like this isn't quite passing the CI checks. Does tsc --noEmit pass locally for you?

@eramdam
Copy link
Contributor Author

eramdam commented Jan 17, 2025

@eramdam looks like this isn't quite passing the CI checks. Does tsc --noEmit pass locally for you?

Oops, you're right, it doesn't 🙈 I wanted to avoid it but it looks like the only clean way of fixing the issue was to add @types/react as a peer dependency so I did that.

Co-authored-by: Keith Cirkel <[email protected]>
@camertron
Copy link
Contributor

Hey @eramdam, thanks for looking into this. I'm hesitant to merge React-specific code into this project, considering it really has nothing to do with React. Could we instead put the React code into a separate .d.ts file and ask that clients add it to their tsconfig.json?

Copy link
Contributor

@keithamus keithamus left a comment

Choose a reason for hiding this comment

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

I think this looks okay from a library perspective. I dislike that there’s react specific idioms too, but react is always messy to integrate with so… 🤷‍♂️

@camertron lets try integrating this with PVC and see if there are any issues. AIUI this shouldn’t cause too much friction within PVC, but it might and at that point we’ll need to look at other solutions. My hope is this is a transparent change to non-react projects like PVC, and doesn’t pull in additional dependencies.

@alanbernale
Copy link

It’d be really helpful to merge this pull request to fix compatibility with React 19.

@lesliecdubs
Copy link

@camertron lets try integrating this with PVC and see if there are any issues. AIUI this shouldn’t cause too much friction within PVC, but it might and at that point we’ll need to look at other solutions. My hope is this is a transparent change to non-react projects like PVC, and doesn’t pull in additional dependencies.

@hectahertz as our PVC release conductor this week, could you take a look at integrating this change with PVC and see if there are any issues?

@lesliecdubs lesliecdubs requested a review from hectahertz April 24, 2025 02:32
@francinelucca
Copy link
Contributor

FYI, I asked @jonrohan about this last week:

J: for the releative-time-element, I think we just need to test upgrading in PVC and see if it still runs properly on the lookbook
M: won't we need to publish first anyways? :thinkin: I don't see canaries being deployed
J: hmm yeah I’m not sure we have that setup there 😞
M: merge -> release -> test in PVC -> (hopefully not) rollback, then?
J: 👍

So the work here is:

  • Merge and Release this
  • Upgrade PVC to this release version and not any errors
  • If no errors, this is done
  • If errors, we'll need to roll this back

@francinelucca francinelucca merged commit abb84c5 into github:main May 2, 2025
1 check 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.

TypeScript types don't work with React 19

6 participants