"Incremental build equals clean build" is claimed but never tested

オープン 初心者向け
#265 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, node.js

調査の方向性

まず site/build.mjs の writeOut と pruneDist の周辺を確認し、次に site/lib/lib.test.mjs と入門セクションにあるテストコマンドを読みます。提案されている変更は、関数を site/lib/dist-writer.mjs に移動し、dist ディレクトリをパラメーター化して、一時ディレクトリでテストすることです。完了条件は、指定されたバイト比較、書き換え、古いファイルの削除、ディレクトリの整理がテストでカバーされていることです。

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

説明

priority: low tests

Summary

build.mjs says the incremental result is byte-identical to a clean build, but writeOut, pruneDist and the produced-file set are not tested, and CI always builds from a fresh checkout, so the incremental path never runs there.

Where

  • site/build.mjs:272-275 (claim)
  • site/build.mjs:288-299 (writeOut)
  • site/build.mjs:323-335 (pruneDist)
  • site/build.mjs:526-531, :638, :745

Impact

A stale file left in local dist, or a needed file pruned, would only show locally.

Suggested fix

Move writeOut and pruneDist into site/lib/dist-writer.mjs with the dist directory as a parameter and test them in a temp directory.

Acceptance criteria

  • Same bytes written twice: 0 writes the second time
  • Same-size file with different bytes is rewritten
  • Stale old/x.html removed and its empty directory pruned
  • Directory holding a produced file is kept
  • Optional: hashes of build and build --clean match in a temp copy

Getting started

  • Relevant files: site/build.mjs, site/lib/lib.test.mjs
  • Run the tests: npm test; the full local gate is npm run check (Node 22+, no install step)
  • Related docs: CONTRIBUTING.md, site/README.md

Related: #85


Filed by repo-audit/full-audit at 4adb944. Severity: low. Effort: S. audit-key: testing|site/build.mjs|writeOut

主要言語
JavaScript
スター
58
フォーク
15
平均マージ
1日 15時間
マージ済み PR(30日)
12

環境構築

はじめの一歩

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

TMHSDigital/Free-Game-Dev-Assets のほかの issue

TMHSDigital/Free-Game-Dev-Assets の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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