celo-org / celo-org/celo-composer
Cleanup: dead Plop actions/prompts, unused deps (path polyfill, plop, cross-env), non-portable commandExists, stale release.sh
- Dominant language
- TypeScript
- Stars
- 188
- Forks
- 189
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Description
## Summary
Grouped cleanup issue: dead code, unused dependencies, and drifted tooling in the CLI itself. None of these break users on their own, but together they add noise, install weight, and misleading signals.
## Dead code
- `src/plopfile.ts:59-68` — the "copy static assets from base" action globs `templates/base/**/*` excluding `.hbs`; all 21 files in `templates/base` are `.hbs`, so the action matches nothing. (The equivalent farcaster action at lines 238-256 does work.)
- `src/plopfile.ts:24-45` — two generator `prompts` (`projectName`, `description`) that can never fire: the code always calls `generator.runActions(...)` directly, never `runPrompts`.
- `src/generators/plop-generator.ts:108-111` — `runPlopGenerator` is exported but never called.
- `PlopConfig.installDependencies` (`plop-generator.ts:16`) and `PlopData.installDependencies` (`plopfile.ts:11`) are declared but never read.
- `CreateOptions.templateType` and `CreateOptions.miniapp*` (`src/commands/create.ts:14,19-22`) have no corresponding commander flags — they're read in several places but can never be set from the CLI.
- `src/generators/project-generator.ts:70,86,140` — unused `catch (error)` bindings.
## Dependencies
- `path` `^0.12.7` (dependencies) — this is the deprecated browserify polyfill; Node always resolves bare `"path"` to the core module, so the package is dead weight with transitive shims.
- `plop` `^4.0.1` (dependencies) — imported type-only (`import { NodePlopAPI } from "plop"`); TS elides it, so it belongs in devDependencies. `node-plop` is the actual runtime engine.
- `cross-env` (devDependencies) — zero references anywhere.
## Tooling drift
- `scripts/release.sh:63-70` promises "The GitHub Action will now… Publish to npm" and links to `/actions`, but the repo has no `.github/` directory / workflows. It also uses `npm version` in a pnpm-managed repo.
- `commandExists()` (`src/commands/create.ts:406-412`) spawns `command -v` without `shell: true`. `command` is a shell builtin; this happens to work on macOS (which ships a `/usr/bin/command` binary) but fails on systems without one, making the "Foundry already installed" check non-portable. The sibling `foundryup` spawn (`create.ts:438-447`) registers no `error` handler, so a missing binary raises an unhandled `error` event.
- `tsconfig.json` excludes a `tests` directory that doesn't exist.
- `.gitignore` is 3 lines (`node_modules`, `.env`, `dist`) — no `.prune-stash`, `*.tsbuildinfo`, or `.DS_Store` (one is committed-adjacent at repo root).
Found in @celo/celo-composer 2.4.13 (main @ 710dd89).
Contributor guide
Research direction
Start with the listed locations in src/plopfile.ts, src/generators/plop-generator.ts, src/generators/project-generator.ts, and src/commands/create.ts, then review the dependency declarations, scripts/release.sh, tsconfig.json, and .gitignore. Confirm each reported action, prompt, export, option, dependency, and tooling path is unused or drifted before changing it. Done means the dead code and dependencies are removed, portability issues are addressed, and repository configuration matches the described pnpm setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- build-system, cli, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100