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

chore: Update version for release (pre) #8217

Merged
merged 1 commit into from
Dec 5, 2023
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
24 changes: 23 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,27 @@
"@remix-run/server-runtime": "2.3.1",
"@remix-run/testing": "2.3.1"
},
"changesets": []
"changesets": [
"angry-dingos-buy",
"blue-guests-raise",
"breezy-guests-repair",
"brown-hotels-rush",
"chatty-shrimps-sell",
"client-data",
"data-function-args",
"fast-needles-sort",
"few-forks-behave",
"green-balloons-promise",
"grumpy-cats-roll",
"hungry-buckets-repair",
"mean-knives-beam",
"relative-splat-path",
"rude-keys-heal",
"shiny-timers-bake",
"short-phones-admire",
"sour-stingrays-roll",
"tidy-timers-share",
"wise-pumas-thank",
"witty-gifts-glow"
]
}
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.4.0-pre.0

## 2.3.1

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.3.1.
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.3.1",
"version": "2.4.0-pre.0",
"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.4.0-pre.0

### Patch Changes

- Updated dependencies:
- `@remix-run/node@2.4.0-pre.0`

## 2.3.1

### 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": "2.3.1",
"version": "2.4.0-pre.0",
"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": "2.3.1",
"@remix-run/node": "2.4.0-pre.0",
"@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`

## 2.4.0-pre.0

### Patch Changes

- Updated dependencies:
- `@remix-run/cloudflare@2.4.0-pre.0`

## 2.3.1

### 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": "2.3.1",
"version": "2.4.0-pre.0",
"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": "2.3.1"
"@remix-run/cloudflare": "2.4.0-pre.0"
},
"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`

## 2.4.0-pre.0

### Patch Changes

- Updated dependencies:
- `@remix-run/cloudflare@2.4.0-pre.0`

## 2.3.1

### 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": "2.3.1",
"version": "2.4.0-pre.0",
"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": "2.3.1"
"@remix-run/cloudflare": "2.4.0-pre.0"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20230518.0",
Expand Down
11 changes: 11 additions & 0 deletions packages/remix-cloudflare/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# `@remix-run/cloudflare`

## 2.4.0-pre.0

### Minor Changes

- Deprecate `DataFunctionArgs` in favor of `LoaderFunctionArgs`/`ActionFunctionArgs`. This is aimed at keeping the types aligned across server/client loaders/actions now that `clientLoader`/`clientActon` functions have `serverLoader`/`serverAction` parameters which differentiate `ClientLoaderFunctionArgs`/`ClientActionFunctionArgs`. ([#8173](https://github.com/remix-run/remix/pull/8173))

### Patch Changes

- Updated dependencies:
- `@remix-run/server-runtime@2.4.0-pre.0`

## 2.3.1

### 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": "2.3.1",
"version": "2.4.0-pre.0",
"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": "2.3.1"
"@remix-run/server-runtime": "2.4.0-pre.0"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20230518.0",
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.4.0-pre.0

## 2.3.1

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.3.1.
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.3.1",
"version": "2.4.0-pre.0",
"description": "CSS bundle href when using CSS bundling features in Remix",
"homepage": "https://remix.run",
"bugs": {
Expand Down
11 changes: 11 additions & 0 deletions packages/remix-deno/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# `@remix-run/deno`

## 2.4.0-pre.0

### Minor Changes

- Deprecate `DataFunctionArgs` in favor of `LoaderFunctionArgs`/`ActionFunctionArgs`. This is aimed at keeping the types aligned across server/client loaders/actions now that `clientLoader`/`clientActon` functions have `serverLoader`/`serverAction` parameters which differentiate `ClientLoaderFunctionArgs`/`ClientActionFunctionArgs`. ([#8173](https://github.com/remix-run/remix/pull/8173))

### Patch Changes

- Updated dependencies:
- `@remix-run/server-runtime@2.4.0-pre.0`

## 2.3.1

### 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": "2.3.1",
"version": "2.4.0-pre.0",
"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": "2.3.1",
"@remix-run/server-runtime": "2.4.0-pre.0",
"mime": "^3.0.0"
},
"peerDependencies": {
Expand Down
144 changes: 144 additions & 0 deletions packages/remix-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,149 @@
# `@remix-run/dev`

## 2.4.0-pre.0

### Minor Changes

- Vite: exclude modules within `.server` directories from client build ([#8154](https://github.com/remix-run/remix/pull/8154))
- Add support for `clientLoader`/`clientAction`/`HydrateFallback` route exports ([RFC](https://github.com/remix-run/remix/discussions/7634)). ([#8173](https://github.com/remix-run/remix/pull/8173))

Remix now supports loaders/actions that run on the client (in addition to, or instead of the loader/action that runs on the server). While we still recommend server loaders/actions for the majority of your data needs in a Remix app - these provide some levers you can pull for more advanced use-cases such as:

- Leveraging a data source local to the browser (i.e., `localStorage`)
- Managing a client-side cache of server data (like `IndexedDB`)
- Bypassing the Remix server in a BFF setup nd hitting your API directly from the browser
- Migrating a React Router SPA to a Remix application

By default, `clientLoader` will not run on hydration, and will only run on subsequent client side navigations.

If you wish to run your client loader on hydration, you can set `clientLoader.hydrate=true` to force Remix to execute it on initial page load. Keep in mind that Remix will still SSR your route component so you should ensure that there is no new _required_ data being added by your `clientLoader`.

If your `clientLoader` neds to run on hydration and adds data you require to render the route component, you can export a `HydrateFallback` component that will render during SSR, and then your route component will not render until the `clientLoader` has executed on hydration.

`clientAction1` is simpler than `clientLoader` because it has no hydration use-cases. `clientAction` will only run on client-side navigations.

For more information, please refer to the [`clientLoader`](https://remix.run/route/client-loader) and [`clientAction`](https://remix.run/route/client-action) documentation.

- Vite: Strict route exports ([#8171](https://github.com/remix-run/remix/pull/8171))

With Vite, Remix gets stricter about which exports are allowed from your route modules.
Previously, the Remix compiler would allow any export from routes.
While this was convenient, it was also a common source of bugs that were hard to track down because they only surfaced at runtime.

For more, see https://remix.run/docs/en/main/future/vite#strict-route-exports

- Add a new `future.v3_relativeSplatPath` flag to implement a breaking bug fix to relative routing when inside a splat route. For more information, please see the React Router [`6.21.0` Release Notes](https://github.com/remix-run/react-router/blob/release-next/CHANGELOG.md#futurev7_relativesplatpath) and the [`useResolvedPath` docs](https://remix.run/hooks/use-resolved-path#splat-paths). ([#8216](https://github.com/remix-run/remix/pull/8216))

### Patch Changes

- Upgrade Vite peer dependency range to v5 ([#8172](https://github.com/remix-run/remix/pull/8172))
- Support HMR for routes with `handle` export in Vite dev ([#8022](https://github.com/remix-run/remix/pull/8022))
- Fix flash of unstyled content for non-Express custom servers in Vite dev ([#8076](https://github.com/remix-run/remix/pull/8076))
- Bundle CSS imported in client entry file in Vite plugin ([#8143](https://github.com/remix-run/remix/pull/8143))
- Change Vite build output paths to fix a conflict between how Vite and the Remix compiler each manage the `public` directory. ([#8077](https://github.com/remix-run/remix/pull/8077))

**This is a breaking change for projects using the unstable Vite plugin.**

The server is now compiled into `build/server` rather than `build`, and the client is now compiled into `build/client` rather than `public`.

For more information on the changes and guidance on how to migrate your project, refer to the updated [Remix Vite documentation](https://remix.run/docs/en/main/future/vite).

- Remove undocumented `legacyCssImports` option from Vite plugin due to issues with `?url` imports of CSS files not being processed correctly in Vite ([#8096](https://github.com/remix-run/remix/pull/8096))
- Vite: fix access to default `entry.{client,server}.tsx` within pnpm workspace on Windows ([#8057](https://github.com/remix-run/remix/pull/8057))
- Remove `unstable_createViteServer` and `unstable_loadViteServerBuild` which were only minimal wrappers around Vite's `createServer` and `ssrLoadModule` functions when using a custom server. ([#8120](https://github.com/remix-run/remix/pull/8120))

**This is a breaking change for projects using the unstable Vite plugin with a custom server.**

Instead, we now provide `unstable_viteServerBuildModuleId` so that custom servers interact with Vite directly rather than via Remix APIs, for example:

```diff
-import {
- unstable_createViteServer,
- unstable_loadViteServerBuild,
-} from "@remix-run/dev";
+import { unstable_viteServerBuildModuleId } from "@remix-run/dev";
```

Creating the Vite server in middleware mode:

```diff
const vite =
process.env.NODE_ENV === "production"
? undefined
- : await unstable_createViteServer();
+ : await import("vite").then(({ createServer }) =>
+ createServer({
+ server: {
+ middlewareMode: true,
+ },
+ })
+ );
```

Loading the Vite server build in the request handler:

```diff
app.all(
"*",
createRequestHandler({
build: vite
- ? () => unstable_loadViteServerBuild(vite)
+ ? () => vite.ssrLoadModule(unstable_viteServerBuildModuleId)
: await import("./build/server/index.js"),
})
);
```

- Pass request handler errors to `vite.ssrFixStacktrace` in Vite dev to ensure stack traces correctly map to the original source code ([#8066](https://github.com/remix-run/remix/pull/8066))
- Vite: Preserve names for exports from .client imports ([#8200](https://github.com/remix-run/remix/pull/8200))

Unlike `.server` modules, the main idea is not to prevent code from leaking into the server build
since the client build is already public. Rather, the goal is to isolate the SSR render from client-only code.
Routes need to import code from `.client` modules without compilation failing and then rely on runtime checks
to determine if the code is running on the server or client.

Replacing `.client` modules with empty modules would cause the build to fail as ESM named imports are statically analyzed.
So instead, we preserve the named export but replace each exported value with an empty object.
That way, the import is valid at build time and the standard runtime checks can be used to determine if then
code is running on the server or client.

- Add `@remix-run/node` to Vite's `optimizeDeps.include` array ([#8177](https://github.com/remix-run/remix/pull/8177))
- Improve Vite plugin performance ([#8121](https://github.com/remix-run/remix/pull/8121))

- Parallelize detection of route module exports
- Disable `server.preTransformRequests` in Vite child compiler since it's only used to process route modules

- Remove automatic global Node polyfill installation from the built-in Vite dev server and instead allow explicit opt-in. ([#8119](https://github.com/remix-run/remix/pull/8119))

**This is a breaking change for projects using the unstable Vite plugin without a custom server.**

If you're not using a custom server, you should call `installGlobals` in your Vite config instead.

```diff
import { unstable_vitePlugin as remix } from "@remix-run/dev";
+import { installGlobals } from "@remix-run/node";
import { defineConfig } from "vite";

+installGlobals();

export default defineConfig({
plugins: [remix()],
});
```

- Vite: Errors at build-time when client imports .server default export ([#8184](https://github.com/remix-run/remix/pull/8184))

Remix already stripped .server file code before ensuring that server code never makes it into the client.
That results in errors when client code tries to import server code, which is exactly what we want!
But those errors were happening at runtime for default imports.
A better experience is to have those errors happen at build-time so that you guarantee that your users won't hit them.

- Fix `request instanceof Request` checks when using Vite dev server ([#8062](https://github.com/remix-run/remix/pull/8062))
- Updated dependencies:
- `@remix-run/server-runtime@2.4.0-pre.0`
- `@remix-run/node@2.4.0-pre.0`
- `@remix-run/serve@2.4.0-pre.0`

## 2.3.1

### Patch Changes
Expand Down
Loading