Skip to content

Commit 7397ceb

Browse files
committed
fix(sdk-package): correct fallback WebSocket import (1.0.8)
1 parent 72b131c commit 7397ceb

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

packages/sdk/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<!-- markdownlint-disable MD024 -->
22
# Changelog
33

4+
## [1.0.8] - 2024-11-29
5+
6+
### Changed
7+
8+
- Fix fallback WebSocket import (for new components API)
9+
410
## [1.0.7] - 2024-11-21
511

612
### Changed

packages/sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/sdk",
3-
"version": "1.0.7",
3+
"version": "1.0.8",
44
"description": "Pipedream SDK",
55
"main": "dist/server/server/index.js",
66
"module": "dist/server/server/index.js",

packages/sdk/src/server/async.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { AccessToken } from "simple-oauth2";
22
import { AsyncResponseManager } from "../shared/async";
33
import type { AsyncResponseManagerOpts } from "../shared/async";
44
import { adapters } from "@rails/actioncable";
5-
import * as WS from "ws";
5+
import { WebSocket } from "ws";
66

77
declare global {
88
function addEventListener(type: string, listener: () => void): void;
@@ -26,7 +26,7 @@ export class ServerAsyncResponseManager extends AsyncResponseManager {
2626
// eslint-disable-next-line @typescript-eslint/no-empty-function
2727
global.removeEventListener = () => {};
2828
if (typeof adapters.WebSocket === "undefined")
29-
adapters.WebSocket = WS as unknown as (typeof adapters)["WebSocket"];
29+
adapters.WebSocket = WebSocket;
3030
}
3131

3232
protected override async getOpts(): Promise<AsyncResponseManagerOpts> {

0 commit comments

Comments
 (0)