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

fix(remix-server-runtime): don't use React types #5713

Conversation

MichaelDeBoey
Copy link
Member

@MichaelDeBoey MichaelDeBoey commented Mar 8, 2023

Follow-up of #4801

Not the most ideal thing to do imo, but it fixes #5615 🤷‍♂️

As I mentioned in #4801 (comment), I added @types/react to dependencies because we're using ComponentType type in packages/remix-server-runtime/routeModules.ts

export type CatchBoundaryComponent = ComponentType;

export type ErrorBoundaryComponent = ComponentType<{ error: Error }>;

export type RouteComponent = ComponentType<{}>;

We should probably move that to @remix-run/react and make @remix-run/server-runtime more renderer-agnostic in that place.

@brophdawg11 thought that would be the case when moving to RR 6.4 (see #4801 (comment)), but apparently that's not the case 😢


Closes #5615
Closes #6275

@changeset-bot
Copy link

changeset-bot bot commented Mar 8, 2023

🦋 Changeset detected

Latest commit: cd1b030

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
@remix-run/server-runtime Patch
@remix-run/cloudflare Patch
@remix-run/deno Patch
@remix-run/dev Patch
@remix-run/node Patch
@remix-run/react Patch
@remix-run/cloudflare-pages Patch
@remix-run/cloudflare-workers Patch
create-remix Patch
@remix-run/architect Patch
@remix-run/express Patch
@remix-run/netlify Patch
@remix-run/serve Patch
@remix-run/testing Patch
@remix-run/vercel Patch
remix Patch
@remix-run/css-bundle Patch
@remix-run/eslint-config Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@MichaelDeBoey MichaelDeBoey force-pushed the inline-ComponentType-type-in-server-runtime branch 6 times, most recently from 5837f1f to 7f5ac90 Compare March 21, 2023 20:28
@MichaelDeBoey MichaelDeBoey force-pushed the inline-ComponentType-type-in-server-runtime branch 2 times, most recently from 0999b33 to 07fb98f Compare March 25, 2023 17:03
@MichaelDeBoey MichaelDeBoey force-pushed the inline-ComponentType-type-in-server-runtime branch 3 times, most recently from e95c1de to 90061ef Compare March 31, 2023 23:31
@MichaelDeBoey MichaelDeBoey force-pushed the inline-ComponentType-type-in-server-runtime branch from 90061ef to a118640 Compare April 10, 2023 17:07
@MichaelDeBoey MichaelDeBoey force-pushed the inline-ComponentType-type-in-server-runtime branch 3 times, most recently from 1376cfc to e9b7236 Compare April 19, 2023 20:32
@MichaelDeBoey MichaelDeBoey force-pushed the inline-ComponentType-type-in-server-runtime branch from e9b7236 to 4d5ecb5 Compare April 24, 2023 00:58
@MichaelDeBoey MichaelDeBoey force-pushed the inline-ComponentType-type-in-server-runtime branch 2 times, most recently from 7c07a00 to f4b7b12 Compare May 1, 2023 21:05
@MichaelDeBoey MichaelDeBoey force-pushed the inline-ComponentType-type-in-server-runtime branch from f4b7b12 to f9a0363 Compare May 6, 2023 15:38
@MichaelDeBoey MichaelDeBoey force-pushed the inline-ComponentType-type-in-server-runtime branch from aff997f to 05144a3 Compare June 6, 2023 21:22
@brophdawg11
Copy link
Contributor

Talked this over with @jacob-ebey and @pcattori and we decided that the loosening of the types in server-runtime is really just a bug fix since that should never have been exporting react-flavored types. We've included deprecation warnings pointing to the corresponding types in @remix-run/react.

@MichaelDeBoey MichaelDeBoey added renderer:react and removed v2 Issues related to v2 apis labels Jun 7, 2023
@MichaelDeBoey MichaelDeBoey linked an issue Jun 7, 2023 that may be closed by this pull request
1 task
@MichaelDeBoey MichaelDeBoey force-pushed the inline-ComponentType-type-in-server-runtime branch from b9c3091 to c88fabb Compare June 7, 2023 21:54
@lpsinger
Copy link
Contributor

Do I understand correctly based on the labels that this won't be fixed until v2? When will that be?

@MichaelDeBoey MichaelDeBoey force-pushed the inline-ComponentType-type-in-server-runtime branch from c88fabb to 1db1f26 Compare June 13, 2023 20:11
@MichaelDeBoey MichaelDeBoey force-pushed the inline-ComponentType-type-in-server-runtime branch from 1db1f26 to cd1b030 Compare June 13, 2023 20:12
@brophdawg11
Copy link
Contributor

@lpsinger Nah sorry for the confusion - we're going to get this merged for the next release

@brophdawg11 brophdawg11 merged commit 534213a into remix-run:dev Jun 13, 2023
9 checks passed
@MichaelDeBoey MichaelDeBoey deleted the inline-ComponentType-type-in-server-runtime branch June 13, 2023 21:48
@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-eb06147-20230614 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.17.1-pre.1 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@brophdawg11
Copy link
Contributor

Hm, we must have a bug in our bot logic - this is not included in 1.17.1-pre.1 and should land in 1.18.0

https://github.com/remix-run/remix/compare/remix@1.17.0...remix@1.17.1-pre.1

@mcansh
Copy link
Collaborator

mcansh commented Jun 14, 2023

Hm, we must have a bug in our bot logic - this is not included in 1.17.1-pre.1 and should land in 1.18.0

https://github.com/remix-run/remix/compare/remix@1.17.0...remix@1.17.1-pre.1

yeah that’s odd… it gets the commits via git log --pretty=format:%H v0.0.0-nightly-eb06147-20230614...remix@1.17.1-pre.1 ./packages, but seems like github actions got a different list 🤔

indeed not here, but somehow got into the list in ci

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-ad9adee-20230615 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-12440f3-20230616 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.18.0-pre.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.18.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants