Skip to content

Commit

Permalink
update changelogs
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance committed Dec 16, 2022
1 parent 3ed7906 commit 8b09abb
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 91 deletions.
22 changes: 0 additions & 22 deletions packages/remix-dev/CHANGELOG.md
Expand Up @@ -7,28 +7,6 @@
- Allow defining multiple routes for the same route module file ([#3970](https://github.com/remix-run/remix/pull/3970))
- Added support and conventions for optional route segments ([#4706](https://github.com/remix-run/remix/pull/4706))

Routes surrounded by parenthesis will be converted into optional segments for React Router. For example `/($lang)/about` will be converted to `/:lang?/about` in React Router.

This means `/($lang)/about` would match:

```
/en/about
/fr/about
/about
```

Another example: `/(one)/($two)/(three).($four)` route would match all of the following:

```
/
/one
/one/param1
/one/param1/three
/one/param1/three/param2
```

As with any of our conventions, you can escape this conversion by wrapping the route filename in square brackets. For example, `/[(one)]/two` would match the URL path `/(one)/two`.

### Patch Changes

- The Remix compiler now supports new Typescript 4.9 syntax (like the `satisfies` keyword) ([#4754](https://github.com/remix-run/remix/pull/4754))
Expand Down
2 changes: 2 additions & 0 deletions packages/remix-eslint-config/CHANGELOG.md
Expand Up @@ -2,6 +2,8 @@

## 1.9.0

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.9.0) for an overview of all changes in v1.9.0.

## 1.8.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.8.2) for an overview of all changes in v1.8.2.
Expand Down
20 changes: 0 additions & 20 deletions packages/remix-serve/CHANGELOG.md
Expand Up @@ -5,26 +5,6 @@
### Patch Changes

- Fix `TypedResponse` so that Typescript correctly shows errors for incompatible types in `loader` and `action` functions. ([#4734](https://github.com/remix-run/remix/pull/4734))

Previously, when the return type of a `loader` or `action` was explicitly set to `TypedResponse<SomeType>`,
Typescript would not show errors when the function returned an incompatible type.

For example:

```ts
export const action = async (
args: ActionArgs
): Promise<TypedResponse<string>> => {
return json(42);
};
```

In this case, Typescript would not show an error even though `42` is clearly not a `string`.

This happens because `json` returns a `TypedResponse<string>`, but because `TypedReponse<string>` was previously just `Response & { json: () => Promise<string> }` and `Response` already defines `{ json: () => Promise<any> }`, type erasure caused `Promise<any>` to be used for `42`.

To fix this, we explicitly omit the `Response` object's `json` property before intersecting with `{ json: () => Promise<T> }`.

- Updated dependencies:
- `@remix-run/express@1.9.0`

Expand Down
20 changes: 0 additions & 20 deletions packages/remix-server-runtime/CHANGELOG.md
Expand Up @@ -5,26 +5,6 @@
### Patch Changes

- Fix `TypedResponse` so that Typescript correctly shows errors for incompatible types in `loader` and `action` functions. ([#4734](https://github.com/remix-run/remix/pull/4734))

Previously, when the return type of a `loader` or `action` was explicitly set to `TypedResponse<SomeType>`,
Typescript would not show errors when the function returned an incompatible type.

For example:

```ts
export const action = async (
args: ActionArgs
): Promise<TypedResponse<string>> => {
return json(42);
};
```

In this case, Typescript would not show an error even though `42` is clearly not a `string`.

This happens because `json` returns a `TypedResponse<string>`, but because `TypedReponse<string>` was previously just `Response & { json: () => Promise<string> }` and `Response` already defines `{ json: () => Promise<any> }`, type erasure caused `Promise<any>` to be used for `42`.

To fix this, we explicitly omit the `Response` object's `json` property before intersecting with `{ json: () => Promise<T> }`.

- Fix error boundary tracking for multiple errors bubbling to the same boundary ([#4829](https://github.com/remix-run/remix/pull/4829))
- Fixed an issue where a loader's `Request` object reflected `method: "POST"` on document submissions ([`a74e51830`](https://github.com/remix-run/remix/commit/a74e51830ec7ecb3ad30e45013270ebf71d7b425))

Expand Down
29 changes: 0 additions & 29 deletions packages/remix/CHANGELOG.md
@@ -1,32 +1,3 @@
# `remix`

## 1.9.0

### Patch Changes

- The Remix compiler now supports new Typescript 4.9 syntax (like the `satisfies` keyword) ([#4754](https://github.com/remix-run/remix/pull/4754))
- Fix `TypedResponse` so that Typescript correctly shows errors for incompatible types in `loader` and `action` functions. ([#4734](https://github.com/remix-run/remix/pull/4734))

Previously, when the return type of a `loader` or `action` was explicitly set to `TypedResponse<SomeType>`,
Typescript would not show errors when the function returned an incompatible type.

For example:

```ts
export const action = async (
args: ActionArgs
): Promise<TypedResponse<string>> => {
return json(42);
};
```

In this case, Typescript would not show an error even though `42` is clearly not a `string`.

This happens because `json` returns a `TypedResponse<string>`, but because `TypedReponse<string>` was previously just `Response & { json: () => Promise<string> }` and `Response` already defines `{ json: () => Promise<any> }`, type erasure caused `Promise<any>` to be used for `42`.

To fix this, we explicitly omit the `Response` object's `json` property before intersecting with `{ json: () => Promise<T> }`.

- Optimize `parentRouteId` lookup in `defineConventionalRoutes`. ([#4800](https://github.com/remix-run/remix/pull/4800))
- Fixed a bug in `.ts` -> `.js` conversion on Windows by using a relative unix-style path ([#4718](https://github.com/remix-run/remix/pull/4718))

See the `CHANGELOG.md` in individual Remix packages for all changes.

0 comments on commit 8b09abb

Please sign in to comment.