Skip to content

Commit 836a30f

Browse files
committed
Merge branch 'dev' into brophdawg11/enable-prefetch-test
2 parents e37e259 + fcc2b7a commit 836a30f

File tree

26 files changed

+55
-242
lines changed

26 files changed

+55
-242
lines changed

DEVELOPMENT.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@ Changesets will do most of the heavy lifting for our releases. When changes are
2222
- `git commit -a -m "Enter prerelease mode"`
2323
- `git push --set-upstream origin release-next`
2424
- Wait for the release workflow to finish - the Changesets action will open a PR that will increment all versions and generate the changelogs
25-
- Check out the PR branch created by changesets locally
26-
- _Optional:_ Review the updated `CHANGELOG.md` files in the PR locally and make any adjustments necessary, then merge the PR into the `release-next` branch.
27-
- `find packages -name 'CHANGELOG.md' -mindepth 2 -maxdepth 2 -exec code {} \;`
28-
- Usually for prereleases there's not much to change here because the prerelease sections will be deleted prior to the final stable release anyway
25+
- If you need/want to make any changes to the `CHANGELOG.md` files, you can do so and commit directly to the PR branch
26+
- This is usually not required for prereleases
2927
- Once the changesets files are in good shape, merge the PR to `release-next`
3028
- Once the PR is merged, the release workflow will publish the updated `X.Y.Z-pre.*` packages to npm
29+
30+
### Prepare the draft release notes
31+
3132
- At this point, you can begin crafting the release notes for the eventual stable release in the root `CHANGELOG.md` file in the repo
3233
- Copy the template for a new release and update the version numbers and links accordingly
3334
- Copy the relevant changelog entries from all packages into the release notes and adjust accordingly
35+
- `find packages -name 'CHANGELOG.md' -mindepth 2 -maxdepth 2 -exec code {} \;`
3436
- Commit these changes directly to the `release-next` branch - they will not trigger a new prerelease since they do not include a changeset
3537

3638
### Iterating a pre-release
@@ -96,15 +98,24 @@ After the `6.25.0` release, we branched off a `v6` branch for continued `6.x` wo
9698
- Once the stable release is out:
9799
- Merge `release-v6` back to `v6` with a **Normal Merge**
98100
- **Do not** merge `release-v6` to `main`
99-
- Copy the updated changelog entry for the `6.X.Y` version to `main`
101+
- Copy the updated root `CHANGELOG.md` entry for the `6.X.Y` release to `main` and `dev`
102+
- `git checkout main`
103+
- `git diff [email protected]@6.X.Y -- "***CHANGELOG.md" > ./docs.patch`
104+
- `git apply ./docs.patch`
105+
- `git checkout dev`
106+
- `git apply ./docs.patch`
107+
- `rm ./docs.patch`
100108
- Copy the docs changes to `main` so they show up on the live docs site for v6
101109
- `git checkout main`
102110
- `git diff [email protected]@6.X.Y docs/ > ./docs.patch`
103111
- `git apply ./docs.patch`
104-
- The _code_ changes should already be in the `dev` branch but confirm that the commits in this release are all included in `dev` already:
105-
- I.e., https://github.com/remix-run/react-router/compare/[email protected]@6.26.2
106-
- If one or more are not, then you can manually bring them over by cherry-picking the commit (or re-doing the work)
107-
- You should not include a changelog in your commit to `dev`
112+
- `rm ./docs.patch`
113+
- The _code_ changes should already be in the `dev` branch
114+
- This should have happened at the time the v6 change was made (except for changes such as deprecation warnings)
115+
- Confirm that the commits in this release are all included in `dev` already:
116+
- I.e., https://github.com/remix-run/react-router/compare/[email protected]@6.26.2
117+
- If one or more are not, then you can manually bring them over by cherry-picking the commit (or re-doing the work)
118+
- You should not include a changelog in your commit to `dev`
108119
- Copy the updated changelogs from `release-next` over to `dev` so the changelogs continue to reflect this new 6x release into the v7 releases
109120

110121
### Notes on 7.0.0-pre.N released during the v7 prerelease

decisions/0011-routes-ts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ As of the creation of this decision document, the only available build context i
9292

9393
### Remix's `routes` option has an adapter for easy migration
9494

95-
Some Remix consumers used the `routes` option to define config-based routes or use community file system routing conventions. To ease the migration, the `@react-router/remix-config-routes-adapter` package provides a `remixConfigRoutes` function that accepts Remix's `routes` config value as an argument.
95+
Some Remix consumers used the `routes` option to define config-based routes or use community file system routing conventions. To ease the migration, the `@react-router/remix-routes-option-adapter` package provides a `remixRoutesOptionAdapter` function that accepts Remix's `routes` config value as an argument.

docs/start/testing.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ order: 9
55

66
# Testing
77

8-
When components use things like `useLoaderData`, `<Link>`, etc, they are required to be rendered in context of a React Router app. The `createStub` function creates that context to test components in isolation.
8+
When components use things like `useLoaderData`, `<Link>`, etc, they are required to be rendered in context of a React Router app. The `createRoutesStub` function creates that context to test components in isolation.
99

1010
Consider a login form component that relies on `useActionData`
1111

@@ -32,19 +32,20 @@ export function LoginForm() {
3232
}
3333
```
3434

35-
We can test this component with `createStub`. It takes an array of objects that resemble route modules with loaders, actions, and components.
35+
We can test this component with `createRoutesStub`. It takes an array of objects that resemble route modules with loaders, actions, and components.
3636

3737
```tsx
38-
import { createStub, route } from "react-router/testing";
38+
import { createRoutesStub } from "react-router";
3939
import * as Test from "@testing-library/react";
4040
import { LoginForm } from "./LoginForm";
4141

4242
test("LoginForm renders error messages", async () => {
4343
const USER_MESSAGE = "Username is required";
4444
const PASSWORD_MESSAGE = "Password is required";
4545

46-
const Stub = createStub([
47-
route("/login", {
46+
const Stub = createRoutesStub([
47+
{
48+
path: "/login",
4849
Component: LoginForm,
4950
action() {
5051
return {

integration/fs-routes-test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ test.describe("fs-routes", () => {
2828
"app/routes.ts": js`
2929
import { type RouteConfig } from "@react-router/dev/routes";
3030
import { flatRoutes } from "@react-router/fs-routes";
31-
import { remixConfigRoutes } from "@react-router/remix-config-routes-adapter";
31+
import { remixRoutesOptionAdapter } from "@react-router/remix-routes-option-adapter";
3232
3333
export const routes: RouteConfig = [
3434
...await flatRoutes({
3535
ignoredRouteFiles: ["**/ignored-route.*"],
3636
}),
3737
3838
// Ensure Remix back compat layer works
39-
...await remixConfigRoutes(async (defineRoutes) => {
39+
...await remixRoutesOptionAdapter(async (defineRoutes) => {
4040
// Ensure async routes work
4141
return defineRoutes((route) => {
4242
route("/remix/config/route", "remix-config-route.tsx")

integration/helpers/vite-cloudflare-template/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@cloudflare/workers-types": "^4.20230518.0",
2323
"@react-router/dev": "workspace:*",
2424
"@react-router/fs-routes": "workspace:*",
25-
"@react-router/remix-config-routes-adapter": "workspace:*",
25+
"@react-router/remix-routes-option-adapter": "workspace:*",
2626
"@types/react": "^18.2.20",
2727
"@types/react-dom": "^18.2.7",
2828
"typescript": "^5.1.6",

integration/helpers/vite-template/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"devDependencies": {
2727
"@react-router/dev": "workspace:*",
2828
"@react-router/fs-routes": "workspace:*",
29-
"@react-router/remix-config-routes-adapter": "workspace:*",
29+
"@react-router/remix-routes-option-adapter": "workspace:*",
3030
"@types/react": "^18.2.20",
3131
"@types/react-dom": "^18.2.7",
3232
"eslint": "^8.38.0",

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
"changeset": "changeset",
2424
"changeset:version": "changeset version && node ./scripts/remove-prerelease-changelogs.mjs",
2525
"publish": "node scripts/publish.js",
26-
"version": "node ./scripts/version",
27-
"watch": "rollup -c -w"
26+
"version": "node ./scripts/version"
2827
},
2928
"jest": {
3029
"projects": [

packages/react-router-fs-routes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @react-router/fs-routes
22

3-
File system routing conventions for [React Router.](https://github.com/remix-run/react-router)
3+
File system routing conventions for [React Router](https://github.com/remix-run/react-router), for use within `routes.ts`.
44

55
```sh
66
npm install @react-router/fs-routes

packages/react-router-fs-routes/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@react-router/fs-routes",
33
"version": "6.26.2",
4-
"description": "File system routing conventions for React Router",
4+
"description": "File system routing conventions for React Router, for use within routes.ts",
55
"bugs": {
66
"url": "https://github.com/remix-run/react-router/issues"
77
},

packages/react-router-remix-config-routes-adapter/README.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)