Skip to content

Fix compatibility with TypeScript 6 or 7#1390

Open
pxseu wants to merge 1 commit into
egoist:mainfrom
pxseu:pxseu/ts6
Open

Fix compatibility with TypeScript 6 or 7#1390
pxseu wants to merge 1 commit into
egoist:mainfrom
pxseu:pxseu/ts6

Conversation

@pxseu
Copy link
Copy Markdown

@pxseu pxseu commented Mar 25, 2026

Fixes:
#1389
#1388

error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0.
Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.

Tested as a monkey patch here:

pxseu/fami@08c396d
https://github.com/pxseu/fami/actions/runs/23560643308/job/68599308721#step:5:9

@codesandbox
Copy link
Copy Markdown

codesandbox Bot commented Mar 25, 2026

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 25, 2026

@pxseu is attempting to deploy a commit to the EGOIST's projects Team on Vercel.

A member of the Team first needs to authorize it.

@pxseu pxseu changed the title Fix compatibility with TypeScript 6 Fix compatibility with TypeScript 6 or 7 Mar 25, 2026
@lgarron
Copy link
Copy Markdown

lgarron commented Mar 31, 2026

I've also confirmed that this patch unbreaks tsup with TypeScript 6 for a fairly complex repo.

This looks like a very effective fix, since it still passes baseUrl via compilerOptions when this is explicitly set. So any projects that need to set this value still have a way to do so.

I'd like to implore the maintainers to merge this and include it in a release, rather than continuing to sit on it.

mcarter-astronautdev added a commit to DriverDigital/vite-plugin-shopify-clean that referenced this pull request Apr 17, 2026
tsup unconditionally sets baseUrl when generating .d.ts files,
which triggers TS5101 in TypeScript 6. Adding ignoreDeprecations
until tsup merges egoist/tsup#1390.
TylerBarnes added a commit to mastra-ai/mastra that referenced this pull request Apr 29, 2026
## 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](egoist/tsup#1388), unmerged
[fix PR #1390](egoist/tsup#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>
pgerke added a commit to lion-and-bear/freeathome-local-api-client that referenced this pull request May 16, 2026
egoist/tsup#1390
Signed-off-by: Philip Gerke <me@philipgerke.com>
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.

2 participants