Skip to content

chore: typescript 7 - #5380

Merged
brunozoric merged 19 commits into
nextfrom
bruno/chore/typescript-7
Jul 10, 2026
Merged

chore: typescript 7#5380
brunozoric merged 19 commits into
nextfrom
bruno/chore/typescript-7

Conversation

@brunozoric

Copy link
Copy Markdown
Contributor

Summary

Rewrites build-tools/tsCompile.js for TypeScript 7 compatibility. TS 7 removed the entire programmatic compiler API (ts.sys, ts.readConfigFile, ts.createProgram, program.emit()), replacing it with a
native binary + client-server architecture under typescript/unstable/*.

New approach shells out to the native tsc binary via execFileSync, split into focused modules:

  • typescript/getTscBinaryPath.js — resolves platform-specific native binary from @typescript/typescript-{platform}-{arch}
  • typescript/readTsConfig.js — JSONC-aware config reader (comments + trailing commas)
  • typescript/runTsc.js — binary executor with 10MB buffer, proper error propagation
  • typescript/writeTempTsConfig.js — temp config with random suffix for concurrent safety

Additional fixes required by TS 7

  • Root tsconfig.build.json: removed 5 deprecated options (noImplicitUseStrict, noStrictGenericChecks, suppressImplicitAnyIndexErrors, suppressExcessPropertyErrors, keyofStringsOnly)
  • @webiny/wcp: removed duplicate computed property key — PROJECT_PACKAGE_FEATURE_NAME.AL and .AUDIT_LOGS both resolve to "auditLogs"
  • create-webiny-project: excluded bundled Yarn CJS binary from TS compilation (module.exports serialization error)
  • buildPackages.ts: wrapped node-notifier in try/catch — terminal-notifier binary crashes with EBADARCH on ARM64 macOS

Cross-platform & robustness

  • Windows: .exe suffix, long-path \\?\ prefix for paths >= 248 chars
  • --tsBuildInfoFile pinned to package root (prevents leak into dist/)
  • resolve() instead of join() for outDir (handles absolute paths)
  • Temp config gitignored (tsconfig.build.tmp-*.json)
  • Helpful error message when platform package missing

Test plan

  • Full yarn build --no-cache passes (138 packages, 17 batches, ~34s)
  • No .tsbuildinfo files in any dist/ directory
  • No stray temp configs after build
  • Two independent Fable 5 review passes — all findings addressed
  • Verify CI build passes on Linux runners
  • Verify create-webiny-project still bundles Yarn binary correctly at runtime

@brunozoric brunozoric self-assigned this Jul 9, 2026
@brunozoric brunozoric added this to the 6.6.0 milestone Jul 9, 2026
@brunozoric
brunozoric force-pushed the bruno/chore/typescript-7 branch from 9570e00 to a4fa7f9 Compare July 9, 2026 09:32
@brunozoric

Copy link
Copy Markdown
Contributor Author

/e2e

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Cypress E2E tests have been initiated (for more information, click here). ✨

Database Status Admin URL
DDB 🔄 Deploying... -
DDB+OS 🔄 Deploying... -

@brunozoric
brunozoric force-pushed the bruno/chore/typescript-7 branch from fedb70b to 2d60e0b Compare July 9, 2026 12:31
brunozoric and others added 17 commits July 10, 2026 09:52
TypeScript 7 removed the entire programmatic compiler API (ts.sys,
ts.readConfigFile, ts.createProgram, program.emit). Replaced with
native tsc binary invocation via execFileSync.

- Split tsCompile.js into focused modules under typescript/ subfolder
- Remove 5 deprecated compiler options from root tsconfig.build.json
- Fix duplicate computed property key in wcp/types.ts (AL/AUDIT_LOGS)
- Exclude bundled Yarn CJS binary from create-webiny-project compilation
- Wrap node-notifier sendNotification in try/catch for ARM64 compat

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@brunozoric
brunozoric force-pushed the bruno/chore/typescript-7 branch from ca0c0b9 to 573f851 Compare July 10, 2026 07:53
@brunozoric
brunozoric marked this pull request as ready for review July 10, 2026 11:32
@brunozoric
brunozoric merged commit e8237d9 into next Jul 10, 2026
327 of 339 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant