Browse Source

chore: updated backend packages and ran npm audit fix

Kristian Vos 3 years ago
parent
commit
8ff2dc22a0
4 changed files with 383 additions and 262 deletions
  1. 1 4
      backend/logic/db/index.js
  2. 2 2
      backend/logic/ws.js
  3. 369 245
      backend/package-lock.json
  4. 11 11
      backend/package.json

+ 1 - 4
backend/logic/db/index.js

@@ -52,13 +52,10 @@ class _DBModule extends CoreClass {
 
 			const mongoUrl = config.get("mongo").url;
 
-			mongoose.set("useFindAndModify", false);
-
 			mongoose
 				.connect(mongoUrl, {
 					useNewUrlParser: true,
-					useUnifiedTopology: true,
-					useCreateIndex: true
+					useUnifiedTopology: true
 				})
 				.then(async () => {
 					this.schemas = {

+ 2 - 2
backend/logic/ws.js

@@ -4,7 +4,7 @@
 
 import config from "config";
 import async from "async";
-import WebSocket from "ws";
+import { WebSocket, WebSocketServer } from "ws";
 import { EventEmitter } from "events";
 
 import CoreClass from "../core";
@@ -51,7 +51,7 @@ class _WSModule extends CoreClass {
 
 		// this._io.origins(config.get("cors.origin"));
 
-		this._io = new WebSocket.Server({ server, path: "/ws" });
+		this._io = new WebSocketServer({ server, path: "/ws" });
 
 		this.rooms = {};
 

File diff suppressed because it is too large
+ 369 - 245
backend/package-lock.json


+ 11 - 11
backend/package.json

@@ -15,8 +15,8 @@
     "lint": "npx eslint logic"
   },
   "dependencies": {
-    "async": "^3.2.0",
-    "axios": "^0.21.2",
+    "async": "^3.2.1",
+    "axios": "^0.22.0",
     "bcrypt": "^5.0.1",
     "bluebird": "^3.7.2",
     "body-parser": "^1.19.0",
@@ -25,23 +25,23 @@
     "cors": "^2.8.5",
     "express": "^4.17.1",
     "moment": "^2.29.1",
-    "mongoose": "^5.13.2",
-    "nodemailer": "^6.6.1",
+    "mongoose": "^6.0.10",
+    "nodemailer": "^6.7.0",
     "oauth": "^0.9.15",
     "redis": "^3.1.2",
-    "retry-axios": "^2.4.0",
+    "retry-axios": "^2.6.0",
     "sha256": "^0.2.0",
     "underscore": "^1.13.1",
-    "ws": "^7.5.3"
+    "ws": "^8.2.3"
   },
   "devDependencies": {
-    "eslint": "^7.30.0",
+    "eslint": "^7.32.0",
     "eslint-config-airbnb-base": "^14.2.1",
     "eslint-config-prettier": "^8.3.0",
-    "eslint-plugin-import": "^2.23.0",
-    "eslint-plugin-jsdoc": "^35.4.3",
-    "eslint-plugin-prettier": "^3.4.0",
-    "prettier": "2.3.2",
+    "eslint-plugin-import": "^2.24.2",
+    "eslint-plugin-jsdoc": "^36.1.1",
+    "eslint-plugin-prettier": "^4.0.0",
+    "prettier": "2.4.1",
     "trace-unhandled": "^2.0.1"
   }
 }

Some files were not shown because too many files changed in this diff