Skip to content

Commit 2aa8f3e

Browse files
changeset
1 parent f0082d8 commit 2aa8f3e

File tree

9 files changed

+579
-3
lines changed

9 files changed

+579
-3
lines changed

.changeset/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Ignore generated .md files
2+
!.changeset/*.md
3+
4+
# Don't ignore these files
5+
!.changeset/README.md
6+
!.changeset/config.json

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.changeset/tired-chefs-invite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'plugin-react-router': patch
3+
---
4+
5+
Support React Router

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repo
16+
uses: actions/checkout@v4
17+
with:
18+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
19+
fetch-depth: 0
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 18
25+
cache: 'pnpm'
26+
27+
- name: Setup PNPM
28+
uses: pnpm/action-setup@v3
29+
with:
30+
version: 9
31+
32+
- name: Install Dependencies
33+
run: pnpm install --frozen-lockfile
34+
35+
- name: Create Release Pull Request or Publish to npm
36+
id: changesets
37+
uses: changesets/action@v1
38+
with:
39+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
40+
publish: pnpm release
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

CONTRIBUTING.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contributing to @rsbuild/plugin-react-router
2+
3+
## Development Workflow
4+
5+
1. Fork and clone the repository
6+
2. Install dependencies with `pnpm install`
7+
3. Make changes
8+
4. Run tests with `pnpm test`
9+
5. Create a changeset (see below)
10+
6. Submit a pull request
11+
12+
## Changesets
13+
14+
We use [changesets](https://github.com/changesets/changesets) to manage our versioning and release process.
15+
16+
> **Note:** Only the `plugin-react-router` package is configured for release. Other packages in the monorepo are ignored by the changesets process.
17+
18+
### Creating a Changeset
19+
20+
After making your changes, create a changeset to document what you've changed:
21+
22+
```bash
23+
pnpm changeset
24+
```
25+
26+
This will:
27+
1. Ask you what kind of change you've made (patch, minor, or major)
28+
2. Ask for a summary of your changes
29+
3. Create a new file in the `.changeset` directory
30+
31+
The changeset file should be committed to the repository along with your changes.
32+
33+
### Versioning Guidelines
34+
35+
- **Patch**: Bug fixes and small changes that don't affect the public API
36+
- **Minor**: New features that don't break backward compatibility
37+
- **Major**: Changes that break backward compatibility
38+
39+
## Release Process
40+
41+
The release process is handled automatically by GitHub Actions when changes are merged to the main branch. The workflow will:
42+
43+
1. Create a pull request with all pending changes
44+
2. When the PR is merged, publish the new version to npm
45+
46+
If you need to trigger a release manually, run:
47+
48+
```bash
49+
pnpm version
50+
pnpm release
51+
```

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023-present Bytedance, Inc. and its affiliates.
3+
Copyright (c) 2025-present Bytedance, Inc. and its affiliates.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@rsbuild/plugin-react-router",
2+
"name": "plugin-react-router",
33
"version": "0.0.1",
44
"description": "React plugin for Rsbuild",
55
"repository": {
@@ -44,7 +44,10 @@
4444
"test:core": "vitest run -c ./vitest.config.ts",
4545
"test:core:watch": "vitest watch -c ./vitest.config.ts",
4646
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
47-
"format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\""
47+
"format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
48+
"changeset": "changeset",
49+
"version": "changeset version",
50+
"release": "pnpm build && changeset publish"
4851
},
4952
"dependencies": {
5053
"@babel/core": "^7.26.3",
@@ -67,6 +70,7 @@
6770
"rspack-plugin-virtual-module": "^0.1.13"
6871
},
6972
"devDependencies": {
73+
"@changesets/cli": "^2.28.1",
7074
"@react-router/dev": "^7.4.0",
7175
"@react-router/node": "^7.4.0",
7276
"@rsbuild/config": "workspace:*",

0 commit comments

Comments
 (0)