Skip to content

Commit fb77062

Browse files
authored
chore!: bun -> pnpm+vitest && manage deps with flake.nix (#143)
1 parent aea526e commit fb77062

66 files changed

Lines changed: 5303 additions & 1860 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/development-workflow/SKILL.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,30 @@ This skill provides all commands and best practices for building, developing, an
99

1010
## Building and Development
1111

12-
- `bun run build` - Build the project using tsdown
13-
- `bun run rebuild` - Fetch latest OpenAPI specs and rebuild everything
14-
- `bun run dev` - Watch mode for development (builds on file changes)
15-
- `bun run fetch:specs` - Update OpenAPI specifications from remote
12+
- `pnpm build` - Build the project using tsdown
13+
- `pnpm rebuild` - Fetch latest OpenAPI specs and rebuild everything
14+
- `pnpm dev` - Watch mode for development (builds on file changes)
15+
- `pnpm fetch:specs` - Update OpenAPI specifications from remote
1616

1717
## Testing
1818

19-
- `bun run test` - Run all tests (unit, examples, scripts)
20-
- `bun run test:unit` - Run only unit tests
21-
- `bun test src/path/to/file.spec.ts` - Run a specific test file
22-
- `bun test -t "test name"` - Run tests matching a pattern
19+
- `pnpm test` - Run all tests (unit, examples, scripts)
20+
- `pnpm test:unit` - Run only unit tests
21+
- `pnpm vitest src/path/to/file.spec.ts` - Run a specific test file
22+
- `pnpm vitest -t "test name"` - Run tests matching a pattern
2323

2424
## Code Quality
2525

26-
- `bun run lint` - Run Biome linter
27-
- `bun run format` - Format code with Biome
28-
- `bun run typecheck` - Type check with tsgo
29-
- `bun run lint:fix` - Auto-fix linting issues
26+
- `pnpm lint` - Run Biome linter
27+
- `pnpm format` - Format code with Biome
28+
- `pnpm typecheck` - Type check with tsgo
29+
- `pnpm lint:fix` - Auto-fix linting issues
3030

3131
## Documentation
3232

33-
- `bun run docs:build` - Build MkDocs documentation
34-
- `bun run docs:serve` - Serve docs locally
35-
- `bun run docs:deploy` - Deploy docs to GitHub Pages
33+
- `pnpm docs:build` - Build MkDocs documentation
34+
- `pnpm docs:serve` - Serve docs locally
35+
- `pnpm docs:deploy` - Deploy docs to GitHub Pages
3636

3737
## Development Guidelines
3838

@@ -51,7 +51,7 @@ Keep commits tiny but meaningful:
5151

5252
### When to Rebuild
5353

54-
Always run `bun run rebuild` when:
54+
Always run `pnpm rebuild` when:
5555
- Updating OpenAPI specifications
5656
- After pulling spec changes
5757
- Before committing generated files
@@ -60,18 +60,18 @@ Always run `bun run rebuild` when:
6060

6161
1. Create feature branch: `git checkout -b feature-name`
6262
2. Make changes to source files
63-
3. Run type checking: `bun run typecheck`
64-
4. Run linter: `bun run lint:fix`
65-
5. Run tests: `bun run test`
66-
6. Format code: `bun run format`
67-
7. Rebuild if specs changed: `bun run rebuild`
63+
3. Run type checking: `pnpm typecheck`
64+
4. Run linter: `pnpm lint:fix`
65+
5. Run tests: `pnpm test`
66+
6. Format code: `pnpm format`
67+
7. Rebuild if specs changed: `pnpm rebuild`
6868
8. Commit with detailed messages
6969
9. Push and create PR: `gh pr create`
7070

7171
## Troubleshooting
7272

7373
### Command Failures
74-
If `bunx <command>` fails, try `bun x <command>` instead.
74+
If `pnpm exec <command>` fails, try `pnpm dlx <command>` instead.
7575

7676
If bash commands fail, try running with fish shell:
7777
```bash
@@ -133,10 +133,10 @@ Use the TypeScript exhaustiveness pattern (`satisfies never`) when branching on
133133
## Publishing & Deployment
134134

135135
When ready to release:
136-
1. Ensure all tests pass: `bun run test`
137-
2. Verify type checking: `bun run typecheck`
138-
3. Build documentation: `bun run docs:build`
136+
1. Ensure all tests pass: `pnpm test`
137+
2. Verify type checking: `pnpm typecheck`
138+
3. Build documentation: `pnpm docs:build`
139139
4. Bump version in package.json
140140
5. Create release commit
141141
6. Push to main or create release PR
142-
7. Deploy docs: `bun run docs:deploy`
142+
7. Deploy docs: `pnpm docs:deploy`

.claude/skills/openapi-architecture/SKILL.md

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

.claude/skills/typescript-testing/SKILL.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
---
22
name: typescript-testing
3-
description: Bun test runner and MSW-based testing patterns for StackOne SDK
3+
description: Vitest test runner and MSW-based testing patterns for StackOne SDK
44
---
55

6-
# TypeScript Testing with Bun and MSW
6+
# TypeScript Testing with Vitest and MSW
77

8-
This skill guides testing practices for the StackOne SDK using Bun's test runner and Mock Service Worker (MSW) for HTTP mocking.
8+
This skill guides testing practices for the StackOne SDK using Vitest test runner and Mock Service Worker (MSW) for HTTP mocking.
99

1010
## Testing Framework
1111

12-
The project uses **Bun's built-in test runner** with Jest-compatible API. Run tests with:
13-
- `bun run test` - Run all tests (unit, examples, scripts)
14-
- `bun run test:unit` - Run only unit tests
15-
- `bun test src/path/to/file.spec.ts` - Run a specific test file
16-
- `bun test -t "test name"` - Run tests matching a pattern
12+
The project uses **Vitest** as the test runner. Run tests with:
13+
- `pnpm test` - Run all tests (unit, examples, scripts)
14+
- `pnpm test:unit` - Run only unit tests
15+
- `pnpm vitest src/path/to/file.spec.ts` - Run a specific test file
16+
- `pnpm vitest -t "test name"` - Run tests matching a pattern
1717

1818
## MSW (Mock Service Worker)
1919

20-
**MSW is the preferred HTTP mocking solution.** MSW is configured globally in `bun.test.setup.ts`, so no per-file setup is required.
20+
**MSW is the preferred HTTP mocking solution.** MSW is configured globally in `vitest.setup.ts`, so no per-file setup is required.
2121

2222
### Adding Mock Handlers
2323

@@ -89,23 +89,12 @@ import { createFixture } from 'fs-fixture';
8989

9090
it('should save file to disk', async () => {
9191
await using fixture = await createFixture();
92-
9392
await fixture.writeFile('data.json', JSON.stringify({ test: 'data' }));
9493
expect(await fixture.exists('data.json')).toBe(true);
95-
96-
const content = await fixture.readFile('data.json', 'utf8');
97-
expect(JSON.parse(content)).toEqual({ test: 'data' });
9894
});
9995
```
10096

101-
Available methods:
102-
- `fixture.path` - Absolute fixture directory path
103-
- `fixture.exists(path)` - Check existence
104-
- `fixture.readFile(path, encoding?)` - Read as string or Buffer
105-
- `fixture.writeFile(path, content)` - Write file
106-
- `fixture.readJson<T>(path)` - Parse JSON with type safety
107-
- `fixture.writeJson(path, data, space?)` - Write formatted JSON
108-
- `fixture.mkdir(path)` - Create nested directories
97+
**Reference:** See `node_modules/fs-fixture/README.md` for full API and advanced usage
10998

11099
## Test Organization
111100

.cursor/rules/biome-standards.mdc

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

0 commit comments

Comments
 (0)