From 0be389482b0ea37cd7d1c0bfda93db21b39bb950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D7=A0=CF=85=CE=B1=CE=B7=20=D7=A0=CF=85=CE=B1=CE=B7=D1=95?= =?UTF-8?q?=CF=83=CE=B7?= Date: Sat, 15 Aug 2026 20:11:33 -0700 Subject: [PATCH] refactor(just)!: convert just to a flat module BREAKING CHANGE: just.mod.just is removed and recipes are renamed from just::fmt to just-fmt. Consumers import just/just.just. Redone against current main rather than rebasing the earlier branch, which predated the */.just/* exclusion and would have regressed it. This is the last module: every one now lives in its own directory with a README, and no .mod.just shim remains. Applies converge-justfile-consumption task 1.1. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/just-lint.yml | 2 +- README.md | 5 ++--- just.mod.just | 3 --- just/README.md | 39 +++++++++++++++++++++++++++++++++ just.just => just/just.just | 4 ++-- justfile | 4 ++-- 6 files changed, 46 insertions(+), 11 deletions(-) delete mode 100644 just.mod.just create mode 100644 just/README.md rename just.just => just/just.just (98%) diff --git a/.github/workflows/just-lint.yml b/.github/workflows/just-lint.yml index d998550..a068ef1 100644 --- a/.github/workflows/just-lint.yml +++ b/.github/workflows/just-lint.yml @@ -15,4 +15,4 @@ jobs: - name: Install just uses: extractions/setup-just@v4 - name: Lint justfiles - run: just --justfile just.just --working-directory . fmt-check + run: just --justfile just/just.just --working-directory . just-fmt-check diff --git a/README.md b/README.md index 05574c7..b0e533a 100644 --- a/README.md +++ b/README.md @@ -92,11 +92,10 @@ Modules are moving into their own directories, each documenting itself: | `docusaurus` | Docusaurus site build, serve, deploy, formatting | [docusaurus/README.md](docusaurus/README.md) | | `go` | Go build, test, coverage gate, format, lint | [go/README.md](go/README.md) | | `md` | Repository markdown formatting (mdformat via uvx) | [md/README.md](md/README.md) | +| `just` | Justfile formatting | [just/README.md](just/README.md) | | `react` | React app build, lint, format, SDK codegen (Bun) | [react/README.md](react/README.md) | -Modules not yet moved are documented inline below. - -### just.just +## just.just | Recipe | Description | | ----------- | --------------------------------------- | diff --git a/just.mod.just b/just.mod.just deleted file mode 100644 index d3dd51c..0000000 --- a/just.mod.just +++ /dev/null @@ -1,3 +0,0 @@ -set working-directory := '../..' - -import? 'just.just' diff --git a/just/README.md b/just/README.md new file mode 100644 index 0000000..e753dba --- /dev/null +++ b/just/README.md @@ -0,0 +1,39 @@ +# just.just + +Formats and checks the justfiles in a repository, using just's own formatter. + +## 📦 Usage + +`just.just` is consumed with `import?`. Its recipes are flat and prefixed, so it +needs no `.mod.just` shim. + +```just +import? '.just/remote/just.just' + +# Fetch shared justfiles from osapi-justfiles +fetch: + mkdir -p .just/remote + curl -sSfL https://raw.githubusercontent.com/osapi-io/osapi-justfiles/refs/heads/main/just/just.just -o .just/remote/just.just +``` + +Then: + +```bash +just fetch # Download the shared recipe file +just just-fmt # Reformat every justfile in the repository +just just-fmt-check # Check formatting, non-zero exit on drift +``` + +## 🔍 What it covers + +Every `justfile` and `*.just` in the repository, except: + +| Skipped | Why | +| -------------- | -------------------------------------------------------------- | +| `**/.just/*` | fetched modules, at any depth — they belong to this repository | +| `.worktrees/*` | checkouts of other branches | +| `.claude/*` | generated and regenerated by tooling | + +## 📄 License + +The [MIT](../LICENSE) License. diff --git a/just.just b/just/just.just similarity index 98% rename from just.just rename to just/just.just index b72ad87..69d4cda 100644 --- a/just.just +++ b/just/just.just @@ -18,7 +18,7 @@ # Reformat justfiles with canonical style [group('fmt')] -fmt: +just-fmt: #!/usr/bin/env bash set -euo pipefail find . -type f \( -name '*.just' -o -name 'justfile' \) ! -path './.worktrees/*' ! -path './.claude/*' ! -path '*/.just/*' | while read -r f; do @@ -27,7 +27,7 @@ fmt: # Check justfile formatting [group('fmt')] -fmt-check: +just-fmt-check: #!/usr/bin/env bash set -euo pipefail failed=0 diff --git a/justfile b/justfile index 4d6321d..ae3f109 100644 --- a/justfile +++ b/justfile @@ -2,8 +2,8 @@ # Check justfile formatting test: - just --justfile just.just --working-directory . fmt-check + just --justfile just/just.just --working-directory . just-fmt-check # Format and lint before committing ready: - just --justfile just.just --working-directory . fmt + just --justfile just/just.just --working-directory . just-fmt