Skip to content

Commit

Permalink
Merge branch 'release-hotfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-ebey committed Aug 5, 2024
2 parents 9a73f54 + 73fdcdc commit 5592c0e
Show file tree
Hide file tree
Showing 38 changed files with 177 additions and 59 deletions.
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ We manage release notes in this file instead of the paginated Github Releases Pa
<summary>Table of Contents</summary>

- [Remix Releases](#remix-releases)
- [v2.11.1](#v2110)
- [Patch Changes](#patch-changes)
- [Changes by Package](#changes-by-package)
- [v2.11.0](#v2110)
- [What's Changed](#whats-changed)
- [Renamed `unstable_fogOfWar` future flag to `unstable_lazyRouteDiscovery` (unstable)](#renamed-unstable_fogofwar-future-flag-to-unstable_lazyroutediscovery-unstable)
Expand Down Expand Up @@ -202,6 +205,34 @@ Date: YYYY-MM-DD
-->

## v2.11.1

Date: 2024-08-05

### Patch Changes

- Revert #9695, stop infinite reload. ([`6dd275797`](https://github.com/remix-run/remix/commit/6dd2757977d9029501b399f02c83d1010df692d1))

### Changes by Package

- [`create-remix`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/create-remix/CHANGELOG.md#2111)
- [`@remix-run/architect`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-architect/CHANGELOG.md#2111)
- [`@remix-run/cloudflare`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-cloudflare/CHANGELOG.md#2111)
- [`@remix-run/cloudflare-pages`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-cloudflare-pages/CHANGELOG.md#2111)
- [`@remix-run/cloudflare-workers`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-cloudflare-workers/CHANGELOG.md#2111)
- [`@remix-run/css-bundle`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-css-bundle/CHANGELOG.md#2111)
- [`@remix-run/deno`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-deno/CHANGELOG.md#2111)
- [`@remix-run/dev`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-dev/CHANGELOG.md#2111)
- [`@remix-run/eslint-config`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-eslint-config/CHANGELOG.md#2111)
- [`@remix-run/express`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-express/CHANGELOG.md#2111)
- [`@remix-run/node`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-node/CHANGELOG.md#2111)
- [`@remix-run/react`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-react/CHANGELOG.md#2111)
- [`@remix-run/serve`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-serve/CHANGELOG.md#2111)
- [`@remix-run/server-runtime`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-server-runtime/CHANGELOG.md#2111)
- [`@remix-run/testing`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-testing/CHANGELOG.md#2111)

**Full Changelog**: [`v2.11.0...v2.11.1`](https://github.com/remix-run/remix/compare/[email protected]@2.11.1)

## v2.11.0

Date: 2024-08-01
Expand Down
6 changes: 3 additions & 3 deletions integration/helpers/vite-cloudflare-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"typecheck": "tsc"
},
"dependencies": {
"@remix-run/cloudflare": "2.11.0",
"@remix-run/cloudflare-pages": "2.11.0",
"@remix-run/react": "2.11.0",
"@remix-run/cloudflare": "2.11.1",
"@remix-run/cloudflare-pages": "2.11.1",
"@remix-run/react": "2.11.1",
"isbot": "^4.1.0",
"miniflare": "^3.20231030.4",
"react": "^18.2.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/create-remix/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# `create-remix`

## 2.11.1

## 2.11.0

No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/remix/blob/main/CHANGELOG.md) for an overview of all changes in v2.11.0.
Expand Down
2 changes: 1 addition & 1 deletion packages/create-remix/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-remix",
"version": "2.11.0",
"version": "2.11.1",
"description": "Create a new Remix app",
"homepage": "https://remix.run",
"bugs": {
Expand Down
7 changes: 7 additions & 0 deletions packages/remix-architect/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `@remix-run/architect`

## 2.11.1

### Patch Changes

- Updated dependencies:
- `@remix-run/[email protected]`

## 2.11.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-architect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-run/architect",
"version": "2.11.0",
"version": "2.11.1",
"description": "Architect server request handler for Remix",
"bugs": {
"url": "https://github.com/remix-run/remix/issues"
Expand Down
7 changes: 7 additions & 0 deletions packages/remix-cloudflare-pages/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `@remix-run/cloudflare-pages`

## 2.11.1

### Patch Changes

- Updated dependencies:
- `@remix-run/[email protected]`

## 2.11.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-cloudflare-pages/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-run/cloudflare-pages",
"version": "2.11.0",
"version": "2.11.1",
"description": "Cloudflare Pages request handler for Remix",
"bugs": {
"url": "https://github.com/remix-run/remix/issues"
Expand Down
7 changes: 7 additions & 0 deletions packages/remix-cloudflare-workers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `@remix-run/cloudflare-workers`

## 2.11.1

### Patch Changes

- Updated dependencies:
- `@remix-run/[email protected]`

## 2.11.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-cloudflare-workers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-run/cloudflare-workers",
"version": "2.11.0",
"version": "2.11.1",
"description": "Cloudflare worker request handler for Remix",
"bugs": {
"url": "https://github.com/remix-run/remix/issues"
Expand Down
7 changes: 7 additions & 0 deletions packages/remix-cloudflare/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `@remix-run/cloudflare`

## 2.11.1

### Patch Changes

- Updated dependencies:
- `@remix-run/[email protected]`

## 2.11.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-cloudflare/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-run/cloudflare",
"version": "2.11.0",
"version": "2.11.1",
"description": "Cloudflare platform abstractions for Remix",
"bugs": {
"url": "https://github.com/remix-run/remix/issues"
Expand Down
2 changes: 2 additions & 0 deletions packages/remix-css-bundle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @remix-run/css-bundle

## 2.11.1

## 2.11.0

No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/remix/blob/main/CHANGELOG.md) for an overview of all changes in v2.11.0.
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-css-bundle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-run/css-bundle",
"version": "2.11.0",
"version": "2.11.1",
"description": "CSS bundle href when using CSS bundling features in Remix",
"homepage": "https://remix.run",
"bugs": {
Expand Down
7 changes: 7 additions & 0 deletions packages/remix-deno/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `@remix-run/deno`

## 2.11.1

### Patch Changes

- Updated dependencies:
- `@remix-run/[email protected]`

## 2.11.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-deno/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-run/deno",
"version": "2.11.0",
"version": "2.11.1",
"description": "Deno platform abstractions for Remix",
"homepage": "https://remix.run",
"main": "./index.ts",
Expand Down
8 changes: 8 additions & 0 deletions packages/remix-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# `@remix-run/dev`

## 2.11.1

### Patch Changes

- Updated dependencies:
- `@remix-run/[email protected]`
- `@remix-run/[email protected]`

## 2.11.0

### Minor Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/remix-dev/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-run/dev",
"version": "2.11.0",
"version": "2.11.1",
"description": "Dev tools and CLI for Remix",
"homepage": "https://remix.run",
"bugs": {
Expand Down Expand Up @@ -106,8 +106,8 @@
"wrangler": "^3.28.2"
},
"peerDependencies": {
"@remix-run/react": "^2.11.0",
"@remix-run/serve": "^2.11.0",
"@remix-run/react": "^2.11.1",
"@remix-run/serve": "^2.11.1",
"typescript": "^5.1.0",
"vite": "^5.1.0",
"wrangler": "^3.28.2"
Expand Down
2 changes: 2 additions & 0 deletions packages/remix-eslint-config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# `@remix-run/eslint-config`

## 2.11.1

## 2.11.0

No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/remix/blob/main/CHANGELOG.md) for an overview of all changes in v2.11.0.
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-run/eslint-config",
"version": "2.11.0",
"version": "2.11.1",
"description": "ESLint configuration for Remix projects",
"bugs": {
"url": "https://github.com/remix-run/remix/issues"
Expand Down
7 changes: 7 additions & 0 deletions packages/remix-express/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `@remix-run/express`

## 2.11.1

### Patch Changes

- Updated dependencies:
- `@remix-run/[email protected]`

## 2.11.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-express/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-run/express",
"version": "2.11.0",
"version": "2.11.1",
"description": "Express server request handler for Remix",
"bugs": {
"url": "https://github.com/remix-run/remix/issues"
Expand Down
7 changes: 7 additions & 0 deletions packages/remix-node/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `@remix-run/node`

## 2.11.1

### Patch Changes

- Updated dependencies:
- `@remix-run/[email protected]`

## 2.11.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-run/node",
"version": "2.11.0",
"version": "2.11.1",
"description": "Node.js platform abstractions for Remix",
"bugs": {
"url": "https://github.com/remix-run/remix/issues"
Expand Down
8 changes: 8 additions & 0 deletions packages/remix-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# `@remix-run/react`

## 2.11.1

### Patch Changes

- Revert #9695, stop infinite reload. ([#9833](https://github.com/remix-run/remix/pull/9833))
- Updated dependencies:
- `@remix-run/[email protected]`

## 2.11.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-react/__tests__/components-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ describe("<RemixServer>", () => {
describe("<RemixBrowser>", () => {
it("handles empty default export objects from the compiler", () => {
window.__remixContext = {
ssrMatches: ["root", "empty"],
url: "/",
state: {
loaderData: {},
},
Expand Down
54 changes: 24 additions & 30 deletions packages/remix-react/browser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { initFogOfWar, useFogOFWarDiscovery } from "./fog-of-war";
/* eslint-disable prefer-let/prefer-let */
declare global {
var __remixContext: {
ssrMatches: string[];
url: string;
basename?: string;
state: HydrationState;
criticalCss?: string;
Expand Down Expand Up @@ -194,6 +194,29 @@ if (import.meta && import.meta.hot) {
*/
export function RemixBrowser(_props: RemixBrowserProps): ReactElement {
if (!router) {
// Hard reload if the path we tried to load is not the current path.
// This is usually the result of 2 rapid back/forward clicks from an
// external site into a Remix app, where we initially start the load for
// one URL and while the JS chunks are loading a second forward click moves
// us to a new URL. Avoid comparing search params because of CDNs which
// can be configured to ignore certain params and only pathname is relevant
// towards determining the route matches.
let initialPathname = window.__remixContext.url;
let hydratedPathname = window.location.pathname;
if (
initialPathname !== hydratedPathname &&
!window.__remixContext.isSpaMode
) {
let errorMsg =
`Initial URL (${initialPathname}) does not match URL at time of hydration ` +
`(${hydratedPathname}), reloading page...`;
console.error(errorMsg);
window.location.reload();
// Get out of here so the reload can happen - don't create the router
// since it'll then kick off unnecessary route.lazy() loads
return <></>;
}

// When single fetch is enabled, we need to suspend until the initial state
// snapshot is decoded into window.__remixContext.state
if (window.__remixContext.future.unstable_singleFetch) {
Expand Down Expand Up @@ -247,35 +270,6 @@ export function RemixBrowser(_props: RemixBrowserProps): ReactElement {
window.location,
window.__remixContext.basename
);

// Hard reload if the matches we rendered on the server aren't the matches
// we matched in the client, otherwise we'll try to hydrate without the
// right modules and throw a hydration error, which can put React into an
// infinite hydration loop when hydrating the full `<html>` document.
// This is usually the result of 2 rapid back/forward clicks from an
// external site into a Remix app, where we initially start the load for
// one URL and while the JS chunks are loading a second forward click moves
// us to a new URL.
let ssrMatches = window.__remixContext.ssrMatches;
let hasDifferentSSRMatches =
(initialMatches || []).length !== ssrMatches.length ||
!(initialMatches || []).every((m, i) => ssrMatches[i] === m.route.id);

if (hasDifferentSSRMatches && !window.__remixContext.isSpaMode) {
let ssr = ssrMatches.join(",");
let client = (initialMatches || []).map((m) => m.route.id).join(",");
let errorMsg =
`SSR Matches (${ssr}) do not match client matches (${client}) at ` +
`time of hydration , reloading page...`;
console.error(errorMsg);

window.location.reload();

// Get out of here so the reload can happen - don't create the router
// since it'll then kick off unnecessary route.lazy() loads
return <></>;
}

if (initialMatches) {
for (let match of initialMatches) {
let routeId = match.route.id;
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-run/react",
"version": "2.11.0",
"version": "2.11.1",
"description": "React DOM bindings for Remix",
"bugs": {
"url": "https://github.com/remix-run/remix/issues"
Expand Down
Loading

0 comments on commit 5592c0e

Please sign in to comment.