fix(widget): hardcode @deepgram/agents range, drop publish-time pin step#42
Merged
lukeocodes merged 1 commit intomainfrom May 1, 2026
Merged
fix(widget): hardcode @deepgram/agents range, drop publish-time pin step#42lukeocodes merged 1 commit intomainfrom
lukeocodes merged 1 commit intomainfrom
Conversation
@deepgram/agents-widget@0.1.2 was tagged but publish-widget failed
again (this time at the Pin step) with:
ReferenceError: SDK_VERSION is not defined
the Pin step had a latent bash-to-JS interpolation bug. SDK_VERSION
was a bash variable but referenced unquoted inside `node -e "..."`,
where it became an undefined JS identifier. the bug pre-existed but
never executed: the original publish-widget always failed earlier on
the broken sibling-checkout. now that the rest of the job works, this
bites.
the right fix isn't to repair the Pin step. widget releases are
independent of SDK releases. widget should declare a real semver
range on @deepgram/agents the same way @deepgram/react and
@deepgram/ui do (`^0.1.0`). bun resolves widget's @deepgram/agents
to the workspace SDK locally because workspace SDK 0.1.x satisfies
^0.1.1, so dev workflow is unchanged. at publish time the range
publishes as-is, no rewrite needed.
changes:
- packages/widget/package.json: '@deepgram/agents' goes from
'workspace:*' to '^0.1.1'. matches the pattern used by react and
ui for their cross-package deps.
- npm-publish.yml: drop the Pin step. replaced with a defensive
guard that fails the publish if any 'workspace:*' string remains
in the widget's dependencies, so npm doesn't accidentally publish
a tarball with workspace-protocol strings.
verified locally from a fully clean checkout: bun install, bun run
build, bun run test all pass. bun symlinks the widget's
@deepgram/agents node_modules entry to packages/sdk as expected.
lukeocodes
pushed a commit
that referenced
this pull request
May 1, 2026
🤖 I have created a release *beep* *boop* --- ## [0.1.3](agents-widget-v0.1.2...agents-widget-v0.1.3) (2026-05-01) ### Bug Fixes * **widget:** hardcode @deepgram/agents range, drop publish-time pin step ([#42](#42)) ([bcde49e](bcde49e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@deepgram/agents-widget@0.1.2was tagged after #40 + #41 merged, then publish-widget failed again at the Pin step:Root cause
the Pin step had a latent bash-to-JS interpolation bug:
SDK_VERSIONinsidenode -e "..."is a JS identifier, not a bash variable. it should have been'$SDK_VERSION'orprocess.env.SDK_VERSION. the bug pre-existed in the workflow before today's launch, but never executed: the original publish-widget always failed earlier on the broken sibling-checkout. now that the rest of the job works, this bites.The right fix isn't to repair the Pin step
widget releases are independent of SDK releases. widget should declare a real semver range on
@deepgram/agentsthe same way@deepgram/reactand@deepgram/uido for their cross-package deps. bun resolves widget's@deepgram/agentsto the workspace SDK locally because workspace SDK 0.1.x satisfies^0.1.1, so dev workflow is unchanged. at publish time the range publishes as-is.Changes
packages/widget/package.json:@deepgram/agentsgoes fromworkspace:*to^0.1.1. matches the pattern@deepgram/reactand@deepgram/uiuse for their cross-package deps..github/workflows/npm-publish.yml: drop the Pin step entirely. replaced with a defensive guard that fails publish if anyworkspace:string is still present in widget dependencies, so npm doesn't accidentally publish a tarball with workspace-protocol strings.Local verification (fully clean checkout)
bun symlinks widget's
@deepgram/agentsto the workspace SDK because the workspace SDK version (0.1.1) satisfies^0.1.1. dev workflow unchanged.State on main
agents-widget-v0.1.2GitHub release exists ✅@deepgram/agents-widget@0.1.2is not on npm ❌release agents-widget 0.1.3. merging that runs the (now actually fixed) publish-widget and@deepgram/agents-widget@0.1.3lands on npm with provenance.Why we don't keep republishing the failed tag
each release-please flow attaches a GitHub release to the merged commit. the publish failure is local to that workflow run; the release tag and version remain. simplest forward path is to let release-please cut a fresh patch each time. once the pipeline is actually green end-to-end, this stops happening.
Defensive guard explained
the new guard is intentionally pessimistic. if anything regresses widget's deps to
workspace:syntax (a refactor, a copy-paste, etc.), the publish job hard-fails beforenpm publishinstead of pushing a broken tarball. there is no scenario where we want to publish a package containingworkspace:strings.Test plan
release agents-widget 0.1.3@deepgram/agents-widget@0.1.3on npm with provenance