Skip to content

feat(sdk): export RunStatus type from @trigger.dev/sdk#4060

Closed
codewithsupra wants to merge 2 commits into
triggerdotdev:mainfrom
codewithsupra:feat/export-run-status-type-from-sdk
Closed

feat(sdk): export RunStatus type from @trigger.dev/sdk#4060
codewithsupra wants to merge 2 commits into
triggerdotdev:mainfrom
codewithsupra:feat/export-run-status-type-from-sdk

Conversation

@codewithsupra

Copy link
Copy Markdown

Problem

RunStatus is defined in @trigger.dev/core/v3 but not re-exported from @trigger.dev/sdk. Consumers who need to type run status values (dashboards, monitoring tools, replay scripts) are forced to derive it indirectly:

// current workaround — couples code to internal SDK method signatures
type Run = Awaited<ReturnType<typeof runs.retrieve>>;
type RunStatus = Run["status"];

Fix

Add a direct type re-export from the SDK's v3 index:

export type { RunStatus } from "@trigger.dev/core/v3";

RunStatus is already exported from @trigger.dev/core/v3 (via schemas/api.tsschemas/index.tsapiClient/types.ts). This change surfaces it as a first-class public type:

import type { RunStatus } from "@trigger.dev/sdk";

Closes #4051

.join('\n') only separates entries — it leaves the last KEY=value on an
unterminated line. A subsequent write to the same runner-scoped file can
merge onto that unterminated tail, corrupting the needsPromotion output
and any other entries that follow.

Match the @actions/core convention: each entry gets its own trailing
newline. Switch from .map(...).join('\n') to .map(... + '\n').join('')
so every line is properly terminated regardless of how many entries are
written.

Fixes triggerdotdev#4003
RunStatus was defined in @trigger.dev/core/v3 but not re-exported from
@trigger.dev/sdk, forcing consumers to derive it indirectly via ReturnType
gymnastics or import it from the internal core package.

Add a direct type re-export so users can do:

  import type { RunStatus } from '@trigger.dev/sdk'

Closes triggerdotdev#4051
@changeset-bot

changeset-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 68d8a6e

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 no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@github-actions

Copy link
Copy Markdown
Contributor

Hi @codewithsupra, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions Bot closed this Jun 26, 2026
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7f0dde96-d048-42f4-b2b5-a1810a44454c

📥 Commits

Reviewing files that changed from the base of the PR and between 2cc1743 and 68d8a6e.

📒 Files selected for processing (2)
  • packages/cli-v3/src/utilities/githubActions.ts
  • packages/trigger-sdk/src/v3/index.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@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: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{}

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.

feat: Export RunStatus type from @trigger.dev/sdk

1 participant