Skip to content

Commit e54ec38

Browse files
committed
Merge remote-tracking branch 'origin/main' into rust
# Conflicts: # apps/ccusage/test/cli-output.test.ts
2 parents 588aaa9 + fa95686 commit e54ec38

4 files changed

Lines changed: 35 additions & 5 deletions

File tree

‎.agents/skills/ccusage-testing/SKILL.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ Utility functions should include concise JSDoc describing their purpose and focu
4747

4848
- Avoid `try`/`catch` in tests for expected failures. Use `expect(...).toThrow()`, `await expect(...).rejects`, or explicit Result failure assertions.
4949
- Avoid `if` branches inside test bodies. Split behaviors into separate tests or use `it.each` for table-driven cases.
50-
- Do not over-DRY tests. Keep repeated setup inline when it makes the behavior easier to read.
50+
- Tests do not need to be DRY. Prefer repeated, explicit setup in each test when it makes the behavior easier to read.
51+
- Do not hoist one-off values out of tests. Write literals and direct setup values inline in the test body when sharing them would make the behavior harder to read.
5152

5253
For concrete good and bad examples, read `../tdd/references/vitest-examples.md`.
5354

‎.agents/skills/tdd/references/vitest-examples.md‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,28 @@ it('renders daily totals', () => {
153153
});
154154
```
155155

156-
Helpers are fine when they create noisy data or fixtures. Keep the assertion in the test unless the helper's name is more explicit than the assertion it hides.
156+
Tests do not need to be DRY. Prefer repeated, explicit setup over shared variables or helpers when duplication makes each test easier to read. Helpers are fine when they create noisy data or fixtures. Keep the assertion in the test unless the helper's name is more explicit than the assertion it hides.
157+
158+
Avoid hoisting one-off values out of tests. Keep literals and setup values close to the behavior they exercise.
159+
160+
Bad:
161+
162+
```typescript
163+
const defaultTimezone = 'UTC';
164+
const reportDate = '2026-05-16';
165+
166+
it('formats the daily heading', () => {
167+
expect(formatDailyHeading(reportDate, defaultTimezone)).toBe('2026-05-16');
168+
});
169+
```
170+
171+
Good:
172+
173+
```typescript
174+
it('formats the daily heading', () => {
175+
expect(formatDailyHeading('2026-05-16', 'UTC')).toBe('2026-05-16');
176+
});
177+
```
157178

158179
Use `assert` to make test preconditions explicit and to narrow nullable values. Do not use non-null assertions (`!`) to silence TypeScript when the test can fail with a useful message.
159180

‎docs/.vitepress/config.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default defineConfig({
9292
{
9393
text: 'Community',
9494
items: [
95-
{ text: 'Related Projects', link: '/guide/related-projects' },
95+
{ text: 'Community Projects', link: '/guide/community-projects' },
9696
{ text: 'Sponsors', link: '/guide/sponsors' },
9797
],
9898
},
@@ -145,6 +145,7 @@ export default defineConfig({
145145
{ from: '/sponsor', to: 'https://github.com/sponsors/ryoppippi', status: 302 },
146146
{ from: '/guide/custom-paths', to: '/guide/claude/', status: 301 },
147147
{ from: '/guide/directory-detection', to: '/guide/claude/', status: 301 },
148+
{ from: '/guide/related-projects', to: '/guide/community-projects', status: 301 },
148149
],
149150
}) as any,
150151
groupIconVitePlugin(),
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# Related Projects
1+
# Community Projects
22

3-
Projects that use ccusage internally or extend its functionality:
3+
Community projects built around ccusage, Claude Code usage tracking, or related workflows.
4+
5+
These projects are maintained independently and are not affiliated with the ccusage project or ryoppippi.
46

57
## Desktop Applications
68

@@ -14,8 +16,13 @@ Projects that use ccusage internally or extend its functionality:
1416
- [ccusage Raycast Extension](https://www.raycast.com/nyatinte/ccusage) - Raycast integration for quick usage checks
1517
- [ccusage.nvim](https://github.com/S1M0N38/ccusage.nvim) - Track Claude Code usage in Neovim
1618

19+
## CLI Utilities
20+
21+
- [scx](https://github.com/yamamuteki/scx) - Convert ccusage USD output from stdin into a local currency
22+
1723
## Web Applications
1824

25+
- [Straude](https://straude.com) - Strava-style Claude Code telemetry for logging usage, tracking spend, and comparing pace
1926
- [viberank](https://viberank.app) - A community-driven leaderboard for Claude Code usage. ([GitHub](https://github.com/sculptdotfun/viberank))
2027

2128
## Contributing

0 commit comments

Comments
 (0)