diff --git a/.clusterfuzzlite/Dockerfile b/.clusterfuzzlite/Dockerfile new file mode 120000 index 0000000..5240dc0 --- /dev/null +++ b/.clusterfuzzlite/Dockerfile @@ -0,0 +1 @@ +Containerfile \ No newline at end of file diff --git a/.machine_readable/MUST.contractile b/.machine_readable/MUST.contractile index 699ec6b..e6b2fcc 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/.prettierignore b/.prettierignore new file mode 100644 index 0000000..71e79a1 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +# package.json is JCS-canonical (LANGUAGE-POLICY §1.4). +# Prettier must not reformat it. +package.json diff --git a/.sonarcloud.properties b/.sonarcloud.properties new file mode 100644 index 0000000..c4d4e59 --- /dev/null +++ b/.sonarcloud.properties @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: MPL-2.0 +# SonarCloud automatic analysis settings. +# +# Exclude the ClusterFuzzLite build image from analysis. It builds on the +# OSS-Fuzz base-builder image, which runs as root and needs the whole source +# tree copied in (COPY . $SRC/zerostep). Both are required by ClusterFuzzLite, +# so Sonar's docker:S6471 (root user) and docker:S6470 (recursive COPY) rules +# do not apply. The image is only used in CI to build fuzzers, never shipped. +# .clusterfuzzlite/Dockerfile is a symlink to the Containerfile. +sonar.exclusions=.clusterfuzzlite/Containerfile,.clusterfuzzlite/Dockerfile diff --git a/bun.lock b/bun.lock new file mode 100644 index 0000000..d57028c --- /dev/null +++ b/bun.lock @@ -0,0 +1,15 @@ +{ + "lockfileVersion": 2, + "configVersion": 1, + "workspaces": { + "": { + "name": "zerostep", + "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..8ecef16 100644 --- a/mise.toml +++ b/mise.toml @@ -1,34 +1,18 @@ [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 +22,24 @@ 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.build] +run = "cargo build --release" + +[tasks.test] +run = "cargo test" + +[tasks.lint] +depends = ["setup"] +run = 'bunx --no-install --bun prettier --check --no-error-on-unmatched-pattern "**/*.{js,mjs,cjs,json,md}"' + +[tasks.fmt] +depends = ["setup"] +run = 'bunx --no-install --bun prettier --write --no-error-on-unmatched-pattern "**/*.{js,mjs,cjs,json,md}"' diff --git a/package.json b/package.json new file mode 100644 index 0000000..d12b9b5 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "devDependencies": { + "prettier": "3.10.1" + }, + "license": "MPL-2.0", + "name": "zerostep", + "private": true +}