diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 01eebc4..9e9bb8a 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -37,7 +37,7 @@ Copyright (c) Jonathan D.A. Jewell ## Banned Languages - No TypeScript (use ReScript) -- No Node.js / npm / bun (use Deno) +- No Node.js / npm (use Bun first) - No Go (use Rust) - No Python (use Julia or Rust) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b4d5ec6..8674e35 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" @@ -35,9 +41,14 @@ updates: # Node.js/npm - package-ecosystem: "npm" directory: "/" - schedule: - interval: "weekly" - open-pull-requests-limit: 3 + multi-ecosystem-group: "js-locks" + patterns: ["*"] + + # Bun (bun.lock): in the js-locks group with npm, so one PR moves package.json and bun.lock together + - package-ecosystem: "bun" + directory: "/" + multi-ecosystem-group: "js-locks" + patterns: ["*"] # Python/pip - package-ecosystem: "pip" diff --git a/.machine_readable/MUST.contractile b/.machine_readable/MUST.contractile index 48ffff1..348b6cc 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 npm/yarn dependencies — Bun first, with pnpm as fallback") ; Dangerous patterns (must "no believe_me (Idris2)") diff --git a/.machine_readable/ai/.clinerules b/.machine_readable/ai/.clinerules index 854d2ee..1acdccd 100644 --- a/.machine_readable/ai/.clinerules +++ b/.machine_readable/ai/.clinerules @@ -25,7 +25,7 @@ # BANNED LANGUAGES # TypeScript -> ReScript -# Node.js / npm / bun -> Deno +# Node.js / npm / yarn / Deno -> Bun (Bun first) # Go -> Rust # Python -> Julia or Rust diff --git a/.machine_readable/ai/.windsurfrules b/.machine_readable/ai/.windsurfrules index 854d2ee..1acdccd 100644 --- a/.machine_readable/ai/.windsurfrules +++ b/.machine_readable/ai/.windsurfrules @@ -25,7 +25,7 @@ # BANNED LANGUAGES # TypeScript -> ReScript -# Node.js / npm / bun -> Deno +# Node.js / npm / yarn / Deno -> Bun (Bun first) # Go -> Rust # Python -> Julia or Rust 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..e056aa9 --- /dev/null +++ b/bun.lock @@ -0,0 +1,15 @@ +{ + "lockfileVersion": 2, + "configVersion": 1, + "workspaces": { + "": { + "name": "rattlescript", + "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/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..e373cc1 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "devDependencies": { + "prettier": "3.10.1" + }, + "license": "MPL-2.0", + "name": "rattlescript", + "private": true +}