Skip to content

Commit

Permalink
Collapse Packages (#11505)
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Apr 30, 2024
1 parent b98c549 commit 5ae9979
Show file tree
Hide file tree
Showing 203 changed files with 938 additions and 3,628 deletions.
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
4 changes: 2 additions & 2 deletions .github/workflows/release-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
ref: ${{ github.event.inputs.branch }}
# checkout using a custom token so that we can push later on
token: ${{ secrets.NIGHTLY_PAT }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- name: 📦 Setup pnpm
Expand All @@ -32,7 +32,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: pnpm
cache: "pnpm"

- name: 📥 Install deps
run: pnpm install --frozen-lockfile
Expand Down
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,
},
};
14 changes: 3 additions & 11 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 Expand Up @@ -127,20 +128,11 @@
"node": ">=14.0.0"
},
"filesize": {
"packages/router/dist/router.umd.min.js": {
"none": "52.8 kB"
},
"packages/react-router/dist/react-router.production.min.js": {
"none": "14.8 kB"
"none": "115.5 kB"
},
"packages/react-router/dist/umd/react-router.production.min.js": {
"none": "17.21 kB"
},
"packages/react-router-dom/dist/react-router-dom.production.min.js": {
"none": "17.1 kB"
},
"packages/react-router-dom/dist/umd/react-router-dom.production.min.js": {
"none": "23.5 kB"
"none": "120 kB"
}
},
"pnpm": {
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.

0 comments on commit 5ae9979

Please sign in to comment.