Skip to content

Commit

Permalink
Merge branch 'release-hotfix' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Aug 9, 2023
2 parents bec8703 + 21d2290 commit e5c3c74
Show file tree
Hide file tree
Showing 38 changed files with 221 additions and 52 deletions.
20 changes: 4 additions & 16 deletions docs/components/nav-link.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,29 +85,17 @@ You can pass a render prop as children to customize the content of the `<NavLink

The `end` prop changes the matching logic for the `active` and `pending` states to only match to the "end" of the NavLinks's `to` path. If the URL is longer than `to`, it will no longer be considered active.

Without the end prop, this link is always active because every URL matches `/`.

```tsx
<NavLink to="/">Home</NavLink>
```

To match the URL "to the end" of `to`, use `end`:

```tsx
<NavLink to="/" end>
Home
</NavLink>
```

Now this link will only be active at `"/"`. This works for paths with more segments as well:

| Link | URL | isActive |
| ----------------------------- | ------------ | -------- |
| `<NavLink to="/tasks" />` | `/tasks` | true |
| `<NavLink to="/tasks" />` | `/tasks/123` | true |
| `<NavLink to="/tasks" end />` | `/tasks` | true |
| `<NavLink to="/tasks" end />` | `/tasks/123` | false |

**A note on links to the root route**

`<NavLink to="/">` is an exceptional case because _every_ URL matches `/`. To avoid this matching every single route by default, it effectively ignores the `end` prop and only matches when you're at the root route.

## `caseSensitive`

Adding the `caseSensitive` prop changes the matching logic to make it case sensitive.
Expand Down
14 changes: 11 additions & 3 deletions docs/file-conventions/remix-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,22 @@ The path to the browser build, relative to remix.config.js. Defaults to
The path to a directory Remix can use for caching things in development,
relative to `remix.config.js`. Defaults to `".cache"`.

## devServerBroadcastDelay (deprecated)
## devServerBroadcastDelay

<docs-warning>This option is deprecated and will likely be removed in a future
stable release. Enable `v2_dev` to eliminate the race conditions that necessitated
this option.</docs-warning>

The delay, in milliseconds, before the dev server broadcasts a reload event.
There is no delay by default.

For v2, the race conditions that necessitated this option have been eliminated.

## devServerPort (deprecated)
## devServerPort

<docs-warning>This option is deprecated and will likely be removed in a future
stable release. Enable `v2_dev` and use [`--port` / `v2_dev.port` option][port]
instead.</docs-warning>

The port number to use for the dev websocket server. Defaults to 8002.

Expand Down Expand Up @@ -238,4 +246,4 @@ There are a few conventions that Remix uses you should be aware of.
[tailwind-functions-and-directives]: https://tailwindcss.com/docs/functions-and-directives
[jspm]: https://github.com/jspm/jspm-core
[esbuild-plugins-node-modules-polyfill]: https://www.npmjs.com/package/esbuild-plugins-node-modules-polyfill
[port]: ../other-api/dev-v2#option-1
[port]: ../other-api/dev-v2#options-1
6 changes: 6 additions & 0 deletions docs/other-api/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ installGlobals();
<docs-info>
Keep in mind that we install these for you automatically in your actual app, so you should only need to do this in your test environment.
</docs-info>

## Version Support

Remix officially supports **Active** and **Maintenance** [Node LTS versions][node-releases] at any given point in time. Dropped support for End of Life Node versions is done in a Remix Minor release.

[node-releases]: https://nodejs.dev/en/about/releases/
9 changes: 9 additions & 0 deletions docs/other-api/serve.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,14 @@ In development, `remix-serve` will ensure the latest code is run by purging the

In production this doesn't happen. The server boots up and that's the end of it.

## `HOST` environment variable

You can configure the hostname for your Express app via `process.env.HOST` and that value will be passed to the internal [`app.listen`][express-listen] method when starting the server.

```sh
HOST=127.0.0.1 npx remix-serve build/
```

[remix-run-express]: adapter#createrequesthandler
[remember]: ./dev-v2#keeping-in-memory-server-state-across-rebuilds
[express-listen]: https://expressjs.com/en/api.html#app.listen
12 changes: 12 additions & 0 deletions docs/pages/gotchas.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,18 @@ This is due to an [issue with esbuild's CSS tree shaking][esbuild-css-tree-shaki

Note that, even if this issue didn't exist, we'd still recommend using named re-exports! While it may introduce a bit more boilerplate, you get explicit control over the module's public interface rather than inadvertently exposing everything.

## Writing to Sessions in Loaders

Typically you should only write to sessions in actions, but there are occasions where it makes sense in loaders (anonymous users, navigation tracking, etc.)

While multiple loaders can _read_ from the same session, _writing_ to a session in loaders can cause problems.

Remix loaders run in parallel, and sometimes in separate requests (client transitions call `fetch` for each loader). If one loader is writing to a session while another is attempting to read from it, you will hit bugs and/or non-deterministic behavior.

Additionally, sessions are built on cookies which come from the browser's request. After committing a session, it goes to the browser in a `Set-Cookie` header which is then sent back to the server on the next request in the `Cookie` header. Regardless of parallel loaders, you can't write to a cookie with `Set-Cookie` and then attempt to read it from the original request `Cookie` and expect updated values. It needs to make a round trip to the browser first and come from the next request.

If you need to write to a session in a loader, ensure the loader doesn't share that session with any other loaders.

[remix-upload-handlers-like-unstable-create-file-upload-handler-and-unstable-create-memory-upload-handler]: ../utils/parse-multipart-form-data#uploadhandler
[css-bundling]: ../guides/styling#css-bundling
[esbuild-css-tree-shaking-issue]: https://github.com/evanw/esbuild/issues/1370
30 changes: 29 additions & 1 deletion docs/pages/v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ module.exports = {
};
```

## remix dev
## `remix dev`

For configuration options, see the [`remix dev` docs][v2-dev-config].

Expand Down Expand Up @@ -868,6 +868,28 @@ import sourceMapSupport from "source-map-support";
sourceMapSupport.install();
```

## Netlify adapter

The `@remix-run/netlify` runtime adapter has been deprecated in favor of
[`@netlify/remix-adapter`][official-netlify-adapter] & [`@netlify/remix-edge-adapter`][official-netlify-edge-adapter]
and will be removed in Remix v2. Please update your code by changing all `@remix-run/netlify` imports to
`@netlify/remix-adapter`.\
Keep in mind that `@netlify/remix-adapter` requires `@netlify/functions@^1.0.0`, which is a breaking change compared
to the current supported `@netlify/functions` versions in `@remix-run/netlify`.

Due to the removal of this adapter, we will also be removing our [Netlify template][netlify-template] in favor of the
[official Netlify template][official-netlify-template].

## Vercel adapter

The `@remix-run/vercel` runtime adapter has been deprecated in favor of out of the box Vercel functionality and will
be removed in Remix v2. Please update your code by removing `@remix-run/vercel` & `@vercel/node` from your
`package.json`, removing your `server.js`/`server.ts` file, and removing the `server` & `serverBuildPath` options
from your `remix.config.js`.

Due to the removal of this adapter, we will also be removing our [Vercel template][vercel-template] in favor of the
[official Vercel template][official-vercel-template].

## Built-in PostCSS/Tailwind support

In v2, these tools will be automatically used within the Remix compiler if PostCSS and/or Tailwind configuration files are present in your project.
Expand All @@ -893,3 +915,9 @@ module.exports = {
[v2-dev-docs]: ../other-api/dev-v2
[manual-mode]: ../guides/manual-mode
[source-map-support]: https://www.npmjs.com/package/source-map-support
[official-netlify-adapter]: https://github.com/netlify/remix-compute/tree/main/packages/remix-adapter
[official-netlify-edge-adapter]: https://github.com/netlify/remix-compute/tree/main/packages/remix-edge-adapter
[netlify-template]: https://github.com/remix-run/remix/tree/main/templates/netlify
[official-netlify-template]: https://github.com/netlify/remix-template
[vercel-template]: https://github.com/remix-run/remix/tree/main/templates/vercel
[official-vercel-template]: https://github.com/vercel/vercel/tree/main/examples/remix
7 changes: 7 additions & 0 deletions packages/create-remix/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `create-remix`

## 1.19.3

### Patch Changes

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

## 1.19.2

### Patch Changes
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": "1.19.2",
"version": "1.19.3",
"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`

## 1.19.3

### Patch Changes

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

## 1.19.2

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/remix-architect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-run/architect",
"version": "1.19.2",
"version": "1.19.3",
"description": "Architect server request handler for Remix",
"bugs": {
"url": "https://github.com/remix-run/remix/issues"
Expand All @@ -15,7 +15,7 @@
"typings": "dist/index.d.ts",
"dependencies": {
"@architect/functions": "^5.2.0",
"@remix-run/node": "1.19.2",
"@remix-run/node": "1.19.3",
"@types/aws-lambda": "^8.10.82"
},
"devDependencies": {
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`

## 1.19.3

### Patch Changes

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

## 1.19.2

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions 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": "1.19.2",
"version": "1.19.3",
"description": "Cloudflare Pages request handler for Remix",
"bugs": {
"url": "https://github.com/remix-run/remix/issues"
Expand All @@ -15,7 +15,7 @@
"typings": "dist/index.d.ts",
"module": "dist/esm/index.js",
"dependencies": {
"@remix-run/cloudflare": "1.19.2"
"@remix-run/cloudflare": "1.19.3"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20230518.0",
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`

## 1.19.3

### Patch Changes

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

## 1.19.2

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions 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": "1.19.2",
"version": "1.19.3",
"description": "Cloudflare worker request handler for Remix",
"bugs": {
"url": "https://github.com/remix-run/remix/issues"
Expand All @@ -16,7 +16,7 @@
"module": "dist/esm/index.js",
"dependencies": {
"@cloudflare/kv-asset-handler": "^0.1.3",
"@remix-run/cloudflare": "1.19.2"
"@remix-run/cloudflare": "1.19.3"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20230518.0",
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`

## 1.19.3

### Patch Changes

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

## 1.19.2

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/remix-cloudflare/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-run/cloudflare",
"version": "1.19.2",
"version": "1.19.3",
"description": "Cloudflare platform abstractions for Remix",
"bugs": {
"url": "https://github.com/remix-run/remix/issues"
Expand All @@ -15,7 +15,7 @@
"typings": "dist/index.d.ts",
"dependencies": {
"@cloudflare/kv-asset-handler": "^0.1.3",
"@remix-run/server-runtime": "1.19.2"
"@remix-run/server-runtime": "1.19.3"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20230518.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/remix-css-bundle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @remix-run/css-bundle

## 1.19.3

No significant changes to this package were made in this release. [See the releases page on GitHub](https://github.com/remix-run/remix/releases/tag/remix%401.19.3) for an overview of all changes in v1.19.3.

## 1.19.2

No significant changes to this package were made in this release. [See the releases page on GitHub](https://github.com/remix-run/remix/releases/tag/remix%401.19.2) for an overview of all changes in v1.19.2.
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": "1.19.2",
"version": "1.19.3",
"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`

## 1.19.3

### Patch Changes

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

## 1.19.2

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/remix-deno/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remix-run/deno",
"version": "1.19.2",
"version": "1.19.3",
"description": "Deno platform abstractions for Remix",
"homepage": "https://remix.run",
"main": "./index.ts",
Expand All @@ -15,7 +15,7 @@
"license": "MIT",
"sideEffects": false,
"dependencies": {
"@remix-run/server-runtime": "1.19.2",
"@remix-run/server-runtime": "1.19.3",
"mime": "^3.0.0"
},
"peerDependencies": {
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`

## 1.19.3

### Patch Changes

- Show deprecation warning when using `devServerBroadcastDelay` and `devServerPort` config options ([#7064](https://github.com/remix-run/remix/pull/7064))
- Updated dependencies:
- `@remix-run/[email protected]`

## 1.19.2

### Patch Changes
Expand Down
Loading

0 comments on commit e5c3c74

Please sign in to comment.