Skip to content

chore(deps): typescript-eslint を 8.71.1 に上げ、test workflow で pnpm peers check を流す - #38

Merged
april418 merged 2 commits into
masterfrom
feature/fix-typescript-eslint-peer
Oct 19, 2026
Merged

april418 merged 2 commits into
masterfrom
feature/fix-typescript-eslint-peer

Conversation

@april418

@april418 april418 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

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-eslint 8.57.2 一式は peer で typescript: >=4.8.4 <6.0.0 を宣言しており、この repo の typescript 6.0.2 に合わない。
    master(5fe4466)の pnpm peers check は exit 1 で、出ていた不一致はこの 1 件だけ
    ✕ unmet peer typescript
      Installed: 6.0.2
      Wanted:
        ">=4.8.4 <6.0.0":
          @typescript-eslint/eslint-plugin@8.57.2
          @typescript-eslint/type-utils@8.57.2
          @typescript-eslint/typescript-estree@8.57.2
          @typescript-eslint/project-service@8.57.2
          @typescript-eslint/tsconfig-utils@8.57.2
          @typescript-eslint/utils@8.57.2
          @typescript-eslint/parser@8.57.2
          typescript-eslint@8.57.2
    
  • typescript-eslint は 8.58.0(2026-03-30 公開)から peer を >=4.8.4 <6.1.0 に広げている
  • gts 7.0.0(最新)は typescript-eslint / @typescript-eslint/eslint-plugin / @typescript-eslint/parser を ^8.46.1 で宣言しているので、
    pnpm update typescript-eslint '@typescript-eslint/*' で lockfile だけ上がる
  • CI はこの不一致を検出していなかった。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 に上げる

  • typescript-eslint と @typescript-eslint/* の 10 パッケージ(eslint-plugin / parser / project-service / scope-manager /
    tsconfig-utils / type-utils / types / typescript-estree / utils / visitor-keys): 8.57.2 → 8.71.1(2026-10-05T17:08Z 公開)
    • 最新の 8.71.2 は 2026-10-12T17:10Z 公開で、minimumReleaseAge(7 日)を満たさないため選ばれない
  • 巻き込みで追加されたもの(いずれも公開から 7 日以上)
    • @eslint-community/eslint-utils 4.10.1(2026-07-22 公開、@typescript-eslint/utils から)
    • minimatch 10.2.6(2026-07-27 公開、@typescript-eslint/typescript-estree から)
    • semver 7.8.5(2026-06-19 公開、@typescript-eslint/typescript-estree から)
    • 8.71.1 が宣言する範囲(^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 配下だけで、公開物には影響しない)
  • 変わったのは typescript-eslint 一式の配下だけで、importers(直接依存)と他の依存の解決結果は動いていない

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 と同じ
  • 置き場所は install の直後、Security audit の前にした
    • frozen install が lockfile と package.json のずれを先に検査するので、peers check はずれの無い lockfile を見る
    • audit / test / build より前で落ちるので、不一致が後ろのステップの失敗に隠れない
  • pnpm の strictPeerDependencies: true では代わりにならない。例外を投げるのは依存解決の中だけで、
    lockfile が最新のときの frozen install はその経路を通らない。このことをステップの直上にコメントで残した

Commits

  • e6d8a07 chore(deps): typescript-eslint と @typescript-eslint/* を 8.71.1 に上げる
  • e6fc1c1 ci(test): test workflow で pnpm peers check を流す

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 0
  • pnpm 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 が動いている)
  • 公開物の cjs/ と esm/(36 ファイル)は master のビルドと同じ(diff -r)
  • 不一致がある状態で新しいステップが落ちること: この PR の test.yml と master の pnpm-lock.yaml を組み合わせた worktree で、
    pnpm install --frozen-lockfile は exit 0(peer の行 0 件)、pnpm peers check は exit 1(上記と同じ 8 パッケージ)
  • push の test run(e6fc1c1、run 38896516829): success。Peer dependency check ステップのログは No peer dependency issues found
  • pull_request の test run(e6fc1c1、run 38896667485): success

範囲外

  • typescript-eslint 8.71.x の peer は typescript: <6.1.0 なので、TypeScript を 6.1 に上げると同じ種類の不一致が再発する。
    この PR のステップで CI が落ちるようになる
  • peers check はプレリリースも範囲内として判定するため、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

april418 and others added 2 commits October 16, 2026 20:50
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>
@april418
april418 merged commit 2ff9655 into master Oct 19, 2026
2 checks passed
@april418
april418 deleted the feature/fix-typescript-eslint-peer branch October 19, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant