mirror of
https://github.com/mastra-ai/mastra.git
synced 2026-11-17 08:44:46 +00:00
## Description Upgrade TypeScript from `5.9.3` to `6.0.3` across the monorepo. TS 6 is the last JS-based release before the Go-based TS 7 — this upgrade prepares the codebase for the eventual v7 migration. ### What changed **Version bump:** - pnpm catalog: `^5.9.3` → `^6.0.3` **Deprecated option removals (TS 6 deprecations → errors in TS 7):** - Removed `baseUrl` from 5 tsconfig files (playground-ui, playground, react SDK) — `paths` now resolves relative to the tsconfig without `baseUrl` - Removed `baseUrl` from 3 e2e test template tsconfigs (no-bundling, monorepo app, inner-tools) - Updated root `tsconfig.json` `moduleResolution` from `"Node"` (alias for deprecated `Node10`) to `"bundler"` **@types auto-discovery (TS 6 breaking change):** - Added `"types": ["node"]` to `tsconfig.node.json` (base config for most packages) - Added `"types": ["node"]` to standalone tsconfigs that don't extend `tsconfig.node.json` (`mcp-registry-registry`, `create-mastra`, `memory/integration-tests`, `playground/e2e/kitchen-sink`) - Added `"types": ["node"]` to e2e test templates (`commonjs`, `no-bundling`, `type-check`) **Build fixes:** - Patched `tsup@8.5.1` to fix `baseUrl` deprecation error in DTS builder (upstream [egoist/tsup#1388](https://github.com/egoist/tsup/issues/1388), unmerged [fix PR #1390](https://github.com/egoist/tsup/pull/1390)) - Fixed `convex` and `elasticsearch` `tsconfig.build.json` to properly extend local `tsconfig.json` (matching all other stores) **Code fixes:** - Removed 2 now-unused `@ts-expect-error` directives in `packages/core` for `ReadableStream` async iteration (natively supported in TS 6's ES2025 lib) - Added type assertion for `Response.json()` return in `mcp-docs-server` (now returns `Promise<unknown>` instead of `Promise<any>`) - Fixed type narrowing in `editor/processor-graph-hydrator.ts` for `.parallel()` and `.map()` calls ### Verified locally - **Full monorepo build**: 122/122 tasks pass — all `.d.ts` generation works correctly - **Typecheck**: all packages pass - **Lint**: 112/112 tasks pass - **E2E tests**: monorepo + no-bundling suites pass locally ## Type of Change - [x] Code refactoring ## Checklist - [x] I have made corresponding changes to the documentation (if applicable) - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have addressed all Coderabbit comments on this PR Link to Devin session: https://app.devin.ai/sessions/286c1e429f144e4eb8f4a69033a347fd Requested by: @TylerBarnes --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: tyler <tylerdbarnes@gmail.com>
34 lines
852 B
34 lines
852 B