Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

refactor: move build.mjs helpers into lib/ and cover the untested paths (frontmatter types, duplicate ids, link schemes, check-links args)

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

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

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

評価

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

調査の方向性

Start with build.mjs, checks.test.mjs, and lib.test.mjs; trace the listed helpers and untested paths, then compare the duplicated definitions in the named modules. The issue suggests moving build helpers into site/lib/build-helpers.mjs and adding assertions for each listed case. Done means build.mjs is mostly orchestration, every listed path has an assertion, and duplicated definitions exist once.

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

説明

enhancement priority: medium tests

Why it matters
checks.test.mjs and lib.test.mjs are quick (under 0.5 s together, 538 assertions) and good, but everything defined inside build.mjs (licenseFamily, loadEntries normalisation, groupedRowsHtml, categoryChipsHtml, headMetaHtml, sitemapXml, notFoundHtml, robotsTxt) is unexported and has no unit test; only CI's full build exercises it. Three of the bugs filed today (string tags, duplicate ids, scheme disagreement) sit exactly in those untested seams, and a test on parseFrontmatter with a trailing comment would have caught the first.

Evidence (grep of both test files on 2026-10-21)
Untested: build.mjs helpers above; repoOf (link-check.mjs:263); the LinkError instanceof gate (build.mjs:422, 477); renderInline bare-URL paren balancing and stop rules (markdown.mjs:316-323); renderBlocks dedent to an intermediate indent (:393-396); checkPage data:/mailto: skip (page-checks.mjs:83); parseFrontmatter with quoted booleans, non-list fields, trailing comments; check-links.mjs arg parsing and run() retry; sync-counts.mjs countEntries.
Duplicated logic that can drift: ID_RE (validate.mjs:59, scaffold.mjs:124); empty() (checks.mjs:64) vs isEmptyField() (validate.mjs:128); count-table regex (checks.mjs:679-681, fragment not regex-escaped) vs scaffold.mjs:106; pickPath (stacks.mjs:59-68) strips # only while makeLinkResolver (links.mjs:12) strips ? and #. Dead code: validate.mjs:98-100 SKIP_WALK contains dist, so the site/dist/ binary prefix can never match.

Suggested approach
Move the build.mjs helpers to site/lib/build-helpers.mjs (or split by concern), export each shared regex/predicate once, delete the dead prefix, and add the listed cases to the two test files. Keep the zero-dependency style.

Done when
build.mjs is mostly orchestration, every listed path has at least one assertion, and the duplicated definitions exist once.

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

環境構築

はじめの一歩

  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 を短くまとめたダイジェスト。