From d2fdffbace000c4d8e6dc34907d4b7caa626db8f Mon Sep 17 00:00:00 2001 From: Yangshun Date: Tue, 25 Jun 2024 08:20:19 +0800 Subject: [PATCH] portal: update deps --- apps/portal/package.json | 4 +- .../portal/src/components/global/AppShell.tsx | 2 +- .../src/components/resumes/ResumePdf.tsx | 9 +- .../resumes/landing/PrimaryFeatures.tsx | 2 +- apps/portal/src/server/router/context.ts | 2 +- packages/ui/package.json | 2 +- yarn.lock | 196 +++++++++++++++++- 7 files changed, 200 insertions(+), 17 deletions(-) diff --git a/apps/portal/package.json b/apps/portal/package.json index f648e646ac..79506a72bd 100644 --- a/apps/portal/package.json +++ b/apps/portal/package.json @@ -17,7 +17,7 @@ }, "dependencies": { "@headlessui/react": "^1.7.3", - "@heroicons/react": "^2.0.11", + "@heroicons/react": "2.0.11", "@next-auth/prisma-adapter": "^1.0.4", "@popperjs/core": "^2.11.6", "@prisma/client": "^4.4.0", @@ -32,7 +32,7 @@ "cross-fetch": "^3.1.5", "date-fns": "^2.29.3", "formidable": "^2.0.1", - "next": "12.3.1", + "next": "13.4.1", "next-auth": "~4.10.3", "node-fetch": "^3.2.10", "react": "18.2.0", diff --git a/apps/portal/src/components/global/AppShell.tsx b/apps/portal/src/components/global/AppShell.tsx index a5e4fbbd74..57f0b1ef5f 100644 --- a/apps/portal/src/components/global/AppShell.tsx +++ b/apps/portal/src/components/global/AppShell.tsx @@ -68,7 +68,7 @@ function ProfileJewel() { { href: '/api/auth/signout', name: 'Sign Out', - onClick: (event: MouseEvent) => { + onClick: (event: React.MouseEvent) => { event.preventDefault(); signOut(); }, diff --git a/apps/portal/src/components/resumes/ResumePdf.tsx b/apps/portal/src/components/resumes/ResumePdf.tsx index ea0bddbaf1..f06effefa2 100644 --- a/apps/portal/src/components/resumes/ResumePdf.tsx +++ b/apps/portal/src/components/resumes/ResumePdf.tsx @@ -1,7 +1,6 @@ import clsx from 'clsx'; import { useEffect, useState } from 'react'; import { Document, Page, pdfjs } from 'react-pdf'; -import type { PDFDocumentProxy } from 'react-pdf/node_modules/pdfjs-dist'; import { MagnifyingGlassMinusIcon, MagnifyingGlassPlusIcon, @@ -20,10 +19,6 @@ export default function ResumePdf({ url }: Props) { const [pageWidth, setPageWidth] = useState(750); const [componentWidth, setComponentWidth] = useState(780); - const onPdfLoadSuccess = (pdf: PDFDocumentProxy) => { - setNumPages(pdf.numPages); - }; - const onPageResize = () => { setComponentWidth( document.querySelector('#pdfView')?.getBoundingClientRect().width ?? 780, @@ -44,7 +39,9 @@ export default function ResumePdf({ url }: Props) { file={url} loading={} noData="" - onLoadSuccess={onPdfLoadSuccess}> + onLoadSuccess={(pdf) => { + setNumPages(pdf.numPages); + }}>
trpc.router(); **/ export function createProtectedRouter() { return createRouter().middleware(({ ctx, next }) => { - if (!ctx.session || !ctx.session.user) { + if (!ctx.session?.user) { throw new trpc.TRPCError({ code: 'UNAUTHORIZED' }); } return next({ diff --git a/packages/ui/package.json b/packages/ui/package.json index f4ba30d9ed..dc62200491 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -23,7 +23,7 @@ }, "dependencies": { "@headlessui/react": "^1.7.3", - "@heroicons/react": "^2.0.11", + "@heroicons/react": "2.0.11", "clsx": "^1.2.1", "next": "^12.3.1", "tailwindcss": "^3.1.8" diff --git a/yarn.lock b/yarn.lock index 9d374ac074..515884b6e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2470,7 +2470,7 @@ __metadata: languageName: node linkType: hard -"@heroicons/react@npm:^2.0.11": +"@heroicons/react@npm:2.0.11, @heroicons/react@npm:^2.0.11": version: 2.0.11 resolution: "@heroicons/react@npm:2.0.11" peerDependencies: @@ -2779,6 +2779,13 @@ __metadata: languageName: node linkType: hard +"@next/env@npm:13.4.1": + version: 13.4.1 + resolution: "@next/env@npm:13.4.1" + checksum: 4736c9c6f75d80b16d3ca0ad3ddb3fcaa171f2144fccf516a67110e3bfcd9121d076e838faad46f815e41ee32e9be0ab68591359de06af13be6cbb860eda3639 + languageName: node + linkType: hard + "@next/eslint-plugin-next@npm:12.3.1": version: 12.3.1 resolution: "@next/eslint-plugin-next@npm:12.3.1" @@ -2809,6 +2816,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-darwin-arm64@npm:13.4.1": + version: 13.4.1 + resolution: "@next/swc-darwin-arm64@npm:13.4.1" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + "@next/swc-darwin-x64@npm:12.3.1": version: 12.3.1 resolution: "@next/swc-darwin-x64@npm:12.3.1" @@ -2816,6 +2830,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-darwin-x64@npm:13.4.1": + version: 13.4.1 + resolution: "@next/swc-darwin-x64@npm:13.4.1" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + "@next/swc-freebsd-x64@npm:12.3.1": version: 12.3.1 resolution: "@next/swc-freebsd-x64@npm:12.3.1" @@ -2837,6 +2858,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-linux-arm64-gnu@npm:13.4.1": + version: 13.4.1 + resolution: "@next/swc-linux-arm64-gnu@npm:13.4.1" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + "@next/swc-linux-arm64-musl@npm:12.3.1": version: 12.3.1 resolution: "@next/swc-linux-arm64-musl@npm:12.3.1" @@ -2844,6 +2872,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-linux-arm64-musl@npm:13.4.1": + version: 13.4.1 + resolution: "@next/swc-linux-arm64-musl@npm:13.4.1" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + "@next/swc-linux-x64-gnu@npm:12.3.1": version: 12.3.1 resolution: "@next/swc-linux-x64-gnu@npm:12.3.1" @@ -2851,6 +2886,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-linux-x64-gnu@npm:13.4.1": + version: 13.4.1 + resolution: "@next/swc-linux-x64-gnu@npm:13.4.1" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + "@next/swc-linux-x64-musl@npm:12.3.1": version: 12.3.1 resolution: "@next/swc-linux-x64-musl@npm:12.3.1" @@ -2858,6 +2900,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-linux-x64-musl@npm:13.4.1": + version: 13.4.1 + resolution: "@next/swc-linux-x64-musl@npm:13.4.1" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + "@next/swc-win32-arm64-msvc@npm:12.3.1": version: 12.3.1 resolution: "@next/swc-win32-arm64-msvc@npm:12.3.1" @@ -2865,6 +2914,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-win32-arm64-msvc@npm:13.4.1": + version: 13.4.1 + resolution: "@next/swc-win32-arm64-msvc@npm:13.4.1" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + "@next/swc-win32-ia32-msvc@npm:12.3.1": version: 12.3.1 resolution: "@next/swc-win32-ia32-msvc@npm:12.3.1" @@ -2872,6 +2928,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-win32-ia32-msvc@npm:13.4.1": + version: 13.4.1 + resolution: "@next/swc-win32-ia32-msvc@npm:13.4.1" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + "@next/swc-win32-x64-msvc@npm:12.3.1": version: 12.3.1 resolution: "@next/swc-win32-x64-msvc@npm:12.3.1" @@ -2879,6 +2942,13 @@ __metadata: languageName: node linkType: hard +"@next/swc-win32-x64-msvc@npm:13.4.1": + version: 13.4.1 + resolution: "@next/swc-win32-x64-msvc@npm:13.4.1" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -4514,6 +4584,15 @@ __metadata: languageName: node linkType: hard +"@swc/helpers@npm:0.5.1": + version: 0.5.1 + resolution: "@swc/helpers@npm:0.5.1" + dependencies: + tslib: ^2.4.0 + checksum: 71e0e27234590435e4c62b97ef5e796f88e786841a38c7116a5e27a3eafa7b9ead7cdec5249b32165902076de78446945311c973e59bddf77c1e24f33a8f272a + languageName: node + linkType: hard + "@szmarczak/http-timer@npm:^1.1.2": version: 1.1.2 resolution: "@szmarczak/http-timer@npm:1.1.2" @@ -4571,7 +4650,7 @@ __metadata: resolution: "@tih/portal@workspace:apps/portal" dependencies: "@headlessui/react": ^1.7.3 - "@heroicons/react": ^2.0.11 + "@heroicons/react": 2.0.11 "@next-auth/prisma-adapter": ^1.0.4 "@popperjs/core": ^2.11.6 "@prisma/client": ^4.4.0 @@ -4595,7 +4674,7 @@ __metadata: csv: ^6.2.2 date-fns: ^2.29.3 formidable: ^2.0.1 - next: 12.3.1 + next: 13.4.1 next-auth: ~4.10.3 node-fetch: ^3.2.10 postcss: ^8.4.16 @@ -4670,7 +4749,7 @@ __metadata: resolution: "@tih/ui@workspace:packages/ui" dependencies: "@headlessui/react": ^1.7.3 - "@heroicons/react": ^2.0.11 + "@heroicons/react": 2.0.11 "@tih/tailwind-config": "*" "@tih/tsconfig": "*" "@types/react": ^18.0.21 @@ -7188,6 +7267,15 @@ __metadata: languageName: node linkType: hard +"busboy@npm:1.6.0": + version: 1.6.0 + resolution: "busboy@npm:1.6.0" + dependencies: + streamsearch: ^1.1.0 + checksum: 32801e2c0164e12106bf236291a00795c3c4e4b709ae02132883fe8478ba2ae23743b11c5735a0aae8afe65ac4b6ca4568b91f0d9fed1fdbc32ede824a73746e + languageName: node + linkType: hard + "bytes@npm:3.0.0": version: 3.0.0 resolution: "bytes@npm:3.0.0" @@ -7698,6 +7786,13 @@ __metadata: languageName: node linkType: hard +"client-only@npm:0.0.1": + version: 0.0.1 + resolution: "client-only@npm:0.0.1" + checksum: 0c16bf660dadb90610553c1d8946a7fdfb81d624adea073b8440b7d795d5b5b08beb3c950c6a2cf16279365a3265158a236876d92bce16423c485c322d7dfaf8 + languageName: node + linkType: hard + "clipboardy@npm:2.3.0": version: 2.3.0 resolution: "clipboardy@npm:2.3.0" @@ -14801,7 +14896,68 @@ eslint-config-turbo@latest: languageName: node linkType: hard -"next@npm:12.3.1, next@npm:^12.3.1": +"next@npm:13.4.1": + version: 13.4.1 + resolution: "next@npm:13.4.1" + dependencies: + "@next/env": 13.4.1 + "@next/swc-darwin-arm64": 13.4.1 + "@next/swc-darwin-x64": 13.4.1 + "@next/swc-linux-arm64-gnu": 13.4.1 + "@next/swc-linux-arm64-musl": 13.4.1 + "@next/swc-linux-x64-gnu": 13.4.1 + "@next/swc-linux-x64-musl": 13.4.1 + "@next/swc-win32-arm64-msvc": 13.4.1 + "@next/swc-win32-ia32-msvc": 13.4.1 + "@next/swc-win32-x64-msvc": 13.4.1 + "@swc/helpers": 0.5.1 + busboy: 1.6.0 + caniuse-lite: ^1.0.30001406 + postcss: 8.4.14 + styled-jsx: 5.1.1 + zod: 3.21.4 + peerDependencies: + "@opentelemetry/api": ^1.1.0 + fibers: ">= 3.1.0" + node-sass: ^6.0.0 || ^7.0.0 + react: ^18.2.0 + react-dom: ^18.2.0 + sass: ^1.3.0 + dependenciesMeta: + "@next/swc-darwin-arm64": + optional: true + "@next/swc-darwin-x64": + optional: true + "@next/swc-linux-arm64-gnu": + optional: true + "@next/swc-linux-arm64-musl": + optional: true + "@next/swc-linux-x64-gnu": + optional: true + "@next/swc-linux-x64-musl": + optional: true + "@next/swc-win32-arm64-msvc": + optional: true + "@next/swc-win32-ia32-msvc": + optional: true + "@next/swc-win32-x64-msvc": + optional: true + peerDependenciesMeta: + "@opentelemetry/api": + optional: true + fibers: + optional: true + node-sass: + optional: true + sass: + optional: true + bin: + next: dist/bin/next + checksum: 169e3fbbf713fad791a9b016c83d396bce628bb0ddf716c5fe50104a21cbc37af7df1586cbe05ae4ae6a090f4e1107211189cfbeeeab8345fe54e11cfefce87f + languageName: node + linkType: hard + +"next@npm:^12.3.1": version: 12.3.1 resolution: "next@npm:12.3.1" dependencies: @@ -19096,6 +19252,13 @@ eslint-config-turbo@latest: languageName: node linkType: hard +"streamsearch@npm:^1.1.0": + version: 1.1.0 + resolution: "streamsearch@npm:1.1.0" + checksum: 1cce16cea8405d7a233d32ca5e00a00169cc0e19fbc02aa839959985f267335d435c07f96e5e0edd0eadc6d39c98d5435fb5bbbdefc62c41834eadc5622ad942 + languageName: node + linkType: hard + "string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.0.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.2, string-width@npm:^4.2.3": version: 4.2.3 resolution: "string-width@npm:4.2.3" @@ -19340,6 +19503,22 @@ eslint-config-turbo@latest: languageName: node linkType: hard +"styled-jsx@npm:5.1.1": + version: 5.1.1 + resolution: "styled-jsx@npm:5.1.1" + dependencies: + client-only: 0.0.1 + peerDependencies: + react: ">= 16.8.0 || 17.x.x || ^18.0.0-0" + peerDependenciesMeta: + "@babel/core": + optional: true + babel-plugin-macros: + optional: true + checksum: 523a33b38603492547e861b98e29c873939b04e15fbe5ef16132c6f1e15958126647983c7d4675325038b428a5e91183d996e90141b18bdd1bbadf6e2c45b2fa + languageName: node + linkType: hard + "stylehacks@npm:^5.1.0": version: 5.1.0 resolution: "stylehacks@npm:5.1.0" @@ -21656,6 +21835,13 @@ eslint-config-turbo@latest: languageName: node linkType: hard +"zod@npm:3.21.4": + version: 3.21.4 + resolution: "zod@npm:3.21.4" + checksum: f185ba87342ff16f7a06686767c2b2a7af41110c7edf7c1974095d8db7a73792696bcb4a00853de0d2edeb34a5b2ea6a55871bc864227dace682a0a28de33e1f + languageName: node + linkType: hard + "zod@npm:^3.18.0": version: 3.19.1 resolution: "zod@npm:3.19.1"