scripts/markdownlint deletes the tracked package-lock.json and modifies package.json
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- bash, nodejs
- 領域
- tooling
調査の方向性
バグは scripts/markdownlint 内で、ロックファイルの存在を確認して npm install --save-dev を実行するブロックにあります。まずそのブロックと、スペルが誤っている package-json.lock を検査している部分を読んでください。markdownlint がインストールされていない状態でスクリプトを実行したときに、git status で package-lock.json と package.json が変更されず、かつ lint が実行されれば完了です。issue では修正案として npm install --no-save が提案されています。
索引モデルが issue の本文から書いたものです。
説明
Error Report
Please answer the following questions before submitting your issue. Thanks!
-
What is the URL/path of the document related to this issue?
-
How would you like to improve it?
When
markdownlintis not installed globally and./node_modules/.bin/markdownlintdoes not exist yet, running./scripts/markdownlint <files>deletes the trackedpackage-lock.jsonfile and modifiespackage.json:$ ./scripts/markdownlint some-file.md $ git status --short D package-lock.json M package.jsonThe cause is in the following part of the script:
had_lock= if test -f package-json.lock ; then had_lock=true fi npm install --save-dev '[email protected]' if [[ -z "$had_lock" ]] ; then rm -f package-lock.json fi- The lock file check uses
package-json.lockinstead ofpackage-lock.json, sohad_lockis always empty andpackage-lock.jsonis always removed.package-lock.jsonhas been tracked in the repository since #8881, so this removes a tracked file. npm install --save-devadds"markdownlint-cli": "^0.17.0"todevDependenciesinpackage.json, and the script does not revert it.
Because
AGENTS.mdand several skills in.agents/instruct agents to run./scripts/markdownlint <files>for validation, these unrelated changes can easily end up in doc PRs.Suggested fix: install
markdownlint-cliwithout modifying the tracked files, for example, withnpm install --no-save '[email protected]', and remove thehad_locklogic. Alternatively, addmarkdownlint-clitodevDependenciesinpackage.jsonandpackage-lock.json. - The lock file check uses
- 主要言語
- Python
- スター
- 616
- フォーク
- 725
- 平均マージ
- 1日 6時間
- マージ済み PR(30日)
- 534
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pingcap/docs のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Broken Link Detectedオープン
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
Broken Link Detectedオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
noontide-co/mainbranch#1211 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[1.x Bug] run-operation --sql reports success but rolls back writes on transaction-capable adaptersオープンtriage
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
dbt-labs/dbt#16784 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
bug settings ui
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DewaldOosthuizen/py-tray-command-launcher#162 ·
メンテナーはふだん 1 日以内に返信
-
run_all sleeps after the final job despite documenting delays between jobs対応中かも @Gambit-Checkmate が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100