From 4d49b8992c03eb97c3dca0c2e2267b90b748ee07 Mon Sep 17 00:00:00 2001 From: renatodellosso Date: Tue, 4 Feb 2025 16:15:17 -0500 Subject: [PATCH 1/2] Bumped version, decreased wait accuracy, removed repairUser console.log --- lib/Utils.ts | 1 - lib/client/ClientUtils.ts | 2 +- package.json | 2 +- tests/lib/client/ClientUtils.test.ts | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/Utils.ts b/lib/Utils.ts index 06f11923..af274cff 100644 --- a/lib/Utils.ts +++ b/lib/Utils.ts @@ -141,7 +141,6 @@ export async function repairUser( } as User; if (updateDocument) { - console.log("Updating user", user._id); await db.updateObjectById( CollectionId.Users, user._id as unknown as ObjectId, diff --git a/lib/client/ClientUtils.ts b/lib/client/ClientUtils.ts index fa084efa..2eee055a 100644 --- a/lib/client/ClientUtils.ts +++ b/lib/client/ClientUtils.ts @@ -144,7 +144,7 @@ export function promisify( } /** - * Tested to be accurate to within 20ms + * Tested to be accurate to within 150ms * * @tested_by tests/lib/client/ClientUtils.test.ts */ diff --git a/package.json b/package.json index cdd5edb1..0bf5cf2c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sj3", - "version": "1.1.17", + "version": "1.1.18", "private": true, "repository": "https://github.com/Decatur-Robotics/Gearbox", "license": "CC BY-NC-SA 4.0", diff --git a/tests/lib/client/ClientUtils.test.ts b/tests/lib/client/ClientUtils.test.ts index a3fe38d1..e78704db 100644 --- a/tests/lib/client/ClientUtils.test.ts +++ b/tests/lib/client/ClientUtils.test.ts @@ -109,7 +109,7 @@ describe(wait.name, () => { const results = await Promise.all(trials); for (const result of results) { - expect(result).toBeLessThanOrEqual(20); + expect(result).toBeLessThanOrEqual(150); } }); }); From 2db79c7d9310090b35be84d2e4955676e4e278b8 Mon Sep 17 00:00:00 2001 From: renatodellosso Date: Tue, 4 Feb 2025 16:45:55 -0500 Subject: [PATCH 2/2] Remove Session User log --- lib/Auth.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/Auth.ts b/lib/Auth.ts index cc624e1c..4a92de06 100644 --- a/lib/Auth.ts +++ b/lib/Auth.ts @@ -91,7 +91,6 @@ export const AuthenticationOptions: AuthOptions = { ], callbacks: { async session({ session, user }) { - console.log("Session user:", user); session.user = await ( await db ).findObjectById(CollectionId.Users, new ObjectId(user.id));