From 6ed2a4d7ddd96c7d32ceb8652069e7fabe100108 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2026 01:57:50 +0000 Subject: [PATCH] chore(release): apply changesets and bump versions --- .changeset/add-test-command.md | 5 --- .../cd-28-keep-relative-import-paths.md | 5 --- .changeset/compose-cli-dependency-0-0-7.md | 5 --- .changeset/compose-install-package-facets.md | 5 --- .changeset/compose-runtime-directory.md | 5 --- .changeset/deploy-command.md | 7 ---- .changeset/diamond-adapter.md | 5 --- .changeset/facet-install-remove-commands.md | 5 --- .../fix-package-facet-source-precedence.md | 5 --- .changeset/fuzzy-local-facet-reference.md | 5 --- .changeset/generated-project-scripts.md | 5 --- .changeset/hardhat-node-version-check.md | 5 --- .changeset/init-no-deploy-script.md | 5 --- .changeset/init-upgradeability.md | 5 --- .changeset/inspect-unknown-signatures.md | 5 --- .changeset/library-constellation-map.md | 9 ------ .../local-compose-cli-dev-dependency.md | 5 --- .changeset/lock-file-instances.md | 5 --- .changeset/modern-pumas-cheer.md | 5 --- .changeset/orange-regions-run.md | 5 --- .changeset/redact-command-secrets.md | 5 --- .changeset/remove-path-reference.md | 5 --- .changeset/sepolia-default-chain.md | 5 --- cli/CHANGELOG.md | 32 +++++++++++++++++++ cli/package.json | 2 +- package-lock.json | 2 +- 26 files changed, 34 insertions(+), 123 deletions(-) delete mode 100644 .changeset/add-test-command.md delete mode 100644 .changeset/cd-28-keep-relative-import-paths.md delete mode 100644 .changeset/compose-cli-dependency-0-0-7.md delete mode 100644 .changeset/compose-install-package-facets.md delete mode 100644 .changeset/compose-runtime-directory.md delete mode 100644 .changeset/deploy-command.md delete mode 100644 .changeset/diamond-adapter.md delete mode 100644 .changeset/facet-install-remove-commands.md delete mode 100644 .changeset/fix-package-facet-source-precedence.md delete mode 100644 .changeset/fuzzy-local-facet-reference.md delete mode 100644 .changeset/generated-project-scripts.md delete mode 100644 .changeset/hardhat-node-version-check.md delete mode 100644 .changeset/init-no-deploy-script.md delete mode 100644 .changeset/init-upgradeability.md delete mode 100644 .changeset/inspect-unknown-signatures.md delete mode 100644 .changeset/library-constellation-map.md delete mode 100644 .changeset/local-compose-cli-dev-dependency.md delete mode 100644 .changeset/lock-file-instances.md delete mode 100644 .changeset/modern-pumas-cheer.md delete mode 100644 .changeset/orange-regions-run.md delete mode 100644 .changeset/redact-command-secrets.md delete mode 100644 .changeset/remove-path-reference.md delete mode 100644 .changeset/sepolia-default-chain.md diff --git a/.changeset/add-test-command.md b/.changeset/add-test-command.md deleted file mode 100644 index adc8a567..00000000 --- a/.changeset/add-test-command.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -Add `compose test` to run a project's test suite through its detected framework (`forge test` or `npx hardhat test`), with `--` passthrough for framework filters and reporting flags. diff --git a/.changeset/cd-28-keep-relative-import-paths.md b/.changeset/cd-28-keep-relative-import-paths.md deleted file mode 100644 index b6f9fcb9..00000000 --- a/.changeset/cd-28-keep-relative-import-paths.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -Preserve the relative folder structure of locally imported dependencies when copying catalog facets, so nested imports (for example `./libraries/LibFee.sol`) keep resolving after `compose install` and `compose init`. diff --git a/.changeset/compose-cli-dependency-0-0-7.md b/.changeset/compose-cli-dependency-0-0-7.md deleted file mode 100644 index 8ed5ef2a..00000000 --- a/.changeset/compose-cli-dependency-0-0-7.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -Update the Compose library dependency to 0.0.7. diff --git a/.changeset/compose-install-package-facets.md b/.changeset/compose-install-package-facets.md deleted file mode 100644 index b2d2db37..00000000 --- a/.changeset/compose-install-package-facets.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -Fix `compose install` of catalog package facets (e.g. `ERC20DataFacet`) in Hardhat projects: package-sourced facets are never copied into `contracts/`, and Hardhat only compiles npm Solidity files listed in `solidity.npmFilesToBuild`, so the install-time validation compile missed the facet and failed with "Facet contract not found in Solidity AST". Install now adds the batch's package facets to the Compose `composeNpmFilesToBuild` overlay in `hardhat.config.ts` before validating, and reverts the config when the transaction rolls back. Projects whose config no longer contains the generated overlay get an error naming the exact specifiers to add manually. Foundry is unaffected (its validation compile already receives the facet paths directly). Install/remove error messages now carry recovery hints (`compose remove `, `path.sol:ContractName` examples, available diamond lists). diff --git a/.changeset/compose-runtime-directory.md b/.changeset/compose-runtime-directory.md deleted file mode 100644 index 5a649baf..00000000 --- a/.changeset/compose-runtime-directory.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -Move every Compose-owned Hardhat runtime file into the ignored `.compose/hardhat/` directory (`.compose/foundry/` is reserved for Foundry): the transient Ignition runner, the generated deploy result, and the account probe. The probe is now a deterministic rendered template rather than a per-run `scripts/compose-account-check-.ts` file, so an interrupted run can no longer leave an untracked script in a tracked directory. `compose init` and every runtime write now ensure the project `.gitignore` contains `.compose/`; the nested `cache/compose/.gitignore` workaround is gone. diff --git a/.changeset/deploy-command.md b/.changeset/deploy-command.md deleted file mode 100644 index b130a9bd..00000000 --- a/.changeset/deploy-command.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": minor ---- - -Add `compose deploy`: plan the diamond from `compose.json` and generate a reviewable managed deployment artifact. Foundry uses a Solidity script; Hardhat 3 uses a Hardhat Ignition module with an ignored transient runner. The default command prints the artifact path and review instructions without prompting or broadcasting; `--dry-run` simulates on a pinned chain fork, while `--broadcast` explicitly deploys, verifies the result on-chain, and records it in `compose.lock`. Hardhat deployment transaction hashes are read from the Ignition journal by future ID. Signing stays in the framework. Supports `--chain`, a per-deployment `--rpc-url` override, named Compose account aliases, `--instance`, `--redeploy`, and `--` passthrough for framework arguments. Add and list non-secret account aliases with `compose account`. - -Hardhat 3 initialization now uses Hardhat's official non-interactive Ethers/Mocha or Viem/Node test-runner template, overlays Compose project settings without discarding the official config, and requires Node.js 22.13 or newer. diff --git a/.changeset/diamond-adapter.md b/.changeset/diamond-adapter.md deleted file mode 100644 index 1f2f4be2..00000000 --- a/.changeset/diamond-adapter.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -Add a shared Diamond introspection adapter for ERC-8153 and ERC-2535, and use it for inspect and bytecode validation. diff --git a/.changeset/facet-install-remove-commands.md b/.changeset/facet-install-remove-commands.md deleted file mode 100644 index d56c7f18..00000000 --- a/.changeset/facet-install-remove-commands.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -Add `compose install`/`i` and `compose remove`/`rm` commands for managing facet registrations in `compose.json`, including versioned batch manifests. diff --git a/.changeset/fix-package-facet-source-precedence.md b/.changeset/fix-package-facet-source-precedence.md deleted file mode 100644 index 24fd91c7..00000000 --- a/.changeset/fix-package-facet-source-precedence.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -Resolve package facets from the project framework's package root (Foundry `lib/Compose`, Hardhat `node_modules`), so a project that has both copies no longer fails with an ambiguous package source. diff --git a/.changeset/fuzzy-local-facet-reference.md b/.changeset/fuzzy-local-facet-reference.md deleted file mode 100644 index 3f9bb8f6..00000000 --- a/.changeset/fuzzy-local-facet-reference.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -Resolve bare facet names in `compose install` by fuzzy-matching the project's Solidity sources, so a local `path.sol:ContractName` reference is only needed when several sources match; interactive runs pick the source from a list. diff --git a/.changeset/generated-project-scripts.md b/.changeset/generated-project-scripts.md deleted file mode 100644 index 22d8f4c8..00000000 --- a/.changeset/generated-project-scripts.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -Generated Foundry and Hardhat projects now expose native framework commands as `npm run build` and `npm test`, plus Compose workflows as `npm run validate` and `npm run deploy`. Foundry projects also include `npm run fmt`. The `compose build` and `compose test` commands remain available as convenience wrappers. diff --git a/.changeset/hardhat-node-version-check.md b/.changeset/hardhat-node-version-check.md deleted file mode 100644 index 2713bbb2..00000000 --- a/.changeset/hardhat-node-version-check.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -Raise the CLI's minimum Node.js version to 22 and check for Node.js 22.13+ before initializing a Hardhat project, so the engine requirement and the getting-started docs agree. diff --git a/.changeset/init-no-deploy-script.md b/.changeset/init-no-deploy-script.md deleted file mode 100644 index 2ae0cb01..00000000 --- a/.changeset/init-no-deploy-script.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": minor ---- - -`compose init` no longer scaffolds a default deploy script; the first `compose deploy` generates the managed, reviewable script from `compose.json` instead. diff --git a/.changeset/init-upgradeability.md b/.changeset/init-upgradeability.md deleted file mode 100644 index c39bba9c..00000000 --- a/.changeset/init-upgradeability.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": minor ---- - -Scaffold immutable diamonds by default: `compose init` prompts for upgradeability, defaulting to Immutable, and non-interactive runs accept `--upgradeable` and `--immutable`. `--upgradeable` includes `DiamondUpgradeFacet` and couples the `owner` base when no ownership base is selected; an explicit `DiamondUpgradeFacet` in `--libraries` opts in for compatibility. Hardhat projects also scaffold a `local` network entry targeting the default Anvil RPC. diff --git a/.changeset/inspect-unknown-signatures.md b/.changeset/inspect-unknown-signatures.md deleted file mode 100644 index 7a7b641d..00000000 --- a/.changeset/inspect-unknown-signatures.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -Mark selectors with unknown signatures in `compose inspect` output. diff --git a/.changeset/library-constellation-map.md b/.changeset/library-constellation-map.md deleted file mode 100644 index bc2b1c69..00000000 --- a/.changeset/library-constellation-map.md +++ /dev/null @@ -1,9 +0,0 @@ ---- ---- - -docs: add an interactive constellation map to the library index - -Generate a deterministic library catalog from Solidity sources and CLI presets, -link documented facets in new tabs, and provide a responsive 3D star map with an -automatic accessible 2D fallback. Rebuild documentation when CLI or Solidity -sources change. diff --git a/.changeset/local-compose-cli-dev-dependency.md b/.changeset/local-compose-cli-dev-dependency.md deleted file mode 100644 index b1502247..00000000 --- a/.changeset/local-compose-cli-dev-dependency.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -`compose init` now adds `@perfect-abstractions/compose-cli` to the generated project's `devDependencies` and installs it, so Compose commands run locally with `npx compose` without a global install. Foundry projects now include a `package.json` for this, and the tutorial and generated READMEs use the `npx compose` flow. diff --git a/.changeset/lock-file-instances.md b/.changeset/lock-file-instances.md deleted file mode 100644 index 190630d6..00000000 --- a/.changeset/lock-file-instances.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": minor ---- - -Nest `compose.lock` deployments by instance (`diamond → chain → instance → deployment`) and validate every recorded instance in `compose validate`. diff --git a/.changeset/modern-pumas-cheer.md b/.changeset/modern-pumas-cheer.md deleted file mode 100644 index e5713b1c..00000000 --- a/.changeset/modern-pumas-cheer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -fix(cli): print correct init output path diff --git a/.changeset/orange-regions-run.md b/.changeset/orange-regions-run.md deleted file mode 100644 index 62cf0bb1..00000000 --- a/.changeset/orange-regions-run.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -fix(cli): defer build freshness to framework compiler diff --git a/.changeset/redact-command-secrets.md b/.changeset/redact-command-secrets.md deleted file mode 100644 index df9d6e31..00000000 --- a/.changeset/redact-command-secrets.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -Redact private keys, mnemonics, passwords, and secret-bearing RPC URLs from command failure errors and passthrough validation messages. diff --git a/.changeset/remove-path-reference.md b/.changeset/remove-path-reference.md deleted file mode 100644 index 8c2d2c87..00000000 --- a/.changeset/remove-path-reference.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": patch ---- - -Accept `path.sol:ContractName` references in `compose remove`/`rm` and remove manifests, so they resolve to the registered facet name the way `compose install` does instead of being skipped as unregistered. diff --git a/.changeset/sepolia-default-chain.md b/.changeset/sepolia-default-chain.md deleted file mode 100644 index 629398c8..00000000 --- a/.changeset/sepolia-default-chain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@perfect-abstractions/compose-cli": minor ---- - -Generated Foundry and Hardhat projects now include a preconfigured `sepolia` chain. `compose.json` points Sepolia at `${SEPOLIA_RPC_URL}`, Foundry projects add a `sepolia` entry under `[rpc_endpoints]`, and Hardhat projects define a Sepolia HTTP network that reads `SEPOLIA_RPC_URL` and the `SEPOLIA_PRIVATE_KEY` signer. Generated projects also include a `.env.example` and README instructions for Sepolia deployments. diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index bc37b0c5..372d19d6 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -1,5 +1,37 @@ # Changelog +## 0.4.0 + +### Minor Changes + +- 20c3848: Add `compose deploy`: plan the diamond from `compose.json` and generate a reviewable managed deployment artifact. Foundry uses a Solidity script; Hardhat 3 uses a Hardhat Ignition module with an ignored transient runner. The default command prints the artifact path and review instructions without prompting or broadcasting; `--dry-run` simulates on a pinned chain fork, while `--broadcast` explicitly deploys, verifies the result on-chain, and records it in `compose.lock`. Hardhat deployment transaction hashes are read from the Ignition journal by future ID. Signing stays in the framework. Supports `--chain`, a per-deployment `--rpc-url` override, named Compose account aliases, `--instance`, `--redeploy`, and `--` passthrough for framework arguments. Add and list non-secret account aliases with `compose account`. + + Hardhat 3 initialization now uses Hardhat's official non-interactive Ethers/Mocha or Viem/Node test-runner template, overlays Compose project settings without discarding the official config, and requires Node.js 22.13 or newer. +- cafc10a: `compose init` no longer scaffolds a default deploy script; the first `compose deploy` generates the managed, reviewable script from `compose.json` instead. +- b0b9465: Scaffold immutable diamonds by default: `compose init` prompts for upgradeability, defaulting to Immutable, and non-interactive runs accept `--upgradeable` and `--immutable`. `--upgradeable` includes `DiamondUpgradeFacet` and couples the `owner` base when no ownership base is selected; an explicit `DiamondUpgradeFacet` in `--libraries` opts in for compatibility. Hardhat projects also scaffold a `local` network entry targeting the default Anvil RPC. +- e8fa69d: Nest `compose.lock` deployments by instance (`diamond → chain → instance → deployment`) and validate every recorded instance in `compose validate`. +- 30fa411: Generated Foundry and Hardhat projects now include a preconfigured `sepolia` chain. `compose.json` points Sepolia at `${SEPOLIA_RPC_URL}`, Foundry projects add a `sepolia` entry under `[rpc_endpoints]`, and Hardhat projects define a Sepolia HTTP network that reads `SEPOLIA_RPC_URL` and the `SEPOLIA_PRIVATE_KEY` signer. Generated projects also include a `.env.example` and README instructions for Sepolia deployments. + +### Patch Changes + +- 6cc3ac7: Add `compose test` to run a project's test suite through its detected framework (`forge test` or `npx hardhat test`), with `--` passthrough for framework filters and reporting flags. +- 08226b5: Preserve the relative folder structure of locally imported dependencies when copying catalog facets, so nested imports (for example `./libraries/LibFee.sol`) keep resolving after `compose install` and `compose init`. +- 69bcd13: Update the Compose library dependency to 0.0.7. +- 87920fd: Fix `compose install` of catalog package facets (e.g. `ERC20DataFacet`) in Hardhat projects: package-sourced facets are never copied into `contracts/`, and Hardhat only compiles npm Solidity files listed in `solidity.npmFilesToBuild`, so the install-time validation compile missed the facet and failed with "Facet contract not found in Solidity AST". Install now adds the batch's package facets to the Compose `composeNpmFilesToBuild` overlay in `hardhat.config.ts` before validating, and reverts the config when the transaction rolls back. Projects whose config no longer contains the generated overlay get an error naming the exact specifiers to add manually. Foundry is unaffected (its validation compile already receives the facet paths directly). Install/remove error messages now carry recovery hints (`compose remove `, `path.sol:ContractName` examples, available diamond lists). +- 21bb6c5: Move every Compose-owned Hardhat runtime file into the ignored `.compose/hardhat/` directory (`.compose/foundry/` is reserved for Foundry): the transient Ignition runner, the generated deploy result, and the account probe. The probe is now a deterministic rendered template rather than a per-run `scripts/compose-account-check-.ts` file, so an interrupted run can no longer leave an untracked script in a tracked directory. `compose init` and every runtime write now ensure the project `.gitignore` contains `.compose/`; the nested `cache/compose/.gitignore` workaround is gone. +- 60ba0c8: Add a shared Diamond introspection adapter for ERC-8153 and ERC-2535, and use it for inspect and bytecode validation. +- 3436841: Add `compose install`/`i` and `compose remove`/`rm` commands for managing facet registrations in `compose.json`, including versioned batch manifests. +- 52ad0b0: Resolve package facets from the project framework's package root (Foundry `lib/Compose`, Hardhat `node_modules`), so a project that has both copies no longer fails with an ambiguous package source. +- c508a23: Resolve bare facet names in `compose install` by fuzzy-matching the project's Solidity sources, so a local `path.sol:ContractName` reference is only needed when several sources match; interactive runs pick the source from a list. +- abc15d1: Generated Foundry and Hardhat projects now expose native framework commands as `npm run build` and `npm test`, plus Compose workflows as `npm run validate` and `npm run deploy`. Foundry projects also include `npm run fmt`. The `compose build` and `compose test` commands remain available as convenience wrappers. +- 6743553: Raise the CLI's minimum Node.js version to 22 and check for Node.js 22.13+ before initializing a Hardhat project, so the engine requirement and the getting-started docs agree. +- 9ce8929: Mark selectors with unknown signatures in `compose inspect` output. +- 12dd70e: `compose init` now adds `@perfect-abstractions/compose-cli` to the generated project's `devDependencies` and installs it, so Compose commands run locally with `npx compose` without a global install. Foundry projects now include a `package.json` for this, and the tutorial and generated READMEs use the `npx compose` flow. +- 69bcd13: fix(cli): print correct init output path +- 0ffed76: fix(cli): defer build freshness to framework compiler +- f1a0616: Redact private keys, mnemonics, passwords, and secret-bearing RPC URLs from command failure errors and passthrough validation messages. +- c508a23: Accept `path.sol:ContractName` references in `compose remove`/`rm` and remove manifests, so they resolve to the registered facet name the way `compose install` does instead of being skipped as unregistered. + ## 0.3.0 ### Minor Changes diff --git a/cli/package.json b/cli/package.json index a7da7d48..3d1662df 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@perfect-abstractions/compose-cli", - "version": "0.3.0", + "version": "0.4.0", "description": "CLI for scaffolding Compose smart contract projects with facet-based diamonds", "main": "dist/index.js", "bin": { diff --git a/package-lock.json b/package-lock.json index 8f11e627..ff28e9f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ }, "cli": { "name": "@perfect-abstractions/compose-cli", - "version": "0.3.0", + "version": "0.4.0", "license": "MIT", "dependencies": { "@inquirer/checkbox": "5.2.1",