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 error type to server runtime meta args #8238

Merged

Conversation

timkraut
Copy link
Contributor

@timkraut timkraut commented Dec 6, 2023

Closes: There is no issue for this one yet

  • Docs (https://remix.run/docs/en/main/route/meta#error does not mention a specific package to import this from - no changes required)
  • Tests (there is a test "loader errors are passed to meta" in the meta-test.tsx file - no changes required)

I have a Remix app on the latest version (v2.3.1) and with a lot of debugging, I've found out that the MetaFunction type imported from '@remix-run/node' differs from the MetaFunction from '@remix-run/react'. If there is an error thrown in the loader with v.2.3.1, the error is set as expected in JavaScript but the types yelled at me.

Testing Strategy

  • Have a look at the inferred types of the MetaFunction imported from '@remix-run/node'
  • Verify that the error property is included

Copy link

changeset-bot bot commented Dec 6, 2023

🦋 Changeset detected

Latest commit: dc7b786

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

This PR includes changesets to release 16 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
@remix-run/architect Patch
@remix-run/express Patch
@remix-run/serve Patch
@remix-run/testing Patch
create-remix 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

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Dec 6, 2023

Hi @timkraut,

Welcome, and thank you for contributing to Remix!

Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once.

You may review the CLA and sign it by adding your name to contributors.yml.

Once the CLA is signed, the CLA Signed label will be added to the pull request.

If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run.

Thanks!

- The Remix team

@timkraut timkraut force-pushed the add-error-type-to-server-runtime-meta-args branch from 6667351 to df4d4f8 Compare December 6, 2023 21:48
@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Dec 6, 2023

Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳

@timkraut timkraut force-pushed the add-error-type-to-server-runtime-meta-args branch 2 times, most recently from df4534c to a64223e Compare December 6, 2023 21:56
@timkraut timkraut force-pushed the add-error-type-to-server-runtime-meta-args branch from a64223e to 31399fa Compare December 6, 2023 22:04
Copy link
Contributor

@brophdawg11 brophdawg11 left a comment

Choose a reason for hiding this comment

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

Thanks!

@brophdawg11 brophdawg11 merged commit 39fd22c into remix-run:dev Dec 7, 2023
5 checks passed
Copy link
Contributor

github-actions bot commented Dec 8, 2023

🤖 Hello there,

We just published version 2.4.0-pre.7 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

I think our CI bot is confused. This was merged to dev so is not included in the 2.4.0 prerelease

Copy link
Contributor

🤖 Hello there,

We just published version 2.4.0-pre.9 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!

Copy link
Contributor

🤖 Hello there,

We just published version 2.4.1-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!

Copy link
Contributor

🤖 Hello there,

We just published version 2.4.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!

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

Successfully merging this pull request may close these issues.

None yet

2 participants