pnpm test can fail at random because the engine's test script rebuilds its dist while the CLI's tests import it

Abierto
#296 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
76/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Start with packages/cli-engine/package.json, tsdown.config.ts, and turbo.json, then run pnpm test repeatedly to reproduce the intermittent resolution failure. Confirm the CLI test task waits for the engine build and that the engine test run no longer cleans dist/ during parallel tests; pnpm test should complete reliably.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

packages/cli-engine/package.json's test script is pnpm run build && pnpm run typecheck && vitest run, and tsdown.config.ts has clean: true. Under the parallel pnpm test, the engine's test task can delete and rewrite dist/ while the CLI's tests are importing it, which fails with Failed to resolve entry for package "@prisma/cli-engine". In turbo.json, test depends only on ^build. Turbo cache hits hide it most of the time.

The fix the ledger proposed: make the CLI's test task depend on the engine's build, and stop the engine's test script from cleaning dist/ mid-run.

Recorded in the prisma-cli-v8 project ledger, which is being deleted at project close-out: https://github.com/prisma/prisma-cli/blob/4356b361adf7044bae59aa0bc70340eda89fdad6/.drive/projects/prisma-cli-v8/deferred.md#L400

🤖 Generated with Claude Code

Lenguaje dominante
TypeScript
Estrellas
25
Forks
4
Merge medio
18 h 22 min
PR fusionados (30 d)
34

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de prisma/prisma-cli

Todos los issues de prisma/prisma-cli

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.