Skip to content

fix: scaffold TypeScript plugins with TypeScript 6 - #10570

Open
MannXo wants to merge 1 commit into
RaspberryPiFoundation:mainfrom
MannXo:fix/10507-typescript-6-plugins
Open

MannXo wants to merge 1 commit into
RaspberryPiFoundation:mainfrom
MannXo:fix/10507-typescript-6-plugins

Conversation

@MannXo

@MannXo MannXo commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

The basics

The details

Resolves

Fixes #10507

Proposed Changes

  • @blockly/dev-scripts accepts TypeScript ^4.3.2 || ^5 || ^6 as a peer.
  • @blockly/create-package writes typescript: ^6.0.3 for new TypeScript plugins instead of the latest release.

Reason for Changes

New TypeScript plugins got typescript@^7.0.2, which fails npm install against the dev-scripts peer range, and ts-loader doesn't support 7 yet. Every TypeScript plugin in this repo already builds on ^6.0.3; the repo's legacy-peer-deps=true hides the peer conflict here.

Test Coverage

  • On main, a generated plugin fails npm install with the ERESOLVE from the issue.
  • With this change, a generated plugin installed against a packed copy of the updated dev-scripts installs cleanly with strict peer resolution, and npm run build succeeds.
  • npm ci, npm run lint, npm run format-check and npm run build pass at the root.

Documentation

None needed.

Additional Information

I kept ^4.3.2 in the peer range so it only widens. Happy to drop it if you'd rather go with ^5 || ^6.

The generator writes the latest published dev-scripts version, so new plugins only install cleanly once this dev-scripts change is released.

AI use: I used Claude Code to write the code changes and run the verification above.

@blockly/dev-scripts now accepts TypeScript 6 as a peer, and
create-package pins new TypeScript plugins to ^6.0.3 instead of the
latest release, since dev-scripts and ts-loader do not support
TypeScript 7.

Fixes RaspberryPiFoundation#10507
@MannXo
MannXo requested a review from a team as a code owner October 10, 2026 18:54
@MannXo
MannXo requested a review from lizschwab October 10, 2026 18:54
@github-actions github-actions Bot added the PR: fix Fixes a bug label Oct 10, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Newly created TS plugins cannot install dependencies

2 participants