Repository navigation
feat: 静的 const コンテナの値変更を情報提供へ分類する - #34
Merged
Merged
Conversation
型注釈のない const の object と array を元ソースの AST で比較し、 キー順序、配列構造、値型、as const の位置が同じ場合に既存の値変更へ分類する。 動的な値や曖昧な宣言は従来の判定を維持する。 通常モードと厳格モード、および危険な変更の回帰テストを追加する。 値トークンが同じ整形差は報告せず、as const の派生型について互換性を保証しないことを明記する。
|
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.
型注釈のない
export constの静的 object / array で葉の値だけを変えると、従来はapi.modと利用側の impact が hook を停止していました。同じ構造の値変更を既存のconst_value_changesに分類し、通常モードでは情報提供、--strict-public-const-valuesでは確認を求めて停止します。as constの位置を比較します。動的な値、spread、computed key、重複キー、型注釈、タグ付き JSDoc、曖昧な宣言や解析失敗は従来の判定を維持します。as constの派生リテラル型は変わり得るため、これはコンパイル互換性の保証ではなく値変更ポリシーです。派生型を含む回帰ケースとモデルの説明でこの境界を明示しました。検証: 専用 unit 7 件、既存 hook unit 30 件、CLI 回帰 4 件、fmt、clippy、AST impact 検査。引用符だけを変える追加テストは修正前の失敗も確認しました。ローカルの全体検査は時間上限で途中終了したため、全体の最終判定はこの PR の GitHub Actions で行います。
Closes #29