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

Collapse Packages #11505

Merged
merged 25 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
46a7218
Collapse react-router-dom into react-router
brophdawg11 Apr 19, 2024
1535a5e
Move router code into react-router
brophdawg11 Apr 23, 2024
cd7efe0
Update imports
brophdawg11 Apr 23, 2024
1ce18de
Get react router tests passing
brophdawg11 Apr 23, 2024
96bcde0
Merge branch 'v7' into brophdawg11/collapse-packages
brophdawg11 Apr 23, 2024
94dfaa1
Remove packages from publish/version scripts
brophdawg11 Apr 23, 2024
0c0d02a
Move single fetch shared types into RR
brophdawg11 Apr 25, 2024
5d9abd7
Fix react router importing from itself
brophdawg11 Apr 25, 2024
95bdcd3
Get rollup build working
brophdawg11 Apr 25, 2024
4cdf693
Remove remix run testing package
brophdawg11 Apr 25, 2024
cdfdaee
Add changeset
brophdawg11 Apr 25, 2024
148dbc6
Fix unit tests
brophdawg11 Apr 26, 2024
83e668e
Add back react-router-dom package for re-exports
brophdawg11 Apr 26, 2024
51cf326
Fix integration tests
brophdawg11 Apr 26, 2024
f629cbc
Fix TS and lint issues
brophdawg11 Apr 26, 2024
804f638
Remove from bundle check
brophdawg11 Apr 26, 2024
38a590e
Set bundle sizes for new collapsed package
brophdawg11 Apr 26, 2024
8adfe08
Update experimental flow to use correct token
brophdawg11 Apr 26, 2024
ca313db
Update version script
brophdawg11 Apr 26, 2024
53924e4
Update version script
brophdawg11 Apr 26, 2024
348eecf
Temporrily remove publish from workflow
brophdawg11 Apr 26, 2024
e53172d
Update meta info in package.json prior to experimental publish
brophdawg11 Apr 26, 2024
c085628
Add new @react-router packages to publish script
brophdawg11 Apr 26, 2024
7b411a7
Add startTransition back to RouterPRovider for v7
brophdawg11 Apr 29, 2024
f1233ec
Merge branch 'v7' into brophdawg11/collapse-packages
brophdawg11 Apr 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/collapse-packages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"react-router": major
---

- Collapse `@remix-run/router` into `react-router`
- Collapse `react-router-dom` into `react-router`
- Collapse `@remix-run/testing` into `react-router`
3 changes: 1 addition & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"@react-router/express",
"@react-router/node",
"@react-router/serve",
"@react-router/server-runtime",
"@react-router/testing"
"@react-router/server-runtime"
]
],
"linked": [],
Expand Down
2 changes: 0 additions & 2 deletions .changeset/drop-node-16.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
"react-router-dom": major
"react-router": major
"@remix-run/router": major
---

Drop support for Node 16, React Router SSR now requires Node 18 or higher
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ This repository is a monorepo containing the following packages:
- [`@react-router/node`](/packages/remix-node)
- [`@react-router/serve`](/packages/remix-serve)
- [`@react-router/server-runtime`](/packages/remix-server-runtime)
- [`@react-router/testing`](/packages/remix-testing)
- [`react-router`](/packages/react-router)
- [`react-router-dom`](/packages/react-router-dom)

Expand Down
2 changes: 1 addition & 1 deletion integration/error-data-request-test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test, expect } from "@playwright/test";
import { UNSAFE_ErrorResponseImpl as ErrorResponseImpl } from "@remix-run/router";
import { UNSAFE_ErrorResponseImpl as ErrorResponseImpl } from "react-router";

import {
createAppFixture,
Expand Down
2 changes: 1 addition & 1 deletion integration/error-sanitization-test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test, expect } from "@playwright/test";
import { UNSAFE_ErrorResponseImpl as ErrorResponseImpl } from "@remix-run/router";
import { UNSAFE_ErrorResponseImpl as ErrorResponseImpl } from "react-router";

import { UNSAFE_ServerMode as ServerMode } from "@react-router/server-runtime";
import type { Fixture } from "./helpers/create-fixture.js";
Expand Down
8 changes: 1 addition & 7 deletions integration/helpers/cf-template/app/root.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
Links,
Meta,
Outlet,
Scripts,
ScrollRestoration,
} from "react-router-dom";
import { Links, Meta, Outlet, Scripts, ScrollRestoration } from "react-router";

export default function App() {
return (
Expand Down
2 changes: 1 addition & 1 deletion integration/helpers/create-fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type { ServerBuild } from "@react-router/server-runtime";
import { createRequestHandler } from "@react-router/server-runtime";
import { createRequestHandler as createExpressHandler } from "@react-router/express";
import { installGlobals } from "@react-router/node";
import { UNSAFE_decodeViaTurboStream as decodeViaTurboStream } from "react-router-dom";
import { UNSAFE_decodeViaTurboStream as decodeViaTurboStream } from "react-router";

import { viteConfig } from "./vite.js";

Expand Down
8 changes: 1 addition & 7 deletions integration/helpers/deno-template/app/root.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
Links,
Meta,
Outlet,
Scripts,
ScrollRestoration,
} from "react-router-dom";
import { Links, Meta, Outlet, Scripts, ScrollRestoration } from "react-router";
import * as React from "react";

export default function App() {
Expand Down
8 changes: 1 addition & 7 deletions integration/helpers/node-template/app/root.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
Links,
Meta,
Outlet,
Scripts,
ScrollRestoration,
} from "react-router-dom";
import { Links, Meta, Outlet, Scripts, ScrollRestoration } from "react-router";

export default function App() {
return (
Expand Down
8 changes: 1 addition & 7 deletions integration/helpers/vite-cloudflare-template/app/root.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
Links,
Meta,
Outlet,
Scripts,
ScrollRestoration,
} from "react-router-dom";
import { Links, Meta, Outlet, Scripts, ScrollRestoration } from "react-router";

export default function App() {
return (
Expand Down
8 changes: 1 addition & 7 deletions integration/helpers/vite-template/app/root.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
Links,
Meta,
Outlet,
Scripts,
ScrollRestoration,
} from "react-router-dom";
import { Links, Meta, Outlet, Scripts, ScrollRestoration } from "react-router";

export default function App() {
return (
Expand Down
3 changes: 1 addition & 2 deletions integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"@react-router/dev": "workspace:*",
"@react-router/express": "workspace:*",
"@react-router/node": "workspace:*",
"@remix-run/router": "workspace:*",
"@react-router/server-runtime": "workspace:*",
"@types/express": "^4.17.9",
"@vanilla-extract/css": "^1.10.0",
Expand All @@ -35,7 +34,7 @@
"prettier": "^2.7.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "workspace:*",
"react-router": "workspace:*",
"serialize-javascript": "^6.0.1",
"shelljs": "^0.8.5",
"strip-ansi": "^6.0.1",
Expand Down
11 changes: 9 additions & 2 deletions jest/jest.config.shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ const ignorePatterns = [
/** @type {import('jest').Config} */
module.exports = {
moduleNameMapper: {
"^@remix-run/router$": "<rootDir>/../router/index.ts",
"@react-router/dev$": "<rootDir>/../remix-dev/index.ts",
"@react-router/express$": "<rootDir>/../remix-express/index.ts",
"@react-router/node$": "<rootDir>/../remix-node/index.ts",
"@react-router/serve$": "<rootDir>/../remix-serve/index.ts",
"@react-router/server-runtime$":
"<rootDir>/../remix-server-runtime/index.ts",
"^react-router$": "<rootDir>/../react-router/index.ts",
"^react-router-dom$": "<rootDir>/../react-router-dom/index.tsx",
"^@web3-storage/multipart-parser$": require.resolve(
"@web3-storage/multipart-parser"
),
Expand All @@ -23,4 +27,7 @@ module.exports = {
"\\.[jt]sx?$": require.resolve("./transform"),
},
watchPathIgnorePatterns: [...ignorePatterns, "\\/node_modules\\/"],
globals: {
__DEV__: true,
},
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"scripts": {
"build": "rollup -c",
"clean": "git clean -fdX .",
"clean:build": "git clean -fdx -e node_modules .",
"clean:integration": "node ./integration/helpers/cleanup.mjs",
"format": "prettier --ignore-path .eslintignore --write .",
"format:check": "prettier --ignore-path .eslintignore --check .",
Expand Down
13 changes: 0 additions & 13 deletions packages/react-router-dom/.eslintrc

This file was deleted.

4 changes: 0 additions & 4 deletions packages/react-router-dom/.gitignore

This file was deleted.