feat(sdk): export RunStatus type from @trigger.dev/sdk#4060
feat(sdk): export RunStatus type from @trigger.dev/sdk#4060codewithsupra wants to merge 2 commits into
Conversation
.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
|
|
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. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
Problem
RunStatusis defined in@trigger.dev/core/v3but 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:Fix
Add a direct type re-export from the SDK's v3 index:
RunStatusis already exported from@trigger.dev/core/v3(viaschemas/api.ts→schemas/index.ts→apiClient/types.ts). This change surfaces it as a first-class public type:Closes #4051