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

Aperta
#318 1 commento 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
docker, typescript

Direzione di ricerca

Start by inspecting the prisma package dependency declaration and the CLI entry points for deploy, dev, project, git, and service. Compare install behavior for the ORM workflows against the platform commands, then verify that ORM-only installs no longer bring in Composer while those platform commands still work.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Versions: [email protected], @prisma/[email protected], 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#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).

Lingua principale
TypeScript
Stelle
26
Fork
4
Merge medio
12h 11m
PR unite (30g)
38

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di prisma/prisma-cli

Tutte le issue di prisma/prisma-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.