Improve changed-file verifier diagnostics when dependencies are missing

オープン
#8,050 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
hugo, javascript, node.js
領域
tooling

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
JavaScript
スター
83
フォーク
334
平均マージ
1日 21時間
マージ済み PR(30日)
106

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

influxdata/docs-v2 のほかの issue

influxdata/docs-v2 の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。