get-tbd 0.2.1 → 0.2.2
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.
- package/dist/bin.mjs +14 -7
- package/dist/bin.mjs.map +1 -1
- package/dist/cli.mjs +14 -7
- package/dist/cli.mjs.map +1 -1
- package/dist/docs/guidelines/bun-monorepo-patterns.md +65 -66
- package/dist/docs/guidelines/cli-agent-skill-patterns.md +314 -158
- package/dist/docs/guidelines/common-doc-guidelines.md +2 -2
- package/dist/docs/guidelines/convex-limits-best-practices.md +39 -39
- package/dist/docs/guidelines/convex-rules.md +13 -13
- package/dist/docs/guidelines/electron-app-development-patterns.md +18 -18
- package/dist/docs/guidelines/general-comment-rules.md +1 -1
- package/dist/docs/guidelines/general-tdd-guidelines.md +4 -4
- package/dist/docs/guidelines/golden-testing-guidelines.md +9 -9
- package/dist/docs/guidelines/pnpm-monorepo-patterns.md +49 -49
- package/dist/docs/guidelines/python-cli-patterns.md +1 -1
- package/dist/docs/guidelines/python-modern-guidelines.md +4 -4
- package/dist/docs/guidelines/release-notes-guidelines.md +18 -2
- package/dist/docs/guidelines/supply-chain-hardening.md +84 -29
- package/dist/docs/guidelines/tbd-sync-troubleshooting.md +3 -3
- package/dist/docs/guidelines/typescript-cli-tool-rules.md +17 -17
- package/dist/docs/guidelines/typescript-code-coverage.md +5 -5
- package/dist/docs/guidelines/typescript-rules.md +3 -3
- package/dist/docs/guidelines/typescript-yaml-handling-rules.md +3 -3
- package/dist/docs/tbd-design.md +40 -40
- package/dist/docs/tbd-docs.md +1 -1
- package/dist/docs/tbd-prime.md +3 -3
- package/dist/index.mjs +1 -1
- package/dist/{src-CtZIHxYM.mjs → src-BpvcrLnq.mjs} +2 -2
- package/dist/{src-CtZIHxYM.mjs.map → src-BpvcrLnq.mjs.map} +1 -1
- package/dist/tbd +14 -7
- package/package.json +1 -1
|
@@ -24,19 +24,19 @@ author: Joshua Levy (github.com/jlevy) with LLM assistance
|
|
|
24
24
|
|
|
25
25
|
| Tool / Package | Version | Check For Updates |
|
|
26
26
|
| --- | --- | --- |
|
|
27
|
-
| **Bun** | 1.3.13 (1.3.14 too recent) | [bun.sh/blog](https://bun.sh/blog)
|
|
28
|
-
| **TypeScript** | ^6.0.3 | [github.com/microsoft/TypeScript/releases](https://github.com/microsoft/TypeScript/releases)
|
|
29
|
-
| **Bunup** | ^0.16.31 | [npmjs.com/package/bunup](https://www.npmjs.com/package/bunup)
|
|
30
|
-
| **Biome** | ^2.4.14 (2.4.15 borderline) | [biomejs.dev](https://biomejs.dev/)
|
|
31
|
-
| **@changesets/cli** | ^2.31.0 | [github.com/changesets/changesets/releases](https://github.com/changesets/changesets/releases)
|
|
32
|
-
| **bun-types** | ^1.3.13 | [npmjs.com/package/bun-types](https://www.npmjs.com/package/bun-types)
|
|
33
|
-
| **tryscript** | ^0.1.6 | [npmjs.com/package/tryscript](https://www.npmjs.com/package/tryscript)
|
|
34
|
-
| **flowmark** | latest | [github.com/jlevy/flowmark](https://github.com/jlevy/flowmark)
|
|
35
|
-
| **publint** | ^0.3.20 (0.3.21 too recent) | [npmjs.com/package/publint](https://www.npmjs.com/package/publint)
|
|
36
|
-
| **actions/checkout** | v6 | [github.com/actions/checkout/releases](https://github.com/actions/checkout/releases)
|
|
37
|
-
| **oven-sh/setup-bun** | v2 | [github.com/oven-sh/setup-bun](https://github.com/oven-sh/setup-bun)
|
|
38
|
-
| **lefthook** | ^2.1.5 (2.1.7/2.1.8 too recent) | [github.com/evilmartians/lefthook/releases](https://github.com/evilmartians/lefthook/releases)
|
|
39
|
-
| **npm-check-updates** | ^22.0.0 (22.2.0 too recent) | [npmjs.com/package/npm-check-updates](https://www.npmjs.com/package/npm-check-updates)
|
|
27
|
+
| **Bun** | 1.3.13 (1.3.14 too recent) | [bun.sh/blog](https://bun.sh/blog)—Runtime, bundler, package manager, test runner. Acquired by Anthropic (Dec 2025). **Pinned to 1.3.13 (2026-04-20) per the 14-day rule**—1.3.14 (2026-05-13) is the **last Zig-based release** and the Rust rewrite merged to `main` 2026-05-14 (~960K lines, generated by Claude AI agents over ~6 days). New built-ins in 1.3.x: `Bun.Image` (Sharp replacement), experimental HTTP/3 in `Bun.serve()`, 7× faster warm installs via isolated linker global store, rewritten `fs.watch()` on Linux/macOS. Bump to 1.3.14 (or 1.4.x once it ships) once the 14-day window has elapsed. |
|
|
28
|
+
| **TypeScript** | ^6.0.3 | [github.com/microsoft/TypeScript/releases](https://github.com/microsoft/TypeScript/releases)—**6.0.3 stable** (shipped 2026-03-23). TS 6.0 is the **last JavaScript-based release** and is positioned as a bridge to 7.0: `strict: true` is now the default, ESM is the default module system, and ~9 compiler settings flipped defaults. **TS 7.0 Beta** (Project Corsa, Go rewrite) shipped 2026-04-21 as `@typescript/native-preview` (binary: `tsgo`); claims ~10× type-check speed and ~3× less memory. TS 7.0 stable is expected mid-to-late 2026. Do not adopt `tsgo` for production builds yet. |
|
|
29
|
+
| **Bunup** | ^0.16.31 | [npmjs.com/package/bunup](https://www.npmjs.com/package/bunup)—Build tool for TS libs. Still 0.x; 0.16.23 through 0.16.31 are bug-fix only (DTS alias fixes, workspace `onSuccess` fix, external/noExternal honoring). Pin to a specific minor version for stability. |
|
|
30
|
+
| **Biome** | ^2.4.14 (2.4.15 borderline) | [biomejs.dev](https://biomejs.dev/)—Formatter + linter. **Pinned to 2.4.14 (2026-05-01) per the 14-day rule**; 2.4.15 (2026-05-09) is 13 days old today—bump on next refresh. v2.4 (Feb 2026) added experimental embedded snippet formatting (CSS/GraphQL in JS/TS template literals), 15 HTML accessibility lint rules enabled by default, and promoted 24 nursery rules to stable (Vue 3, Next.js, Qwik). |
|
|
31
|
+
| **@changesets/cli** | ^2.31.0 | [github.com/changesets/changesets/releases](https://github.com/changesets/changesets/releases)—2.31.0 latest. **Still no native Bun support**; `changeset version` does not resolve `workspace:*` references for Bun workspaces—workarounds below remain required. |
|
|
32
|
+
| **bun-types** | ^1.3.13 | [npmjs.com/package/bun-types](https://www.npmjs.com/package/bun-types)—Type definitions for Bun runtime APIs. Track Bun version (pinned to 1.3.13 per the 14-day rule). |
|
|
33
|
+
| **tryscript** | ^0.1.6 | [npmjs.com/package/tryscript](https://www.npmjs.com/package/tryscript)—Golden/CLI testing via Markdown test files. |
|
|
34
|
+
| **flowmark** | latest | [github.com/jlevy/flowmark](https://github.com/jlevy/flowmark)—Markdown auto-formatter (via `uvx`). |
|
|
35
|
+
| **publint** | ^0.3.20 (0.3.21 too recent) | [npmjs.com/package/publint](https://www.npmjs.com/package/publint)—**Pinned to 0.3.20 (2026-05-08) per the 14-day rule**; 0.3.21 (2026-05-13) is 9 days old today. Incremental: re-enabled TS/TSX file existence checks; `exports["default"]` support. |
|
|
36
|
+
| **actions/checkout** | v6 | [github.com/actions/checkout/releases](https://github.com/actions/checkout/releases)—v6.0.2 (2026-01-09). Credentials now stored in `$RUNNER_TEMP` rather than `.git/config`; Node 24 runtime; requires runner ≥ 2.327.1. |
|
|
37
|
+
| **oven-sh/setup-bun** | v2 | [github.com/oven-sh/setup-bun](https://github.com/oven-sh/setup-bun)—v2.2.0 (2026-03-14). Migrated to Node.js 24 runtime ahead of GitHub’s **2026-06-02 deadline** that forces all Node.js 20 actions to Node.js 24. |
|
|
38
|
+
| **lefthook** | ^2.1.5 (2.1.7/2.1.8 too recent) | [github.com/evilmartians/lefthook/releases](https://github.com/evilmartians/lefthook/releases)—**Pinned to 2.1.5 (2026-04-06) per the 14-day rule**; 2.1.7 and 2.1.8 both shipped 2026-05-19 (3 days old). Patch-level since 2.1.1: dependency bumps and config-warning improvements. v2 still excludes regexp `exclude` and `skip_output` from v1. |
|
|
39
|
+
| **npm-check-updates** | ^22.0.0 (22.2.0 too recent) | [npmjs.com/package/npm-check-updates](https://www.npmjs.com/package/npm-check-updates)—**Major version jump from 19 to 22.** **Pinned to 22.0.0 (2026-04-25) per the 14-day rule**; 22.2.0 (2026-05-12) is 10 days old today. Now pure ESM; named imports only (`import { run } from 'npm-check-updates'`); `.ncurc.js` with `module.exports` no longer works in `"type": "module"` projects (use `.ncurc.cjs`). **Critical for supply chain: now ships `--cooldown <days>` to refuse versions younger than the specified age.** See [Supply-Chain Mitigation](#supply-chain-mitigation). |
|
|
40
40
|
|
|
41
41
|
### Reminders When Updating
|
|
42
42
|
|
|
@@ -44,7 +44,7 @@ author: Joshua Levy (github.com/jlevy) with LLM assistance
|
|
|
44
44
|
|
|
45
45
|
2. **Update the table** with new versions and any relevant notes
|
|
46
46
|
|
|
47
|
-
3. **Search and update code examples
|
|
47
|
+
3. **Search and update code examples**—version numbers appear in:
|
|
48
48
|
|
|
49
49
|
- GitHub Actions workflows (CI and Release sections)
|
|
50
50
|
|
|
@@ -56,24 +56,24 @@ author: Joshua Levy (github.com/jlevy) with LLM assistance
|
|
|
56
56
|
|
|
57
57
|
- Appendices (complete examples)
|
|
58
58
|
|
|
59
|
-
4. **Verify compatibility
|
|
59
|
+
4. **Verify compatibility**—check that tools still work together
|
|
60
60
|
|
|
61
61
|
5. **Update the “Last Updated” date** at the top of the document
|
|
62
62
|
|
|
63
63
|
6. **Review “Open Research Questions”** section for any resolved items
|
|
64
64
|
|
|
65
65
|
7. **Honor the 14-day package-age rule** when bumping versions in code examples.
|
|
66
|
-
See [Supply-Chain Mitigation](#supply-chain-mitigation)
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
See [Supply-Chain Mitigation](#supply-chain-mitigation)—versions cited here should be
|
|
67
|
+
≥14 days old at the time the table is updated, except where a clearly-noted security
|
|
68
|
+
exception applies.
|
|
69
69
|
|
|
70
70
|
* * *
|
|
71
71
|
|
|
72
72
|
## Executive Summary
|
|
73
73
|
|
|
74
74
|
This research brief provides a comprehensive guide for setting up a modern TypeScript
|
|
75
|
-
monorepo using the **Bun ecosystem** end-to-end
|
|
76
|
-
|
|
75
|
+
monorepo using the **Bun ecosystem** end-to-end—Bun as runtime, package manager, bundler
|
|
76
|
+
(via Bunup), and test runner.
|
|
77
77
|
It serves as a direct comparison to the companion document on pnpm-based monorepos,
|
|
78
78
|
covering the same architectural scope but using Bun-native tooling wherever possible.
|
|
79
79
|
|
|
@@ -83,7 +83,7 @@ building ESM (or dual ESM/CJS) outputs with TypeScript declarations, **Changeset
|
|
|
83
83
|
(single-package repos) for versioning and release automation, **Biome** for formatting
|
|
84
84
|
and linting, **publint** for package validation, and **lefthook** for git hooks.
|
|
85
85
|
The architecture also covers Bun’s unique capability for **compiling standalone
|
|
86
|
-
executables
|
|
86
|
+
executables**—a native binary distribution path unavailable in the pnpm ecosystem.
|
|
87
87
|
|
|
88
88
|
**Research Questions**:
|
|
89
89
|
|
|
@@ -123,7 +123,7 @@ research stock.
|
|
|
123
123
|
|
|
124
124
|
## Research Findings
|
|
125
125
|
|
|
126
|
-
### 1. Package Manager
|
|
126
|
+
### 1. Package Manager and Workspace Structure
|
|
127
127
|
|
|
128
128
|
#### Bun Workspaces
|
|
129
129
|
|
|
@@ -141,13 +141,12 @@ research stock.
|
|
|
141
141
|
|
|
142
142
|
- Supports `workspace:*` protocol for inter-package references
|
|
143
143
|
|
|
144
|
-
- Does not use a content-addressable store like pnpm
|
|
145
|
-
`node_modules`
|
|
144
|
+
- Does not use a content-addressable store like pnpm—installs are flat in `node_modules`
|
|
146
145
|
|
|
147
146
|
- Missing some pnpm features: no `pnpm deploy`, less strict `node_modules` (phantom
|
|
148
147
|
dependencies possible)
|
|
149
148
|
|
|
150
|
-
- **Notable**: Bun was acquired by Anthropic on 2025-12-02
|
|
149
|
+
- **Notable**: Bun was acquired by Anthropic on 2025-12-02—Anthropic’s first
|
|
151
150
|
acquisition. Bun powers Claude Code (which ships as a `bun build --compile`
|
|
152
151
|
executable), the Claude Agent SDK, and other Anthropic AI tooling, signaling strong
|
|
153
152
|
ongoing investment and maintenance.
|
|
@@ -354,7 +353,7 @@ Bun to directly import TypeScript source files, bypassing compiled output entire
|
|
|
354
353
|
```
|
|
355
354
|
|
|
356
355
|
This means during development within the monorepo, Bun can consume TypeScript directly
|
|
357
|
-
without a build step
|
|
356
|
+
without a build step—a significant DX advantage over Node.js-based setups.
|
|
358
357
|
|
|
359
358
|
**Assessment**: This is a unique Bun advantage.
|
|
360
359
|
During local development, packages can be consumed without building.
|
|
@@ -568,8 +567,8 @@ export default defineConfig([
|
|
|
568
567
|
|
|
569
568
|
**Key details**:
|
|
570
569
|
|
|
571
|
-
- Set `clean: true` only on the first config
|
|
572
|
-
|
|
570
|
+
- Set `clean: true` only on the first config—subsequent configs must use `clean: false`
|
|
571
|
+
to avoid deleting earlier outputs.
|
|
573
572
|
- CLI binaries typically don’t need `dts` since they aren’t imported by consumers.
|
|
574
573
|
- The `banner` field adds the shebang line for direct execution.
|
|
575
574
|
|
|
@@ -634,7 +633,7 @@ has platform-specific issues.
|
|
|
634
633
|
|
|
635
634
|
* * *
|
|
636
635
|
|
|
637
|
-
### 4. Package Exports
|
|
636
|
+
### 4. Package Exports and Dual Module Support
|
|
638
637
|
|
|
639
638
|
#### Subpath Exports
|
|
640
639
|
|
|
@@ -690,7 +689,7 @@ This auto-generates:
|
|
|
690
689
|
|
|
691
690
|
**Manual configuration** (if not using auto-exports):
|
|
692
691
|
|
|
693
|
-
Identical to the pnpm research
|
|
692
|
+
Identical to the pnpm research—use the same `exports` structure with `"types"` before
|
|
694
693
|
`"default"` in each condition block.
|
|
695
694
|
|
|
696
695
|
**Bun export condition**: Optionally add a `"bun"` condition pointing to TypeScript
|
|
@@ -784,7 +783,7 @@ publint is runtime-agnostic.
|
|
|
784
783
|
|
|
785
784
|
* * *
|
|
786
785
|
|
|
787
|
-
### 7. Versioning
|
|
786
|
+
### 7. Versioning and Release Automation
|
|
788
787
|
|
|
789
788
|
#### Changesets (with Bun Workarounds)
|
|
790
789
|
|
|
@@ -904,7 +903,7 @@ No `tsx` dependency needed.
|
|
|
904
903
|
**Details**:
|
|
905
904
|
|
|
906
905
|
Bun ships with a built-in test runner that is API-compatible with Jest/Vitest.
|
|
907
|
-
It is extremely fast
|
|
906
|
+
It is extremely fast—roughly 2x faster than Node’s built-in test runner and
|
|
908
907
|
significantly faster than Jest or Vitest.
|
|
909
908
|
|
|
910
909
|
**Key features**:
|
|
@@ -1062,7 +1061,7 @@ maintain.
|
|
|
1062
1061
|
|
|
1063
1062
|
* * *
|
|
1064
1063
|
|
|
1065
|
-
### 9. Code Formatting
|
|
1064
|
+
### 9. Code Formatting and Linting
|
|
1066
1065
|
|
|
1067
1066
|
#### Biome
|
|
1068
1067
|
|
|
@@ -1300,7 +1299,7 @@ jobs:
|
|
|
1300
1299
|
```
|
|
1301
1300
|
|
|
1302
1301
|
**`biome ci` vs `biome check`**: Use `biome ci .` (via `"check:ci": "biome ci ."`) in CI
|
|
1303
|
-
workflows instead of `biome check .`. The `biome ci` command is stricter
|
|
1302
|
+
workflows instead of `biome check .`. The `biome ci` command is stricter—it errors on
|
|
1304
1303
|
formatting issues rather than just reporting them, and produces cleaner output for CI
|
|
1305
1304
|
logs. Use `biome check --write .` for local development (auto-fixes issues) and
|
|
1306
1305
|
`biome ci .` in CI (fails on any issue).
|
|
@@ -1315,7 +1314,7 @@ logs. Use `biome check --write .` for local development (auto-fixes issues) and
|
|
|
1315
1314
|
| Lint + format | Separate `format:check` + `lint:check` | Single `biome check` |
|
|
1316
1315
|
| Node.js setup | Required | Not required (Bun includes runtime) |
|
|
1317
1316
|
|
|
1318
|
-
**Assessment**: Bun CI is simpler
|
|
1317
|
+
**Assessment**: Bun CI is simpler—one setup action instead of two, and a single check
|
|
1319
1318
|
command instead of separate format and lint steps.
|
|
1320
1319
|
The text-based `bun.lock` (since Bun 1.2) is diffable in PRs, on par with
|
|
1321
1320
|
`pnpm-lock.yaml`.
|
|
@@ -1391,7 +1390,7 @@ projects that prefer manual version control and want provenance guarantees.
|
|
|
1391
1390
|
|
|
1392
1391
|
> **When to prefer this over Changesets (LLM-era note):** For a **single published
|
|
1393
1392
|
> package**, Changesets’ main wins (multi-package coordination, per-PR changelog
|
|
1394
|
-
> accumulation) mostly evaporate while its ceremony stays
|
|
1393
|
+
> accumulation) mostly evaporate while its ceremony stays—and Bun adds the extra
|
|
1395
1394
|
> `workspace:*` workarounds above.
|
|
1396
1395
|
> When releases are cut by an agent/maintainer who assembles notes from clean
|
|
1397
1396
|
> conventional commits at release time (see a release-notes template), tag-triggered
|
|
@@ -1473,11 +1472,11 @@ jobs:
|
|
|
1473
1472
|
|
|
1474
1473
|
**Release process with tag-triggered workflow**:
|
|
1475
1474
|
|
|
1476
|
-
1. `bun run changeset
|
|
1475
|
+
1. `bun run changeset`—create changeset
|
|
1477
1476
|
2. Commit the changeset file
|
|
1478
|
-
3. `bun run changeset version
|
|
1477
|
+
3. `bun run changeset version`—bumps versions, updates CHANGELOG
|
|
1479
1478
|
4. Commit the version bump
|
|
1480
|
-
5. `git tag vX.X.X && git push --tags
|
|
1479
|
+
5. `git tag vX.X.X && git push --tags`—triggers the release workflow
|
|
1481
1480
|
|
|
1482
1481
|
**Key advantages over Changesets Action**:
|
|
1483
1482
|
|
|
@@ -1514,7 +1513,7 @@ timing. The Changesets Action remains simpler for projects that prefer full auto
|
|
|
1514
1513
|
|
|
1515
1514
|
* * *
|
|
1516
1515
|
|
|
1517
|
-
### 11. Git Hooks
|
|
1516
|
+
### 11. Git Hooks and Local Validation
|
|
1518
1517
|
|
|
1519
1518
|
#### Lefthook with Biome
|
|
1520
1519
|
|
|
@@ -1724,7 +1723,7 @@ This is a unique advantage that the pnpm ecosystem does not offer natively.
|
|
|
1724
1723
|
|
|
1725
1724
|
npm-check-updates (`ncu`) works with Bun.
|
|
1726
1725
|
The main difference is using `bun install` instead of `pnpm install` after updates.
|
|
1727
|
-
**All upgrade commands must honor the 14-day package-age rule
|
|
1726
|
+
**All upgrade commands must honor the 14-day package-age rule**—see
|
|
1728
1727
|
[Supply-Chain Mitigation](#supply-chain-mitigation) for the rationale and exception
|
|
1729
1728
|
process. `ncu` v22+ ships a native `--cooldown` flag that enforces this directly.
|
|
1730
1729
|
|
|
@@ -1795,7 +1794,7 @@ Distribution options are identical:
|
|
|
1795
1794
|
|
|
1796
1795
|
1. **GitHub Packages** (recommended for teams)
|
|
1797
1796
|
|
|
1798
|
-
2. **Direct GitHub install**: `bun add github:org/repo
|
|
1797
|
+
2. **Direct GitHub install**: `bun add github:org/repo`—Bun has limited support for
|
|
1799
1798
|
monorepo subdirectory installs (lagging behind pnpm)
|
|
1800
1799
|
|
|
1801
1800
|
3. **Local linking**: `bun link` works similarly to `pnpm link`
|
|
@@ -1825,13 +1824,13 @@ in core library code if the library needs to work in Node.js environments.
|
|
|
1825
1824
|
Supply-chain hardening applies to **every repo, not just new monorepos**, so the full
|
|
1826
1825
|
policy and hands-on enforcement now live in a standalone guideline:
|
|
1827
1826
|
**`tbd guidelines supply-chain-hardening`**. It covers the cross-ecosystem 14-day
|
|
1828
|
-
cool-off plus the Node/pnpm/Bun specifics
|
|
1827
|
+
cool-off plus the Node/pnpm/Bun specifics—lifecycle-script allowlists, lockfile
|
|
1829
1828
|
discipline, `npm-check-updates --cooldown 14`, the CI audit gate, and the
|
|
1830
1829
|
`check-package-age` pre-push guard.
|
|
1831
1830
|
Deeper background and the named-incident watch list:
|
|
1832
1831
|
<https://github.com/jlevy/supply-chain-hardening>.
|
|
1833
1832
|
|
|
1834
|
-
**Bun specifics**: Bun blocks lifecycle scripts by default
|
|
1833
|
+
**Bun specifics**: Bun blocks lifecycle scripts by default—extend the allowlist via
|
|
1835
1834
|
`trustedDependencies` in `package.json`, run `bun audit` in CI with
|
|
1836
1835
|
`bun install --frozen-lockfile`, and commit `bun.lock`. Bun has no native release-age
|
|
1837
1836
|
gate yet, so enforce the 14-day cool-off with `bunx npm-check-updates --cooldown 14`.
|
|
@@ -1911,13 +1910,13 @@ gate yet, so enforce the 14-day cool-off with `bunx npm-check-updates --cooldown
|
|
|
1911
1910
|
7. **Use `bun publish` per package** instead of `changeset publish` to ensure proper
|
|
1912
1911
|
workspace resolution.
|
|
1913
1912
|
|
|
1914
|
-
8. **Run CLI from source with `bun`** directly
|
|
1913
|
+
8. **Run CLI from source with `bun`** directly—no need for `tsx` or any TypeScript
|
|
1915
1914
|
execution wrapper.
|
|
1916
1915
|
|
|
1917
1916
|
9. **Consider `bun --compile`** for distributing CLI tools as standalone executables,
|
|
1918
1917
|
especially for users who don’t have Node.js or Bun installed.
|
|
1919
1918
|
|
|
1920
|
-
10. **Use `bun test`** for testing
|
|
1919
|
+
10. **Use `bun test`** for testing—fake timers are now supported (v1.3.4+). Switch to
|
|
1921
1920
|
Vitest only if you need test isolation, browser mode, or sharding.
|
|
1922
1921
|
|
|
1923
1922
|
11. **Keep the root `package.json` private** with `"private": true` and only workspace
|
|
@@ -1934,23 +1933,23 @@ gate yet, so enforce the 14-day cool-off with `bunx npm-check-updates --cooldown
|
|
|
1934
1933
|
15. **Add the `"bun"` export condition** to let Bun consumers import TypeScript source
|
|
1935
1934
|
directly, bypassing compiled output.
|
|
1936
1935
|
|
|
1937
|
-
16. **Use dynamic git-based versioning** for dev builds
|
|
1936
|
+
16. **Use dynamic git-based versioning** for dev builds—the pattern works identically
|
|
1938
1937
|
with Bun, and `bun` replaces `tsx` for script execution.
|
|
1939
1938
|
|
|
1940
|
-
17. **Use `biome ci`** in CI workflows instead of `biome check
|
|
1939
|
+
17. **Use `biome ci`** in CI workflows instead of `biome check`—it’s stricter and
|
|
1941
1940
|
produces cleaner output for CI logs.
|
|
1942
1941
|
|
|
1943
1942
|
18. **Consider ESM-only output** for Bun-native CLI tools and packages targeting modern
|
|
1944
1943
|
Node.js (>=22). Only add CJS if specific consumers require it.
|
|
1945
1944
|
|
|
1946
|
-
19. **Use flowmark** for Markdown formatting in pre-commit hooks
|
|
1945
|
+
19. **Use flowmark** for Markdown formatting in pre-commit hooks—Biome does not format
|
|
1947
1946
|
Markdown, and consistent Markdown formatting improves documentation quality.
|
|
1948
1947
|
|
|
1949
|
-
20. **Add golden/CLI tests** with `tryscript` alongside `bun test` for CLI tools
|
|
1948
|
+
20. **Add golden/CLI tests** with `tryscript` alongside `bun test` for CLI tools—they
|
|
1950
1949
|
catch regressions in help text, output formatting, and argument parsing.
|
|
1951
1950
|
|
|
1952
1951
|
21. **Consider tag-triggered OIDC releases** as an alternative to the Changesets GitHub
|
|
1953
|
-
Action
|
|
1952
|
+
Action—they provide npm provenance attestation and automatic GitHub Releases.
|
|
1954
1953
|
|
|
1955
1954
|
* * *
|
|
1956
1955
|
|
|
@@ -2000,7 +1999,7 @@ gate yet, so enforce the 14-day cool-off with `bunx npm-check-updates --cooldown
|
|
|
2000
1999
|
`@typescript/native-preview` (binary `tsgo`). Claims ~10x type-check speed and ~3x
|
|
2001
2000
|
less memory; passes 95%+ of the test suite.
|
|
2002
2001
|
Available in Visual Studio 2026 18.6 Insiders by default.
|
|
2003
|
-
**Do not adopt for production builds yet
|
|
2002
|
+
**Do not adopt for production builds yet**—wait for stable (expected mid-to-late
|
|
2004
2003
|
2026). May change the DTS generation landscape for Bunup and tsdown once stable.
|
|
2005
2004
|
|
|
2006
2005
|
9. **Bunup maturity**: Bunup is iterating rapidly (0.16.31 as of May 2026, up from 0.4.x
|
|
@@ -2024,7 +2023,7 @@ gate yet, so enforce the 14-day cool-off with `bunx npm-check-updates --cooldown
|
|
|
2024
2023
|
`--audit-level=<low|moderate|high|critical>` and `--json` output.
|
|
2025
2024
|
Should be a required CI check (see
|
|
2026
2025
|
[Supply-Chain Mitigation](#supply-chain-mitigation)). A `bun audit signatures`
|
|
2027
|
-
equivalent to npm’s signature verification has not yet shipped
|
|
2026
|
+
equivalent to npm’s signature verification has not yet shipped—monitor.
|
|
2028
2027
|
|
|
2029
2028
|
* * *
|
|
2030
2029
|
|
|
@@ -2112,7 +2111,7 @@ testing features.
|
|
|
2112
2111
|
|
|
2113
2112
|
- [publint Documentation](https://publint.dev/docs/)
|
|
2114
2113
|
|
|
2115
|
-
### Guides
|
|
2114
|
+
### Guides and Articles
|
|
2116
2115
|
|
|
2117
2116
|
- [Building a TypeScript Library in 2026 with Bunup](https://dev.to/arshadyaseen/building-a-typescript-library-in-2026-with-bunup-3bmg)
|
|
2118
2117
|
|
|
@@ -2304,10 +2303,10 @@ testing features.
|
|
|
2304
2303
|
[Supply-Chain Mitigation](#supply-chain-mitigation) policy.
|
|
2305
2304
|
Newer releases may exist (`@biomejs/biome` 2.4.15, `lefthook` 2.1.8,
|
|
2306
2305
|
`npm-check-updates` 22.2.0) but were too fresh at the time of this document update.
|
|
2307
|
-
- `"check:ci": "biome ci ."` uses `biome ci` (stricter than `biome check
|
|
2306
|
+
- `"check:ci": "biome ci ."` uses `biome ci` (stricter than `biome check`—errors on
|
|
2308
2307
|
formatting issues)
|
|
2309
2308
|
- `bun run --filter '*' <script>` delegates to each workspace package
|
|
2310
|
-
- The `@changesets/changelog-github` dependency is optional
|
|
2309
|
+
- The `@changesets/changelog-github` dependency is optional—use
|
|
2311
2310
|
`"changelog": "@changesets/cli/changelog"` in `.changeset/config.json` for a simpler
|
|
2312
2311
|
built-in changelog generator
|
|
2313
2312
|
- `npm-check-updates` v22+ is pure ESM. Add `--cooldown 14` to every invocation per the
|
|
@@ -2406,7 +2405,7 @@ testing features.
|
|
|
2406
2405
|
|
|
2407
2406
|
- `"organizeImports": { "enabled": true }` →
|
|
2408
2407
|
`"assist": { "actions": { "source": { "organizeImports": "on" } } }`
|
|
2409
|
-
- `"vcs"` configuration is new
|
|
2408
|
+
- `"vcs"` configuration is new—enables `.gitignore`-based file exclusion
|
|
2410
2409
|
- `"files.ignoreUnknown": true` prevents errors on unsupported file types
|
|
2411
2410
|
- `"files.includes"` with negation patterns replaces the old `"files.ignore"` array
|
|
2412
2411
|
(both still work, but `includes` with negation is more flexible)
|
|
@@ -2629,7 +2628,7 @@ export default defineConfig([
|
|
|
2629
2628
|
}
|
|
2630
2629
|
```
|
|
2631
2630
|
|
|
2632
|
-
### Appendix G: Case Study
|
|
2631
|
+
### Appendix G: Case Study—craft-agents-oss (Real-World Bun Monorepo)
|
|
2633
2632
|
|
|
2634
2633
|
**Repository**:
|
|
2635
2634
|
[lukilabs/craft-agents-oss](https://github.com/lukilabs/craft-agents-oss) (Apache 2.0,
|
|
@@ -2678,7 +2677,7 @@ craft-agents-oss/
|
|
|
2678
2677
|
|
|
2679
2678
|
**1. Source-Level Exports (No Build Step for Internal Consumption)**
|
|
2680
2679
|
|
|
2681
|
-
All internal packages export TypeScript source directly
|
|
2680
|
+
All internal packages export TypeScript source directly—no `dist/` directory:
|
|
2682
2681
|
|
|
2683
2682
|
```json
|
|
2684
2683
|
// packages/shared/package.json — 27 subpath exports
|
|
@@ -2745,10 +2744,10 @@ Changesets entirely for a private monorepo that distributes as a single Electron
|
|
|
2745
2744
|
|
|
2746
2745
|
Instead of Biome, this project uses ESLint with 4 custom rules:
|
|
2747
2746
|
|
|
2748
|
-
- `no-direct-navigation-state
|
|
2749
|
-
- `no-localstorage
|
|
2750
|
-
- `no-direct-platform-check
|
|
2751
|
-
- `no-hardcoded-path-separator
|
|
2747
|
+
- `no-direct-navigation-state`—enforces navigation state abstraction
|
|
2748
|
+
- `no-localstorage`—prevents browser localStorage usage (Bun incompatible)
|
|
2749
|
+
- `no-direct-platform-check`—enforces platform detection abstraction
|
|
2750
|
+
- `no-hardcoded-path-separator`—enforces cross-platform paths
|
|
2752
2751
|
|
|
2753
2752
|
This demonstrates that ESLint’s custom rule ecosystem remains valuable for
|
|
2754
2753
|
domain-specific architectural constraints that Biome cannot yet replicate.
|
|
@@ -2797,7 +2796,7 @@ The source-level exports pattern and TypeScript build scripts are directly appli
|
|
|
2797
2796
|
The hybrid esbuild/Vite approach is more relevant for Electron/full-stack apps than for
|
|
2798
2797
|
pure library packages where Bunup would be simpler.
|
|
2799
2798
|
|
|
2800
|
-
### Appendix H: Case Study
|
|
2799
|
+
### Appendix H: Case Study—clam (Published Bun CLI Monorepo)
|
|
2801
2800
|
|
|
2802
2801
|
**Repository**: [jlevy/clam](https://github.com/jlevy/clam) (MIT, shell-like interface
|
|
2803
2802
|
for Claude Code and other agents)
|
|
@@ -2866,7 +2865,7 @@ export default defineConfig([
|
|
|
2866
2865
|
```
|
|
2867
2866
|
|
|
2868
2867
|
Separate configs for library (with DTS) and CLI binary (with shebang, dependency
|
|
2869
|
-
bundling, no DTS). ESM-only output
|
|
2868
|
+
bundling, no DTS). ESM-only output—no CJS.
|
|
2870
2869
|
|
|
2871
2870
|
**2. Tag-Triggered OIDC Release with npm Provenance**
|
|
2872
2871
|
|
|
@@ -2897,7 +2896,7 @@ new Biome 2.x `"assist"` API for import organization.
|
|
|
2897
2896
|
The base config enables `isolatedDeclarations: true` (as recommended), but the package
|
|
2898
2897
|
overrides it to `false` because its types are complex enough to require the full
|
|
2899
2898
|
TypeScript compiler for DTS generation.
|
|
2900
|
-
This is a valid pattern
|
|
2899
|
+
This is a valid pattern—enable in the base, override in packages that need it.
|
|
2901
2900
|
|
|
2902
2901
|
#### What This Repo Uses
|
|
2903
2902
|
|