docs-lint をローカルコピーから独立パッケージ依存に置き換え - #198
Merged
Merged
Conversation
7リポジトリに tools/docs-lint.mjs を個別コピーして運用した結果、 同じバグが複数リポジトリで独立に再発見・再修正される重複管理問題が 発生したため、正式版パッケージ (github:128na/docs-lint#v1.0.0) に 一本化する。package.json を持たないリポジトリのため npm 依存としては 追加せず、composer scripts・CI から npx --yes github:128na/docs-lint#v1.0.0 で直接呼び出す。tools/docs-policy.json(設定ファイル)は変更せず維持。 置き換え後の出力は旧ローカルコピーと完全一致(6 files scanned, 0 error(s), 0 warning(s))を確認済み。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tools/docs-lint.mjsを個別コピーして運用した結果、同じバグが複数リポジトリで独立に再発見・再修正される重複管理問題が発生したため、正式版パッケージ (128na/docs-lint タグv1.0.0) への依存に一本化する。composer.json(Laravel/PHP)のみでpackage.jsonを持たないため、npm 依存としては追加せず、composer scripts(docs)と CI(.github/workflows/docs-lint.yml)からnpx --yes github:128na/docs-lint#v1.0.0を直接呼び出す形にした。tools/docs-lint.mjs(ローカルコピー)は削除。設定ファイルtools/docs-policy.jsonは変更せず維持(コメント内の呼び出し方の記述のみ更新)。補足: 依頼された呼び出し形からの変更点
依頼では
npx --yes github:128na/docs-lint#v1.0.0 docs-lintという形が提示されていたが、実機検証の結果、末尾のdocs-lintは npx が単一 bin を自動解決した上でスクリプトへの追加引数として渡ってしまい、docs-lintパッケージ側ではこれを「ポリシーファイルパス」の位置引数と解釈してENOENTで落ちることを確認した。そのため末尾の引数なしnpx --yes github:128na/docs-lint#v1.0.0に修正している。Test plan
node tools/docs-lint.mjs→docs-lint: 6 files scanned, 0 error(s), 0 warning(s)(exit 0)npx --yes github:128na/docs-lint#v1.0.0→docs-lint: 6 files scanned, 0 error(s), 0 warning(s)(exit 0) — 出力完全一致composer run docs経由でも同じ出力を確認docs-lintworkflow) が green になること🤖 Generated with Claude Code