diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index ec75f13..dcd2fe5 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -15,7 +15,7 @@ This repo follows the hyperpolymath standard. See `https://github.com/hyperpolym The full policy is canonical in `hyperpolymath/standards`. Key points: - **AffineScript** - Primary application code (compiles to typed-wasm) -- **Deno** - Runtime & package management (replaces Node/npm/bun) +- **Bun** - Runtime & package management, tier 1 (replaces Node/yarn; Deno, pnpm, npm as fallbacks) - **Rust/SPARK** - Performance-critical, systems, WASM, CLI tools - **Zig** - FFI layer, memory-safe systems - **Idris2** - Formal verification @@ -30,7 +30,7 @@ The full policy is canonical in `hyperpolymath/standards`. Key points: ### BANNED - TypeScript (use AffineScript) -- Node.js (use Deno) +- Node.js (use Bun) - Go (use Rust) - Python (general, except SaltStack) - Java/Kotlin/Swift (use Rust/Tauri/Dioxus) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index eb05fcc..31f695b 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -36,8 +36,8 @@ Copyright (c) Jonathan D.A. Jewell ## Banned Languages -- No TypeScript (use ReScript) -- No Node.js / npm / bun (use Deno) +- No TypeScript (use AffineScript) +- No Node.js / yarn (use Bun first; Deno, pnpm, npm as fallbacks) - No Go (use Rust) - No Python (use Julia or Rust) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b4d5ec6..7434ce1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,6 +3,12 @@ # Covers common ecosystems - remove unused ones for your project version: 2 + +multi-ecosystem-groups: + js-locks: + schedule: + interval: "weekly" + open-pull-requests-limit: 3 updates: # GitHub Actions - always include - package-ecosystem: "github-actions" @@ -32,12 +38,11 @@ updates: interval: "weekly" open-pull-requests-limit: 3 - # Node.js/npm - - package-ecosystem: "npm" + # Bun (bun.lock): in the js-locks group, so one PR moves package.json and bun.lock together (no npm entry: no npm lockfile here) + - package-ecosystem: "bun" directory: "/" - schedule: - interval: "weekly" - open-pull-requests-limit: 3 + multi-ecosystem-group: "js-locks" + patterns: ["*"] # Python/pip - package-ecosystem: "pip" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 5c32b02..8492656 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -21,7 +21,7 @@ Copyright (c) Jonathan D.A. Jewell - [ ] Tests pass (`just test` or equivalent) - [ ] Code is formatted (`just fmt` or equivalent) - [ ] Linter is clean (no new warnings or errors) -- [ ] No banned language patterns (no TypeScript, no npm/bun, no Go/Python) +- [ ] No banned language patterns (no TypeScript, no Node.js/yarn (Bun first; Deno, pnpm, npm as fallbacks), no Go/Python) - [ ] No `unsafe` blocks without `// SAFETY:` comments - [ ] No banned functions (`believe_me`, `unsafeCoerce`, `Obj.magic`, `Admitted`, `sorry`) - [ ] SPDX license headers present on all new/modified source files diff --git a/.machine_readable/6a2/anchor/ANCHOR.a2ml b/.machine_readable/6a2/anchor/ANCHOR.a2ml index 02644a3..e15763b 100644 --- a/.machine_readable/6a2/anchor/ANCHOR.a2ml +++ b/.machine_readable/6a2/anchor/ANCHOR.a2ml @@ -35,7 +35,7 @@ owns = [ [implementation-policy] allowed = ["Rust", "Idris2", "Zig", "Scheme", "Shell", "Just", "AsciiDoc", "Markdown"] -forbidden = ["Node.js", "npm"] +forbidden = ["Node.js", "yarn"] [golden-path] smoke-test-command = [ diff --git a/.machine_readable/MUST.contractile b/.machine_readable/MUST.contractile index 48ffff1..3f06033 100644 --- a/.machine_readable/MUST.contractile +++ b/.machine_readable/MUST.contractile @@ -46,7 +46,7 @@ (must "no new TypeScript files") (must "no new Python files") (must "no new Go files") - (must "no npm/bun/yarn/pnpm dependencies — Deno only") + (must "no Node.js/yarn dependencies — Bun first; Deno, pnpm, npm as fallbacks") ; Dangerous patterns (must "no believe_me (Idris2)") diff --git a/.machine_readable/ai/.clinerules b/.machine_readable/ai/.clinerules index f9ec408..a9d8c01 100644 --- a/.machine_readable/ai/.clinerules +++ b/.machine_readable/ai/.clinerules @@ -24,8 +24,8 @@ # Rust: transmute (unless FFI with // SAFETY: comment) # BANNED LANGUAGES -# TypeScript -> ReScript -# Node.js / npm / bun -> Deno +# TypeScript -> AffineScript +# Node.js / yarn -> Bun first; Deno, pnpm, npm as fallbacks # Go -> Rust # Python -> Julia or Rust diff --git a/.machine_readable/ai/.cursorrules b/.machine_readable/ai/.cursorrules index abfca22..3fd3249 100644 --- a/.machine_readable/ai/.cursorrules +++ b/.machine_readable/ai/.cursorrules @@ -23,8 +23,8 @@ # Rust: transmute (unless FFI with // SAFETY: comment) # BANNED LANGUAGES -# TypeScript -> use ReScript -# Node.js / npm / bun -> use Deno +# TypeScript -> use AffineScript +# Node.js / yarn -> use Bun first; Deno, pnpm, npm as fallbacks # Go -> use Rust # Python -> use Julia or Rust diff --git a/.machine_readable/ai/.windsurfrules b/.machine_readable/ai/.windsurfrules index f9ec408..a9d8c01 100644 --- a/.machine_readable/ai/.windsurfrules +++ b/.machine_readable/ai/.windsurfrules @@ -24,8 +24,8 @@ # Rust: transmute (unless FFI with // SAFETY: comment) # BANNED LANGUAGES -# TypeScript -> ReScript -# Node.js / npm / bun -> Deno +# TypeScript -> AffineScript +# Node.js / yarn -> Bun first; Deno, pnpm, npm as fallbacks # Go -> Rust # Python -> Julia or Rust diff --git a/.machine_readable/anchors/ANCHOR.a2ml b/.machine_readable/anchors/ANCHOR.a2ml index 02644a3..e15763b 100644 --- a/.machine_readable/anchors/ANCHOR.a2ml +++ b/.machine_readable/anchors/ANCHOR.a2ml @@ -35,7 +35,7 @@ owns = [ [implementation-policy] allowed = ["Rust", "Idris2", "Zig", "Scheme", "Shell", "Just", "AsciiDoc", "Markdown"] -forbidden = ["Node.js", "npm"] +forbidden = ["Node.js", "yarn"] [golden-path] smoke-test-command = [ diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..49c40e2 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: MPL-2.0 +# package.json is JCS-canonical (LANGUAGE-POLICY §1.4); Prettier must not reformat it. +package.json diff --git a/bun.lock b/bun.lock new file mode 100644 index 0000000..d371edc --- /dev/null +++ b/bun.lock @@ -0,0 +1,15 @@ +{ + "lockfileVersion": 2, + "configVersion": 1, + "workspaces": { + "": { + "name": "jaffascript", + "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/docs/RSR_OUTLINE.adoc b/docs/RSR_OUTLINE.adoc index 409e430..7acc316 100644 --- a/docs/RSR_OUTLINE.adoc +++ b/docs/RSR_OUTLINE.adoc @@ -222,10 +222,10 @@ project/ === Prohibited * Python outside `salt/` directory -* TypeScript/JavaScript (use ReScript) +* TypeScript/JavaScript (use AffineScript) * CUE (use Guile/Nickel) * `Dockerfile` (use `Containerfile`) -* npm, Bun, pnpm, yarn (use Deno) +* Node.js, yarn (use Bun first; Deno, pnpm, npm as fallbacks) * Go (use Rust) == STATE.a2ml diff --git a/docs/practice/AI-CONVENTIONS.adoc b/docs/practice/AI-CONVENTIONS.adoc index f5d52fb..ac56215 100644 --- a/docs/practice/AI-CONVENTIONS.adoc +++ b/docs/practice/AI-CONVENTIONS.adoc @@ -55,8 +55,8 @@ MAINTENANCE-CHECKLIST.a2ml, or SOFTWARE-DEVELOPMENT-APPROACH.a2ml in the reposit | Banned | Use Instead | |---------------------|--------------------| -| TypeScript | ReScript | -| Node.js / npm / bun | Deno | +| TypeScript | AffineScript | +| Node.js / yarn | Bun (tier 1); Deno, pnpm, npm as fallbacks | | Go | Rust | | Python | Julia / Rust | diff --git a/mise.toml b/mise.toml index 6dd983f..7302715 100644 --- a/mise.toml +++ b/mise.toml @@ -1,34 +1,20 @@ [tools] # Language runtimes -node = "latest" -python = "latest" rust = "latest" -go = "latest" zig = "latest" -java = "latest" -bun = "latest" -denojs = "latest" +bun = "1.4" # 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 +24,20 @@ 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 ." + +[tasks.setup] +description = "Install pinned JS dev tools (Prettier) from bun.lock" +run = "bun install --frozen-lockfile" + +[tasks.lint] +run = "bun install --frozen-lockfile && bunx --no-install --bun prettier --check ." + +[tasks.fmt] +run = "bun install --frozen-lockfile && bunx --no-install --bun prettier --write ." diff --git a/package.json b/package.json new file mode 100644 index 0000000..2756612 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "devDependencies": { + "prettier": "3.10.1" + }, + "license": "MPL-2.0", + "name": "jaffascript", + "private": true +}