diff --git a/.machine_readable/root-allow.txt b/.machine_readable/root-allow.txt index 25e49a48..f19cf07a 100644 --- a/.machine_readable/root-allow.txt +++ b/.machine_readable/root-allow.txt @@ -1,2 +1,9 @@ .hypatia-ignore CLAUDE.md + +# ─── JS manifest and locks (LANGUAGE-POLICY §1.4) ─────────────────────────── +package.json # JCS-canonical manifest; pins JS tooling (LANGUAGE-POLICY §1.4) +bun.lock # tier-1 lock, required (LANGUAGE-POLICY §1.4) +deno.lock # generated compatibility lock (LANGUAGE-POLICY §1.4) +pnpm-lock.yaml # generated compatibility lock (LANGUAGE-POLICY §1.4) +.prettierignore # keeps Prettier off the JCS package.json and pnpm-lock.yaml; Prettier reads it from the root diff --git a/.mise.toml b/.mise.toml index bda9d2e6..1ccde07d 100644 --- a/.mise.toml +++ b/.mise.toml @@ -3,6 +3,7 @@ # = "asdf version management" # = "Run asdf install to install all tools" # = "Primary runtime" +bun = "latest" deno = "2.1.4" zig = "0.13.0" # = "Language runtimes" diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..2117be21 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,14 @@ +# package.json is JCS-canonical and pnpm-lock.yaml is tool-generated (LANGUAGE-POLICY §1.4). +# Prettier must not reformat them. +package.json +pnpm-lock.yaml + +# Vendored, generated or estate-stamped content has no Prettier baseline: +# reformatting it would diverge from its source of truth. +alkahest-shell-transmuter/ +proofs/lean4/lake-manifest.json +.github/ +.claude/ +docs/wiki/ +docs/*.md +CLAUDE.md diff --git a/bun.lock b/bun.lock new file mode 100644 index 00000000..48a18364 --- /dev/null +++ b/bun.lock @@ -0,0 +1,15 @@ +{ + "lockfileVersion": 2, + "configVersion": 1, + "workspaces": { + "": { + "name": "valence-shell", + "devDependencies": { + "prettier": "3.10.1", + }, + }, + }, + "packages": { + "prettier": ["prettier@3.10.1", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-70vp3ZUYoPlFbF9uiTdXHUUCGEIp7d4+6p+8DYbkm2jP7x/3i/paXVF6dopSI3zd/CEitrZN1rc4i85xWmmXlg=="], + } +} diff --git a/deno.lock b/deno.lock new file mode 100644 index 00000000..245355dc --- /dev/null +++ b/deno.lock @@ -0,0 +1,19 @@ +{ + "version": "5", + "specifiers": { + "npm:prettier@3.10.1": "3.10.1" + }, + "npm": { + "prettier@3.10.1": { + "integrity": "sha512-70vp3ZUYoPlFbF9uiTdXHUUCGEIp7d4+6p+8DYbkm2jP7x/3i/paXVF6dopSI3zd/CEitrZN1rc4i85xWmmXlg==", + "bin": true + } + }, + "workspace": { + "packageJson": { + "dependencies": [ + "npm:prettier@3.10.1" + ] + } + } +} diff --git a/mise.toml b/mise.toml index 6dd983f6..27c4ce55 100644 --- a/mise.toml +++ b/mise.toml @@ -1,34 +1,21 @@ [tools] # Language runtimes -node = "latest" -python = "latest" rust = "latest" -go = "latest" zig = "latest" -java = "latest" bun = "latest" denojs = "latest" # Package managers -npm = "latest" -yarn = "latest" pnpm = "latest" -pip = "latest" cargo = "latest" go-task = "latest" # Formatting & Linting -gofmt = "latest" -black = "latest" -isort = "latest" -ruff = "latest" -prettier = "latest" shfmt = "latest" stylua = "latest" # Build tools cmake = "latest" -make = "latest" ninja = "latest" # Shell tools @@ -38,20 +25,29 @@ gnu-tar = "latest" gnu-grep = "latest" # Testing -vitest = "latest" -pytest = "latest" -jest = "latest" [env] # Common environment variables -NODE_ENV = "development" -PYTHONDONTWRITEBYTECODE = "1" -PYTHONUNBUFFERED = "1" # Task runner alias [alias] task = "go-task" -build = "cargo build --release || npm run build || go build" -test = "cargo test || npm test || go test ./..." -lint = "ruff check . || prettier --check . || black --check ." -fmt = "ruff format . || prettier --write . || black ." + +# Runnable commands (the [alias] table is for tool-version aliases only) +[tasks.build] +description = "Build the Rust CLI" +dir = "impl/rust-cli" +run = "cargo build --release" + +[tasks.test] +description = "Test the Rust CLI" +dir = "impl/rust-cli" +run = "cargo test" + +[tasks.lint] +description = "Check formatting with the pinned Prettier" +run = "bun install --frozen-lockfile && bunx --no-install --bun prettier --check ." + +[tasks.fmt] +description = "Format with the pinned Prettier" +run = "bun install --frozen-lockfile && bunx --no-install --bun prettier --write ." diff --git a/package.json b/package.json new file mode 100644 index 00000000..401960b4 --- /dev/null +++ b/package.json @@ -0,0 +1 @@ +{"devDependencies":{"prettier":"3.10.1"},"license":"MPL-2.0","name":"valence-shell","private":true} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 00000000..2d39affb --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,24 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + prettier: + specifier: 3.10.1 + version: 3.10.1 + +packages: + + prettier@3.10.1: + resolution: {integrity: sha512-70vp3ZUYoPlFbF9uiTdXHUUCGEIp7d4+6p+8DYbkm2jP7x/3i/paXVF6dopSI3zd/CEitrZN1rc4i85xWmmXlg==} + engines: {node: '>=14'} + hasBin: true + +snapshots: + + prettier@3.10.1: {}