Skip to content

fix(typescript): export Socket class from subpackage exports.ts when websocket clients are generated#13638

Merged
fern-support merged 2 commits intomainfrom
devin/1773768124-export-socket-from-exports
Mar 17, 2026
Merged

fix(typescript): export Socket class from subpackage exports.ts when websocket clients are generated#13638
fern-support merged 2 commits intomainfrom
devin/1773768124-export-socket-from-exports

Conversation

@Swimburger
Copy link
Member

@Swimburger Swimburger commented Mar 17, 2026

Description

When WebSocket clients are generated in the TypeScript SDK, the generated Socket class (e.g. RealtimeSocket) was not exported from the subpackage's exports.ts file. Only the Client class was exported, making the Socket class inaccessible through the public exports path (src/exports.ts → core/exports.ts → ...).

Changes Made

  • SdkGenerator.ts: In generateSubpackageExports(), added a named export for the Socket class from ./client/Socket when generateWebSocketClients is enabled and the package has a websocket channel. The export is placed between the Client export and the wildcard ./client/index re-export.
  • Seed fixtures: Updated all websocket seed test exports.ts files (websocket, websocket-bearer-auth, websocket-inferred-auth) to include the new Socket export.
  • versions.yml: Added version 3.58.1 changelog entry.

Review Checklist

  • Verify the guard condition (this.generateWebSocketClients && package_.websocket != null) correctly limits the export to only packages with an actual websocket channel
  • Verify packageId.subpackageId is safe — packageId.isRoot is checked false at the top of the loop before this code runs
  • Confirm seed fixtures match expected generator output (CI seed tests will validate this)

Testing

  • Seed test fixtures updated for all affected websocket variants (no-serde, serde, bearer-auth, inferred-auth)
  • CI seed tests will verify generated output matches fixtures

Link to Devin session: https://app.devin.ai/sessions/507b82611d614885a0f11aba0b995f5e
Requested by: @Swimburger


Open with Devin

…t clients are generated

Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@claude
Copy link

claude bot commented Mar 17, 2026

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit in Settings → Usage.

Once credits are available, reopen this pull request to trigger a review.

Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
@fern-support fern-support changed the title fix(ts): export Socket class from subpackage exports.ts when websocket clients are generated fix(typescript): export Socket class from subpackage exports.ts when websocket clients are generated Mar 17, 2026
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

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

@fern-support fern-support enabled auto-merge (squash) March 17, 2026 17:35
@fern-support fern-support merged commit 6d6a9d0 into main Mar 17, 2026
88 of 89 checks passed
@fern-support fern-support deleted the devin/1773768124-export-socket-from-exports branch March 17, 2026 17:37
@devin-ai-integration
Copy link
Contributor

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants