Improve changed-file verifier diagnostics when dependencies are missing

Abierto
#8,050 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
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
hugo, javascript, node.js
Área
tooling

Línea de trabajo

Start with the documented setup, package.json, yarn.lock, and the changed-file verifier and scripts/ci/lint-codeblocks.mjs; confirm the supported Node and Yarn versions and install the repository dependencies. Then rerun yarn verify:changed -- --run content/platform/_index.md and check whether the missing p-limit error is resolved. If setup resolves it, make the verifier or documentation explain how to prepare dependencies; if not, identify the underlying cause and add a regression check that preserves reporting of real lint failures.

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

Descripción

Problem

The changed-file verifier attempts to run code-block lint even when the checkout's JavaScript dependencies aren't installed. The lint command then fails with a Node module-resolution stack trace instead of explaining how to prepare the environment.

Observed

In a checkout with an empty node_modules directory, run:

yarn verify:changed -- --run content/platform/_index.md

The verifier reports a failed yarn lint-codeblocks command. The underlying error is:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'p-limit' imported from .../scripts/ci/lint-codeblocks.mjs

p-limit is already declared in package.json and recorded in yarn.lock. This observation does not establish a missing dependency declaration or a CI failure. The checkout had an empty node_modules; installing the repo's dependencies may resolve this specific failure. The affected check hasn't been rerun after an install.

Requested work

  • Reproduce from a fresh checkout using the documented setup. Confirm the supported Node and Yarn versions and whether installing dependencies resolves the error.
  • If the normal setup resolves it, make the verifier or documentation give a clear, actionable dependency-install instruction when the environment isn't prepared.
  • If the failure persists after the supported installation, identify and fix the actual dependency or environment problem.
  • Add an appropriate regression check for any behavior changed, and confirm the verifier still reports real lint failures.

Context

Found while checking the InfluxDB 1 positioning changes. The same checkout also lacked the local Hugo executable, so the full build wasn't verified there.

Lenguaje dominante
JavaScript
Estrellas
83
Forks
334
Merge medio
1 d 21 h
PR fusionados (30 d)
106

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

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 influxdata/docs-v2

Todos los issues de influxdata/docs-v2

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.