- This repo uses Bun as the package manager (
bun install,bun run, etc.) - Workspace deps use
workspace:*protocol - Use catalog for any potentially common dependencies
- CI workflows use
bun runto execute scripts andbunxfor one-off commands
- Write any scripts which may end up being saved in TypeScript (
.ts), not JavaScript- throwaway/one-off code is fine in JS
- Execute scripts using
bun run, notnode- e.g.
bun run scripts/release-preview.ts - Bun runs
.tsfiles natively — no compile step needed
- e.g.
- Scripts in
scripts/at the repo root are monorepo-level utilities, while specific packages may have their ownscriptsfolder
- The varlock CLI binary is built using
bun build --compile(not Node SEA or pkg) bun run --filter varlock build:binarybuilds a local dev binary for the current platform atpackages/varlock/dist-sea/varlockpackages/varlock/scripts/build-binaries.tsbuilds cross-platform release binaries (or use--current-platformfor a single local binary)
- Unit/integration tests use Vitest
- Smoke tests live in
smoke-tests/and test the CLI end-to-end - Binary-specific tests in
smoke-tests/tests/binary.test.tsrequire the SEA binary to be built first
- This monorepo uses bumpy (
@varlock/bumpy) for version management - Changeset files live in
.bumpy/and are created withbunx @varlock/bumpy add(orbun run bumpy:add) - Standard bump types:
major,minor,patch - Isolated bump types:
minor-isolatedandpatch-isolatedare natively supported- These suppress dependency propagation — the package itself gets bumped but dependents are not automatically bumped
- Use
minor-isolatedfor minor bumps that don't affect the library API consumed by dependents (e.g., CLI-only features invarlockthat plugins/integrations don't depend on). This is the most common use case — because all packages are still on0.x,^0.y.zranges treat minor bumps as out-of-range, which would otherwise cascade bumps to all dependents. patch-isolatedexists but is rarely needed — patch bumps on0.xstay within^ranges and don't cascademajor-isolatedis intentionally not supported (major bumps must propagate to keep semver ranges valid)
- Non-interactive changeset creation (for CI/AI):
bumpy add --packages "pkg:minor" --message "description" --name "changeset-name"
- Run
bun run lint:fixfrom the repo root after completing a significant chunk of work (new feature, refactor, bug fix, etc.) - The linter uses ESLint with
@stylisticand other plugins — auto-fix handles most formatting issues - Do not leave lint errors unresolved; fix any that
--fixcannot handle automatically