Bump prettier from 1.19.1 to 2.0.5 (#36)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Panayiotis Lipiridis <lipiridis@gmail.com>
This commit is contained in:
dependabot-preview[bot] 2020-06-25 18:33:46 +03:00 committed by GitHub
parent 78ed62d438
commit 30ca342490
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 11 deletions

View File

@ -29,7 +29,7 @@
"eslint-config-prettier": "6.10.1",
"eslint-plugin-prettier": "3.1.4",
"express": "4.17.1",
"prettier": "1.19.1",
"prettier": "2.0.5",
"socket.io": "2.3.0"
},
"devDependencies": {

View File

@ -17,21 +17,21 @@ server.listen(port, () => {
});
const io = socketIO(server, {
handlePreflightRequest: function(req, res) {
handlePreflightRequest: function (req, res) {
var headers = {
"Access-Control-Allow-Headers": "Content-Type, Authorization",
"Access-Control-Allow-Origin": req.header ? req.header.origin : "*",
"Access-Control-Allow-Credentials": true
"Access-Control-Allow-Credentials": true,
};
res.writeHead(200, headers);
res.end();
}
},
});
io.on("connection", socket => {
io.on("connection", (socket) => {
ioDebug("connection established!");
io.to(`${socket.id}`).emit("init-room");
socket.on("join-room", roomID => {
socket.on("join-room", (roomID) => {
socketDebug(`${socket.id} has joined ${roomID}`);
socket.join(roomID);
if (io.sockets.adapter.rooms[roomID].length <= 1) {
@ -67,7 +67,7 @@ io.on("connection", socket => {
const rooms = io.sockets.adapter.rooms;
for (const roomID in socket.rooms) {
const clients = Object.keys(rooms[roomID].sockets).filter(
id => id !== socket.id
(id) => id !== socket.id
);
if (clients.length > 0) {
socket.broadcast.to(roomID).emit("room-user-change", clients);

View File

@ -1054,10 +1054,10 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"
prettier@1.19.1:
version "1.19.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
prettier@2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4"
integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==
progress@^2.0.0:
version "2.0.3"