Skip to content
This repository was archived by the owner on Oct 28, 2026. It is now read-only.

build: move to a Turborepo monorepo with Bun and Ultracite - #3

Merged
PunGrumpy merged 20 commits into
mainfrom
chore/turborepo-bun
Sep 29, 2026
Merged

PunGrumpy merged 20 commits into
mainfrom
chore/turborepo-bun

Conversation

@PunGrumpy

@PunGrumpy PunGrumpy commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Description

Turn the repo into a Turborepo monorepo so the object graph web app can sit next to the CLI later.

  • The Go module moves to apps/cli with the module path github.com/PunGrumpy/plumb/apps/cli. Turborepo reads it through go.work with experimentalGoWorkspaces, so it shows up as the cli package.

  • Bun replaces npm. Workspaces are apps/* and packages/*.

  • Changesets ignores the root package once it has workspaces, so the version and CHANGELOG.md move to apps/cli/package.json. The changeset name is still plumb.

  • check and fix are the same tasks across the repo:

    Task cli (Go) root (Ultracite)
    turbo run check make vet (gofmt -l and go vet) ultracite check (oxlint and oxfmt)
    turbo run fix go fmt ./... ultracite fix

    bun run check and bun run fix stay as Ultracite only, because they are the bodies of the root tasks and the husky and Claude hooks call them.

  • test runs go test -race, and its hash includes docs/troubleshooting.md, which TestEveryCodeIsDocumented reads.

  • .github follows vercel/turborepo: a setup-environment composite action, a PR title lint, issue forms, a PR template and CODEOWNERS. The Changesets PR is now titled chore: version packages so it passes the title lint.

  • brand/README.md and every guide in docs/ are translated to English, one commit per page. The ### `code` headings in troubleshooting.md stay the same, because plumb explain links to them.

  • apps/cli/package.json is marked MIT. There is no LICENSE file yet.

Testing Instructions

bun install
bun turbo run check test build

Run it again and every task should come from the cache. Then check the binaries and the release build:

make -C apps/cli build dist
./apps/cli/bin/plumb demo
goreleaser build --snapshot --clean --single-target

Each commit passes go vet and go test in apps/cli.

Make room for more apps and shared packages next to the CLI. The module
path becomes github.com/PunGrumpy/plumb/apps/cli so go install resolves
it from its new directory.
Turborepo reads the Go module through go.work, so build, test and check
run with caching from the repo root. Bun replaces npm for the dev tools.

Changesets ignores the root package once it has workspaces, so the
version and CHANGELOG.md move to apps/cli/package.json.
Ultracite runs oxlint and oxfmt as root tasks next to the Go check and
fix tasks, so turbo run check and turbo run fix cover the whole repo. A
husky pre-commit hook fixes staged files before each commit.
Both workflows set up Bun and install dependencies the same way. The
action also reads the Bun version from packageManager in package.json.
Squash merges use the PR title as the commit message, so check it
against the same conventional types as the history. The Changesets
version PR gets a title that passes the check.
Bug reports ask for plumb version, plumb doctor output and an optional
--record directory, which is what a trace needs to be replayed.
@changeset-bot

changeset-bot Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ebd7135

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@PunGrumpy
PunGrumpy merged commit dfbc06a into main Sep 29, 2026
5 of 6 checks passed
@PunGrumpy
PunGrumpy deleted the chore/turborepo-bun branch September 29, 2026 08:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant