chore: upgrade deps and linting

This commit is contained in:
Mythie
2023-08-01 17:34:17 +10:00
parent 25d7390b27
commit 9431e7f0ad
34 changed files with 2193 additions and 16056 deletions

1
apps/marketing/ambient.d.ts vendored Normal file
View File

@ -0,0 +1 @@
declare module '@documenso/tailwind-config';

View File

@ -19,21 +19,21 @@
"framer-motion": "^10.12.8",
"lucide-react": "^0.214.0",
"micro": "^10.0.1",
"next": "13.4.9",
"next-auth": "^4.22.1",
"next": "13.4.12",
"next-auth": "4.22.3",
"next-contentlayer": "^0.3.4",
"next-plausible": "^3.7.2",
"next-plausible": "^3.10.1",
"perfect-freehand": "^1.2.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "^7.43.9",
"react-icons": "^4.8.0",
"typescript": "5.0.4",
"typescript": "5.1.6",
"zod": "^3.21.4"
},
"devDependencies": {
"@types/node": "20.1.0",
"@types/react": "18.2.6",
"@types/react-dom": "18.2.4"
"@types/react": "18.2.18",
"@types/react-dom": "18.2.7"
}
}

View File

@ -9,10 +9,18 @@
}
],
"paths": {
"~/*": ["./src/*"],
"contentlayer/generated": ["./.contentlayer/generated"]
"~/*": [
"./src/*"
],
"contentlayer/generated": [
"./.contentlayer/generated"
]
},
"strictNullChecks": true
"types": [
"@documenso/lib/types/next-auth.d.ts"
],
"strictNullChecks": true,
"incremental": false
},
"include": [
"next-env.d.ts",
@ -21,5 +29,7 @@
".next/types/**/*.ts",
".contentlayer/generated"
],
"exclude": ["node_modules"]
"exclude": [
"node_modules"
]
}

1
apps/web/ambient.d.ts vendored Normal file
View File

@ -0,0 +1 @@
declare module '@documenso/tailwind-config';

View File

@ -22,9 +22,9 @@
"lucide-react": "^0.214.0",
"micro": "^10.0.1",
"nanoid": "^4.0.2",
"next": "13.4.9",
"next-auth": "^4.22.1",
"next-plausible": "^3.7.2",
"next": "13.4.12",
"next-auth": "4.22.3",
"next-plausible": "^3.10.1",
"next-themes": "^0.2.1",
"perfect-freehand": "^1.2.0",
"react": "18.2.0",
@ -34,13 +34,13 @@
"react-icons": "^4.8.0",
"react-pdf": "^7.1.1",
"react-rnd": "^10.4.1",
"typescript": "5.0.4",
"typescript": "5.1.6",
"zod": "^3.21.4"
},
"devDependencies": {
"@types/formidable": "^2.0.6",
"@types/node": "20.1.0",
"@types/react": "18.2.6",
"@types/react-dom": "18.2.4"
"@types/react": "18.2.18",
"@types/react-dom": "18.2.7"
}
}

View File

@ -17,7 +17,7 @@ import { AddSubjectFormPartial } from '~/components/forms/edit-document/add-subj
const PDFViewer = dynamic(async () => import('~/components/(dashboard)/pdf-viewer/pdf-viewer'), {
ssr: false,
loading: () => (
<div className="dark:bg-background flex-col flex min-h-[80vh] items-center justify-center bg-white/50">
<div className="dark:bg-background flex min-h-[80vh] flex-col items-center justify-center bg-white/50">
<Loader className="text-documenso h-12 w-12 animate-spin" />
<p className="text-muted-foreground mt-4">Loading document...</p>

View File

@ -16,7 +16,7 @@ export type LoadablePDFCard = PDFViewerProps & {
const PDFViewer = dynamic(async () => import('~/components/(dashboard)/pdf-viewer/pdf-viewer'), {
ssr: false,
loading: () => (
<div className="flex-col flex min-h-[80vh] items-center justify-center bg-white/50">
<div className="flex min-h-[80vh] flex-col items-center justify-center bg-white/50">
<Loader className="h-12 w-12 animate-spin text-slate-500" />
<p className="mt-4 text-slate-500">Loading document...</p>

View File

@ -4,7 +4,7 @@ import { ChevronLeft, Loader } from 'lucide-react';
export default function Loading() {
return (
<div className="flex-col mx-auto -mt-4 flex w-full max-w-screen-xl px-4 md:px-8">
<div className="mx-auto -mt-4 flex w-full max-w-screen-xl flex-col px-4 md:px-8">
<Link href="/documents" className="flex grow-0 items-center text-[#7AC455] hover:opacity-80">
<ChevronLeft className="mr-2 inline-block h-5 w-5" />
Documents
@ -14,7 +14,7 @@ export default function Loading() {
</h1>
<div className="mt-8 grid min-h-[80vh] w-full grid-cols-12 gap-x-8">
<div className="dark:bg-background border-border col-span-12 rounded-xl border-2 bg-white/50 p-2 before:rounded-xl lg:col-span-6 xl:col-span-7">
<div className="flex-col flex min-h-[80vh] items-center justify-center">
<div className="flex min-h-[80vh] flex-col items-center justify-center">
<Loader className="text-documenso h-12 w-12 animate-spin" />
<p className="text-muted-foreground mt-4">Loading document...</p>

View File

@ -4,7 +4,7 @@ import { ChevronLeft } from 'lucide-react';
export default function DocumentSentPage() {
return (
<div className="flex-col mx-auto -mt-4 flex w-full max-w-screen-xl px-4 md:px-8">
<div className="mx-auto -mt-4 flex w-full max-w-screen-xl flex-col px-4 md:px-8">
<Link href="/documents" className="flex grow-0 items-center text-[#7AC455] hover:opacity-80">
<ChevronLeft className="mr-2 inline-block h-5 w-5" />
Documents

View File

@ -102,7 +102,7 @@ export const DocumentDropzone = ({ className, onDrop, ...props }: DocumentDropzo
<Card
role="button"
className={cn(
'focus-visible:ring-ring ring-offset-background flex-col flex flex-1 cursor-pointer items-center justify-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2',
'focus-visible:ring-ring ring-offset-background flex flex-1 cursor-pointer flex-col items-center justify-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2',
className,
)}
gradient={true}
@ -110,11 +110,11 @@ export const DocumentDropzone = ({ className, onDrop, ...props }: DocumentDropzo
{...getRootProps()}
{...props}
>
<CardContent className="text-muted-foreground/40 flex-col flex items-center justify-center p-6">
<CardContent className="text-muted-foreground/40 flex flex-col items-center justify-center p-6">
{/* <FilePlus strokeWidth="1px" className="h-16 w-16"/> */}
<div className="flex">
<motion.div
className="border-muted-foreground/20 group-hover:border-documenso/80 dark:bg-muted/80 flex-col z-10 flex aspect-[3/4] w-24 origin-top-right -rotate-[22deg] gap-y-1 rounded-lg border bg-white/80 px-2 py-4 backdrop-blur-sm"
className="border-muted-foreground/20 group-hover:border-documenso/80 dark:bg-muted/80 z-10 flex aspect-[3/4] w-24 origin-top-right -rotate-[22deg] flex-col gap-y-1 rounded-lg border bg-white/80 px-2 py-4 backdrop-blur-sm"
variants={DocumentDropzoneCardLeftVariants}
>
<div className="bg-muted-foreground/20 group-hover:bg-documenso h-2 w-full rounded-[2px]" />
@ -123,7 +123,7 @@ export const DocumentDropzone = ({ className, onDrop, ...props }: DocumentDropzo
</motion.div>
<motion.div
className="border-muted-foreground/20 group-hover:border-documenso/80 dark:bg-muted/80 flex-col z-20 flex aspect-[3/4] w-24 items-center justify-center gap-y-1 rounded-lg border bg-white/80 px-2 py-4 backdrop-blur-sm"
className="border-muted-foreground/20 group-hover:border-documenso/80 dark:bg-muted/80 z-20 flex aspect-[3/4] w-24 flex-col items-center justify-center gap-y-1 rounded-lg border bg-white/80 px-2 py-4 backdrop-blur-sm"
variants={DocumentDropzoneCardCenterVariants}
>
<Plus
@ -133,7 +133,7 @@ export const DocumentDropzone = ({ className, onDrop, ...props }: DocumentDropzo
</motion.div>
<motion.div
className="border-muted-foreground/20 group-hover:border-documenso/80 dark:bg-muted/80 flex-col z-10 flex aspect-[3/4] w-24 origin-top-left rotate-[22deg] gap-y-1 rounded-lg border bg-white/80 px-2 py-4 backdrop-blur-sm"
className="border-muted-foreground/20 group-hover:border-documenso/80 dark:bg-muted/80 z-10 flex aspect-[3/4] w-24 origin-top-left rotate-[22deg] flex-col gap-y-1 rounded-lg border bg-white/80 px-2 py-4 backdrop-blur-sm"
variants={DocumentDropzoneCardRightVariants}
>
<div className="bg-muted-foreground/20 group-hover:bg-documenso h-2 w-full rounded-[2px]" />

View File

@ -362,7 +362,7 @@ export const AddFieldsFormPartial = ({
title="Add Fields"
description="Add all relevant fields for each recipient."
>
<div className="flex-col flex">
<div className="flex flex-col">
{selectedField && visible && (
<Card
className="border-primary pointer-events-none fixed z-50 cursor-pointer bg-white"
@ -477,7 +477,7 @@ export const AddFieldsFormPartial = ({
data-selected={selectedField === FieldType.SIGNATURE ? true : undefined}
>
<Card className="group-data-[selected]:border-documenso h-full w-full cursor-pointer group-disabled:opacity-50">
<CardContent className="flex-col flex items-center justify-center px-6 py-4">
<CardContent className="flex flex-col items-center justify-center px-6 py-4">
<p
className={cn(
'text-muted-foreground group-data-[selected]:text-foreground text-3xl font-medium',
@ -500,7 +500,7 @@ export const AddFieldsFormPartial = ({
data-selected={selectedField === FieldType.EMAIL ? true : undefined}
>
<Card className="group-data-[selected]:border-documenso h-full w-full cursor-pointer group-disabled:opacity-50">
<CardContent className="flex-col flex items-center justify-center px-6 py-4">
<CardContent className="flex flex-col items-center justify-center px-6 py-4">
<p
className={cn(
'text-muted-foreground group-data-[selected]:text-foreground text-xl font-medium',
@ -522,7 +522,7 @@ export const AddFieldsFormPartial = ({
data-selected={selectedField === FieldType.NAME ? true : undefined}
>
<Card className="group-data-[selected]:border-documenso h-full w-full cursor-pointer group-disabled:opacity-50">
<CardContent className="flex-col flex items-center justify-center px-6 py-4">
<CardContent className="flex flex-col items-center justify-center px-6 py-4">
<p
className={cn(
'text-muted-foreground group-data-[selected]:text-foreground text-xl font-medium',
@ -544,7 +544,7 @@ export const AddFieldsFormPartial = ({
data-selected={selectedField === FieldType.DATE ? true : undefined}
>
<Card className="group-data-[selected]:border-documenso h-full w-full cursor-pointer group-disabled:opacity-50">
<CardContent className="flex-col flex items-center justify-center px-6 py-4">
<CardContent className="flex flex-col items-center justify-center px-6 py-4">
<p
className={cn(
'text-muted-foreground group-data-[selected]:text-foreground text-xl font-medium',

View File

@ -148,7 +148,7 @@ export const AddSignersFormPartial = ({
title="Add Signers"
description="Add the people who will sign the document."
>
<div className="flex-col flex w-full gap-y-4">
<div className="flex w-full flex-col gap-y-4">
<AnimatePresence>
{signers.map((signer, index) => (
<motion.div

View File

@ -85,8 +85,8 @@ export const AddSubjectFormPartial = ({
title="Add Subject"
description="Add the subject and message you wish to send to signers."
>
<div className="flex-col flex">
<div className="flex-col flex gap-y-4">
<div className="flex flex-col">
<div className="flex flex-col gap-y-4">
<div>
<Label htmlFor="subject">
Subject <span className="text-muted-foreground">(Optional)</span>
@ -128,7 +128,7 @@ export const AddSubjectFormPartial = ({
You can use the following variables in your message:
</p>
<ul className="flex-col mt-2 flex list-inside list-disc gap-y-2 text-sm">
<ul className="mt-2 flex list-inside list-disc flex-col gap-y-2 text-sm">
<li className="text-muted-foreground">
<code className="text-muted-foreground bg-muted-foreground/20 rounded p-1 text-sm">
{'{signer.name}'}

View File

@ -19,12 +19,12 @@ export const EditDocumentFormContainer = ({
<form
id={id}
className={cn(
'dark:bg-background border-border bg-widget flex-col sticky top-20 flex h-[calc(100vh-6rem)] max-h-screen rounded-xl border px-4 py-6',
'dark:bg-background border-border bg-widget sticky top-20 flex h-[calc(100vh-6rem)] max-h-screen flex-col rounded-xl border px-4 py-6',
className,
)}
{...props}
>
<div className={cn('flex-col -mx-2 flex flex-1 overflow-hidden px-2')}>{children}</div>
<div className={cn('-mx-2 flex flex-1 flex-col overflow-hidden px-2')}>{children}</div>
</form>
);
};
@ -43,14 +43,14 @@ export const EditDocumentFormContainerContent = ({
...props
}: EditDocumentFormContainerContentProps) => {
return (
<div className={cn('flex-col flex flex-1', className)} {...props}>
<div className={cn('flex flex-1 flex-col', className)} {...props}>
<h3 className="text-foreground text-2xl font-semibold">{title}</h3>
<p className="text-muted-foreground mt-2 text-sm">{description}</p>
<hr className="border-border mb-8 mt-4" />
<div className="flex-col -mx-2 flex flex-1 overflow-y-auto px-2">{children}</div>
<div className="-mx-2 flex flex-1 flex-col overflow-y-auto px-2">{children}</div>
</div>
);
};

View File

@ -28,8 +28,8 @@ export const FieldItem = ({
field,
passive,
disabled,
minHeight,
minWidth,
minHeight: _minHeight,
minWidth: _minWidth,
onResize,
onMove,
onRemove,
@ -63,24 +63,6 @@ export const FieldItem = ({
const pageHeight = (field.pageHeight / 100) * height;
const pageWidth = (field.pageWidth / 100) * width;
console.log(
structuredClone({
field,
top,
left,
height,
width,
pageX: coords.pageX,
pageY: coords.pageY,
pageHeight: coords.pageHeight,
pageWidth: coords.pageWidth,
newPageX: pageX,
newPageY: pageY,
newPageHeight: pageHeight,
newPageWidth: pageWidth,
}),
);
setCoords({
pageX: pageX,
pageY: pageY,

View File

@ -81,7 +81,7 @@ export const PasswordForm = ({ className }: PasswordFormProps) => {
return (
<form
className={cn('flex-col flex w-full gap-y-4', className)}
className={cn('flex w-full flex-col gap-y-4', className)}
onSubmit={handleSubmit(onFormSubmit)}
>
<div>

View File

@ -1,6 +1,7 @@
{
"extends": "@documenso/tsconfig/nextjs.json",
"compilerOptions": {
"baseUrl": ".",
"allowJs": true,
"plugins": [
{
@ -10,15 +11,24 @@
"paths": {
"~/*": [
"./src/*"
],
"contentlayer/generated": [
"./.contentlayer/generated"
]
},
"strictNullChecks": true
"types": [
"@documenso/lib/types/next-auth.d.ts"
],
"strictNullChecks": true,
"incremental": false
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
"**/*.d.ts",
".next/types/**/*.ts",
".contentlayer/generated"
],
"exclude": [
"node_modules"

18066
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,6 @@
"packageManager": "npm@8.19.2",
"workspaces": [
"apps/*",
"packages/*",
"packages/email/.react-email"
"packages/*"
]
}

View File

@ -24,7 +24,6 @@
},
"devDependencies": {
"@types/nodemailer": "^6.4.8",
"react-email": "^1.9.4",
"tsup": "^7.1.0"
}
}

View File

@ -12,7 +12,7 @@ import {
Text,
} from '@react-email/components';
import * as config from '@documenso/tailwind-config';
import config from '@documenso/tailwind-config';
interface DocumentCompletedEmailTemplateProps {
downloadLink?: string;

View File

@ -13,7 +13,7 @@ import {
Text,
} from '@react-email/components';
import * as config from '@documenso/tailwind-config';
import config from '@documenso/tailwind-config';
interface DocumentInviteEmailTemplateProps {
inviterName?: string;

View File

@ -11,7 +11,7 @@ import {
Text,
} from '@react-email/components';
import * as config from '@documenso/tailwind-config';
import config from '@documenso/tailwind-config';
interface DocumentPendingEmailTemplateProps {
documentName?: string;

View File

@ -1,5 +1,5 @@
{
"extends": "@documenso/tsconfig/react-library.json",
"include": ["."],
"include": ["**/*.ts", "**/*.tsx", "**/*.d.ts", "**/*.json"],
"exclude": ["dist", "build", "node_modules"]
}

View File

@ -7,11 +7,11 @@
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"eslint": "^8.40.0",
"eslint-config-next": "^13.4.9",
"eslint-config-next": "13.4.12",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-config-turbo": "^1.9.3",
"typescript": "^5.0.4"
"typescript": "^5.1.6"
}
}

View File

@ -16,13 +16,13 @@
"@documenso/email": "*",
"@documenso/prisma": "*",
"@pdf-lib/fontkit": "^1.1.1",
"@next-auth/prisma-adapter": "^1.0.6",
"@next-auth/prisma-adapter": "1.0.7",
"@upstash/redis": "^1.20.6",
"bcrypt": "^5.1.0",
"pdf-lib": "^1.17.1",
"nanoid": "^4.0.2",
"next": "13.4.9",
"next-auth": "^4.22.1",
"next": "13.4.12",
"next-auth": "4.22.3",
"react": "18.2.0",
"stripe": "^12.7.0"
},

View File

@ -1,5 +1,5 @@
{
"extends": "@documenso/tsconfig/react-library.json",
"include": ["."],
"include": ["**/*.ts", "**/*.tsx", "**/*.d.ts"],
"exclude": ["dist", "build", "node_modules"]
}

View File

@ -8,8 +8,8 @@ declare module 'next-auth' {
interface User extends Omit<DefaultUser, 'id' | 'image'> {
id: PrismaUser['id'];
email?: PrismaUser['email'];
name?: PrismaUser['name'];
email?: PrismaUser['email'];
emailVerified?: PrismaUser['emailVerified'];
}
}

View File

@ -12,7 +12,7 @@
"prisma:migrate-deploy": "prisma migrate deploy"
},
"dependencies": {
"@prisma/client": "^4.14.0",
"prisma": "^4.14.0"
"@prisma/client": "5.0.0",
"prisma": "5.0.0"
}
}

View File

@ -9,12 +9,12 @@
"dependencies": {
"@documenso/lib": "*",
"@documenso/prisma": "*",
"@tanstack/react-query": "^4.29.5",
"@trpc/client": "^10.25.1",
"@trpc/next": "^10.25.1",
"@trpc/react-query": "^10.25.1",
"@trpc/server": "^10.25.1",
"superjson": "^1.12.3",
"@tanstack/react-query": "^4.32.0",
"@trpc/client": "^10.36.0",
"@trpc/next": "^10.36.0",
"@trpc/react-query": "^10.36.0",
"@trpc/server": "^10.36.0",
"superjson": "^1.13.1",
"zod": "^3.21.4"
}
}

1
packages/tsconfig/ambient.d.ts vendored Normal file
View File

@ -0,0 +1 @@
declare module '@documenso/tailwind-config';

View File

@ -16,8 +16,8 @@
"preserveWatchOutput": true,
"skipLibCheck": true,
"strict": true,
"target": "ES2018",
"types": ["@documenso/tsconfig/process-env.d.ts"]
"target": "ES2018"
},
"include": ["**/*.ts", "**/*.tsx", "**/.d.ts"],
"exclude": ["node_modules"]
}

View File

@ -19,6 +19,6 @@
],
"resolveJsonModule": true
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}

View File

@ -16,10 +16,10 @@
},
"devDependencies": {
"@documenso/tsconfig": "*",
"@types/react": "18.2.6",
"@types/react-dom": "18.2.4",
"@types/react": "18.2.18",
"@types/react-dom": "18.2.7",
"react": "18.2.0",
"typescript": "^5.0.4"
"typescript": "^5.1.6"
},
"dependencies": {
"@radix-ui/react-accordion": "^1.1.1",