Skip to content

Commit 2d62504

Browse files
authored
Merge pull request #2144 from AmruthPillai/chore/update-dependencies
Update dependencies, bump release version and a lot more
2 parents 5b3e91e + e34d0ce commit 2d62504

File tree

31 files changed

+4673
-4371
lines changed

31 files changed

+4673
-4371
lines changed

.github/workflows/publish-docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ jobs:
153153
password: ${{ secrets.DOCKER_TOKEN }}
154154

155155
- name: Deploy the latest image on rxresu.me
156-
run: curl -X POST ${{ secrets.SERVICE_WEBHOOK }}
156+
run: curl -Xk POST ${{ secrets.SERVICE_WEBHOOK }}
157157

158158
- name: Inform about the release on Discord
159159
uses: sarisia/[email protected]

.ncurc.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/raineorshine/npm-check-updates/main/src/types/RunOptions.json",
33
"upgrade": true,
4+
"target": "minor",
45
"install": "always",
56
"packageManager": "pnpm",
6-
"reject": ["eslint", "eslint-plugin-unused-imports", "@reactive-resume/*"]
7+
"reject": [
8+
"eslint",
9+
"@swc/*",
10+
"@swc-node/*",
11+
"@reactive-resume/*",
12+
"eslint-plugin-unused-imports"
13+
]
714
}

apps/client/.eslintrc.json

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
"ignorePatterns": ["!**/*"],
44
"overrides": [
55
{
6-
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
6+
"files": ["*.ts", "*.tsx"],
77
"extends": [
88
"plugin:tailwindcss/recommended",
99
"plugin:@tanstack/eslint-plugin-query/recommended"
1010
],
11+
"parserOptions": {
12+
"projectService": "./apps/client/tsconfig.json"
13+
},
1114
"settings": {
1215
"tailwindcss": {
1316
"callees": ["cn", "clsx", "cva"],
@@ -39,8 +42,59 @@
3942
"lingui/no-unlocalized-strings": [
4043
2,
4144
{
42-
"ignoreFunction": ["cn"],
43-
"ignoreAttribute": ["alt"]
45+
"ignore": [
46+
// Ignore strings which are a single "word" (no spaces)
47+
// and doesn't start with an uppercase letter
48+
"^(?![A-Z])\\S+$",
49+
// Ignore UPPERCASE literals
50+
// Example: const test = "FOO"
51+
"^[A-Z0-9_-]+$"
52+
],
53+
"ignoreNames": [
54+
// Ignore matching className (case-insensitive)
55+
{ "regex": { "pattern": "className", "flags": "i" } },
56+
// Ignore UPPERCASE names
57+
// Example: test.FOO = "ola!"
58+
{ "regex": { "pattern": "^[A-Z0-9_-]+$" } },
59+
"id",
60+
"src",
61+
"srcSet",
62+
"styleName",
63+
"placeholder",
64+
"alt",
65+
"type",
66+
"width",
67+
"height",
68+
"displayName",
69+
"Authorization"
70+
],
71+
"ignoreFunctions": [
72+
"cn",
73+
"cva",
74+
"track",
75+
"Error",
76+
"console.*",
77+
"*headers.set",
78+
"*.addEventListener",
79+
"*.removeEventListener",
80+
"*.postMessage",
81+
"*.getElementById",
82+
"*.dispatch",
83+
"*.commit",
84+
"*.includes",
85+
"*.indexOf",
86+
"*.endsWith",
87+
"*.startsWith",
88+
"require"
89+
],
90+
// Following settings require typed linting https://typescript-eslint.io/getting-started/typed-linting/
91+
"useTsTypes": true,
92+
"ignoreMethodsOnTypes": [
93+
// Ignore specified methods on Map and Set types
94+
"Map.get",
95+
"Map.has",
96+
"Set.has"
97+
]
4498
}
4599
],
46100
"lingui/t-call-in-function": 2,

apps/client/src/pages/builder/sidebars/right/sections/layout.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
verticalListSortingStrategy,
1919
} from "@dnd-kit/sortable";
2020
import { CSS } from "@dnd-kit/utilities";
21-
import { t, Trans } from "@lingui/macro";
21+
import { t } from "@lingui/macro";
2222
import { ArrowCounterClockwise, DotsSixVertical, Plus, TrashSimple } from "@phosphor-icons/react";
2323
import { defaultMetadata } from "@reactive-resume/schema";
2424
import { Button, Portal, Tooltip } from "@reactive-resume/ui";
@@ -92,9 +92,7 @@ type SectionProps = {
9292
};
9393

9494
const Section = ({ id, isDragging = false }: SectionProps) => {
95-
const name = useResumeStore((state) =>
96-
get(state.resume.data.sections, `${id}.name`, id),
97-
) as string;
95+
const name = useResumeStore((state) => get(state.resume.data.sections, `${id}.name`, id));
9896

9997
return (
10098
<div
@@ -229,13 +227,12 @@ export const LayoutSection = () => {
229227

230228
const main = page[0];
231229
const sidebar = page[1];
230+
const pageNumber = pageIndex + 1;
232231

233232
return (
234233
<div key={pageIndex} className="rounded border p-3 pb-4">
235234
<div className="flex items-center justify-between">
236-
<p className="mb-3 text-xs font-bold">
237-
<Trans>Page {pageIndex + 1}</Trans>
238-
</p>
235+
<p className="mb-3 text-xs font-bold">{t`Page ${pageNumber}`}</p>
239236

240237
{pageIndex !== 0 && (
241238
<Tooltip content={t`Remove Page`}>

apps/server/src/auth/utils/payload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { idSchema } from "@reactive-resume/schema";
2-
import { z } from "nestjs-zod/z";
2+
import { z } from "zod";
33

44
export const payloadSchema = z.object({
55
id: idSchema,

apps/server/src/config/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { z } from "nestjs-zod/z";
1+
import { z } from "zod";
22

33
export const configSchema = z.object({
44
NODE_ENV: z.enum(["development", "production"]).default("production"),

apps/server/src/resume/resume.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export class ResumeService {
114114
title: updateResumeDto.title,
115115
slug: updateResumeDto.slug,
116116
visibility: updateResumeDto.visibility,
117-
data: updateResumeDto.data as unknown as Prisma.JsonObject,
117+
data: updateResumeDto.data as Prisma.JsonObject,
118118
},
119119
where: { userId_id: { userId, id } },
120120
});

libs/dto/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@reactive-resume/utils": "*",
1313
"@reactive-resume/schema": "*",
1414
"nestjs-zod": "^3.0.0",
15-
"@swc/helpers": "~0.5.11"
15+
"@swc/helpers": "~0.5.11",
16+
"zod": "^3.24.1"
1617
}
1718
}

libs/dto/src/auth/forgot-password.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createZodDto } from "nestjs-zod/dto";
2-
import { z } from "nestjs-zod/z";
2+
import { z } from "zod";
33

44
export const forgotPasswordSchema = z.object({ email: z.string().email() });
55

libs/dto/src/auth/login.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { createZodDto } from "nestjs-zod/dto";
2-
import { z } from "nestjs-zod/z";
2+
import { z } from "zod";
33

44
import { usernameSchema } from "../user";
55

66
export const loginSchema = z
77
.object({
88
identifier: z.string().transform((value) => value.toLowerCase()),
9-
password: z.password().min(6),
9+
password: z.string().min(6),
1010
})
1111
.refine(
1212
(value) => {

libs/dto/src/auth/message.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createZodDto } from "nestjs-zod/dto";
2-
import { z } from "nestjs-zod/z";
2+
import { z } from "zod";
33

44
export const messageSchema = z.object({ message: z.string() });
55

libs/dto/src/auth/providers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createZodDto } from "nestjs-zod/dto";
2-
import { z } from "nestjs-zod/z";
2+
import { z } from "zod";
33

44
const authProvidersSchema = z.array(z.enum(["email", "github", "google"]));
55

libs/dto/src/auth/register.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { createZodDto } from "nestjs-zod/dto";
2-
import { z } from "nestjs-zod/z";
2+
import { z } from "zod";
33

44
import { userSchema } from "../user";
55

66
export const registerSchema = userSchema
77
.pick({ name: true, email: true, username: true, locale: true })
8-
.extend({ password: z.password().min(6) });
8+
.extend({ password: z.string().min(6) });
99

1010
export class RegisterDto extends createZodDto(registerSchema) {}

libs/dto/src/auth/reset-password.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { createZodDto } from "nestjs-zod/dto";
2-
import { z } from "nestjs-zod/z";
2+
import { z } from "zod";
33

44
export const resetPasswordSchema = z.object({
55
token: z.string(),
6-
password: z.password().min(6),
6+
password: z.string().min(6),
77
});
88

99
export class ResetPasswordDto extends createZodDto(resetPasswordSchema) {}

libs/dto/src/auth/response.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createZodDto } from "nestjs-zod/dto";
2-
import { z } from "nestjs-zod/z";
2+
import { z } from "zod";
33

44
import { userSchema } from "../user";
55

libs/dto/src/auth/two-factor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createZodDto } from "nestjs-zod/dto";
2-
import { z } from "nestjs-zod/z";
2+
import { z } from "zod";
33

44
export const twoFactorSchema = z.object({
55
code: z

libs/dto/src/auth/update-password.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createZodDto } from "nestjs-zod/dto";
2-
import { z } from "nestjs-zod/z";
2+
import { z } from "zod";
33

44
export const updatePasswordSchema = z.object({
55
password: z.string().min(6),

libs/dto/src/contributors/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createZodDto } from "nestjs-zod/dto";
2-
import { z } from "nestjs-zod/z";
2+
import { z } from "zod";
33

44
export const contributorSchema = z.object({
55
id: z.number(),

libs/dto/src/feature/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createZodDto } from "nestjs-zod/dto";
2-
import { z } from "nestjs-zod/z";
2+
import { z } from "zod";
33

44
export const featureSchema = z.object({
55
isSignupsDisabled: z.boolean().default(false),

libs/dto/src/resume/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { kebabCase } from "@reactive-resume/utils";
22
import { createZodDto } from "nestjs-zod/dto";
3-
import { z } from "nestjs-zod/z";
3+
import { z } from "zod";
44

55
export const createResumeSchema = z.object({
66
title: z.string().min(1),

libs/dto/src/resume/delete.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { idSchema } from "@reactive-resume/schema";
22
import { createZodDto } from "nestjs-zod/dto";
3-
import { z } from "nestjs-zod/z";
3+
import { z } from "zod";
44

55
export const deleteResumeSchema = z.object({
66
id: idSchema,

libs/dto/src/resume/import.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { resumeDataSchema } from "@reactive-resume/schema";
22
import { kebabCase } from "@reactive-resume/utils";
33
import { createZodDto } from "nestjs-zod/dto";
4-
import { z } from "nestjs-zod/z";
4+
import { z } from "zod";
55

66
export const importResumeSchema = z.object({
77
title: z.string().optional(),

libs/dto/src/resume/resume.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defaultResumeData, idSchema, resumeDataSchema } from "@reactive-resume/schema";
2+
import { dateSchema } from "@reactive-resume/utils";
23
import { createZodDto } from "nestjs-zod/dto";
3-
import { z } from "nestjs-zod/z";
4+
import { z } from "zod";
45

56
import { userSchema } from "../user";
67

@@ -13,8 +14,8 @@ export const resumeSchema = z.object({
1314
locked: z.boolean().default(false),
1415
userId: idSchema,
1516
user: userSchema.optional(),
16-
createdAt: z.date().or(z.dateString()),
17-
updatedAt: z.date().or(z.dateString()),
17+
createdAt: dateSchema,
18+
updatedAt: dateSchema,
1819
});
1920

2021
export class ResumeDto extends createZodDto(resumeSchema) {}

libs/dto/src/resume/url.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createZodDto } from "nestjs-zod/dto";
2-
import { z } from "nestjs-zod/z";
2+
import { z } from "zod";
33

44
export const urlSchema = z.object({ url: z.string().url() });
55

libs/dto/src/secrets/secrets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { idSchema } from "@reactive-resume/schema";
2-
import { z } from "nestjs-zod/z";
2+
import { z } from "zod";
33

44
export const secretsSchema = z.object({
55
id: idSchema,

libs/dto/src/statistics/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createZodDto } from "nestjs-zod/dto";
2-
import { z } from "nestjs-zod/z";
2+
import { z } from "zod";
33

44
export const statisticsSchema = z.object({
55
views: z.number().int().default(0),

libs/dto/src/user/user.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { idSchema } from "@reactive-resume/schema";
2+
import { dateSchema } from "@reactive-resume/utils";
23
import { createZodDto } from "nestjs-zod/dto";
3-
import { z } from "nestjs-zod/z";
4+
import { z } from "zod";
45

56
import { secretsSchema } from "../secrets";
67

@@ -26,8 +27,8 @@ export const userSchema = z.object({
2627
emailVerified: z.boolean().default(false),
2728
twoFactorEnabled: z.boolean().default(false),
2829
provider: z.enum(["email", "github", "google"]).default("email"),
29-
createdAt: z.date().or(z.dateString()),
30-
updatedAt: z.date().or(z.dateString()),
30+
createdAt: dateSchema,
31+
updatedAt: dateSchema,
3132
});
3233

3334
export class UserDto extends createZodDto(userSchema) {}

libs/utils/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"unique-names-generator": "^4.7.1",
1515
"clsx": "^2.1.1",
1616
"tailwind-merge": "^2.3.0",
17-
"@swc/helpers": "~0.5.11"
17+
"@swc/helpers": "~0.5.11",
18+
"zod": "^3.24.1"
1819
}
1920
}

libs/utils/src/namespaces/date.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
import dayjs from "dayjs";
2+
import { z } from "zod";
3+
4+
export const dateSchema = z.union([z.date(), z.string().datetime()]).transform((value) => {
5+
if (typeof value === "string") return dayjs(value).toDate();
6+
return value;
7+
});
28

39
export const sortByDate = <T>(a: T, b: T, key: keyof T, desc = true) => {
410
if (!a[key] || !b[key]) return 0;

0 commit comments

Comments
 (0)