Skip to content

fix: remove redundant project name prompt from create-mochi#44

Merged
khromov merged 1 commit into
mainfrom
remove-cli-name-prompt
May 25, 2026
Merged

fix: remove redundant project name prompt from create-mochi#44
khromov merged 1 commit into
mainfrom
remove-cli-name-prompt

Conversation

@khromov

@khromov khromov commented May 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Removes the interactive "What should the package be named?" prompt from create-mochi
  • The package.json name is now derived from the directory basename automatically (via the existing defaultNameFor() helper, which falls back to mochi-app if the basename isn't a valid npm name)
  • Also removes the --name CLI flag since it's no longer needed

Test plan

  • bun run typecheck passes
  • bun run format clean
  • Run bunx create-mochi ./test-proj — should skip the name prompt and scaffold with "name": "test-proj" in package.json

Derive the package.json name from the directory basename instead of
prompting interactively. The prompt defaulted to the folder name anyway
and was an unnecessary extra step.
@github-actions

Copy link
Copy Markdown
Contributor

Mochi review report

Try this PR

Expand instructions
gh run download -R khromov/mochi 26420071449 -n mochi-framework-pr -D /tmp/mochi-pr && bun i /tmp/mochi-pr/mochi-framework-pr.tgz

Download manually

Lines of code (non-blank lines)

packages/mochi
Category main PR Δ
Total 16153 16153 0

Unchanged: src/**/*.test.ts (5444), src/Mochi.ts (1103), src/ComponentRegistry.ts (1477), src/hooks.ts (229), src/{requestContext,forms,errors}.ts (260), src/{events,log,logger}.ts (317), src/consoleLogger.ts (342), src/cookies*.ts (157), src/extensions.ts (191), src/cache.ts (60), src/middleware/** (81), src/enhance*.ts (184), src/build*.ts (251), src/proxy.ts (125), src/cli* (112), src/{csrf,serverIslandCrypto}.ts (240), src/{types.ts,*.d.ts} (602), src/web-components/** (431), src/debug-bar/** (1866), src/templates/** (790), Other (1891).

packages/docs
Category main PR Δ
Total 3464 3464 0

Unchanged: Docs (3464).

packages/site
Category main PR Δ
Total 9677 9677 0

Unchanged: src/demos/** (5488), src/components/** (2080), src/lib/** (715), src/stores/** (26), Other (1368).

packages/demos
Category main PR Δ
Total 3107 3107 0

Unchanged: src/hn/** (1085), Other (2022).

packages/minimal
Category main PR Δ
Total 538 538 0

Unchanged: Other (538).

packages/cli
Category main PR Δ
src/cli* 161 138 -23
Total 502 479 -23

Unchanged: src/**/*.test.ts (117), src/{create,templates,utils}.ts (220), Other (4).

@khromov khromov merged commit dfa3c95 into main May 25, 2026
3 checks passed
@github-actions github-actions Bot mentioned this pull request May 25, 2026
khromov pushed a commit that referenced this pull request May 26, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>mochi-framework: 0.4.0</summary>

##
[0.4.0](mochi-framework-v0.3.2...mochi-framework-v0.4.0)
(2026-05-26)


### Features

* make url export isomorphic (server + client)
([#47](#47))
([11bbbe6](11bbbe6))
* per-page JS bundle panel in debug bar
([#42](#42))
([7eba984](7eba984))


### Bug Fixes

* resolve Svelte 5 state warnings and add autofixer tooling
([#49](#49))
([3d949a5](3d949a5))


### Performance

* consolidate per-request HTML passes in renderComponent
([#36](#36))
([285a87f](285a87f))
* reduce server island runtime by ~80% (8.59kB → 1.91kB )
([#50](#50))
([d570bc8](d570bc8))
</details>

<details><summary>create-mochi: 0.2.3</summary>

##
[0.2.3](create-mochi-v0.2.2...create-mochi-v0.2.3)
(2026-05-26)


### Bug Fixes

* remove redundant project name prompt from create-mochi
([#44](#44))
([dfa3c95](dfa3c95))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@khromov khromov deleted the remove-cli-name-prompt branch June 6, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant