Skip to content

Make drizzle-kit and better-sqlite3 optional peers in the next major #969

Backlog

Description

@hyfdev

Installing only void with npm on Linux x64 puts 412 MiB in node_modules, and 58 MiB of that comes from drizzle-kit and better-sqlite3.

Void uses them only for void db commands, the deploy schema-drift check and local D1 migrations.

They can't become optional peers in 1.x, because upgrading void would remove them from existing projects and break their database commands.

Two steps can land in 1.x:

  • The CLI looks up drizzle-kit in the commands that use it, not when it starts.
  • void init and create-void add drizzle-kit, and better-sqlite3 for D1, to the app's devDependencies when a database is chosen, so new apps keep working after the upgrade.

In the next major, both become optional peers, a command missing one names the package to install, and on D1 void db reset and void db seed check for the driver before deleting the local database.

pg and mysql2 add under 5 MiB together, so they can stay.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions