Skip to content

H-6787: Update to TypeScript 7 - #9944

Open
indietyp wants to merge 11 commits into
mainfrom
bm/h-6787-replace-tsgo-with-typescript-7
Open

indietyp wants to merge 11 commits into
mainfrom
bm/h-6787-replace-tsgo-with-typescript-7

Conversation

@indietyp

@indietyp indietyp commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

🌟 Purpose

Adopt TypeScript 7 as the default tsc, this therefore replaces TypeScript 6, and TypeScript native preview, meaning that we're finally on the same version.

The current only issue is that TypeScript 7 does not expose an API (only TypeScript 7.1 will do so), therefore systems that need to interact with TypeScript directly use the TypeScript 6 package. Astro and ESLint additionally stay behind - both require TypeScript 7.1.

This isn't a problem, since the changes between the two versions are minimal.

🔍 Changes

  • Use @typescript/typescript6 for direct compiler-API consumers, including Petrinaut's browser language service and graph code generation. Pass the same compiler to the browser extension's ts-loader and React Refresh transformer. Its standalone type-check still uses TypeScript 7.
  • Keep ESLint's parser/plugin dependency tree on TypeScript 6 through workspace-limited hoisting. A direct dependency alone still lets transitive plugins load TypeScript 7. Declare the Astro language server's missing TypeScript peer so Volar resolves the checker's compiler. Yarn constraints preserve these named-catalog exceptions.
  • Move @blockprotocol/type-system to Rolldown with native declaration generation rather than retaining Rollup's compiler-API dependency. Check the bundled .d.ts files after emission because bundling can succeed with invalid type references. The main/slim runtime exports and WASM assets remain unchanged.

@indietyp
indietyp added this pull request to stack #9934 October 6, 2026 21:00
@vercel

vercel Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hash Ready Ready Preview Oct 19, 2026 5:59pm UTC
petrinaut Ready Ready Preview Oct 19, 2026 5:59pm UTC
petrinaut-docs Ready Ready Preview Oct 19, 2026 5:59pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
hashdotdesign-tokens Ignored Ignored Preview Oct 19, 2026 5:59pm UTC

Request Review

@github-actions github-actions Bot added area/deps Relates to third-party dependencies (area) area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team type/eng > backend Owned by the @backend team area/tests New or updated tests area/apps labels Oct 6, 2026
@indietyp
indietyp deployed to pull-request October 6, 2026 21:01 — with GitHub Actions Active
@indietyp
indietyp deployed to pull-request October 6, 2026 21:01 — with GitHub Actions Active
@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 17.24138% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.03%. Comparing base (4b68bf2) to head (a1b29df).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...protocol/type-system/typescript/rolldown.config.js 0.00% 12 Missing ⚠️
...al/harpc/client/typescript/src/net/internal/dns.ts 0.00% 2 Missing ⚠️
...bs/@local/hash-isomorphic-utils/src/prosemirror.ts 0.00% 2 Missing ⚠️
...es/flow-activities/generate-chart-config-action.ts 0.00% 1 Missing ⚠️
...sheet-action/convert-subgraph-to-sheet-requests.ts 0.00% 1 Missing ⚠️
...sh-api/src/graph/knowledge/system-types/comment.ts 0.00% 1 Missing ⚠️
...-api/src/graphql/resolvers/ontology/entity-type.ts 0.00% 1 Missing ⚠️
...pi/src/graphql/resolvers/ontology/property-type.ts 0.00% 1 Missing ⚠️
...ocal/harpc/client/typescript/src/net/Connection.ts 0.00% 1 Missing ⚠️
...cal/harpc/client/typescript/src/net/Transaction.ts 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9944      +/-   ##
==========================================
- Coverage   68.13%   68.03%   -0.11%     
==========================================
  Files        1995     2000       +5     
  Lines      205556   205884     +328     
  Branches     8708     8780      +72     
==========================================
+ Hits       140053   140066      +13     
- Misses      63838    64154     +316     
+ Partials     1665     1664       -1     
Flag Coverage Δ
apps.hash-ai-worker-ts 6.86% <0.00%> (-0.42%) ⬇️
apps.hash-api 15.60% <0.00%> (ø)
blockprotocol.type-system 41.73% <14.28%> (+0.88%) ⬆️
durable-kernel 86.65% <ø> (-0.09%) ⬇️
error-stack 90.55% <ø> (ø)
harpc-codec 84.61% <ø> (ø)
harpc-net 96.25% <ø> (-0.02%) ⬇️
harpc-tower 67.11% <ø> (ø)
harpc-types 0.00% <ø> (ø)
harpc-wire-protocol 93.85% <ø> (ø)
hash-codec 72.09% <ø> (ø)
hash-config 83.57% <ø> (ø)
hash-graph 21.07% <ø> (ø)
hash-graph-api 37.84% <ø> (ø)
hash-graph-atlas 80.04% <ø> (+0.03%) ⬆️
hash-graph-authentication 96.71% <ø> (ø)
hash-graph-authorization 68.47% <ø> (ø)
hash-graph-embeddings 91.92% <ø> (ø)
hash-graph-postgres-store 31.61% <ø> (ø)
hash-graph-store 50.93% <ø> (ø)
hash-graph-temporal-versioning 50.53% <ø> (ø)
hash-graph-types 0.00% <ø> (ø)
hash-graph-validation 85.37% <ø> (ø)
hash-integrations-definition 95.05% <ø> (ø)
hash-middleware 87.80% <ø> (ø)
hash-secret 99.50% <ø> (ø)
hashql-ast 90.01% <ø> (ø)
hashql-compiletest 28.71% <ø> (ø)
hashql-core 81.41% <ø> (ø)
hashql-diagnostics 72.85% <ø> (ø)
hashql-eval 81.55% <ø> (ø)
hashql-hir 89.10% <ø> (ø)
hashql-mir 87.22% <ø> (ø)
hashql-syntax-jexpr 94.77% <ø> (ø)
local.harpc-client 51.56% <33.33%> (+0.06%) ⬆️
local.hash-backend-utils 6.23% <0.00%> (ø)
local.hash-graph-sdk 9.79% <ø> (ø)
local.hash-isomorphic-utils 31.96% <33.33%> (+0.02%) ⬆️
problematic 90.09% <ø> (ø)
railroad-plugin 45.28% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed

codspeed Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 6 benchmarks measured no execution time

Nothing ran under measurement, usually because the compiler removed the code under test. These results are not comparable, so they count as unchanged.

Preventing compiler optimizations

✅ 98 untouched benchmarks


Comparing bm/h-6787-replace-tsgo-with-typescript-7 (f1662ab) with main (d3c0347)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (5000b26) during the generation of this report, so d3c0347 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread libs/@blockprotocol/graph/package.json Outdated

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread libs/@blockprotocol/graph/package.json

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e140d24. Configure here.

Comment thread libs/@blockprotocol/type-system/typescript/rolldown.config.js

This branch was successfully deployed

5 active (2 outdated) deployments
Preview – hash — f1662ab1 Deployed Oct 19, 2026 by vercel[bot]
Preview – petrinaut-docs — f1662ab1 Deployed Oct 19, 2026 by vercel[bot]
Preview – petrinaut — f1662ab1 Deployed Oct 19, 2026 by vercel[bot]
pull-request — a1b29dfb Deployed Oct 19, 2026 by indietyp via Sourcemaps (@apps/hash-ai-worker-ts) #40443
Preview – hashdotdesign-tokens — dcedbcf0 Deployed Oct 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash.design Affects the `hash.design` design site (app) area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-api Affects the HASH API (app) area/apps area/deps Relates to third-party dependencies (area) area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) area/tests > integration New or updated integration tests area/tests New or updated tests type/eng > backend Owned by the @backend team type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

1 participant