Skip to content

Commit f17be42

Browse files
committed
Update release docs for v2 branch
1 parent 65ac99b commit f17be42

File tree

1 file changed

+33
-103
lines changed

1 file changed

+33
-103
lines changed

DEVELOPMENT.md

Lines changed: 33 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,70 @@
11
# Remix Development
22

3-
All Remix development happens here on GitHub. There are two main branches in this
4-
repository that you should be aware of:
5-
6-
- `main` - This is the stable line. Code in this branch should always pass all
7-
the tests. Hot fixes may be pushed directly to this branch without appearing in
8-
`dev`. Docs on the website reflect this branch.
9-
- `dev` - This is where most development happens. When hot fix commits land in
10-
`main` they are merged into this branch. Feature branches are based on this
11-
branch and are merged in as they are completed.
12-
13-
## Workflow
14-
15-
We currently use [pnpm](https://pnpm.io) to develop Remix.
16-
17-
```bash
18-
# install everything
19-
pnpm install
20-
21-
# run the build
22-
pnpm build
23-
24-
# run the unit tests
25-
pnpm test:primary
26-
27-
# run the unit tests for a specific package in watch mode
28-
pnpm test:primary packages/remix-react --watch
29-
30-
# run the playwright integration tests in Chromium
31-
pnpm test:integration --project chromium
32-
33-
# run specific playwright integration tests in Chromium
34-
pnpm test:integration integration/client-data --project chromium
35-
```
3+
> [IMPORTANT]!
4+
> Remix v2 is now in maintenance mode and developed strictly on the `v2` branch.
5+
> v2 changes should never commit to, merge to, or merge from the `main`/`dev` branches.
366
377
## Releases
388

39-
New releases should be created from release branches originating from the `dev` branch. When you are ready to begin the release process:
40-
41-
- Make sure you've pulled all of the changes from GitHub for both `dev` and `main` branches
42-
- Check out the `dev` branch
43-
- If needed, bump the dependencies to the correct React Router release
44-
- `./scripts/bump-router-versions.sh [pre|latest]`
45-
- Create a new release branch with the `release-` prefix
46-
- `git checkout -b release-next`
47-
- **IMPORTANT:** The `release-` prefix is important, as this is what triggers our GitHub CI workflow that will ultimately publish the release
48-
- Merge `main` into the release branch
49-
50-
Changesets will do most of the heavy lifting for our releases. When changes are made to the codebase, an accompanying changeset file should be included to document the change. Those files will dictate how Changesets will version our packages and what shows up in the changelogs.
9+
v2 releases are managed from a `release-v2` branch created from the `v2` branch. Changesets will do most of the heavy lifting for our releases. When changes are made to the codebase, an accompanying changeset file should be included to document the change. Those files will dictate how Changesets will version our packages and what shows up in the changelogs.
5110

5211
### Starting a new pre-release
5312

54-
- Ensure you are on the new `release-*` branch
55-
- Enter Changesets pre-release mode using the `pre` tag: `pnpm changeset pre enter pre`
56-
- Commit the change and push the `release-*` branch to GitHub
57-
- Wait for the release workflow to finish - the Changesets action in the workflow will open a PR that will increment all versions and generate the changelogs
58-
- Review the updated `CHANGELOG` files and make any adjustments necessary, then merge the PR into the `release-*` branch
59-
- `find packages -name 'CHANGELOG.md' -mindepth 2 -maxdepth 2 -exec code {} \;`
60-
- Once the PR is merged, the release workflow will publish the updated packages to npm
13+
- Check out the `v2` branch and pull latest from GitHub
14+
- If needed, bump the dependencies to the correct React Router release
15+
- `./scripts/bump-router-versions.sh [pre|latest]`
16+
- Create a new `release-v2` branch
17+
- `git checkout -b release-v2`
18+
- Enter Changesets pre-release mode using the `pre` tag
19+
- `pnpm changeset pre enter pre`
20+
- Commit the change and push the `release-v2` branch to GitHub
21+
- `git commit -am "Enter prerelease mode"`
22+
- `git push --set-upstream origin release-v2`
23+
- Wait for the changesets release workflow to finish - the Changesets action in the workflow will open a PR that will increment all versions and generate the changelogs
24+
- Merge the PR into the `release-v2` branch and the changesets action will publish the prerelease to `npm`
6125
- At this point, you can begin crafting the release notes for the eventual stable release in the root `CHANGELOG.md` file in the repo
6226
- Copy the template for a new release and update the version numbers and links accordingly
6327
- Copy the relevant changelog entries from all packages into the release notes and adjust accordingly
64-
- Commit these changes directly to the `release-*` branch - they will not trigger a new prerelease since they do not include a changeset
28+
- `find packages -name 'CHANGELOG.md' -mindepth 2 -maxdepth 2 -exec code {} \;`
29+
- Commit these changes and push directly to the `release-v2` branch - they will not trigger a new prerelease since they do not include a changeset
6530

6631
### Iterating a pre-release
6732

6833
You may need to make changes to a pre-release prior to publishing a final stable release. To do so:
6934

70-
- Make whatever changes you need
35+
- Branch from `release-v2` and make whatever changes you need
7136
- Create a new changeset: `pnpm changeset`
7237
- **IMPORTANT:** This is required even if you ultimately don't want to include these changes in the logs
73-
- Remember, changelogs can be edited prior to publishing, but the Changeset version script needs to see new changesets in order to create a new version
74-
- Commit the changesets and push the `release-*` branch to GitHub
38+
- Changelogs can be edited prior to publishing, but the Changeset version script needs to see new changesets in order to create a new prerelease version
39+
- Commit the changesets to your branch
40+
- PR and merge it to the `release-v2` branch
7541
- Wait for the release workflow to finish and the Changesets action to open its PR that will increment all versions
76-
- Review the PR, make any adjustments necessary, and merge it into the `release-*` branch
42+
- Review the PR, make any adjustments necessary, and merge it into the `release-v2` branch
7743
- Once the PR is merged, the release workflow will publish the updated packages to npm
7844
- Make sure you copy over the new changeset contents into stable release notes in the root `CHANGELOG.md` file in the repo
7945

8046
### Publishing the stable release
8147

82-
- Exit Changesets pre-release mode: `pnpm changeset pre exit`
83-
- Commit the edited `pre.json` file along with any unpublished changesets, and push the `release-*` branch to GitHub
48+
- Exit Changesets pre-release mode in the `release-v2` branch:
49+
- `pnpm changeset pre exit`
50+
- Commit the edited `pre.json` file along with any unpublished changesets, and push the `release-v2` branch to GitHub
51+
- `git commit -am "Exit prerelease mode"`
52+
- `git push origin release-v2`
8453
- Wait for the release workflow to finish - the Changesets action in the workflow will open a PR that will increment all versions and generate the changelogs for the stable release
8554
- Review the updated `CHANGELOG` files and make any adjustments necessary
8655
- `find packages -name 'CHANGELOG.md' -mindepth 2 -maxdepth 2 -exec code {} \;`
8756
- Our automated release process should have removed prerelease entries
8857
- Finalize the release notes
8958
- This should already be in pretty good shape in the root `CHANGELOG.md` file in the repo
9059
- Do a quick double check that all iterated prerelease changesets got copied over
91-
- Merge the PR into the `release-*` branch
60+
- Merge the PR into the `release-v2` branch
9261
- Once the PR is merged, the release workflow will publish the updated packages to npm
9362
- Once the release is published:
94-
- Pull the latest `release-*` branch containing the PR you just merged
95-
- Merge the `release-*` branch into `main` **using a non-fast-forward merge** and push it up to GitHub
96-
- `git checkout main; git merge --no-ff release-next`
97-
- Merge the `release-*` branch into `dev` **using a non-fast-forward merge** and push it up to GitHub
98-
- `git checkout dev; git merge --no-ff release-next`
63+
- Pull the latest `release-2` branch containing the PR you just merged
64+
- Merge the `release-v2` branch into `v2` **using a non-fast-forward merge** and push it up to GitHub
65+
- `git checkout v2; git merge --no-ff release-v2`
9966
- Convert the `[email protected]` tag to a Release on GitHub with the name `v2.x.y` and add a deep-link to the release heading in `CHANGELOG.md`
100-
101-
### Hotfix releases
102-
103-
Hotfix releases follow the same process as standard releases above, but the `release-*` branch should be branched off latest `main` instead of `dev`. Once the stable hotfix is published, the `release-*` branch should be merged back into both `main` and `dev` just like a normal release.
67+
- ⚠️ Make sure to uncheck the "Mark as latest" checkbox
10468

10569
### Experimental releases
10670

@@ -113,37 +77,3 @@ Experimental releases use a [manually-triggered Github Actions workflow](./.gith
11377
- Leave the `Use workflow from` dropdown as `main`
11478
- Enter your feature branch in the `branch` input
11579
- Click the `Run workflow` button
116-
117-
### Nightly releases
118-
119-
Nightly releases happen automatically at midnight PST via a [cron-driven workflow](./.github/workflows/nightly.yml) that is essentially the same as the experimental releases, but also performs some validations after the release.
120-
121-
## Local Development Tips and Tricks
122-
123-
### Environment Variables
124-
125-
This repository supports handful of environment variables to streamline the local development/testing process.
126-
127-
**`REMIX_DEBUG`**
128-
129-
By default, the Remix `rollup` build will strip any `console.debug` calls to avoid cluttering up the console during application usage. These `console.debug` statements can be preserved by setting `REMIX_DEBUG=true` during your local build.
130-
131-
```sh
132-
REMIX_DEBUG=true pnpm watch
133-
```
134-
135-
**`LOCAL_BUILD_DIRECTORY`**
136-
137-
When developing Remix locally, you often need to go beyond unit/integration tests and test your changes in a local Remix application. The easiest way to do this is to run your local Remix build and use this environment variable to direct `rollup` to write the output files directly into the local Remix application's `node_modules` folder. Then you just need to restart your local Remix application server to pick up the changes.
138-
139-
```sh
140-
# Tab 1 - create and run a local remix application
141-
npx create-remix
142-
cd my-remix-app
143-
npm run dev
144-
145-
# Tab 2 - remix repository
146-
LOCAL_BUILD_DIRECTORY=../my-remix-app pnpm watch
147-
```
148-
149-
Now - any time you make changes in the Remix repository, they will be written out to the appropriate locations in `../my-remix-app/node_modules` and you can restart the `npm run dev` command to pick them up 🎉.

0 commit comments

Comments
 (0)