diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e7bdb26a..c84b63a0 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,4 +4,4 @@ ## How it was verified - + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 318b251e..f2c5faf0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -96,10 +96,15 @@ covers the architecture, tests and other scripts. 2. Make one logical change. One change per pull request and per commit. -3. Run the gate. `bun run check` must pass before and after your change: +3. Run the gate. These must pass before and after your change: ```sh - bun run check # lint, format check, typecheck, unit and integration tests + bun run lint + bun run format:check + bun run typecheck + bun run test # unit and integration tests + bun run pins:verify # pinned dependency versions + bun run vendor:verify # vendored Interchange matches its manifest ``` `bun run format` fixes formatting. Changes to the hub's API also need diff --git a/apps/hub/README.md b/apps/hub/README.md index e459a260..541dc5a3 100644 --- a/apps/hub/README.md +++ b/apps/hub/README.md @@ -32,8 +32,8 @@ use a few of its package exports. The hub needs a real Postgres and reads its settings from `.env.hub`, copied from `.env.hub.example`; [setup][setup] covers both. `bun run dev` migrates the database and starts the hub with the interface, and `bun run start` runs -the hub alone. `bun run check` runs lint, format, typechecks and tests; -`bun run test` runs the tests alone. The +the hub alone. `bun run lint`, `bun run format:check`, `bun run typecheck` +and `bun run test` check it. The [Interchange docs map][interchange-docs] lists the Interchange doc for each area; read it before building on one. diff --git a/apps/web/README.md b/apps/web/README.md index 757028c9..b2337093 100644 --- a/apps/web/README.md +++ b/apps/web/README.md @@ -31,8 +31,8 @@ serves the built `dist/` on its own origin. `bun run dev` starts the hub and this interface with live reload; the dev server reads `UI_PORT` and `UI_HUB_ORIGIN` from `.env.web`, copied from `.env.web.example`. Put new user-visible wording in `src/config.ts`. -`bun run check` lints, formats, typechecks and tests it with the rest of the -repo. Setup is in [CONTRIBUTING.md][setup]. +`bun run lint`, `bun run format:check`, `bun run typecheck` and `bun run test` +check it with the rest of the repo. Setup is in [CONTRIBUTING.md][setup]. [client]: https://github.com/corbitsdev/corbits-builder/tree/main/packages/client [schemas]: https://github.com/corbitsdev/corbits-builder/tree/main/packages/schemas diff --git a/docs/DEV.md b/docs/DEV.md index 83e28b08..a8fb268c 100644 --- a/docs/DEV.md +++ b/docs/DEV.md @@ -55,9 +55,13 @@ lives under `HUB_DATA_DIR` (`data/hub`). Docker sidecars are optional ## Tests ```sh -bun run check # lint, format check, typecheck, unit and integration tests -bun run test # unit and integration tests only -bun run test:e2e # the API end to end against an isolated Postgres +bun run lint +bun run format:check +bun run typecheck +bun run test # unit and integration tests +bun run pins:verify # pinned dependency versions +bun run vendor:verify # vendored Interchange matches its manifest +bun run test:e2e # the API end to end against an isolated Postgres ``` `bun run test:e2e` reads the `E2E_DB_*` values from `.env.hub`. Start its diff --git a/package.json b/package.json index cc054002..a58655f5 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,6 @@ "docker:sidecar": "docker build -f deploy/Dockerfile --target sidecar -t corbits-builder-sidecar:local .", "auth:bootstrap": "bun --env-file=.env.hub --conditions=intx-src apps/hub/src/setup.ts", "auth:emulate": "bun --env-file=.env.hub scripts/google-emulate.ts", - "check": "bun run lint && bun run format:check && bun run typecheck && bun run test && bun run pins:verify", "lint": "bun --bun run oxlint --deny-warnings", "format": "bun fmt --no-script", "format:check": "bun fmt --no-script --check", diff --git a/packages/client/README.md b/packages/client/README.md index 0243bb2b..d38b0ef8 100644 --- a/packages/client/README.md +++ b/packages/client/README.md @@ -21,7 +21,7 @@ This package is a client boundary. It imports only ## Working on it Add a method beside the area it belongs to and keep request and response -shapes in `packages/schemas`. `bun run check` typechecks this +shapes in `packages/schemas`. `bun run typecheck` checks this workspace with the others; the API itself is proven against a running hub, as [DEV.md][dev] describes. diff --git a/packages/schemas/README.md b/packages/schemas/README.md index 27f732db..d2f72921 100644 --- a/packages/schemas/README.md +++ b/packages/schemas/README.md @@ -35,8 +35,8 @@ internal building blocks of the exported ones. ## Working on it A change here changes a wire or storage shape, so update the hub and the -client in the same change. `bun run check` typechecks every importer and -runs the tests. +client in the same change. `bun run typecheck` checks every importer and +`bun run test` runs the tests. [hub]: https://github.com/corbitsdev/corbits-builder/tree/main/apps/hub [client]: https://github.com/corbitsdev/corbits-builder/tree/main/packages/client diff --git a/workflows/coder/README.md b/workflows/coder/README.md index 2191346c..bf2e469d 100644 --- a/workflows/coder/README.md +++ b/workflows/coder/README.md @@ -40,7 +40,7 @@ workspace, `install_packages`, `app_status`, a headless browser, Exa search, The starter pins `@corbits/react-ui` to the same version as this package's dev dependency; the digest fails the bundle when they differ. A defect in generated apps is fixed here, in the starter, prompt or check scripts, or in -the hub's tools. `bun run check` typechecks and tests it, and `bun run dev` +the hub's tools. `bun run typecheck` and `bun run test` cover it, and `bun run dev` runs it in a real project. [package]: https://github.com/corbitsdev/corbits-builder/blob/main/apps/hub/src/workflows/coder-package.ts diff --git a/workflows/coordinator/README.md b/workflows/coordinator/README.md index 310f869d..5741fff7 100644 --- a/workflows/coordinator/README.md +++ b/workflows/coordinator/README.md @@ -31,7 +31,7 @@ the hub's: ## Working on it -Prompt conventions are in [AGENTS.md][agents]. `bun run check` typechecks and tests it, and +Prompt conventions are in [AGENTS.md][agents]. `bun run typecheck` and `bun run test` cover it, and `bun run dev` runs it in a real project. [entry]: https://github.com/corbitsdev/corbits-builder/blob/main/apps/hub/src/workflows/entries/coordinator.ts diff --git a/workflows/designer/README.md b/workflows/designer/README.md index 0da6a17c..7d7a4e25 100644 --- a/workflows/designer/README.md +++ b/workflows/designer/README.md @@ -36,8 +36,8 @@ and skills through its macros. ## Working on it The design contract the coder relies on is the starter's `DESIGN.md` and -token names; change them together with the [coder][coder]. `bun run check` -typechecks and tests it, and `bun run dev` runs it in a real project. +token names; change them together with the [coder][coder]. `bun run typecheck` and `bun run test` cover it, and `bun run dev` runs it in a +real project. [entry]: https://github.com/corbitsdev/corbits-builder/blob/main/apps/hub/src/workflows/entries/designer.ts [coordinator]: https://github.com/corbitsdev/corbits-builder/tree/main/workflows/coordinator diff --git a/workflows/reviewer/README.md b/workflows/reviewer/README.md index e1f03541..43d27ed1 100644 --- a/workflows/reviewer/README.md +++ b/workflows/reviewer/README.md @@ -24,8 +24,8 @@ the problem brief and the document to review in full. ## Working on it Prompt conventions are in [AGENTS.md][agents]. -`bun run check` typechecks and tests it, and `bun run dev` runs it in a real -project. +`bun run typecheck` and `bun run test` cover it, and `bun run dev` runs it in a +real project. [entry]: https://github.com/corbitsdev/corbits-builder/blob/main/apps/hub/src/workflows/entries/reviewer.ts [coordinator]: https://github.com/corbitsdev/corbits-builder/tree/main/workflows/coordinator diff --git a/workflows/writer/README.md b/workflows/writer/README.md index c66995ea..266430fd 100644 --- a/workflows/writer/README.md +++ b/workflows/writer/README.md @@ -31,8 +31,8 @@ needs in full. ## Working on it What a document should contain lives in its skill rather than the prompt; -prompt conventions are in [AGENTS.md][agents]. `bun run check` typechecks -and tests it, and `bun run dev` runs it in a real project. +prompt conventions are in [AGENTS.md][agents]. `bun run typecheck` and `bun run test` cover it, and `bun run dev` runs it in a +real project. [entry]: https://github.com/corbitsdev/corbits-builder/blob/main/apps/hub/src/workflows/entries/writer.ts [coordinator]: https://github.com/corbitsdev/corbits-builder/tree/main/workflows/coordinator