bun-sticky 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ Run the championship-grade test suite and report results.
6
6
  bun test --summary all
7
7
  ```
8
8
 
9
- Expected: All tests pass (200+)
9
+ Expected: All tests pass (328+)
10
10
 
11
11
  If any tests fail:
12
12
  1. Identify the failing test
@@ -24,6 +24,3 @@ jobs:
24
24
 
25
25
  - name: Run tests
26
26
  run: bun test
27
-
28
- - name: Type check
29
- run: bun run tsc --noEmit
package/CLAUDE.md CHANGED
@@ -2,10 +2,12 @@
2
2
 
3
3
  Fastest bun under the sum. Bun-native .faf CLI with Wolfejam slot-based scoring.
4
4
 
5
+ **🏆 100% Trophy** - 9/9 slots filled
6
+
5
7
  ## Quick Commands
6
8
 
7
9
  ```bash
8
- bun test # Run WJTTC test suite (200+ tests)
10
+ bun test # Run WJTTC test suite (328 tests)
9
11
  bun run index.ts score # Score current project
10
12
  bun run index.ts help # Show commands
11
13
  bun publish # Publish to npm (see PUBLISH-PROTOCOL.md)
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2025 wolfejam
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -3,7 +3,7 @@
3
3
  ## Pre-Publish Checklist
4
4
 
5
5
  ### 1. Code Quality
6
- - [x] All 177 tests passing (`bun test`)
6
+ - [x] All 328 tests passing (`bun test`)
7
7
  - [x] Zero TypeScript errors
8
8
  - [x] Zero runtime dependencies
9
9
  - [x] Pure Bun APIs only
@@ -18,7 +18,7 @@
18
18
  ### 3. Test Suite
19
19
  ```bash
20
20
  bun test
21
- # Expect: 177 pass, 0 fail
21
+ # Expect: 328 pass, 0 fail
22
22
  ```
23
23
 
24
24
  ### 4. Manual Verification
@@ -54,6 +54,8 @@ bunx bun-sticky help
54
54
  |---------|------|-------|
55
55
  | 1.0.0 | 2024-12-22 | Initial release - Wolfejam slot-based scoring, 177 tests |
56
56
  | 1.0.1 | 2024-12-22 | Proper publish ceremony, version consistency |
57
+ | 1.0.2 | 2025-12-22 | Test fixes (rounding, TIERS export, Empty tier) |
58
+ | 1.0.3 | 2025-12-22 | Fix sync command overwriting CLAUDE.md |
57
59
 
58
60
  ---
59
61
 
package/README.md CHANGED
@@ -18,7 +18,7 @@ bunx bun-sticky score
18
18
  ████ █▄▀ ▀▄▀ █ █
19
19
  ▀▀
20
20
 
21
- 🥐 Bun Sticky v1.0.1 .faf CLI
21
+ 🥐 Bun Sticky v1.0.3 .faf CLI
22
22
  Fastest bun under the sum.
23
23
 
24
24
  ────────────────────────────────────────────────
@@ -29,7 +29,7 @@ bunx bun-sticky score
29
29
  Project ████████████ 3/3
30
30
  Human ████████░░░░ 4/6
31
31
 
32
- 🥉 78% Bronze
32
+ 🟢 78% Green
33
33
  Filled: 7/9 slots
34
34
  ```
35
35
 
@@ -97,7 +97,7 @@ Built for Bun's speed:
97
97
 
98
98
  ## Testing
99
99
 
100
- 177 tests. Championship-grade WJTTC test suite.
100
+ 328 tests. Championship-grade WJTTC test suite.
101
101
 
102
102
  ```bash
103
103
  bun test
package/index.ts CHANGED
@@ -20,7 +20,7 @@ import { getTier } from "./lib/tier.ts";
20
20
  // CONSTANTS
21
21
  // ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
22
22
 
23
- const VERSION = "1.0.2";
23
+ const VERSION = "1.0.3";
24
24
 
25
25
  // Standard colors only (B/W version - color reserved for ZIG poster child)
26
26
  const GREEN = "\x1b[32m";
@@ -237,20 +237,58 @@ async function cmdSync(): Promise<void> {
237
237
  const result = calculateScore(faf);
238
238
  const tier = getTier(result.score);
239
239
 
240
- // Generate CLAUDE.md
241
- const claudeMd = `# ${name}
240
+ const scoreBadge = `**${tier.emoji} ${result.score}% ${tier.name}** - ${result.filled}/${result.total} slots filled`;
241
+ const claudeFile = Bun.file("CLAUDE.md");
242
+
243
+ if (await claudeFile.exists()) {
244
+ // Update existing CLAUDE.md - preserve content, update/insert score badge
245
+ let existing = await claudeFile.text();
246
+ const badgePattern = /^\*\*[🏆🥇🥈🥉🟢🟡🔴⚪🍊]\s*\d+%.*\*\*.*slots filled$/mu;
247
+
248
+ if (badgePattern.test(existing)) {
249
+ // Replace existing badge
250
+ existing = existing.replace(badgePattern, scoreBadge);
251
+ } else {
252
+ // Insert badge after first paragraph (after title + description)
253
+ const lines = existing.split("\n");
254
+ let insertIndex = 1;
255
+
256
+ // Find first empty line after title
257
+ for (let i = 1; i < lines.length; i++) {
258
+ if (lines[i].trim() === "") {
259
+ insertIndex = i + 1;
260
+ // Skip consecutive empty lines
261
+ while (insertIndex < lines.length && lines[insertIndex].trim() === "") {
262
+ insertIndex++;
263
+ }
264
+ break;
265
+ }
266
+ }
242
267
 
243
- ${goal}
268
+ // Check if next line is already a heading, insert before it
269
+ if (lines[insertIndex]?.startsWith("#")) {
270
+ lines.splice(insertIndex, 0, scoreBadge, "");
271
+ } else {
272
+ lines.splice(insertIndex, 0, "", scoreBadge);
273
+ }
274
+ existing = lines.join("\n");
275
+ }
244
276
 
245
- ## Score: ${tier.emoji} ${result.score}%
277
+ await Bun.write("CLAUDE.md", existing);
278
+ } else {
279
+ // Create new minimal CLAUDE.md
280
+ const claudeMd = `# ${name}
246
281
 
247
- Filled: ${result.filled}/${result.total} slots
282
+ ${goal}
283
+
284
+ ${scoreBadge}
248
285
 
249
286
  ---
250
287
  *Synced by Bun Sticky*
251
288
  `;
289
+ await Bun.write("CLAUDE.md", claudeMd);
290
+ }
252
291
 
253
- await Bun.write("CLAUDE.md", claudeMd);
254
292
  console.log(BANNER);
255
293
  console.log(` ${GREEN}Synced${RESET} project.faf → CLAUDE.md`);
256
294
  console.log();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bun-sticky",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Fastest bun under the sum. FAF scoring CLI for Bun.",
5
5
  "main": "index.ts",
6
6
  "type": "module",
package/project.faf CHANGED
@@ -8,7 +8,7 @@ project:
8
8
  goal: Bun-native FAF scoring CLI with wolfejam slot-based system
9
9
  main_language: TypeScript
10
10
  type: cli
11
- version: 1.0.0
11
+ version: 1.0.3
12
12
 
13
13
  human_context:
14
14
  who: Developers using Bun for fast TypeScript CLIs