- bump up version to 4.0.6

- update dependencies
- remove test phase from CI script
- lint and format all files
This commit is contained in:
Amruth Pillai
2024-03-10 10:35:23 +01:00
parent ec77d13ebd
commit b47b7824ff
23 changed files with 65 additions and 69 deletions
+4 -4
View File
@@ -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"
}
@@ -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<ValidationResult | null>(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,
});
}
};
@@ -178,7 +178,7 @@ export const TwoFactorDialog = () => {
<FormItem>
<FormControl>
<div className="space-y-4">
<QRCodeSVG value={field.value!} size={256} className="mx-auto" />
<QRCodeSVG value={field.value ?? ""} size={256} className="mx-auto" />
<Input readOnly {...field} className="opacity-75" />
</div>
</FormControl>
+2 -6
View File
@@ -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)) {
@@ -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,
+1
View File
@@ -2,6 +2,7 @@
declare const appVersion: string;
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface ImportMetaEnv {}
interface ImportMeta {
+5 -5
View File
@@ -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"
}
+3 -3
View File
@@ -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";
+5 -5
View File
@@ -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
}
}