Skip to content

prisma CLI: make @prisma/composer-cli optional — ORM-only projects install ~200 extra packages (~0.9 GB) #318

Description

@sss-Mihail-sss

Versions: prisma@8.0.0-rc.17, @prisma/orm-postgres@8.0.0-rc.13, pnpm 12.5.1, macOS arm64.

What happens. prisma has @prisma/composer-cli in dependencies, so every project that uses the CLI only for ORM workflows (contract emit, migration plan, db migrate, db verify) installs Composer and its whole deploy toolchain. In our pnpm monorepo:

  • 214 of the app's 727 packages are reachable only through @prisma/composer-cli;
  • they take ~0.9 GB of a 2.2 GB store. The largest are alchemy (216 MB), @distilled.cloud/aws (205 MB), @cloudflare/workerd-* (144 MB), @distilled.cloud/cloudflare (104 MB) and effect (52 MB);
  • the build scripts of workerd/sharp have to be reviewed in allowBuilds, since pnpm fails the install otherwise;
  • Composer's fresh releases need minimumReleaseAgeExclude entries;
  • it brings effect rc peer mismatches (see also Prisma ORM RC.13: npm Dependency-Resolution Problem orm#30257).

Production images are not affected when built with --prod, but dev machines, CI and Docker build stages pay the cost.

Request. Keep prisma lean for ORM use:

  1. make @prisma/composer-cli an optional or peer dependency that is installed on first use of deploy/dev/project/git/service, or
  2. ship the platform commands as a separate package.

Related: prisma/orm#30242 (CLI dependency weight in tests), prisma/orm#30437 (Composer ↔ engine coupling).

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions