Skip to content

fix(init): generate .void types on install in scaffolded starters - #521

Merged
cpojer merged 1 commit into
voidzero-dev:mainfrom
ashunar0:fix/starter-postinstall-prepare
Oct 22, 2026
Merged

cpojer merged 1 commit into
voidzero-dev:mainfrom
ashunar0:fix/starter-postinstall-prepare

Conversation

@ashunar0

Copy link
Copy Markdown
Contributor

Fixes #519

Add "postinstall": "void prepare" to the starter scripts. Init installs after writing the starter, so a new scaffold gets the types at that point, and a fresh clone gets them on install. This is the same approach as nuxt prepare.

EMPTY_PROJECT_ALLOWED_SCRIPTS also allows postinstall: void prepare, so running init again on a starter still sees it as an empty project.

Checked:

  • init.test.ts (postinstall in the React + D1 starter, and the deleted-starter check)
  • a 1.1.12 starter cloned fresh with postinstall added: pnpm install creates .void/db.d.ts and routes.d.ts, and tsc passes (it fails without it)

16 tests in init.test.ts fail locally on main too. This PR adds no new failures.

Starters extend .void/tsconfig.json, which lists db.d.ts and routes.d.ts, but nothing generates them until the first dev or build. .void/ is gitignored, so fresh clones hit the same missing files. Run void prepare from postinstall so both cases get the types on install.

@cpojer cpojer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@cpojer
cpojer merged commit dc17982 into voidzero-dev:main Oct 22, 2026
2 checks passed
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.

.void/db.d.ts is missing in a new scaffold or a fresh clone of a starter

2 participants