Skip to content

TypeScript 7 移行の解禁判定と dependabot ignore の解除 #708

Description

@ryowatanabe

背景

2026-08-05 の Dependabot 実行 (run 30974518707) が typescript 6.0.3 → 7.0.2 の更新で失敗した。

Dependabot が実行したコマンドと出力 (ローカルでも同一エラー・exit 1 を再現済み):

$ corepack yarn add typescript@7.0.2 --mode=update-lockfile

YN0060: typescript is listed by your project with version 7.0.2, which doesn't satisfy
        what @typescript-eslint/eslint-plugin and other dependencies request (>=4.8.4 <6.1.0).
YN0086: Some peer dependencies are incorrectly met by your project
YN0001: Error: typescript@patch:typescript@npm%3A7.0.2#optional!builtin<compat/typescript>::version=7.0.2&hash=5786d5:
        ENOENT: no such file or directory, lstat '/node_modules/typescript/lib/_tsc.js'

Dependabot はこれを dependency_file_not_resolvable: {"message": "peer dependencies are incorrectly met"} として報告し、ジョブ全体が exit 1 になる。

原因 (2 つ重なっている)

  1. Yarn 側 (致命的): Yarn 4.14.1 は typescript に builtin<compat/typescript> パッチを自動適用するが、TypeScript 7 は Go 実装への書き換えで lib/_tsc.js を同梱しなくなったため ENOENT で落ちる。
  2. peer 制約: @typescript-eslint/eslint-plugin 8.65.0 が typescript >=4.8.4 <6.1.0 を要求しており、TS 7 は満たさない。

いずれにせよ現時点の toolchain では TypeScript 7 を採用できない。

暫定対応

.github/dependabot.yml で typescript の major 更新を ignore し、週次実行が毎回 failure になるのを止める (本 issue を起票した PR で実施)。

解除条件

以下の 両方 を満たしたら .github/dependabot.ymlignore エントリを削除する。

  • @typescript-eslint/eslint-plugin / @typescript-eslint/parser の peer が TypeScript 7 を許容する
  • Yarn の builtin<compat/typescript> パッチが TypeScript 7 で動作する (または Yarn 側で patch 適用が不要になる)

確認方法

# peer 制約の確認
yarn npm info @typescript-eslint/eslint-plugin --fields peerDependencies

# 実際に通るか (失敗したら package.json / yarn.lock を revert すること)
corepack yarn add typescript@<latest-7.x> --mode=update-lockfile

両方通るようになったら ignore を外し、yarn lint / tsc --noEmit / yarn test / yarn build で検証する。

関連

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions