Repository navigation
chore(deps): typescript-eslint を 8.71.1 に上げ、test workflow で pnpm peers check を流す - #38
Merged
Merged
Conversation
gts 7.0.0 が引き込む typescript-eslint 8.57.2 一式は peer で typescript >=4.8.4 <6.0.0 を宣言しており、この repo の typescript 6.0.2 と合わず pnpm peers check が不一致を出していた。typescript-eslint は 8.58.0 から peer を <6.1.0 に広げている。 gts 7.0.0 は typescript-eslint と @typescript-eslint/eslint-plugin / parser を ^8.46.1 で宣言しているので、package.json は変えずに lockfile 上の版だけを上げた。最新の 8.71.2 は公開から 7 日未満で minimumReleaseAge にかかるため 8.71.1 にしている。 pnpm update は更新対象の配下の依存も範囲内の最新に解決し直すため、 @eslint-community/eslint-utils 4.10.1 / minimatch 10.2.6 / semver 7.8.5 が追加された。8.71.1 が宣言する範囲(^4.9.1 / ^10.2.2 / ^7.7.3)は 既存の 4.9.1 / 10.2.4 / 7.7.4 でも満たせる。既存の版は eslint や eslint-plugin-n など他の依存が使い続けるので残る。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pnpm install --frozen-lockfile は peer dependency の不一致があっても exit 0 で終わり、警告も出さない。そのため typescript-eslint 8.57.2 の peer(typescript >=4.8.4 <6.0.0)と typescript 6.0.2 の不一致が CI で 検出されないまま残っていた。typescript-eslint 8.71.x の peer は typescript <6.1.0 なので、TypeScript を 6.1 に上げると同じ不一致が 再発しうる。 install の直後に置き、lockfile と node_modules が揃った時点で検査する。 audit / test / build より前で落とすことで、不一致を他の失敗に紛れさせない。 strictPeerDependencies が例外を投げるのは依存解決の中だけで、lockfile が 最新のときの frozen install はその経路を通らないため、代わりにならない。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
gts 7.0.0 が引き込む typescript-eslint 一式を lockfile 上で 8.57.2 → 8.71.1 に上げ、typescript 6.0.2 との peer 不一致を解消する。package.json は変えない。
あわせて test workflow の
pnpm install --frozen-lockfileの直後にpnpm peers checkを足し、peer の不一致があれば CI を落とすようにする。IntimateMerger/im-ulid#27(lockfile の更新)と IntimateMerger/im-ulid#28(peers check の追加)と同じ対応を、1 本にまとめたもの。
ステップだけを先に入れると master の CI が落ちるので、lockfile の更新を先のコミットに置いている。
背景
typescript: >=4.8.4 <6.0.0を宣言しており、この repo の typescript 6.0.2 に合わない。master(5fe4466)の
pnpm peers checkは exit 1 で、出ていた不一致はこの 1 件だけ>=4.8.4 <6.1.0に広げている^8.46.1で宣言しているので、pnpm update typescript-eslint '@typescript-eslint/*'で lockfile だけ上がるpnpm install --frozen-lockfileは peer の不一致があっても exit 0 で終わり、警告も出さない(master 5fe4466 の test run 38886616790 も success で、ログに peer を含む行は 0 件)
Changes
chore(deps): typescript-eslint と @typescript-eslint/* を 8.71.1 に上げる
tsconfig-utils / type-utils / types / typescript-estree / utils / visitor-keys): 8.57.2 → 8.71.1(2026-10-05T17:08Z 公開)
^4.9.1/^10.2.2/^7.7.3)は既存の 4.9.1 / 10.2.4 / 7.7.4 でも満たせるが、pnpm updateが更新対象の子依存を解決し直したため新しい版が入った。既存の版は eslint 9.39.4 / 10.1.0 や eslint-plugin-n などが使い続けるので残る(devDependencies 配下だけで、公開物には影響しない)
ci(test): test workflow で pnpm peers check を流す
.github/workflows/test.ymlにPeer dependency checkステップ(pnpm peers check)を追加する。追加行は ci(test): test workflow で pnpm peers check を流す im-ulid#28 と同じstrictPeerDependencies: trueでは代わりにならない。例外を投げるのは依存解決の中だけで、lockfile が最新のときの frozen install はその経路を通らない。このことをステップの直上にコメントで残した
Commits
Test plan
手元(node 24.14.1 / pnpm 11.9.0 / registry.npmjs.org)で確認済み:
pnpm peers check: master は exit 1(上記)、この PR は exit 0(No peer dependency issues found)。--lockfile-onlyでも同じpnpm install --frozen-lockfile(node_modules なしから): exit 0pnpm audit: exit 0(No known vulnerabilities found、master と同じ)pnpm test: 5 ファイル 51 件通過pnpm run build(prebuild のgts lint含む): exit 0。新しい lint エラー・警告は出ないgts lintは root の eslint 10.1.0 を**/*.ts **/*.js **/*.tsx **/*.jsxで起動し、gts の設定から読まれるtypescript-eslint は 8.71.1。対象の .prettierrc.js と src/ の 11 ファイルの計 12 ファイルとも errors 0 / warnings 0
@typescript-eslint/no-floating-promisesが、Promise を放置した検証用ファイルをエラーにすることも確認した(TypeScript 6.0.2 で型付きの lint が動いている)
diff -r)pnpm install --frozen-lockfileは exit 0(peer の行 0 件)、pnpm peers checkは exit 1(上記と同じ 8 パッケージ)Peer dependency checkステップのログはNo peer dependency issues found範囲外
typescript: <6.1.0なので、TypeScript を 6.1 に上げると同じ種類の不一致が再発する。この PR のステップで CI が落ちるようになる
typescript@6.1.0-betaのような版は検出しない(ci(test): test workflow で pnpm peers check を流す im-ulid#28 で確認)🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com