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

Bump Router prerelease #8903

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
60 changes: 60 additions & 0 deletions integration/client-data-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,66 @@ test.describe("Client Data", () => {
expect(html).not.toMatch("Should not see me");
console.error = _consoleError;
});

test("server loader errors are persisted for non-hydrating routes", async ({
page,
}) => {
let _consoleError = console.error;
console.error = () => {};
appFixture = await createAppFixture(
await createFixture(
{
files: {
...getFiles({
parentClientLoader: true,
parentClientLoaderHydrate: false,
// Hydrate the parent clientLoader but don't add a HydrateFallback
parentAdditions: js`
clientLoader.hydrate = true;
`,
childClientLoader: false,
childClientLoaderHydrate: false,
}),
"app/routes/parent.child.tsx": js`
import { json } from '@remix-run/node'
import { useRouteError } from '@remix-run/react'
export function loader() {
throw json({ message: 'Child Server Error'});
}
export default function Component() {
return <h1>Should not see me</h1>;
}
export function ErrorBoundary() {
const error = useRouteError();
return (
<>
<h1>Child Error</h1>
<pre>{JSON.stringify(error, null, 2)}</pre>
</>
);
}
`,
},
},
ServerMode.Development // Avoid error sanitization
),
ServerMode.Development // Avoid error sanitization
);
let app = new PlaywrightFixture(appFixture, page);

await app.goto("/parent/child");
let html = await app.getHtml("main");
expect(html).toMatch("Parent Server Loader</p>");
expect(html).toMatch("Child Server Error");
expect(html).not.toMatch("Should not see me");
// Ensure we hydrate and remain on the boundary
await new Promise((r) => setTimeout(r, 100));
html = await app.getHtml("main");
expect(html).toMatch("Parent Server Loader (mutated by client)</p>");
expect(html).toMatch("Child Server Error");
expect(html).not.toMatch("Should not see me");
console.error = _consoleError;
});
});

test.describe("clientLoader - lazy route module", () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@mdx-js/mdx": "^2.3.0",
"@npmcli/package-json": "^4.0.1",
"@remix-run/node": "2.7.2",
"@remix-run/router": "1.15.1",
"@remix-run/router": "1.15.2-pre.0",
"@remix-run/server-runtime": "2.7.2",
"@types/mdx": "^2.0.5",
"@vanilla-extract/integration": "^6.2.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/remix-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"typings": "dist/index.d.ts",
"module": "dist/esm/index.js",
"dependencies": {
"@remix-run/router": "1.15.1",
"@remix-run/router": "1.15.2-pre.0",
"@remix-run/server-runtime": "2.7.2",
"react-router": "6.22.1",
"react-router-dom": "6.22.1"
"react-router": "6.22.2-pre.0",
"react-router-dom": "6.22.2-pre.0"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.17.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-server-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"typings": "dist/index.d.ts",
"module": "dist/esm/index.js",
"dependencies": {
"@remix-run/router": "1.15.1",
"@remix-run/router": "1.15.2-pre.0",
"@types/cookie": "^0.6.0",
"@web3-storage/multipart-parser": "^1.0.0",
"cookie": "^0.6.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/remix-testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"dependencies": {
"@remix-run/node": "2.7.2",
"@remix-run/react": "2.7.2",
"@remix-run/router": "1.15.1",
"react-router-dom": "6.22.1"
"@remix-run/router": "1.15.2-pre.0",
"react-router-dom": "6.22.2-pre.0"
},
"devDependencies": {
"@types/node": "^18.17.1",
Expand Down
30 changes: 15 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2482,10 +2482,10 @@
"@changesets/types" "^5.0.0"
dotenv "^8.1.0"

"@remix-run/[email protected].1":
version "1.15.1"
resolved "https://registry.npmjs.org/@remix-run/router/-/router-1.15.1.tgz#221fd31a65186b9bc027b74573485fb3226dff7f"
integrity sha512-zcU0gM3z+3iqj8UX45AmWY810l3oUmXM7uH4dt5xtzvMhRtYVhKGOmgOd1877dOPPepfCjUv57w+syamWIYe7w==
"@remix-run/[email protected].2-pre.0":
version "1.15.2-pre.0"
resolved "https://registry.npmjs.org/@remix-run/router/-/router-1.15.2-pre.0.tgz#7c045fa57c7eeb64306a92c0611949b5d3bebfe5"
integrity sha512-87zTVzkwSWTlaHH5vLziaQkyYWTEy8tTs/XPkwKlDfIZVdvnVtuDuwMCsCyzccJw8FxPvS2xoOeExeaQIlhacQ==

"@remix-run/web-blob@^3.1.0":
version "3.1.0"
Expand Down Expand Up @@ -11300,20 +11300,20 @@ react-refresh@^0.14.0:
resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz"
integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==

[email protected].1:
version "6.22.1"
resolved "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.1.tgz#cfa109d4b6b0a4d00bac179bc0ad2a6469455282"
integrity sha512-iwMyyyrbL7zkKY7MRjOVRy+TMnS/OPusaFVxM2P11x9dzSzGmLsebkCvYirGq0DWB9K9hOspHYYtDz33gE5Duw==
[email protected].2-pre.0:
version "6.22.2-pre.0"
resolved "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.2-pre.0.tgz#9892bc8bcb15e25b1bc2050fb9f3b80646264d59"
integrity sha512-37KoToqJmM8Di0WPojcLQvywjfN8fDUKtRgCxASzjnXnUr2AY55FWMYImBC6/zgwgVCZP8wodKoNysAiBEst8w==
dependencies:
"@remix-run/router" "1.15.1"
react-router "6.22.1"
"@remix-run/router" "1.15.2-pre.0"
react-router "6.22.2-pre.0"

[email protected].1:
version "6.22.1"
resolved "https://registry.npmjs.org/react-router/-/react-router-6.22.1.tgz#a5ff849bfe709438f7e139421bb28138209662c7"
integrity sha512-0pdoRGwLtemnJqn1K0XHUbnKiX0S4X8CgvVVmHGOWmofESj31msHo/1YiqcJWK7Wxfq2a4uvvtS01KAQyWK/CQ==
[email protected].2-pre.0:
version "6.22.2-pre.0"
resolved "https://registry.npmjs.org/react-router/-/react-router-6.22.2-pre.0.tgz#2b82e32367b28e962a7f8539c96e8d2bf4efb864"
integrity sha512-bVT5azwFuWqfarpI7JV/NdejUR8/2A0N6YTA8X8hhuxYnJZlD/XdWAiErFL8Rfe2emhlJ7Zf3qZTHF+6yLf4fg==
dependencies:
"@remix-run/router" "1.15.1"
"@remix-run/router" "1.15.2-pre.0"

react@^18.2.0:
version "18.2.0"
Expand Down