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 1 commit
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix integration tests
  • Loading branch information
brophdawg11 committed Apr 26, 2024
commit 51cf326f82a53d2a3a0427ba9dcbff8e4211655b
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
3 changes: 2 additions & 1 deletion integration/helpers/cf-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"isbot": "^4.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "workspace:*"
"react-router": "workspace:*",
"react-router-dom": "workspace:*"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20230518.0",
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
3 changes: 2 additions & 1 deletion integration/helpers/deno-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"isbot": "^4.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "workspace:*"
"react-router": "workspace:*",
"react-router-dom": "workspace:*"
},
"devDependencies": {
"@react-router/dev": "workspace:*"
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
3 changes: 2 additions & 1 deletion integration/helpers/node-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"isbot": "^4.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "workspace:*"
"react-router": "workspace:*",
"react-router-dom": "workspace:*"
},
"devDependencies": {
"@react-router/dev": "workspace:*",
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
3 changes: 2 additions & 1 deletion integration/helpers/vite-cloudflare-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"miniflare": "^3.20231030.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "workspace:*"
"react-router": "workspace:*",
"react-router-dom": "workspace:*"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20230518.0",
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
1 change: 1 addition & 0 deletions integration/helpers/vite-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "workspace:*",
"react-router-dom": "workspace:*",
"serialize-javascript": "^6.0.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-dev/config/defaults/entry.client.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { startTransition, StrictMode } from "react";
import { hydrateRoot } from "react-dom/client";
import { HydratedRouter } from "react-router-dom";
import { HydratedRouter } from "react-router";

startTransition(() => {
hydrateRoot(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { AppLoadContext, EntryContext } from "@react-router/cloudflare";
import { RemixServer } from "react-router-dom";
import { RemixServer } from "react-router";
import * as isbotModule from "isbot";
import { renderToReadableStream } from "react-dom/server";

Expand Down
2 changes: 1 addition & 1 deletion packages/remix-dev/config/defaults/entry.server.node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PassThrough } from "node:stream";

import type { AppLoadContext, EntryContext } from "@react-router/node";
import { createReadableStreamFromReadable } from "@react-router/node";
import { RemixServer } from "react-router-dom";
import { RemixServer } from "react-router";
import * as isbotModule from "isbot";
import { renderToPipeableStream } from "react-dom/server";

Expand Down
2 changes: 1 addition & 1 deletion packages/remix-dev/config/defaults/entry.server.spa.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { EntryContext } from "@react-router/node";
import { RemixServer } from "react-router-dom";
import { RemixServer } from "react-router";
import * as React from "react";
import { renderToString } from "react-dom/server";

Expand Down
19 changes: 19 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ packages:
- "packages/remix-node"
- "packages/remix-serve"
- "packages/remix-server-runtime"
- "packages/remix-testing"
- "packages/router"
- "playground/compiler"
- "playground/compiler-express"
- "playground/compiler-spa"
7 changes: 4 additions & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@ const path = require("path");

module.exports = function rollup(options) {
return [
"router",
"react-router",
"react-router-dom",
"remix-dev",
"remix-express",
"remix-node",
"remix-serve",
"remix-server-runtime",
"remix-testing",
]
.flatMap((dir) => {
// if (dir !== "router") return null;
let configPath = path.join("packages", dir, "rollup.config.js");
try {
fs.readFileSync(configPath);
} catch (e) {
console.error(
"⚠️ Skipping build for package directory without rollup.config.js:",
dir
);
return null;
}
let packageBuild = require(`.${path.sep}${configPath}`);
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
{ "path": "packages/remix-express" },
{ "path": "packages/remix-node" },
{ "path": "packages/remix-serve" },
{ "path": "packages/remix-server-runtime" },
{ "path": "packages/remix-testing" }
{ "path": "packages/remix-server-runtime" }
]
}
Loading