From ff4cfeb1505dfc021cb83fade1ca80469a31490c Mon Sep 17 00:00:00 2001 From: Security2431 <artem2431@gmail.com> Date: Thu, 11 Apr 2024 08:23:00 +0300 Subject: [PATCH] fix: upgrade t3-stack partialy --- packages/api/src/router/auth.ts | 9 ++-- packages/ui/package.json | 2 - packages/ui/src/index.ts | 2 +- pnpm-lock.yaml | 89 --------------------------------- 4 files changed, 6 insertions(+), 96 deletions(-) diff --git a/packages/api/src/router/auth.ts b/packages/api/src/router/auth.ts index 105b4eae..230c0885 100644 --- a/packages/api/src/router/auth.ts +++ b/packages/api/src/router/auth.ts @@ -1,11 +1,12 @@ -import { createTRPCRouter, protectedProcedure, publicProcedure } from "../trpc"; +import type { TRPCRouterRecord } from "@trpc/server"; -export const authRouter = createTRPCRouter({ +import { protectedProcedure, publicProcedure } from "../trpc"; + +export const authRouter = { getSession: publicProcedure.query(({ ctx }) => { return ctx.session; }), getSecretMessage: protectedProcedure.query(() => { - // testing type validation of overridden next-auth Session in @acme/auth package return "you can see this secret message!"; }), -}); +} satisfies TRPCRouterRecord; diff --git a/packages/ui/package.json b/packages/ui/package.json index 0ec3c7f6..26212a6a 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -58,10 +58,8 @@ "@tanstack/react-table": "^8.15.3", "class-variance-authority": "^0.7.0", "cmdk": "^1.0.0", - "install": "^0.13.0", "lucide-react": "^0.367.0", "next-themes": "^0.2.1", - "npm": "^10.5.2", "react-hook-form": "^7.50.1", "sonner": "^1.4.1", "tailwind-merge": "^2.2.2", diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts index e92cc270..d120cda6 100644 --- a/packages/ui/src/index.ts +++ b/packages/ui/src/index.ts @@ -2,6 +2,6 @@ import type { CxOptions } from "class-variance-authority"; import { cx } from "class-variance-authority"; import { twMerge } from "tailwind-merge"; -const cn = (...inputs: CxOptions) => twMerge(cx(inputs)); +const cn = (...inputs: Parameters<typeof cx>) => twMerge(cx(inputs)); export { cn }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4fa621f8..b5b15257 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -473,18 +473,12 @@ importers: cmdk: specifier: ^1.0.0 version: 1.0.0(@types/react@18.2.75)(react-dom@18.2.0)(react@18.2.0) - install: - specifier: ^0.13.0 - version: 0.13.0 lucide-react: specifier: ^0.367.0 version: 0.367.0(react@18.2.0) next-themes: specifier: ^0.2.1 version: 0.2.1(next@14.1.0)(react-dom@18.2.0)(react@18.2.0) - npm: - specifier: ^10.5.2 - version: 10.5.2 react-hook-form: specifier: ^7.50.1 version: 7.50.1(react@18.2.0) @@ -9435,11 +9429,6 @@ packages: wrap-ansi: 6.2.0 dev: true - /install@0.13.0: - resolution: {integrity: sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==} - engines: {node: '>= 0.10'} - dev: false - /internal-ip@4.3.0: resolution: {integrity: sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==} engines: {node: '>=6'} @@ -11590,84 +11579,6 @@ packages: dependencies: path-key: 3.1.1 - /npm@10.5.2: - resolution: {integrity: sha512-cHVG7QEJwJdZyOrK0dKX5uf3R5Fd0E8AcmSES1jLtO52UT1enUKZ96Onw/xwq4CbrTZEnDuu2Vf9kCQh/Sd12w==} - engines: {node: ^18.17.0 || >=20.5.0} - hasBin: true - dev: false - bundledDependencies: - - '@isaacs/string-locale-compare' - - '@npmcli/arborist' - - '@npmcli/config' - - '@npmcli/fs' - - '@npmcli/map-workspaces' - - '@npmcli/package-json' - - '@npmcli/promise-spawn' - - '@npmcli/redact' - - '@npmcli/run-script' - - '@sigstore/tuf' - - abbrev - - archy - - cacache - - chalk - - ci-info - - cli-columns - - cli-table3 - - columnify - - fastest-levenshtein - - fs-minipass - - glob - - graceful-fs - - hosted-git-info - - ini - - init-package-json - - is-cidr - - json-parse-even-better-errors - - libnpmaccess - - libnpmdiff - - libnpmexec - - libnpmfund - - libnpmhook - - libnpmorg - - libnpmpack - - libnpmpublish - - libnpmsearch - - libnpmteam - - libnpmversion - - make-fetch-happen - - minimatch - - minipass - - minipass-pipeline - - ms - - node-gyp - - nopt - - normalize-package-data - - npm-audit-report - - npm-install-checks - - npm-package-arg - - npm-pick-manifest - - npm-profile - - npm-registry-fetch - - npm-user-validate - - npmlog - - p-map - - pacote - - parse-conflict-json - - proc-log - - qrcode-terminal - - read - - semver - - spdx-expression-parse - - ssri - - supports-color - - tar - - text-table - - tiny-relative-date - - treeverse - - validate-npm-package-name - - which - - write-file-atomic - /nullthrows@1.1.1: resolution: {integrity: sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==} dev: false