Skip to content

[agent] Failed to update typescript #705

Description

@claude

Failed dependency update

Package: typescript
From: 6.0.3To: 7.0.2

Error

pnpm update-outdated-deps bumped typescript to 7.0.2 in the root and in all 34 workspace package.json files. Every eslint task in the repo then crashed before linting a single file — first in the update script's own update-outdated-deps:fix-pkg-json step, then in Step 2a (pnpm lint), where all 35 eslint tasks failed with exit code 2:

ESLint: 9.39.2

TypeError: Cannot read properties of undefined (reading 'Cjs')
    at node_modules/.pnpm/@typescript-eslint+typescript-estree@8.54.0_typescript@7.0.2/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js:59:14
    ...
    at async eslint.config.ts:1:218

Root cause

typescript-eslint is deliberately excluded from updates by the update-outdated-deps:update-versions script:

pnpm update -r --latest !eslint !@eslint/js !typescript-eslint !useless-lib

so it stays pinned at 8.54.0, whose @typescript-eslint/typescript-estree reads a ts.Extension/ModuleKind member (Cjs) that no longer exists in TypeScript 7. @typescript-eslint/parser is not in the exclusion list, so it was bumped to 8.68.0 independently — leaving the parser and the plugin/estree on different versions as well.

What was tried

  1. Reverted only the root typescript to 6.0.3 and reinstalled — eslint still crashed, because the other 33 workspace package.json files still declared 7.0.2.
  2. Reset the working tree and re-ran the update with typescript added to the exclusion list:
    pnpm update -r --latest '!eslint' '!@eslint/js' '!typescript-eslint' '!useless-lib' '!typescript'
    
    followed by syncpack fix, pnpm install --no-frozen-lockfile and update-outdated-deps:fix-pkg-json. All four validation steps then passed.

No clean migration is available from the agent's side: adopting TypeScript 7 requires unpinning typescript-eslint (and aligning it with @typescript-eslint/parser), which is a deliberate repository decision rather than a dependency bump.

Suggested follow-up

  • Move typescript-eslint to a release that supports TypeScript 7, together with @typescript-eslint/parser and @workleap/eslint-configs, then bump typescript to 7.x.
  • Consider adding @typescript-eslint/parser to the same exclusion list as typescript-eslint (or removing both), so the parser and the plugin cannot drift apart on future runs.

Related

Dependency update PR that excludes this bump: #704

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions