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

Move server-runtime into react-router #11698

Merged
merged 14 commits into from
Jun 21, 2024

Conversation

markdalgleish
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Jun 21, 2024

⚠️ No Changeset found

Latest commit: 8c7afc5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 6 packages
Name Type
react-router Major
react-router-dom Major
@react-router/dev Major
@react-router/node Major
@react-router/express Major
@react-router/serve Major

Click here to learn what changesets are, and how to add one.

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

Comment on lines +4 to +10
env: {
browser: true,
commonjs: true,
},
rules: {
strict: 0,
"no-restricted-syntax": ["error", "LogicalExpression[operator='??']"],
Copy link
Member Author

@markdalgleish markdalgleish Jun 21, 2024

Choose a reason for hiding this comment

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

This is just porting across equivalent config from .eslintrc (removed above) since it was converted to .eslintrc.js so it can include the options from the server-runtime package.

@@ -1,4 +1,8 @@
import { parseMultipartFormData } from "../formData";
/**
* @jest-environment node
Copy link
Member Author

Choose a reason for hiding this comment

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

This was needed in a few tests since react-router uses jsdom as its default environment, resulting in a few test failures when moving tests across.

Comment on lines +365 to +368
// defer,
// json,
// redirect,
// redirectDocument,
Copy link
Member Author

Choose a reason for hiding this comment

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

@brophdawg11 What's the plan with these APIs? For now I've left the React Router versions as the exported implementations.

@@ -43,6 +43,7 @@ export interface EntryContext extends RemixContextObject {
export interface FutureConfig {
v3_fetcherPersist: boolean;
v3_relativeSplatPath: boolean;
v3_throwAbortReason: boolean;
Copy link
Member Author

Choose a reason for hiding this comment

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

This flag was in the server-runtime implementation but missing here.

Copy link
Member Author

Choose a reason for hiding this comment

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

This file previously contained and exported the following types:

  • EntryContext
  • FutureConfig
  • AssetsManifest

Instead, this PR updates server-runtime to use the existing React Router types.

@markdalgleish markdalgleish marked this pull request as ready for review June 21, 2024 07:29
@ryanflorence
Copy link
Member

This looks great.

Here are all the exports of the node package now:

image

I don't think we want to re-export anything from "react-router" from "@react-router/node"

I'm inclined to merge this since it's a lot of work and probably 90% of what we want, 100 changed files is annoying to babysit for changes.

@ryanflorence ryanflorence merged commit 559b0eb into v7 Jun 21, 2024
7 of 8 checks passed
@ryanflorence ryanflorence deleted the markdalgleish/server-runtime-to-react-router branch June 21, 2024 13:31
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