Skip to content

Commit

Permalink
Merge branch 'dev' into markdalgleish/update-cli-help
Browse files Browse the repository at this point in the history
  • Loading branch information
markdalgleish authored Feb 28, 2024
2 parents a3e3949 + df59cc6 commit d3c3edf
Show file tree
Hide file tree
Showing 91 changed files with 864 additions and 297 deletions.
5 changes: 0 additions & 5 deletions .changeset/layout-error-boundary.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/layout-hydrate-fallback.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/many-grapes-confess.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/quick-experts-enjoy.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/shy-fireants-listen.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/silver-years-roll.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tender-keys-develop.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ body:
If you'd rather open a GitHub issue, here are other ways to share a reproduction (ordered from most helpful to least):
- 🥇 Link to a [StackBlitz](https://stackblitz.com/?starters=fullstack) environment
- 🥇 Link to a [StackBlitz](https://remix.new) environment
- 🥈 Link to a GitHub repository
- 🥉 Description of project including template, `remix.config.js`, `package.json` scripts, etc.
Expand Down
122 changes: 84 additions & 38 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,83 +13,88 @@ We manage release notes in this file instead of the paginated Github Releases Pa
<summary>Table of Contents</summary>

- [Remix Releases](#remix-releases)
- [2.7.2](#272)
- [v2.8.0](#v280)
- [Minor Changes](#minor-changes)
- [Patch Changes](#patch-changes)
- [2.7.1](#271)
- [Updated Dependencies](#updated-dependencies)
- [Changes by Package](#changes-by-package)
- [2.7.2](#272)
- [Patch Changes](#patch-changes-1)
- [2.7.1](#271)
- [Patch Changes](#patch-changes-2)
- [v2.7.0](#v270)
- [What's Changed](#whats-changed)
- [Stabilized Vite Plugin](#stabilized-vite-plugin)
- [New `Layout` Export](#new-layout-export)
- [Basename support](#basename-support)
- [Cloudflare Proxy as a Vite Plugin](#cloudflare-proxy-as-a-vite-plugin)
- [Minor Changes](#minor-changes)
- [Patch Changes](#patch-changes-2)
- [Updated Dependencies](#updated-dependencies)
- [Changes by Package](#changes-by-package)
- [v2.6.0](#v260)
- [What's Changed](#whats-changed-1)
- [Unstable Vite Plugin updates](#unstable-vite-plugin-updates)
- [Minor Changes](#minor-changes-1)
- [Patch Changes](#patch-changes-3)
- [Updated Dependencies](#updated-dependencies-1)
- [Changes by Package](#changes-by-package-1)
- [v2.5.1](#v251)
- [v2.6.0](#v260)
- [What's Changed](#whats-changed-1)
- [Unstable Vite Plugin updates](#unstable-vite-plugin-updates)
- [Minor Changes](#minor-changes-2)
- [Patch Changes](#patch-changes-4)
- [Updated Dependencies](#updated-dependencies-2)
- [Changes by Package](#changes-by-package-2)
- [v2.5.1](#v251)
- [Patch Changes](#patch-changes-5)
- [Updated Dependencies](#updated-dependencies-3)
- [Changes by Package](#changes-by-package-3)
- [v2.5.0](#v250)
- [What's Changed](#whats-changed-2)
- [SPA Mode (unstable)](#spa-mode-unstable)
- [Server Bundles (unstable)](#server-bundles-unstable)
- [Minor Changes](#minor-changes-2)
- [Patch Changes](#patch-changes-5)
- [Updated Dependencies](#updated-dependencies-3)
- [Changes by Package](#changes-by-package-3)
- [v2.4.1](#v241)
- [Minor Changes](#minor-changes-3)
- [Patch Changes](#patch-changes-6)
- [Updated Dependencies](#updated-dependencies-4)
- [Changes by Package](#changes-by-package-4)
- [v2.4.1](#v241)
- [Patch Changes](#patch-changes-7)
- [Updated Dependencies](#updated-dependencies-5)
- [Changes by Package](#changes-by-package-5)
- [v2.4.0](#v240)
- [What's Changed](#whats-changed-3)
- [Client Data](#client-data)
- [`future.v3_relativeSplatPath`](#futurev3_relativesplatpath)
- [Vite Updates (Unstable)](#vite-updates-unstable)
- [Minor Changes](#minor-changes-3)
- [Patch Changes](#patch-changes-7)
- [Updated Dependencies](#updated-dependencies-5)
- [Changes by Package](#changes-by-package-5)
- [v2.3.1](#v231)
- [Minor Changes](#minor-changes-4)
- [Patch Changes](#patch-changes-8)
- [Updated Dependencies](#updated-dependencies-6)
- [Changes by Package](#changes-by-package-6)
- [v2.3.1](#v231)
- [Patch Changes](#patch-changes-9)
- [Updated Dependencies](#updated-dependencies-7)
- [Changes by Package](#changes-by-package-7)
- [v2.3.0](#v230)
- [What's Changed](#whats-changed-4)
- [Stabilized `useBlocker`](#stabilized-useblocker)
- [`unstable_flushSync` API](#unstable_flushsync-api)
- [Minor Changes](#minor-changes-4)
- [Patch Changes](#patch-changes-9)
- [Updated Dependencies](#updated-dependencies-7)
- [Changes by Package](#changes-by-package-7)
- [Minor Changes](#minor-changes-5)
- [Patch Changes](#patch-changes-10)
- [Updated Dependencies](#updated-dependencies-8)
- [Changes by Package](#changes-by-package-8)
- [v2.2.0](#v220)
- [What's Changed](#whats-changed-5)
- [Vite!](#vite)
- [New Fetcher APIs](#new-fetcher-apis)
- [Persistence Future Flag](#persistence-future-flag)
- [Minor Changes](#minor-changes-5)
- [Patch Changes](#patch-changes-10)
- [Updated Dependencies](#updated-dependencies-8)
- [Changes by Package](#changes-by-package-8)
- [v2.1.0](#v210)
- [What's Changed](#whats-changed-6)
- [View Transitions](#view-transitions)
- [Stable `createRemixStub`](#stable-createremixstub)
- [Minor Changes](#minor-changes-6)
- [Patch Changes](#patch-changes-11)
- [Updated Dependencies](#updated-dependencies-9)
- [Changes by Package](#changes-by-package-9)
- [v2.0.1](#v201)
- [v2.1.0](#v210)
- [What's Changed](#whats-changed-6)
- [View Transitions](#view-transitions)
- [Stable `createRemixStub`](#stable-createremixstub)
- [Minor Changes](#minor-changes-7)
- [Patch Changes](#patch-changes-12)
- [Updated Dependencies](#updated-dependencies-10)
- [Changes by Package](#changes-by-package-10)
- [v2.0.1](#v201)
- [Patch Changes](#patch-changes-13)
- [Changes by Package 🔗](#changes-by-package-)
- [v2.0.0](#v200)
- [Breaking Changes](#breaking-changes)
Expand All @@ -101,8 +106,8 @@ We manage release notes in this file instead of the paginated Github Releases Pa
- [Breaking Type Changes](#breaking-type-changes)
- [New Features](#new-features)
- [Other Notable Changes](#other-notable-changes)
- [Updated Dependencies](#updated-dependencies-10)
- [Changes by Package](#changes-by-package-10)
- [Updated Dependencies](#updated-dependencies-11)
- [Changes by Package](#changes-by-package-11)

</details>

Expand Down Expand Up @@ -150,22 +155,63 @@ Date: YYYY-MM-DD
-->

## v2.8.0

Date: 2024-02-28

### Minor Changes

- `@remix-run/dev` - Vite: Pass resolved `viteConfig` to Remix Vite plugin's `buildEnd` hook ([#8885](https://github.com/remix-run/remix/pull/8885))

### Patch Changes

- `@remix-run/dev` - Mark `Layout` as browser safe route export in `esbuild` compiler ([#8842](https://github.com/remix-run/remix/pull/8842))
- `@remix-run/dev` - Vite: Silence build warnings when dependencies include `"use client"` directives ([#8897](https://github.com/remix-run/remix/pull/8897))
- `@remix-run/dev` - Vite: Fix `serverBundles` issue where multiple browser manifests are generated ([#8864](https://github.com/remix-run/remix/pull/8864))
- `@remix-run/dev` - Vite: Support custom `build.assetsDir` option ([#8843](https://github.com/remix-run/remix/pull/8843))
- `@remix-run/react` - Fix the default root `ErrorBoundary` component so it leverages the user-provided `Layout` component ([#8859](https://github.com/remix-run/remix/pull/8859))
- `@remix-run/react` - Fix the default root `HydrateFallback` component so it leverages any user-provided `Layout` component ([#8892](https://github.com/remix-run/remix/pull/8892))

### Updated Dependencies

- [`react-router-dom@6.22.2`](https://github.com/remix-run/react-router/releases/tag/react-router%406.22.2)
- [`@remix-run/router@1.15.2`](https://github.com/remix-run/react-router/blob/main/packages/router/CHANGELOG.md#1152)

### Changes by Package

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

**Full Changelog**: [`v2.7.2...v2.8.0`](https://github.com/remix-run/remix/compare/remix@2.7.2...remix@2.8.0)

## 2.7.2

Date: 2024-02-21

### Patch Changes

- Vite: Fix error when building projects with `.css?url` imports ([#8829](https://github.com/remix-run/remix/pull/8829))
- `@remix-run/dev` - Vite: Fix error when building projects with `.css?url` imports ([#8829](https://github.com/remix-run/remix/pull/8829))

## 2.7.1

Date: 2024-02-20

### Patch Changes

- Fix breaking change for `@remix-run/cloudflare-pages` ([#8819](https://github.com/remix-run/remix/pull/8819))
- Restore Cloudflare event context fields in `getLoadContext` argument for backwards compatibility.
- `@remix-run/cloudflare-pages` - Fix breaking change and restore Cloudflare event context fields in `getLoadContext` argument for backwards compatibility ([#8819](https://github.com/remix-run/remix/pull/8819))

## v2.7.0

Expand Down
6 changes: 6 additions & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- ahmedeldessouki
- ahuth
- aiji42
- ainoya
- airjp73
- airondumael
- aissa-bouguern
Expand Down Expand Up @@ -132,6 +133,7 @@
- Deanmv
- defjosiah
- denissb
- depsimon
- derekr
- derenge
- devcamke
Expand Down Expand Up @@ -316,6 +318,7 @@
- juwiragiye
- jveldridge
- jvnm-dev
- jwaltz
- jwnx
- kalch
- kamtugeza
Expand Down Expand Up @@ -594,13 +597,15 @@
- tjefferson08
- tmcw
- tombiju
- tombohub
- tombyrer
- tomer-yechiel
- TomerAberbach
- TomVance
- toufiqnuur
- toyozaki
- TrySound
- ttsirkia
- turkerdev
- tvanantwerp
- twhitbeck
Expand Down Expand Up @@ -642,6 +647,7 @@
- yauri-io
- yesmeck
- yomeshgupta
- yoshimatsu567
- youbicode
- youngvform
- yudai-nkt
Expand Down
6 changes: 3 additions & 3 deletions docs/discussion/server-vs-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ export default function Component() {

## Forcing Code Out of the Browser or Server Builds

You can force code out of either the client or the server with the [`*.client.tsx`][file_convention_client] and [`*.server.tsx`][file_convention_server] conventions.
You can force code out of either the client or the server with the [`*.client.ts`][file_convention_client] and [`*.server.ts`][file_convention_server] conventions.

While rare, sometimes server code makes it to client bundles because of how the compiler determines the dependencies of a route module, or because you accidentally try to use it in code that needs to ship to the client. You can force it out by adding `*.server.tsx` on the end of the file name.
While rare, sometimes server code makes it to client bundles because of how the compiler determines the dependencies of a route module, or because you accidentally try to use it in code that needs to ship to the client. You can force it out by adding `*.server.ts` on the end of the file name.

For example, we could name a module `app/user.server.ts` instead of `app/user.ts` to ensure that the code in that module is never bundled into the client — even if you try to use it in the component.

Additionally, you may depend on client libraries that are unsafe to even bundle on the server — maybe it tries to access [`window`][window_global] by simply being imported. You can likewise remove these modules from the server build by appending `*.client.tsx` to the file name.
Additionally, you may depend on client libraries that are unsafe to even bundle on the server — maybe it tries to access [`window`][window_global] by simply being imported. You can likewise remove these modules from the server build by appending `*.client.ts` to the file name.

[action]: ../route/action
[headers]: ../route/headers
Expand Down
6 changes: 3 additions & 3 deletions docs/file-conventions/routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ app/
│ │ └── scroll-experience.tsx
│ ├── _landing.about/
│ │ ├── employee-profile-card.tsx
│ │ ├── get-employee-data.server.tsx
│ │ ├── get-employee-data.server.ts
│ │ ├── route.tsx
│ │ └── team-photo.jpg
│ ├── _landing/
Expand All @@ -344,7 +344,7 @@ app/
│ │ ├── route.tsx
│ │ └── stats.tsx
│ ├── app.projects/
│ │ ├── get-projects.server.tsx
│ │ ├── get-projects.server.ts
│ │ ├── project-buttons.tsx
│ │ ├── project-card.tsx
│ │ └── route.tsx
Expand All @@ -355,7 +355,7 @@ app/
│ ├── app_.projects.$id.roadmap/
│ │ ├── chart.tsx
│ │ ├── route.tsx
│ │ └── update-timeline.server.tsx
│ │ └── update-timeline.server.ts
│ └── contact-us.tsx
└── root.tsx
```
Expand Down
11 changes: 9 additions & 2 deletions docs/future/vite.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,17 @@ export async function loader({
If you'd like to add additional properties to the load context,
you should export a `getLoadContext` function from a shared module so that **load context in Vite, Wrangler, and Cloudflare Pages are all augmented in the same way**:

```ts filename=load-context.ts lines=[1,9,13-26]
```ts filename=load-context.ts lines=[1,4-9,20-33]
import { type AppLoadContext } from "@remix-run/cloudflare";
import { type PlatformProxy } from "wrangler";

// When using `wrangler.toml` to configure bindings,
// `wrangler types` will generate types for those bindings
// into the global `Env` interface.
// Need this empty interface so that typechecking passes
// even if no `wrangler.toml` exists.
interface Env {}

type Cloudflare = Omit<PlatformProxy<Env>, "dispose">;

declare module "@remix-run/cloudflare" {
Expand Down Expand Up @@ -1061,7 +1068,7 @@ We currently recommend excluding the plugin when used with other Vite-based tool

For Vitest:

```ts filename=vite.config.ts lines=[7,12-13]
```ts filename=vite.config.ts lines=[5]
import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig, loadEnv } from "vite";

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/file-uploads.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Your job is to do whatever you need with the `data` and return a value that's a

We have the built-in `unstable_createFileUploadHandler` and `unstable_createMemoryUploadHandler` and we also expect more upload handler utilities to be developed in the future. If you have a form that needs to use different upload handlers, you can compose them together with a custom handler, here's a theoretical example:

```tsx filename=file-upload-handler.server.tsx
```ts filename=file-upload-handler.server.ts
import type { UploadHandler } from "@remix-run/node"; // or cloudflare/deno
import { unstable_createFileUploadHandler } from "@remix-run/node"; // or cloudflare/deno
import { createCloudinaryUploadHandler } from "some-handy-remix-util";
Expand Down
3 changes: 3 additions & 0 deletions docs/guides/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ npx create-remix@latest --template remix-run/remix/templates/cloudflare-workers
npx create-remix@latest --template remix-run/remix/templates/deno
npx create-remix@latest --template remix-run/remix/templates/express
npx create-remix@latest --template remix-run/remix/templates/fly
npx create-remix@latest --template remix-run/remix/templates/vite-cloudflare
npx create-remix@latest --template remix-run/remix/templates/vite-express
npx create-remix@latest --template remix-run/remix/templates/vite
## SPA Mode
npx create-remix@latest --template remix-run/remix/templates/spa
Expand Down
Loading

0 comments on commit d3c3edf

Please sign in to comment.