From 7457677f049d4bef87249c8c26e859e2a2190eb0 Mon Sep 17 00:00:00 2001 From: wielopolski Date: Fri, 7 Feb 2025 15:44:05 +0100 Subject: [PATCH] feat: pnpm udpdate --- .github/workflows/e2e.yml | 2 +- apps/api/package.json | 3 +- .../src/auth/__tests__/auth.service.spec.ts | 2 +- apps/api/src/auth/auth.service.ts | 2 +- apps/api/src/common/helpers/hashPassword.ts | 2 +- apps/api/src/courses/course.service.ts | 5 ++ apps/api/src/user/user.service.ts | 2 +- apps/web/app/modules/Courses/Courses.page.tsx | 1 - package.json | 2 +- pnpm-lock.yaml | 67 +++++++++++-------- 10 files changed, 52 insertions(+), 36 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index d1cec45c5..6e8fd0479 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -68,7 +68,7 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v4 with: - version: 10.2.0 + version: 10.2.1 - name: Setup Node.js uses: actions/setup-node@v4 diff --git a/apps/api/package.json b/apps/api/package.json index 8562e7abd..184a1df34 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -53,11 +53,12 @@ "@nestjs/websockets": "10.4.4", "@repo/email-templates": "workspace:*", "@sinclair/typebox": "0.32.34", + "@types/bcryptjs": "^2.4.6", "@types/multer": "1.4.12", "add": "2.0.6", "adm-zip": "0.5.16", "axios": "1.7.2", - "bcrypt": "5.1.1", + "bcryptjs": "^2.4.3", "cache-manager": "6.2.0", "cookie": "0.6.0", "cookie-parser": "1.4.6", diff --git a/apps/api/src/auth/__tests__/auth.service.spec.ts b/apps/api/src/auth/__tests__/auth.service.spec.ts index 94df53c51..b947aac0c 100644 --- a/apps/api/src/auth/__tests__/auth.service.spec.ts +++ b/apps/api/src/auth/__tests__/auth.service.spec.ts @@ -1,6 +1,6 @@ import { ConflictException, NotFoundException, UnauthorizedException } from "@nestjs/common"; import { JwtService } from "@nestjs/jwt"; -import * as bcrypt from "bcrypt"; +import * as bcrypt from "bcryptjs"; import { eq } from "drizzle-orm"; import { omit } from "lodash"; import { nanoid } from "nanoid"; diff --git a/apps/api/src/auth/auth.service.ts b/apps/api/src/auth/auth.service.ts index 2d2cd0608..8ce969ed5 100644 --- a/apps/api/src/auth/auth.service.ts +++ b/apps/api/src/auth/auth.service.ts @@ -14,7 +14,7 @@ import { PasswordRecoveryEmail, WelcomeEmail, } from "@repo/email-templates"; -import * as bcrypt from "bcrypt"; +import * as bcrypt from "bcryptjs"; import { and, eq, isNull, lte, sql } from "drizzle-orm"; import { nanoid } from "nanoid"; diff --git a/apps/api/src/common/helpers/hashPassword.ts b/apps/api/src/common/helpers/hashPassword.ts index 06ba730a8..37d17d928 100644 --- a/apps/api/src/common/helpers/hashPassword.ts +++ b/apps/api/src/common/helpers/hashPassword.ts @@ -1,4 +1,4 @@ -import * as bcrypt from "bcrypt"; +import * as bcrypt from "bcryptjs"; export default function hashPassword(password: string): Promise { return bcrypt.hash(password, 10); diff --git a/apps/api/src/courses/course.service.ts b/apps/api/src/courses/course.service.ts index 49f78fc68..e35f60e6d 100644 --- a/apps/api/src/courses/course.service.ts +++ b/apps/api/src/courses/course.service.ts @@ -360,6 +360,11 @@ export class CourseService { } async getCourse(id: UUIDType, userId: UUIDType): Promise { + //TODO: to remove + const testDeployment = "test"; + + testDeployment; + const [course] = await this.db .select({ id: courses.id, diff --git a/apps/api/src/user/user.service.ts b/apps/api/src/user/user.service.ts index 018568f76..aeb65479e 100644 --- a/apps/api/src/user/user.service.ts +++ b/apps/api/src/user/user.service.ts @@ -6,7 +6,7 @@ import { UnauthorizedException, } from "@nestjs/common"; import { CreatePasswordEmail } from "@repo/email-templates"; -import * as bcrypt from "bcrypt"; +import * as bcrypt from "bcryptjs"; import { and, count, eq, ilike, inArray, or, sql } from "drizzle-orm"; import { nanoid } from "nanoid"; diff --git a/apps/web/app/modules/Courses/Courses.page.tsx b/apps/web/app/modules/Courses/Courses.page.tsx index dbe15f970..ae207fefb 100644 --- a/apps/web/app/modules/Courses/Courses.page.tsx +++ b/apps/web/app/modules/Courses/Courses.page.tsx @@ -95,7 +95,6 @@ export default function CoursesPage() { category: state.category, sort: state.sort, }); - console.log({ userAvailableCourses }); const { data: categories, isLoading: isCategoriesLoading } = useCategoriesSuspense(); diff --git a/package.json b/package.json index fef5bbbe9..f913f3a04 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "prettier-plugin-tailwindcss": "0.6.9", "turbo": "^2.2.3" }, - "packageManager": "pnpm@10.2.0", + "packageManager": "pnpm@10.2.1", "engines": { "node": ">=20" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bcd7859d5..4b84d02d3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -95,6 +95,9 @@ importers: '@sinclair/typebox': specifier: 0.32.34 version: 0.32.34 + '@types/bcryptjs': + specifier: ^2.4.6 + version: 2.4.6 '@types/multer': specifier: 1.4.12 version: 1.4.12 @@ -107,9 +110,9 @@ importers: axios: specifier: 1.7.2 version: 1.7.2 - bcrypt: - specifier: 5.1.1 - version: 5.1.1 + bcryptjs: + specifier: ^2.4.3 + version: 2.4.3 cache-manager: specifier: 6.2.0 version: 6.2.0 @@ -4579,6 +4582,9 @@ packages: '@types/bcrypt@5.0.2': resolution: {integrity: sha512-6atioO8Y75fNcbmj0G7UjI9lXN2pQ/IGJ2FWT4a/btd0Lk9lQalHLKhkgKVZ3r+spnmWUKfbMi1GEe9wyHQfNQ==} + '@types/bcryptjs@2.4.6': + resolution: {integrity: sha512-9xlo6R2qDs5uixm0bcIqCeMCE6HiQsIyel9KQySStiyqNl2tnj2mP3DX1Nf56MD6KMenNNlBBsy3LJ7gUEQPXQ==} + '@types/body-parser@1.19.5': resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} @@ -5571,9 +5577,8 @@ packages: bcrypt-pbkdf@1.0.2: resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==} - bcrypt@5.1.1: - resolution: {integrity: sha512-AGBHOG5hPYZ5Xl9KXzU5iKq9516yEmvCKDg3ecP5kX2aB6UqTeXZxk2ELnDgDm6BQSMlLt9rDB4LoSMx0rYwww==} - engines: {node: '>= 10.0.0'} + bcryptjs@2.4.3: + resolution: {integrity: sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==} binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} @@ -8954,9 +8959,6 @@ packages: node-abort-controller@3.1.1: resolution: {integrity: sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==} - node-addon-api@5.1.0: - resolution: {integrity: sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==} - node-domexception@1.0.0: resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} engines: {node: '>=10.5.0'} @@ -13879,6 +13881,7 @@ snapshots: transitivePeerDependencies: - encoding - supports-color + optional: true '@mdx-js/mdx@2.3.0': dependencies: @@ -16472,6 +16475,8 @@ snapshots: dependencies: '@types/node': 20.17.6 + '@types/bcryptjs@2.4.6': {} + '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 @@ -17377,7 +17382,8 @@ snapshots: '@zxing/text-encoding@0.9.0': optional: true - abbrev@1.1.1: {} + abbrev@1.1.1: + optional: true abbrev@2.0.0: {} @@ -17410,7 +17416,7 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.3.7 + debug: 4.4.0 transitivePeerDependencies: - supports-color @@ -17493,7 +17499,8 @@ snapshots: append-field@1.0.0: {} - aproba@2.0.0: {} + aproba@2.0.0: + optional: true archiver-utils@2.1.0: dependencies: @@ -17555,6 +17562,7 @@ snapshots: dependencies: delegates: 1.0.0 readable-stream: 3.6.2 + optional: true arg@4.1.3: {} @@ -17809,13 +17817,7 @@ snapshots: dependencies: tweetnacl: 0.14.5 - bcrypt@5.1.1: - dependencies: - '@mapbox/node-pre-gyp': 1.0.11 - node-addon-api: 5.1.0 - transitivePeerDependencies: - - encoding - - supports-color + bcryptjs@2.4.3: {} binary-extensions@2.3.0: {} @@ -18215,7 +18217,8 @@ snapshots: color-name@1.1.4: {} - color-support@1.1.3: {} + color-support@1.1.3: + optional: true colorette@2.0.20: {} @@ -18298,7 +18301,8 @@ snapshots: consola@3.2.3: {} - console-control-strings@1.1.0: {} + console-control-strings@1.1.0: + optional: true constant-case@2.0.0: dependencies: @@ -18635,7 +18639,8 @@ snapshots: delayed-stream@1.0.0: {} - delegates@1.0.0: {} + delegates@1.0.0: + optional: true denque@1.5.1: {} @@ -18645,7 +18650,8 @@ snapshots: destroy@1.2.0: {} - detect-libc@2.0.3: {} + detect-libc@2.0.3: + optional: true detect-newline@3.1.0: {} @@ -19989,6 +19995,7 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 wide-align: 1.1.5 + optional: true geckodriver@4.5.1: dependencies: @@ -20225,7 +20232,8 @@ snapshots: dependencies: has-symbols: 1.0.3 - has-unicode@2.0.1: {} + has-unicode@2.0.1: + optional: true has@1.0.4: {} @@ -20324,7 +20332,7 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.4.0 transitivePeerDependencies: - supports-color @@ -21452,6 +21460,7 @@ snapshots: make-dir@3.1.0: dependencies: semver: 6.3.1 + optional: true make-dir@4.0.0: dependencies: @@ -22105,8 +22114,6 @@ snapshots: node-abort-controller@3.1.1: {} - node-addon-api@5.1.0: {} - node-domexception@1.0.0: {} node-emoji@1.11.0: @@ -22154,6 +22161,7 @@ snapshots: nopt@5.0.0: dependencies: abbrev: 1.1.1 + optional: true nopt@7.2.1: dependencies: @@ -22206,6 +22214,7 @@ snapshots: console-control-strings: 1.1.0 gauge: 3.0.2 set-blocking: 2.0.0 + optional: true nwsapi@2.2.13: {} @@ -23638,7 +23647,8 @@ snapshots: transitivePeerDependencies: - supports-color - set-blocking@2.0.0: {} + set-blocking@2.0.0: + optional: true set-cookie-parser@2.7.1: {} @@ -25325,6 +25335,7 @@ snapshots: wide-align@1.1.5: dependencies: string-width: 4.2.3 + optional: true widest-line@3.1.0: dependencies: