Skip to content

fix(build): support decorator metadata with TypeScript 7 - #4505

Merged
carderne merged 5 commits into
mainfrom
feature/tri-12948-support-emitdecoratormetadata-with-typescript-7
Aug 5, 2026
Merged

fix(build): support decorator metadata with TypeScript 7#4505
carderne merged 5 commits into
mainfrom
feature/tri-12948-support-emitdecoratormetadata-with-typescript-7

Conversation

@carderne

@carderne carderne commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Allow projects using TypeScript 7 to enable emitDecoratorMetadata() without adding the TypeScript 6 compiler to every Trigger.dev CLI installation. Addresses #4500.

Fix

The extension now resolves TypeScript from the project and feature-detects the legacy compiler API. TypeScript 5 and 6 continue using the project's compiler, while TypeScript 7 projects can install Microsoft's optional @typescript/typescript6 compatibility package alongside TypeScript 7.

When no compatible compiler API is available, the build reports an actionable installation error. The extension documentation includes setup commands for npm, pnpm, and Bun.

Verified with TypeScript 5, TypeScript 6, TypeScript 7 with and without the compatibility package, emitted decorator metadata, packed ESM and CommonJS consumers, package export checks, and typechecking.

@changeset-bot

changeset-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5a71996

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 changesets to release 27 packages
Name Type
trigger.dev Patch
@trigger.dev/build Patch
@trigger.dev/core Patch
@trigger.dev/python Patch
@trigger.dev/react-hooks Patch
@trigger.dev/redis-worker Patch
@trigger.dev/rsc Patch
@trigger.dev/schema-to-json Patch
@trigger.dev/sdk Patch
@internal/dashboard-agent Patch
@internal/cache Patch
@internal/clickhouse Patch
@internal/llm-model-catalog Patch
@internal/metrics-pipeline Patch
@trigger.dev/rbac Patch
@internal/redis Patch
@internal/replication Patch
@internal/run-engine Patch
@internal/run-store Patch
@internal/schedule-engine Patch
@trigger.dev/sso Patch
@internal/testcontainers Patch
@internal/tracing Patch
@internal/tsql Patch
@internal/sdk-compat-tests Patch
@trigger.dev/database Patch
@trigger.dev/otlp-importer Patch

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

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 82d75739-d50c-492c-aeb5-57a66601f43a

📥 Commits

Reviewing files that changed from the base of the PR and between 9b50bd2 and 5a71996.

📒 Files selected for processing (1)
  • packages/build/src/extensions/internal/loadTypescript.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/build/src/extensions/internal/loadTypescript.test.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout. (32)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (12, 12)
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-ubuntu-latest-x64-4x - pnpm)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (11, 12)
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-windows-latest-x64-8x - pnpm)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 12)
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-windows-latest-x64-8x - npm)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 12)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-ubuntu-latest-x64-4x - npm)
  • GitHub Check: sdk-compat / Node.js 26.4 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: sdk-compat / Node.js 20.20 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: obsmap / 🧪 Unit Tests: Observability Map
  • GitHub Check: packages / 🧪 Unit Tests: Packages (2, 3)
  • GitHub Check: sdk-compat / Node.js 24.18 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp
  • GitHub Check: sdk-compat / Cloudflare Workers
  • GitHub Check: runops-guard / runops-guard
  • GitHub Check: sdk-compat / Bun Runtime
  • GitHub Check: sdk-compat / Deno Runtime
  • GitHub Check: internal / 🧪 Unit Tests: Internal
  • GitHub Check: packages / 🧪 Unit Tests: Packages (1, 3)
  • GitHub Check: packages / 🧪 Unit Tests: Packages (3, 3)
  • GitHub Check: code-quality / code-quality
  • GitHub Check: Build and publish previews

Walkthrough

The build package now loads TypeScript dynamically and supports TypeScript 7 through the optional @typescript/typescript6 compatibility package. The extension converts parsed tsconfig compiler options before transpilation. Tests cover compiler loading, errors, fallback behavior, decorator metadata, and package aliasing. Documentation and release notes describe the required installation and configuration steps.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: decorator metadata support for TypeScript 7.
Description check ✅ Passed The description explains the change, issue, compatibility behavior, documentation, and testing; only checklist and screenshot sections are omitted.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/tri-12948-support-emitdecoratormetadata-with-typescript-7

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

@trigger.dev/build

npm i https://pkg.pr.new/@trigger.dev/build@5a71996

trigger.dev

npm i https://pkg.pr.new/trigger.dev@5a71996

@trigger.dev/core

npm i https://pkg.pr.new/@trigger.dev/core@5a71996

@trigger.dev/python

npm i https://pkg.pr.new/@trigger.dev/python@5a71996

@trigger.dev/react-hooks

npm i https://pkg.pr.new/@trigger.dev/react-hooks@5a71996

@trigger.dev/redis-worker

npm i https://pkg.pr.new/@trigger.dev/redis-worker@5a71996

@trigger.dev/rsc

npm i https://pkg.pr.new/@trigger.dev/rsc@5a71996

@trigger.dev/schema-to-json

npm i https://pkg.pr.new/@trigger.dev/schema-to-json@5a71996

@trigger.dev/sdk

npm i https://pkg.pr.new/@trigger.dev/sdk@5a71996

commit: 5a71996

@carderne
carderne force-pushed the feature/tri-12948-support-emitdecoratormetadata-with-typescript-7 branch from 31e8cc5 to bc095a4 Compare August 5, 2026 08:50
@carderne
carderne marked this pull request as ready for review August 5, 2026 09:00
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Base automatically changed from ts7 to main August 5, 2026 14:49
@carderne
carderne force-pushed the feature/tri-12948-support-emitdecoratormetadata-with-typescript-7 branch from 87ed753 to 9b50bd2 Compare August 5, 2026 14:49
devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot 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.

Devin Review found 1 new potential issue.

Open in Devin Review

Comment thread packages/build/src/extensions/internal/loadTypescript.ts
@carderne
carderne merged commit 1a16d61 into main Aug 5, 2026
55 checks passed
@carderne
carderne deleted the feature/tri-12948-support-emitdecoratormetadata-with-typescript-7 branch August 5, 2026 15:33
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