Skip to content

Commit

Permalink
add .js to relative imports for @rc-ex/ws
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerlong committed Jan 31, 2025
1 parent ac25f84 commit c6adcf1
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
4 changes: 2 additions & 2 deletions packages/extensions/ws/src/exceptions/ConnectionException.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { WsgError, WsgEvent, WsgMeta } from "../types";
import Utils from "../utils";
import type { WsgError, WsgEvent, WsgMeta } from "../types.js";
import Utils from "../utils.js";

class ConnectionException extends Error {
public wsgEvent: WsgEvent;
Expand Down
10 changes: 5 additions & 5 deletions packages/extensions/ws/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ import waitFor from "wait-for-async";
import RestException from "@rc-ex/core/RestException";
import type SubscriptionInfo from "@rc-ex/core/definitions/SubscriptionInfo";

import { request } from "./rest";
import { request } from "./rest.js";
import type {
ConnectionDetails,
WebSocketExtensionInterface,
WebSocketOptions,
Wsc,
WsgEvent,
WsToken,
} from "./types";
import Subscription from "./subscription";
import ConnectionException from "./exceptions/ConnectionException";
import Utils from "./utils";
} from "./types.js";
import Subscription from "./subscription.js";
import ConnectionException from "./exceptions/ConnectionException.js";
import Utils from "./utils.js";

const CONNECTING = 0;
const OPEN = 1;
Expand Down
4 changes: 2 additions & 2 deletions packages/extensions/ws/src/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import RestException from "@rc-ex/core/RestException";
import hyperid from "hyperid";
import { getReasonPhrase } from "http-status-codes";

import Utils from "./utils";
import type { WebSocketExtensionInterface } from "./types";
import Utils from "./utils.js";
import type { WebSocketExtensionInterface } from "./types.js";

const version = "0.16";

Expand Down
8 changes: 6 additions & 2 deletions packages/extensions/ws/src/subscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ import type SubscriptionInfo from "@rc-ex/core/definitions/SubscriptionInfo";
import type { RestResponse } from "@rc-ex/core/types";
import type { MessageEvent } from "ws";

import type { WebSocketExtensionInterface, WsgEvent, WsgMeta } from "./types";
import Utils from "./utils";
import type {
WebSocketExtensionInterface,
WsgEvent,
WsgMeta,
} from "./types.js";
import Utils from "./utils.js";

class Subscription {
public subscriptionInfo?: SubscriptionInfo;
Expand Down
6 changes: 3 additions & 3 deletions packages/extensions/ws/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { MessageEvent } from "isomorphic-ws";
import type WS from "isomorphic-ws";

import type { WsgEvent, WsgMeta } from "./types";
import ClosedException from "./exceptions/ClosedException";
import TimeoutException from "./exceptions/TimeoutException";
import type { WsgEvent, WsgMeta } from "./types.js";
import ClosedException from "./exceptions/ClosedException.js";
import TimeoutException from "./exceptions/TimeoutException.js";

class Utils {
public static splitWsgData(wsgData: string): [WsgMeta, any] {
Expand Down

0 comments on commit c6adcf1

Please sign in to comment.