Repository navigation
fix: pnpm の override と解決版を確認して誤った更新報告を防ぐ - #53
Merged
Merged
Conversation
pnpm の override が直接依存の指定を上書きすると、manifest だけが更新され、 lock の版が古いままでも更新成功と報告していた。 実効 override のある宣言は設定を維持して理由付きでスキップする。 install 後は importer・宣言キー・実パッケージ名・版を照合し、目標未到達を失敗に数える。 全出力を最終検証後に確定し、refresh の復元も維持する。
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
概要
pnpm の overrides が直接依存を上書きし、manifest だけ更新されて lock が旧版でも成功と表示される問題を修正します。実効 override がある直接依存は理由付きでスキップし、固定・範囲の設定を保持します。親指定で無関係な直接依存を妨げず、スコープ付き依存と alias も扱います。
install 後は各 workspace の宣言キー・実名・解決版を照合します。目標未到達や確認不能な更新は成功件数から除き、JSON・text・quiet・diff で失敗として表示して終了コード2を返します。
--no-ageと--refresh-lockも対象です。設計判断
override の自動変更は利用者の固定方針を変えるため採用せず、スキップする設計を選びました。版条件付きの selector は保守的に保護し、その可能性を理由に示します。旧
package.jsonの設定は実際の pnpm が11未満の場合だけ扱います。peer 単独の要件にローカルへのインストールを要求しません。通常 install の確認失敗では検査用にファイルを保持し、refresh は既存の復元処理を使います。今回は pnpm を対象とし、出力は install の最終検証後に確定します。
検証
make ci: pass(fmt・clippy・全テスト)。追加したCLI E2Eも成功。Closes #51