Skip to content

Commit

Permalink
Replace url-join with url.resolve
Browse files Browse the repository at this point in the history
url-join 5.0.0 (automatically merged in 9393d07) only supports
ECMAScript, so just replace it with url.resolve

Fixes: synclounge/synclounge#1035
Fixes: synclounge/synclounge#1041
  • Loading branch information
drizzt committed Aug 1, 2022
1 parent 60deae0 commit 50f430d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
14 changes: 0 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"express": "^4.18.1",
"nconf": "^0.12.0",
"socket.io": "^4.5.1",
"url-join": "^5.0.0",
"uuid": "^8.3.2"
},
"optionalDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/socketserver/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import express from 'express';
import cors from 'cors';
import http from 'http';
import urljoin from 'url-join';
import url from 'url';

import { Server } from 'socket.io';
import attachEventHandlers from './handlers';
Expand All @@ -25,7 +25,7 @@ const socketServer = ({
app.use(baseUrl, router);

const socketio = new Server(server, {
path: urljoin(baseUrl, '/socket.io'),
path: url.resolve(baseUrl, 'socket.io'),
cors: {
origin: '*',
},
Expand Down

0 comments on commit 50f430d

Please sign in to comment.