-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix(sdk): resolve undefined name variable in updateEnvVar overload #4494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@trigger.dev/sdk": patch | ||
| --- | ||
|
|
||
| Fix `updateEnvVar` incorrectly reading from an out-of-scope variable when called with the `(projectRef, slug, name, params)` overload. The `name` parameter was undefined in the implementation body; it now correctly reads from `nameOrRequestOptions`. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -338,7 +338,7 @@ export function update( | |
|
|
||
| $projectRef = projectRefOrName; | ||
| $slug = slugOrParams; | ||
| $name = name!; | ||
| $name = nameOrRequestOptions as string; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Updating an environment variable from inside a running task still targets the wrong project When the four-argument form is used from inside a running task, the project identifier is taken from the slug argument instead of the project argument ( Why the fix is incomplete: only the no-task-context branch was correctedThe implementation signature is But inside a task (
Compare with Prompt for agentsWas this helpful? React with 👍 or 👎 to provide feedback.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔍 Second overload (name, params) still unusable outside a task context Overload 2 declares Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| $params = params; | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Release note text describes internals instead of user-facing behavior
The release note text added for this change describes internal implementation details (
.changeset/fix-update-env-var-name-scope.md:5) rather than the user-visible behavior, which the repository guidelines require.Impact: Users reading the published release notes see internal variable names instead of a plain description of what was fixed.
Repository rule from AGENTS.md on changeset wording
AGENTS.md states: "Write the description for users, not maintainers. Both changesets and
.server-changes/notes ship verbatim in user-visible release notes. Lead with what changed for the user - one plain sentence describing behavior, not implementation, and never naming internal tools or infra." The current text mentions "out-of-scope variable", "the implementation body" and the internal parameter namenameOrRequestOptions.Was this helpful? React with 👍 or 👎 to provide feedback.