Skip to content

Commit

Permalink
fix: patch isomorphic-ws package.
Browse files Browse the repository at this point in the history
  • Loading branch information
jiyoung-an committed Apr 19, 2024
1 parent 95b4533 commit fea0301
Show file tree
Hide file tree
Showing 4 changed files with 246 additions and 5 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"test_ain_raw": "jest ain_raw.test.ts",
"test_he": "jest he.test.ts",
"test_em": "jest event_manager.test.ts",
"docs": "yarn build && typedoc --plugin @mxssfd/typedoc-theme --theme my-theme --out docs"
"docs": "yarn build && typedoc --plugin @mxssfd/typedoc-theme --theme my-theme --out docs",
"postinstall": "patch-package"
},
"engines": {
"node": ">=16"
Expand Down Expand Up @@ -62,7 +63,9 @@
"isomorphic-ws": "^5.0.0",
"lodash": "^4.17.20",
"node-seal": "^4.5.7",
"patch-package": "^8.0.0",
"pbkdf2": "^3.0.17",
"postinstall-postinstall": "^2.1.0",
"randombytes": "^2.1.0",
"scryptsy": "^2.1.0",
"semver": "^6.3.0",
Expand Down
15 changes: 15 additions & 0 deletions patches/isomorphic-ws+5.0.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/node_modules/isomorphic-ws/index.d.ts b/node_modules/isomorphic-ws/index.d.ts
index de923a9..c63f488 100644
--- a/node_modules/isomorphic-ws/index.d.ts
+++ b/node_modules/isomorphic-ws/index.d.ts
@@ -3,6 +3,5 @@
// Fix for https://github.com/heineiuo/isomorphic-ws/issues/8
// If there is still something wrong, welcome issue.

-import WebSocket = require('ws')
-
-export = WebSocket
\ No newline at end of file
+import { WebSocket } from 'ws'
+export default WebSocket
\ No newline at end of file
2 changes: 1 addition & 1 deletion src/event-manager/event-channel-client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Ain from '../ain';
import * as WebSocket from 'isomorphic-ws';
import WebSocket from 'isomorphic-ws';
import {
EventChannelMessageTypes,
EventChannelMessage,
Expand Down
Loading

0 comments on commit fea0301

Please sign in to comment.