Skip to content

chore: upgrade TypeScript to v6 and hold v7 - #351

Merged
willeastcott merged 1 commit into
mainfrom
chore/typescript-6
Sep 24, 2026
Merged

willeastcott merged 1 commit into
mainfrom
chore/typescript-6

Conversation

@willeastcott

Copy link
Copy Markdown
Contributor

Summary

TypeScript 7 can't land yet. typescript-eslint, which comes in through @playcanvas/eslint-config, only supports typescript <6.1.0, even in its latest release (8.70.1), so lint crashes on 7. That's one of #348's failures. This moves to TypeScript 6.0.3, the newest version typescript-eslint supports, makes the config changes TypeScript 7 will also need, and holds 7 in Renovate until typescript-eslint catches up.

Changes

  • TypeScript 5.9.3 → 6.0.3.
  • Remove baseUrl from the root and blocks tsconfigs. TS 6 deprecates it (an error by default) and TS 7 removes it; it caused fix(deps): update all npm dependencies (major) #348's build failure. Nothing used it as a module lookup root, and blocks' paths already start with ./src, so they resolve the same without it.
  • Add "types": ["node"] to lib's tsconfig. TS 6 no longer loads every @types package automatically, and src/utils/env.ts uses the process global. It goes in lib's config rather than the root one because only lib has @types/node.
  • Remove an @ts-expect-error on navigator.gpu that TS 6 reports as unused, because its DOM types now include WebGPU. The one on navigator.xr is still needed.
  • Hold typescript below 7 in renovate.json until typescript-eslint supports it, written like the existing changesets/action hold.

Verification (local)

  • Build, lint, test and the Prettier check pass with the same results as on main (0 lint errors; 140 tests passed, 16 skipped).
  • The emitted .d.ts files are byte-identical to a TS 5.9 build. The only JS differences are comments: the removed directive, and commented-out JSX in splat-viewer.tsx that TS 6 no longer copies into the output. tsc-alias rewrites blocks' imports exactly as before.
  • Lockfile: typescript is the only package whose version changes. This is the first dependency change under pnpm 12, so the re-resolve also re-keys some snapshots, as described in pnpm 12's release notes. debug's optional supports-color peer is now linked, and the eslint-plugin-import / eslint-module-utils / eslint-import-resolver-typescript peer cycle is keyed canonically.

After merging

Tick the rebase box on #348 so Renovate regenerates it from main. With the hold, it should drop typescript, and its CI should then show whether ESLint 10 and lucide-react 1.x work.

No changeset: the published output changes only in comments.

🤖 Generated with Claude Code

TypeScript 7 can't land yet. typescript-eslint, which comes in through
@playcanvas/eslint-config, only supports typescript <6.1.0 (latest
8.70.1), so linting crashes on 7. Move to 6.0.3, the newest version it
supports, and make the config changes that 7 will also need.

- Remove baseUrl from the root and blocks tsconfigs. TS 6 deprecates it
  (an error by default) and TS 7 removes it. Nothing used it as a
  lookup root, and blocks' paths already start with ./src, so they
  resolve the same without it.
- Add "types": ["node"] to lib's tsconfig. TS 6 no longer loads every
  @types package by default, and lib's env.ts uses the process global.
- Drop an @ts-expect-error on navigator.gpu that TS 6 reports as unused,
  because its DOM types now include WebGPU. The one on navigator.xr is
  still needed.
- Hold typescript below 7 in renovate.json until typescript-eslint
  supports it, like the existing changesets/action hold.

Verified locally: build, lint, test and fmt pass with the same results
as main. The emitted .d.ts files are byte-identical to TS 5.9's, and
the only JS differences are comments: the removed directive, and
commented-out JSX in splat-viewer that TS 6 no longer copies into the
output. pnpm 12's first re-resolve also re-keys a few lockfile
snapshots (debug's optional supports-color peer and the
eslint-plugin-import cycle) without changing any package version other
than typescript.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b6b1e21

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@willeastcott
willeastcott requested a lite review from Copilot September 24, 2026 17:18
@willeastcott willeastcott self-assigned this Sep 24, 2026
@pkg-pr-new

pkg-pr-new Bot commented Sep 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@playcanvas/blocks@351
npm i https://pkg.pr.new/@playcanvas/react@351

commit: b6b1e21

@willeastcott
willeastcott merged commit 171586f into main Sep 24, 2026
8 checks passed
@willeastcott
willeastcott deleted the chore/typescript-6 branch September 24, 2026 17:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved review comments remain, and all readiness assessments support approval.

Review effort: Lite
Findings: None

What changed in this PR

Upgrades TypeScript to 6.0.3, prepares configuration for TypeScript 7, and prevents Renovate from proposing v7 prematurely.

Changes:

  • Removes deprecated baseUrl settings.
  • Adds Node typings and updates WebGPU compatibility.
  • Updates dependency metadata and Renovate constraints.
File Description
tsconfig.json Removes deprecated root baseUrl.
renovate.json Holds TypeScript below v7.
pnpm-lock.yaml Updates TypeScript and dependency snapshots.
packages/​lib/​tsconfig.json Includes Node typings.
packages/​lib/​src/​utils/​create-graphics-device.ts Removes obsolete WebGPU suppression.
packages/​blocks/​tsconfig.json Removes deprecated baseUrl.
package.json Upgrades TypeScript to 6.0.3.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants