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

feat(@react-router/dev): remove deprecated ABORT_DELAY in favor of streamTimeout #12478

Merged
merged 3 commits into from
Dec 6, 2024

Conversation

brophdawg11
Copy link
Contributor

@brophdawg11 brophdawg11 commented Dec 5, 2024

Closes #12467

Copy link

changeset-bot bot commented Dec 5, 2024

🦋 Changeset detected

Latest commit: 1cf17f5

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

This PR includes changesets to release 11 packages
Name Type
@react-router/dev Patch
@react-router/fs-routes Patch
@react-router/remix-routes-option-adapter Patch
create-react-router Patch
react-router Patch
react-router-dom Patch
@react-router/architect Patch
@react-router/cloudflare Patch
@react-router/express Patch
@react-router/node Patch
@react-router/serve 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

@brophdawg11 brophdawg11 linked an issue Dec 5, 2024 that may be closed by this pull request
@@ -11,7 +11,6 @@ import { StreamTransfer } from "./single-fetch";
export interface ServerRouterProps {
context: EntryContext;
url: string | URL;
abortDelay?: number;
Copy link
Member

@MichaelDeBoey MichaelDeBoey Dec 5, 2024

Choose a reason for hiding this comment

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

Removing this prop would be a breaking change

Copy link
Member

Choose a reason for hiding this comment

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

I'd add a warning for now that it's non-functional and deprecated.

Copy link
Member

Choose a reason for hiding this comment

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

Making it non-functional would be a breaking change as well

Deprecating it and pointing towards using streamTimeout would be a good idea though!

Copy link
Member

Choose a reason for hiding this comment

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

I think it's already non-functional, though. At least based on the issue that spawned this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah it's now a useless prop that was supposed to be removed in 7.0.0 but got missed. I think you can view it as a types bug fix since the type allows you to pass a thing that does nothing. FWIW it's also a build-time "break" not a runtime functional breaking change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Confirmed with the tam we feel this is a types bug fix.

Another advantage is the error TS will provide after this change is a good thing because if you are still passing abortDelay in RR v7 then it's highly likely you have a functional bug in your app because your streams are not going to timeout properly. Surfacing this TS proper error will alert you to fix that bug.

@MichaelDeBoey MichaelDeBoey changed the title Remove deprecated ABORT_DELAY in favor of streamTimeout feat(@react-router/dev): remove deprecated ABORT_DELAY in favor of streamTimeout Dec 5, 2024
@brophdawg11 brophdawg11 merged commit 5213a95 into dev Dec 6, 2024
8 checks passed
@brophdawg11 brophdawg11 deleted the brophdawg11/stream-timeout branch December 6, 2024 16:58
Copy link
Contributor

🤖 Hello there,

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

Copy link
Contributor

🤖 Hello there,

We just published version 7.1.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 6.28.2-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 6.28.3-pre-v6.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
Development

Successfully merging this pull request may close these issues.

[React Router V7] Server timeout after 5 seconds
3 participants