From bb3d0aa935266b5aa508a4d9fa703b3c33eae1bd Mon Sep 17 00:00:00 2001 From: 0xisk <0xisk@proton.me> Date: Wed, 15 Jul 2026 14:29:30 +0200 Subject: [PATCH 1/3] build: rename dev scripts to compile/lint Rename the contract-compilation scripts and Turbo tasks `compact` / `compact:*` to `compile` / `compile:*`, and the Biome scripts `fmt-and-lint` / `fmt-and-lint:*` to `lint` / `lint:*` (matching compact-tools). Update the README, CONTRIBUTING, CI workflows, and issue template that reference them. The compiler binary invocations (`compact-compiler`, `compact compile`), the `@openzeppelin/compact-*` package names, the `skip-compact` toolchain-install flag, and the `compact` keyword are left unchanged. Refs: OpenZeppelin/compact-contracts#673 --- .github/ISSUE_TEMPLATE/01_bug_report.yml | 2 +- .github/workflows/checks.yml | 2 +- .github/workflows/test.yml | 2 +- CHANGELOG.md | 4 +++ CONTRIBUTING.md | 2 +- README.md | 14 ++++---- contracts/package.json | 26 +++++++------- package.json | 20 +++++------ turbo.json | 44 ++++++++++++------------ 9 files changed, 60 insertions(+), 56 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/01_bug_report.yml b/.github/ISSUE_TEMPLATE/01_bug_report.yml index 59fd5f71e..82f0a47b6 100644 --- a/.github/ISSUE_TEMPLATE/01_bug_report.yml +++ b/.github/ISSUE_TEMPLATE/01_bug_report.yml @@ -31,7 +31,7 @@ body: label: What are the steps to reproduce this issue? placeholder: | 1. Clone repo - 2. Run `yarn compact` + 2. Run `yarn compile` 3. … 4. See error validations: diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 72a77ad2d..9f7dbc258 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -33,4 +33,4 @@ jobs: skip-compact: "true" - name: Format & Lint - run: yarn fmt-and-lint:ci + run: yarn lint:ci diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e09c1e9f4..2ab906fde 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,7 +39,7 @@ jobs: uses: ./.github/actions/setup - name: Compile contracts - run: yarn compact + run: yarn compile - name: Run type checks run: yarn types diff --git a/CHANGELOG.md b/CHANGELOG.md index cf4759dc0..879695e7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add EcdhMask (#655) +### Changed + +- Rename the contract-compilation scripts and Turbo tasks from `compact` / `compact:*` to `compile` / `compile:*`, and the Biome scripts from `fmt-and-lint` / `fmt-and-lint:*` to `lint` / `lint:*`. (#XXX) + ## 0.3.0-alpha (2026-06-30) ### Added diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a98f2c663..ea5122219 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -158,7 +158,7 @@ While the prerequisites above must be satisfied prior to having your pull reques All TypeScript code is linted with [Biomejs](https://biomejs.dev/). -Quickly fix all formatting and linting errors with the `yarn fmt-and-lint:fix` command. +Quickly fix all formatting and linting errors with the `yarn lint:fix` command. ## Opening an issue diff --git a/README.md b/README.md index 12f2271eb..033bd5b10 100644 --- a/README.md +++ b/README.md @@ -214,7 +214,7 @@ git clone git@github.com:OpenZeppelin/compact-contracts.git ```bash nvm install && \ yarn && \ -yarn compact +yarn compile ``` ### Run tests @@ -226,8 +226,8 @@ yarn test ### Check/apply Biome formatter ```bash -yarn fmt-and-lint -yarn fmt-and-lint:fix +yarn lint +yarn lint:fix ``` ### Advanced @@ -235,8 +235,8 @@ yarn fmt-and-lint:fix #### Targeted compilation ```bash -yarn compact:access -yarn compact:archive +yarn compile:access +yarn compile:archive ... ``` @@ -246,10 +246,10 @@ ZK key generation is slow and usually unnecessary during development. ```bash # Full compilation with skip-zk (use environment variable) -SKIP_ZK=true yarn compact +SKIP_ZK=true yarn compile # Access compilation with skip-zk (this compiles security first as a dependency) -SKIP_ZK=true yarn compact:access +SKIP_ZK=true yarn compile:access ``` #### Clean environment diff --git a/contracts/package.json b/contracts/package.json index 72d20a643..342410543 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -25,20 +25,20 @@ "#test-utils/zswap.js": "./test-utils/zswap.js" }, "scripts": { - "compact": "compact-compiler --exclude '*/archive/*'", - "compact:access": "compact-compiler --dir access", - "compact:archive": "compact-compiler --dir archive", - "compact:crypto": "compact-compiler --dir crypto", - "compact:multisig": "compact-compiler --dir multisig", - "compact:security": "compact-compiler --dir security", - "compact:token": "compact-compiler --dir token", - "compact:utils": "compact-compiler --dir utils", + "compile": "compact-compiler --exclude '*/archive/*'", + "compile:access": "compact-compiler --dir access", + "compile:archive": "compact-compiler --dir archive", + "compile:crypto": "compact-compiler --dir crypto", + "compile:multisig": "compact-compiler --dir multisig", + "compile:security": "compact-compiler --dir security", + "compile:token": "compact-compiler --dir token", + "compile:utils": "compact-compiler --dir utils", "build": "compact-builder --hierarchical --out dist --clean-dist --exclude '*/archive/*' --exclude 'Mock*' --exclude '*.mock.compact' --copy package.json --copy ../README.md && find dist -type d -empty -delete", - "test": "SKIP_ZK=true yarn run compact && vitest run", - "test:coverage": "SKIP_ZK=true yarn run compact && vitest run --coverage", - "test:live": "yarn run compact && MIDNIGHT_BACKEND=live vitest run --config vitest.live.config.ts", - "compact:integration": "SKIP_ZK=true compact compile test/integration/_mocks/SharedInitCollision.compact artifacts/SharedInitCollision && SKIP_ZK=true compact compile test/integration/_mocks/ComposedTokens.compact artifacts/ComposedTokens", - "test:integration": "yarn run compact:integration && vitest run --config vitest.integration.config.ts", + "test": "SKIP_ZK=true yarn run compile && vitest run", + "test:coverage": "SKIP_ZK=true yarn run compile && vitest run --coverage", + "test:live": "yarn run compile && MIDNIGHT_BACKEND=live vitest run --config vitest.live.config.ts", + "compile:integration": "SKIP_ZK=true compact compile test/integration/_mocks/SharedInitCollision.compact artifacts/SharedInitCollision && SKIP_ZK=true compact compile test/integration/_mocks/ComposedTokens.compact artifacts/ComposedTokens", + "test:integration": "yarn run compile:integration && vitest run --config vitest.integration.config.ts", "types": "tsc -p tsconfig.json --noEmit", "clean": "git clean -fXd" }, diff --git a/package.json b/package.json index fdf9ee283..e6b9a5f20 100644 --- a/package.json +++ b/package.json @@ -8,18 +8,18 @@ "packages/*" ], "scripts": { - "compact": "turbo run compact --filter=@openzeppelin/compact-contracts --log-prefix=none", - "compact:access": "turbo run compact:access --filter=@openzeppelin/compact-contracts --log-prefix=none", - "compact:archive": "turbo run compact:archive --filter=@openzeppelin/compact-contracts --log-prefix=none", - "compact:crypto": "turbo run compact:crypto --filter=@openzeppelin/compact-contracts --log-prefix=none", - "compact:security": "turbo run compact:security --filter=@openzeppelin/compact-contracts --log-prefix=none", - "compact:token": "turbo run compact:token --filter=@openzeppelin/compact-contracts --log-prefix=none", - "compact:utils": "turbo run compact:utils --filter=@openzeppelin/compact-contracts --log-prefix=none", + "compile": "turbo run compile --filter=@openzeppelin/compact-contracts --log-prefix=none", + "compile:access": "turbo run compile:access --filter=@openzeppelin/compact-contracts --log-prefix=none", + "compile:archive": "turbo run compile:archive --filter=@openzeppelin/compact-contracts --log-prefix=none", + "compile:crypto": "turbo run compile:crypto --filter=@openzeppelin/compact-contracts --log-prefix=none", + "compile:security": "turbo run compile:security --filter=@openzeppelin/compact-contracts --log-prefix=none", + "compile:token": "turbo run compile:token --filter=@openzeppelin/compact-contracts --log-prefix=none", + "compile:utils": "turbo run compile:utils --filter=@openzeppelin/compact-contracts --log-prefix=none", "build": "turbo run build --log-prefix=none", "test": "turbo run test --filter=@openzeppelin/compact-contracts --log-prefix=none", - "fmt-and-lint": "biome check .", - "fmt-and-lint:fix": "biome check . --write", - "fmt-and-lint:ci": "biome ci . --no-errors-on-unmatched", + "lint": "biome check .", + "lint:fix": "biome check . --write", + "lint:ci": "biome ci . --no-errors-on-unmatched", "types": "turbo run types", "clean": "turbo run clean" }, diff --git a/turbo.json b/turbo.json index efac8ec02..7ee8584d6 100644 --- a/turbo.json +++ b/turbo.json @@ -1,63 +1,63 @@ { "$schema": "https://turbo.build/schema.json", "tasks": { - "compact:crypto": { + "compile:crypto": { "dependsOn": ["^build"], "env": ["COMPACT_HOME", "SKIP_ZK"], "inputs": ["src/crypto/**/*.compact"], "outputLogs": "new-only", "outputs": ["artifacts/**/"] }, - "compact:security": { + "compile:security": { "dependsOn": ["^build"], "env": ["COMPACT_HOME", "SKIP_ZK"], "inputs": ["src/security/**/*.compact"], "outputLogs": "new-only", "outputs": ["artifacts/**/"] }, - "compact:utils": { + "compile:utils": { "dependsOn": ["^build"], "env": ["COMPACT_HOME", "SKIP_ZK"], "inputs": ["src/utils/**/*.compact"], "outputLogs": "new-only", "outputs": ["artifacts/**/"] }, - "compact:access": { - "dependsOn": ["^build", "compact:utils"], + "compile:access": { + "dependsOn": ["^build", "compile:utils"], "env": ["COMPACT_HOME", "SKIP_ZK"], "inputs": ["src/access/**/*.compact"], "outputLogs": "new-only", "outputs": ["artifacts/**/"] }, - "compact:archive": { - "dependsOn": ["^build", "compact:utils"], + "compile:archive": { + "dependsOn": ["^build", "compile:utils"], "env": ["COMPACT_HOME", "SKIP_ZK"], "inputs": ["src/archive/**/*.compact"], "outputLogs": "new-only", "outputs": ["artifacts/**/"] }, - "compact:multisig": { - "dependsOn": ["^build", "compact:utils"], + "compile:multisig": { + "dependsOn": ["^build", "compile:utils"], "env": ["COMPACT_HOME", "SKIP_ZK"], "inputs": ["src/multisig/**/*.compact"], "outputLogs": "new-only", "outputs": ["artifacts/**/"] }, - "compact:token": { - "dependsOn": ["^build", "compact:utils"], + "compile:token": { + "dependsOn": ["^build", "compile:utils"], "env": ["COMPACT_HOME", "SKIP_ZK"], "inputs": ["src/token/**/*.compact"], "outputLogs": "new-only", "outputs": ["artifacts/**/"] }, - "compact": { + "compile": { "dependsOn": [ - "compact:crypto", - "compact:security", - "compact:utils", - "compact:access", - "compact:multisig", - "compact:token" + "compile:crypto", + "compile:security", + "compile:utils", + "compile:access", + "compile:multisig", + "compile:token" ], "env": ["COMPACT_HOME", "SKIP_ZK"], "inputs": ["src/**/*.compact", "test/**/*.compact"], @@ -89,13 +89,13 @@ "outputs": ["dist/**"] }, "types": { - "dependsOn": ["@openzeppelin/compact-contracts#compact"], + "dependsOn": ["@openzeppelin/compact-contracts#compile"], "outputs": [], "cache": false }, - "//#fmt-and-lint": {}, - "//#fmt-and-lint:ci": {}, - "//#fmt-and-lint:fix": { + "//#lint": {}, + "//#lint:ci": {}, + "//#lint:fix": { "cache": false }, "clean": { From 90f0f2f18dcdeb6d16d2197e7b05ee651f1059a1 Mon Sep 17 00:00:00 2001 From: 0xisk <0xisk@proton.me> Date: Wed, 15 Jul 2026 14:46:07 +0200 Subject: [PATCH 2/3] docs(changelog): reference PR #680 for the rename --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 879695e7b..b856ff325 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Rename the contract-compilation scripts and Turbo tasks from `compact` / `compact:*` to `compile` / `compile:*`, and the Biome scripts from `fmt-and-lint` / `fmt-and-lint:*` to `lint` / `lint:*`. (#XXX) +- Rename the contract-compilation scripts and Turbo tasks from `compact` / `compact:*` to `compile` / `compile:*`, and the Biome scripts from `fmt-and-lint` / `fmt-and-lint:*` to `lint` / `lint:*`. (#680) ## 0.3.0-alpha (2026-06-30) From b3c8498991b7de84896064446b8b3b26b3baf5a2 Mon Sep 17 00:00:00 2001 From: 0xisk <0xisk@proton.me> Date: Fri, 17 Jul 2026 12:25:37 +0200 Subject: [PATCH 3/3] build: add root compile:multisig wrapper The multisig compile task is defined in contracts/package.json and turbo.json but had no root-level wrapper, unlike the other compile:* scripts. yarn 4 masks this via its colon-name workspace fallback, so it never hard-failed, but the explicit wrapper keeps the root scripts consistent and avoids relying on the implicit fallback. --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index e6b9a5f20..35054ce76 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "compile:access": "turbo run compile:access --filter=@openzeppelin/compact-contracts --log-prefix=none", "compile:archive": "turbo run compile:archive --filter=@openzeppelin/compact-contracts --log-prefix=none", "compile:crypto": "turbo run compile:crypto --filter=@openzeppelin/compact-contracts --log-prefix=none", + "compile:multisig": "turbo run compile:multisig --filter=@openzeppelin/compact-contracts --log-prefix=none", "compile:security": "turbo run compile:security --filter=@openzeppelin/compact-contracts --log-prefix=none", "compile:token": "turbo run compile:token --filter=@openzeppelin/compact-contracts --log-prefix=none", "compile:utils": "turbo run compile:utils --filter=@openzeppelin/compact-contracts --log-prefix=none",