Skills in a workspace fall back to each package when one member's package.json has a BOM or does not parse

Abierto
#432 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
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
node.js, typescript
Área
cli, tooling

Línea de trabajo

Start with packages/cli/src/lib/skills/workspace-members.ts and trace how @manypkg/tools handles workspace member manifests; check the skills sync and init paths that consume the member list. Reproduce with a workspace member whose package.json has a BOM or invalid JSON. Done when one bad manifest does not hide other members and the affected skills commands report a diagnostic instead of silently using the member directory.

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

Descripción

What happens

In a pnpm or npm workspace, a single member whose package.json starts with a byte order mark (BOM), or does not parse as JSON, makes the CLI treat the whole workspace as having no members.

packages/cli/src/lib/skills/workspace-members.ts lists members with @manypkg/tools, which throws on that file. The CLI then anchors agent skills at the current directory in every package, as it did before 8.0.0-rc.38:

  • prisma skills sync run in any member writes skill copies into that member, not the workspace root;
  • the out-of-date notice reads the member's own copies;
  • prisma init in a member writes the postinstall hook there, unless a parent prisma.config.ts governs it.

Nothing tells the user why.

Reproduction

  1. A pnpm workspace with pnpm-workspace.yaml listing packages/*, two members packages/a and packages/b, and a .git directory at the root.
  2. Save packages/b/package.json with a UTF-8 BOM (or break its JSON).
  3. In packages/a, run prisma skills sync. Expected: copies under the workspace root. Actual: copies under packages/a.

Expected

Listing members tolerates a BOM, and one unreadable member manifest does not drop every member. If a member cannot be read, the skills commands report it with a diagnostic, not silently fall back.

Found while reviewing the fix for init --postinstall in a workspace member.

Lenguaje dominante
TypeScript
Estrellas
26
Forks
4
Merge medio
12 h 11 min
PR fusionados (30 d)
38

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.