Skip to content

Commit 184fe7d

Browse files
Zendrexclaude
andcommitted
chore: add cursor rules for bun runtime and changesets
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ff721d0 commit 184fe7d

File tree

4 files changed

+77
-0
lines changed

4 files changed

+77
-0
lines changed

.cursor/mcp.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"mcpServers": {}
3+
}

.cursor/rules/changesets.mdc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
alwaysApply: true
3+
---
4+
This project uses Changesets for versioning and releases.
5+
6+
## When committing changes
7+
8+
Before making a commit that affects the library's functionality, create a changeset:
9+
10+
```bash
11+
bun changeset
12+
```
13+
14+
Then select the appropriate version bump:
15+
- `patch` - Bug fixes, internal changes
16+
- `minor` - New features (backwards compatible)
17+
- `major` - Breaking changes
18+
19+
Include the generated `.changeset/*.md` file in your commit.
20+
21+
## When to include a changeset
22+
23+
**Include a changeset for:**
24+
- Bug fixes
25+
- New features
26+
- Breaking changes
27+
- API changes
28+
- Behavior changes
29+
30+
**Skip changesets for:**
31+
- Documentation-only changes
32+
- CI/tooling changes
33+
- Internal refactors with no user-facing impact
34+
- Test-only changes
35+
36+
## Workflow
37+
38+
1. Make code changes
39+
2. Run `bun changeset` and describe the change
40+
3. Commit both code changes and the changeset file together

.cursor/rules/runtime.mdc

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
alwaysApply: true
3+
---
4+
Default to using Bun instead of Node.js.
5+
6+
- Use `bun <file>` instead of `node <file>` or `ts-node <file>`
7+
- Use `bun test` instead of `jest` or `vitest`
8+
- Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild`
9+
- Use `bun install` instead of `npm install` or `yarn install` or `pnpm install`
10+
- Use `bun run <script>` instead of `npm run <script>` or `yarn run <script>` or `pnpm run <script>`
11+
- Use `bunx <package> <command>` instead of `npx <package> <command>`
12+
- Bun automatically loads .env, so don't use dotenv.
13+
14+
## APIs
15+
16+
- `Bun.redis` for Redis. Don't use `ioredis`.
17+
- `WebSocket` is built-in. Don't use `ws`.
18+
19+
## Testing
20+
21+
Use `bun test` to run tests.
22+
23+
```ts#index.test.ts
24+
import { test, expect } from "bun:test";
25+
26+
test("hello world", () => {
27+
expect(1).toBe(1);
28+
});
29+
```
30+
31+
For more information, read the Bun API docs in `node_modules/bun-types/docs/**.mdx`.

.cursor/worktrees.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"setup-worktree": ["bun install"]
3+
}

0 commit comments

Comments
 (0)