From b47b7824ff5258222ce8f8fa0a16af1e25e51002 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Sun, 10 Mar 2024 10:35:23 +0100 Subject: [PATCH] - bump up version to 4.0.6 - update dependencies - remove test phase from CI script - lint and format all files --- .../workflows/{lint-test-build.yml => lint-build.yml} | 3 +-- apps/artboard/tsconfig.json | 8 ++++---- .../src/pages/dashboard/resumes/_dialogs/import.tsx | 6 +++--- .../pages/dashboard/settings/_dialogs/two-factor.tsx | 2 +- apps/client/src/providers/locale.tsx | 8 ++------ apps/client/src/services/resume/statistics.ts | 2 +- apps/client/src/vite-env.d.ts | 1 + apps/client/tsconfig.json | 10 +++++----- apps/server/src/auth/auth.controller.ts | 6 +++--- apps/server/tsconfig.json | 10 +++++----- libs/dto/package.json | 2 +- libs/dto/tsconfig.json | 10 +++++----- libs/hooks/tsconfig.json | 10 +++++----- libs/parser/package.json | 2 +- libs/parser/tsconfig.json | 10 +++++----- libs/schema/package.json | 2 +- libs/schema/tsconfig.json | 10 +++++----- libs/ui/src/components/command.tsx | 2 +- libs/ui/tsconfig.json | 10 +++++----- libs/utils/package.json | 6 +++--- libs/utils/src/namespaces/color.ts | 2 +- libs/utils/tsconfig.json | 10 +++++----- package.json | 2 +- 23 files changed, 65 insertions(+), 69 deletions(-) rename .github/workflows/{lint-test-build.yml => lint-build.yml} (91%) diff --git a/.github/workflows/lint-test-build.yml b/.github/workflows/lint-build.yml similarity index 91% rename from .github/workflows/lint-test-build.yml rename to .github/workflows/lint-build.yml index 40433887..394026ae 100644 --- a/.github/workflows/lint-test-build.yml +++ b/.github/workflows/lint-build.yml @@ -1,4 +1,4 @@ -name: Lint, Test and Build +name: Lint and Build on: push: @@ -35,7 +35,6 @@ jobs: pnpm exec nx-cloud record -- pnpm exec nx format:check parallel-commands-on-agents: | pnpm exec nx affected --target=lint --parallel=3 - pnpm exec nx affected --target=test --parallel=3 --ci --code-coverage pnpm exec nx affected --target=build --parallel=3 agents: diff --git a/apps/artboard/tsconfig.json b/apps/artboard/tsconfig.json index 672dc873..fe609d7a 100644 --- a/apps/artboard/tsconfig.json +++ b/apps/artboard/tsconfig.json @@ -5,14 +5,14 @@ "esModuleInterop": false, "allowSyntheticDefaultImports": true, "strict": true, - "types": ["vite/client"], + "types": ["vite/client"] }, "files": [], "include": [], "references": [ { - "path": "./tsconfig.app.json", - }, + "path": "./tsconfig.app.json" + } ], - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.json" } diff --git a/apps/client/src/pages/dashboard/resumes/_dialogs/import.tsx b/apps/client/src/pages/dashboard/resumes/_dialogs/import.tsx index fdd79ffc..718d6173 100644 --- a/apps/client/src/pages/dashboard/resumes/_dialogs/import.tsx +++ b/apps/client/src/pages/dashboard/resumes/_dialogs/import.tsx @@ -72,7 +72,7 @@ type ValidationResult = export const ImportDialog = () => { const { toast } = useToast(); const { isOpen, close } = useDialog("import"); - const { importResume, loading, error: importError } = useImportResume(); + const { importResume, loading } = useImportResume(); const [validationResult, setValidationResult] = useState(null); @@ -182,11 +182,11 @@ export const ImportDialog = () => { } close(); - } catch (error: any) { + } catch (error: unknown) { toast({ variant: "error", title: t`Oops, the server returned an error.`, - description: error["message"], + description: error instanceof Error ? error.message : undefined, }); } }; diff --git a/apps/client/src/pages/dashboard/settings/_dialogs/two-factor.tsx b/apps/client/src/pages/dashboard/settings/_dialogs/two-factor.tsx index 6807eede..1e9fcf29 100644 --- a/apps/client/src/pages/dashboard/settings/_dialogs/two-factor.tsx +++ b/apps/client/src/pages/dashboard/settings/_dialogs/two-factor.tsx @@ -178,7 +178,7 @@ export const TwoFactorDialog = () => {
- +
diff --git a/apps/client/src/providers/locale.tsx b/apps/client/src/providers/locale.tsx index d8243322..dccfe2ce 100644 --- a/apps/client/src/providers/locale.tsx +++ b/apps/client/src/providers/locale.tsx @@ -18,12 +18,8 @@ export const LocaleProvider = ({ children }: Props) => { const userLocale = useAuthStore((state) => state.user?.locale); useEffect(() => { - const detectedLocale = detect( - fromUrl("locale"), - fromStorage("locale"), - userLocale, - defaultLocale, - )!; + const detectedLocale = + detect(fromUrl("locale"), fromStorage("locale"), userLocale, defaultLocale) ?? defaultLocale; // Activate the locale only if it's supported if (languages.some((lang) => lang.locale === detectedLocale)) { diff --git a/apps/client/src/services/resume/statistics.ts b/apps/client/src/services/resume/statistics.ts index ae9bd3e7..7dc3f829 100644 --- a/apps/client/src/services/resume/statistics.ts +++ b/apps/client/src/services/resume/statistics.ts @@ -10,7 +10,7 @@ export const findResumeStatisticsById = async (data: { id: string }) => { return response.data; }; -export const useResumeStatistics = (id: string, enabled: boolean = false) => { +export const useResumeStatistics = (id: string, enabled = false) => { const { error, isPending: loading, diff --git a/apps/client/src/vite-env.d.ts b/apps/client/src/vite-env.d.ts index e8890a1f..51062e5b 100644 --- a/apps/client/src/vite-env.d.ts +++ b/apps/client/src/vite-env.d.ts @@ -2,6 +2,7 @@ declare const appVersion: string; +// eslint-disable-next-line @typescript-eslint/no-empty-interface interface ImportMetaEnv {} interface ImportMeta { diff --git a/apps/client/tsconfig.json b/apps/client/tsconfig.json index 44302cf9..fdfab6c3 100644 --- a/apps/client/tsconfig.json +++ b/apps/client/tsconfig.json @@ -5,17 +5,17 @@ "esModuleInterop": false, "allowSyntheticDefaultImports": true, "strict": true, - "types": ["vite/client", "vitest"], + "types": ["vite/client", "vitest"] }, "files": [], "include": [], "references": [ { - "path": "./tsconfig.app.json", + "path": "./tsconfig.app.json" }, { - "path": "./tsconfig.spec.json", - }, + "path": "./tsconfig.spec.json" + } ], - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.json" } diff --git a/apps/server/src/auth/auth.controller.ts b/apps/server/src/auth/auth.controller.ts index f141180d..82db76ff 100644 --- a/apps/server/src/auth/auth.controller.ts +++ b/apps/server/src/auth/auth.controller.ts @@ -48,7 +48,7 @@ export class AuthController { private readonly utils: UtilsService, ) {} - private async exchangeToken(id: string, email: string, isTwoFactorAuth: boolean = false) { + private async exchangeToken(id: string, email: string, isTwoFactorAuth = false) { try { const payload = payloadSchema.parse({ id, isTwoFactorAuth }); @@ -67,8 +67,8 @@ export class AuthController { private async handleAuthenticationResponse( user: UserWithSecrets, response: Response, - isTwoFactorAuth: boolean = false, - redirect: boolean = false, + isTwoFactorAuth = false, + redirect = false, ) { let status = "authenticated"; diff --git a/apps/server/tsconfig.json b/apps/server/tsconfig.json index 3c98d67d..c1e2dd4e 100644 --- a/apps/server/tsconfig.json +++ b/apps/server/tsconfig.json @@ -4,13 +4,13 @@ "include": [], "references": [ { - "path": "./tsconfig.app.json", + "path": "./tsconfig.app.json" }, { - "path": "./tsconfig.spec.json", - }, + "path": "./tsconfig.spec.json" + } ], "compilerOptions": { - "esModuleInterop": true, - }, + "esModuleInterop": true + } } diff --git a/libs/dto/package.json b/libs/dto/package.json index 0ce1a092..7cf5eddd 100644 --- a/libs/dto/package.json +++ b/libs/dto/package.json @@ -9,7 +9,7 @@ "access": "public" }, "dependencies": { - "@swc/helpers": "~0.5.2", + "@swc/helpers": "~0.5.6", "nestjs-zod": "^3.0.0", "@reactive-resume/utils": "*", "@reactive-resume/schema": "*" diff --git a/libs/dto/tsconfig.json b/libs/dto/tsconfig.json index 9ee7a346..f5b85657 100644 --- a/libs/dto/tsconfig.json +++ b/libs/dto/tsconfig.json @@ -7,16 +7,16 @@ "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, + "noFallthroughCasesInSwitch": true }, "files": [], "include": [], "references": [ { - "path": "./tsconfig.lib.json", + "path": "./tsconfig.lib.json" }, { - "path": "./tsconfig.spec.json", - }, - ], + "path": "./tsconfig.spec.json" + } + ] } diff --git a/libs/hooks/tsconfig.json b/libs/hooks/tsconfig.json index d46dcdb0..cc963811 100644 --- a/libs/hooks/tsconfig.json +++ b/libs/hooks/tsconfig.json @@ -5,17 +5,17 @@ "esModuleInterop": false, "allowSyntheticDefaultImports": true, "strict": true, - "types": ["vite/client", "vitest"], + "types": ["vite/client", "vitest"] }, "files": [], "include": [], "references": [ { - "path": "./tsconfig.lib.json", + "path": "./tsconfig.lib.json" }, { - "path": "./tsconfig.spec.json", - }, + "path": "./tsconfig.spec.json" + } ], - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.json" } diff --git a/libs/parser/package.json b/libs/parser/package.json index b5a6631c..341ed600 100644 --- a/libs/parser/package.json +++ b/libs/parser/package.json @@ -9,7 +9,7 @@ "access": "public" }, "dependencies": { - "@swc/helpers": "~0.5.2", + "@swc/helpers": "~0.5.6", "@reactive-resume/schema": "*", "nestjs-zod": "^3.0.0", "zod": "^3.22.4", diff --git a/libs/parser/tsconfig.json b/libs/parser/tsconfig.json index 9ee7a346..f5b85657 100644 --- a/libs/parser/tsconfig.json +++ b/libs/parser/tsconfig.json @@ -7,16 +7,16 @@ "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, + "noFallthroughCasesInSwitch": true }, "files": [], "include": [], "references": [ { - "path": "./tsconfig.lib.json", + "path": "./tsconfig.lib.json" }, { - "path": "./tsconfig.spec.json", - }, - ], + "path": "./tsconfig.spec.json" + } + ] } diff --git a/libs/schema/package.json b/libs/schema/package.json index 38e2def6..c8f82b45 100644 --- a/libs/schema/package.json +++ b/libs/schema/package.json @@ -9,7 +9,7 @@ "access": "public" }, "dependencies": { - "@swc/helpers": "~0.5.2", + "@swc/helpers": "~0.5.6", "zod": "^3.22.4", "@reactive-resume/utils": "*", "@paralleldrive/cuid2": "^2.2.2" diff --git a/libs/schema/tsconfig.json b/libs/schema/tsconfig.json index 9ee7a346..f5b85657 100644 --- a/libs/schema/tsconfig.json +++ b/libs/schema/tsconfig.json @@ -7,16 +7,16 @@ "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, + "noFallthroughCasesInSwitch": true }, "files": [], "include": [], "references": [ { - "path": "./tsconfig.lib.json", + "path": "./tsconfig.lib.json" }, { - "path": "./tsconfig.spec.json", - }, - ], + "path": "./tsconfig.spec.json" + } + ] } diff --git a/libs/ui/src/components/command.tsx b/libs/ui/src/components/command.tsx index 1bf1fdc3..ed951083 100644 --- a/libs/ui/src/components/command.tsx +++ b/libs/ui/src/components/command.tsx @@ -19,7 +19,7 @@ export const Command = forwardRef< Command.displayName = CommandPrimitive.displayName; -interface CommandDialogProps extends DialogProps {} +type CommandDialogProps = DialogProps; export const CommandDialog = ({ children, ...props }: CommandDialogProps) => ( diff --git a/libs/ui/tsconfig.json b/libs/ui/tsconfig.json index d46dcdb0..cc963811 100644 --- a/libs/ui/tsconfig.json +++ b/libs/ui/tsconfig.json @@ -5,17 +5,17 @@ "esModuleInterop": false, "allowSyntheticDefaultImports": true, "strict": true, - "types": ["vite/client", "vitest"], + "types": ["vite/client", "vitest"] }, "files": [], "include": [], "references": [ { - "path": "./tsconfig.lib.json", + "path": "./tsconfig.lib.json" }, { - "path": "./tsconfig.spec.json", - }, + "path": "./tsconfig.spec.json" + } ], - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.json" } diff --git a/libs/utils/package.json b/libs/utils/package.json index 24d49044..9efcacdf 100644 --- a/libs/utils/package.json +++ b/libs/utils/package.json @@ -9,10 +9,10 @@ "access": "public" }, "dependencies": { - "@swc/helpers": "~0.5.2", + "@swc/helpers": "~0.5.6", "dayjs": "^1.11.10", - "clsx": "^2.0.0", - "tailwind-merge": "^2.0.0", + "clsx": "^2.1.0", + "tailwind-merge": "^2.2.1", "papaparse": "^5.4.1", "unique-names-generator": "^4.7.1" } diff --git a/libs/utils/src/namespaces/color.ts b/libs/utils/src/namespaces/color.ts index d3b4671c..37f15060 100644 --- a/libs/utils/src/namespaces/color.ts +++ b/libs/utils/src/namespaces/color.ts @@ -1,4 +1,4 @@ -export const hexToRgb = (hex: string, alpha: number = 0) => { +export const hexToRgb = (hex: string, alpha = 0) => { const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16); diff --git a/libs/utils/tsconfig.json b/libs/utils/tsconfig.json index 3e334acb..6f2129d8 100644 --- a/libs/utils/tsconfig.json +++ b/libs/utils/tsconfig.json @@ -8,16 +8,16 @@ "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, + "noFallthroughCasesInSwitch": true }, "files": [], "include": [], "references": [ { - "path": "./tsconfig.lib.json", + "path": "./tsconfig.lib.json" }, { - "path": "./tsconfig.spec.json", - }, - ], + "path": "./tsconfig.spec.json" + } + ] } diff --git a/package.json b/package.json index cbc02eb0..cd5b89a2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@reactive-resume/source", "description": "A free and open-source resume builder that simplifies the process of creating, updating, and sharing your resume.", - "version": "4.0.5", + "version": "4.0.6", "license": "MIT", "private": true, "author": {