Repository navigation
feat!: remove the canton stack - #17
Merged
Merged
Conversation
Canton now has its own installer, canton-create in the
canton-dappbooster repo. This installer goes back to scaffolding
dAppBooster for EVM only.
- Removed the canton stack config, its post-install screen and the
stack selection step
- Removed the --canton, --evm and --stack flags
- --info prints { features, modes } again, with no stacks key
- The success JSON no longer has a stack field
- The override env vars are now DAPPBOOSTER_REPO_URL and DAPPBOOSTER_REF
- The review step and the title no longer show the stack
- EvmPostInstall is now PostInstall
- Removed what only Canton used: the Node version check, the initial
commit, the stack-level post-install lines, and the prepare step's
scripts and devDependencies
BREAKING CHANGE: the stack flags are gone, and --info and the success
JSON no longer carry stack data.
These code paths existed for Canton features and the Canton template. The EVM stack never reaches them. - Removed the default installation mode. It needs a feature that is off by default, and every EVM feature is on by default, so EVM never offered it. --mode default now fails like any other unknown mode - Removed the feature requires field, the toggle logic that enforced it, and the transformSelection prop it added to MultiSelect - installPackages runs the postinstall script again without checking that it exists. dAppBooster always ships one - cleanupFiles no longer strips scripts that run a removed directory. Each EVM feature already lists its own scripts
With one template left, the stack layer only added indirection. Nothing changes for users. - source/stacks/ is now source/config.ts. It holds the feature map, the prepare and staging paths, and getRepo(), which reads the DAPPBOOSTER_REPO_URL and DAPPBOOSTER_REF overrides - Operations, helpers and step components no longer take a stack argument - Removed the Stack, StackConfig, PackageManager and EnvFile types - pnpm and the .env.example to .env.local copy are now written where they are used
The readme, CLAUDE.md and architecture.md still explained stacks, the stack flags and the Canton template. - The readme drops the stack flags and the Canton examples, and points Canton users at create-canton-dappbooster - CLAUDE.md says source/config.ts holds the feature metadata, and names the DAPPBOOSTER_REPO_URL and DAPPBOOSTER_REF overrides - architecture.md describes config.ts, the full and custom modes, and the operations without a stack argument. The guide for adding a stack is gone
The wizard no longer asks for a stack, so record-demo.py stopped waiting for that prompt, and demo.svg is a fresh recording of the current flow.
meow accepts unknown flags by default and ignores them. After the stack flags were removed, `dappbooster --canton --ni --name x --mode full` scaffolded an EVM project and exited 0. The CLI now sets allowUnknownFlags to false, so an unknown flag stops the run with exit code 2 before anything touches the disk.
isFeatureNameValid used the `in` operator, which also matches keys inherited from Object.prototype. `--features constructor` passed validation and produced a project with every feature removed. It now uses Object.hasOwn, and a test covers the case.
After `pnpm remove`, installPackages ran `pnpm run postinstall`, which fails when the cloned template has no such script, for example a fork set through DAPPBOOSTER_REPO_URL. The failure removed the finished project. It now runs `pnpm run --if-present postinstall`, which runs the script when it exists and does nothing otherwise.
allowUnknownFlags made meow print to stderr and exit 2 on its own, so a
non-interactive run with an old flag such as --canton returned no JSON
for agents to parse.
The flags are now declared once in a constant. After parsing, any flag
not in it goes through reportFailure, which prints the usual
{ success: false, error } envelope and sets exit code 1.
cleanupFiles and installPackages took both the mode and the kept features. Every caller passes the resolved features, and full mode always means every feature, so the mode added nothing: with every feature kept, both already do no feature work. - Both now take only the project folder, the features and onProgress - FileCleanup and Install no longer take a mode prop - The tests for full mode and for "all features selected" were the same case, so they are merged
Small cleanups in code this branch already touched. Nothing changes for users. - cleanupFiles: removeKeys had one caller left, so patchPackageJson removes the scripts itself - info.ts: JSON.stringify already drops undefined values, so the conditional spread for postInstall is gone - Removed the CleanupGroup type. TypeScript infers prepare and staging - cloneRepo runs one git clone, then branches only for the checkout - resolveModeFeatures uses isFeatureSelected - InstallationMode builds its list from MODE_LABELS, so a new mode shows up in the wizard without a second edit - The default mode test was a copy of the invalid mode test, so the two are merged
The wizard's subgraph warning wrote out its own copy of the two setup steps, while the JSON output read them from featureDefinitions.subgraph.postInstall. The two had already drifted apart. - PostInstall now prints the steps from the config - The config text gains The Graph Studio URL, so agents get it too - The step text in the wizard is no longer gray
cloneRepo and installPackages wrote 'pnpm' five times between them. config.ts now exports packageManager, and both operations read it.
MultiSelect handed back its selection in click order, so OptionalPackages sorted it back into config order before using it. MultiSelect now submits the selected items in the order of its items list, which is what a checkbox list shows. OptionalPackages passes the selection on as it is.
The docs missed the latest changes, and Vale and an AI-tells pass flagged their wording. - architecture.md lists packageManager, the JSON error for unknown flags, and the subgraph steps PostInstall reads from the config - CLAUDE.md says config.ts holds the features, the cleanup paths, the repository and the package manager - Headings use sentence case. Dashes and arrows in prose became plain sentences, and passive phrases became active where the actor is known - The CI order in CLAUDE.md is now a numbered list, and "gates" became "checks" - The readme keeps its layout. Only a few phrases changed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
No related issue.
Canton now has its own installer,
create-canton-dappbooster, so this one goes back to EVM only.Changes
--canton,--evmand--stackflagsdefaultmode, featurerequires, the Node check and the initial commit--features constructorno longer passes validationpostinstallscript no longer fails the installDeviations
./src/subgraphs/...), so Make EVM feature-script stripping robust to template script renames #10 stays as it isAcceptance criteria
pnpm dlx dappboosterscaffolds an EVM project with no stack prompt--cantonand other unknown flags fail with a JSON error--infoprints onlyfeaturesandmodesTest plan
Automated tests
pnpm installpnpm lint && pnpm typecheck && pnpm test && pnpm knipManual verification
pnpm buildnode <repo>/dist/cli.js --infofeaturesandmodesnode <repo>/dist/cli.js --ni --name demo_app --mode custom --features demo,typedoc"success": true, and nosrc/subgraphs,docsor.huskyindemo_appnode <repo>/dist/cli.js --canton --ni"error": "Unknown flags: --canton"Breaking changes
stackskey in--info, thestackfield in the success JSON,--mode defaultand theDAPPBOOSTER_EVM_*env varsfeaturesat the top of--info, and rename the env vars toDAPPBOOSTER_REPO_URLandDAPPBOOSTER_REF. Canton users move tocreate-canton-dappboosterChecklist
Screenshots
None.