diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json new file mode 100644 index 0000000000..7493ba73f9 --- /dev/null +++ b/cypress/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "module": "ES2015", + "target": "ES2015", + } +} diff --git a/package-lock.json b/package-lock.json index 8bb9cab268..938ec10c4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,7 +63,7 @@ "snowpack": "^3.8.2", "ts-jest": "^26.5.6", "ts-node": "^10.2.1", - "typescript": "4.2.4" + "typescript": "4.4.2" }, "engines": { "node": "16" @@ -16891,8 +16891,9 @@ } }, "node_modules/typescript": { - "version": "4.2.4", - "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.2.tgz", + "integrity": "sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -30289,8 +30290,9 @@ } }, "typescript": { - "version": "4.2.4", - "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.2.tgz", + "integrity": "sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==", "dev": true }, "unbox-primitive": { diff --git a/package.json b/package.json index 3bc1d04a56..5f23154a31 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "snowpack": "^3.8.2", "ts-jest": "^26.5.6", "ts-node": "^10.2.1", - "typescript": "4.2.4" + "typescript": "4.4.2" }, "lint-staged": { "*.{js,jsx,mjs,ts,tsx}": "eslint --cache --fix" diff --git a/src/authentication/FlowDetails.tsx b/src/authentication/FlowDetails.tsx index 76ba4c238b..20de84a0af 100644 --- a/src/authentication/FlowDetails.tsx +++ b/src/authentication/FlowDetails.tsx @@ -93,7 +93,7 @@ export const FlowDetails = () => { await Promise.all(requests); refresh(); addAlert(t("updateFlowSuccess"), AlertVariant.success); - } catch (error) { + } catch (error: any) { addAlert( t("updateFlowError", { error: error.response?.data?.errorMessage || error, @@ -113,7 +113,7 @@ export const FlowDetails = () => { ); refresh(); addAlert(t("updateFlowSuccess"), AlertVariant.success); - } catch (error) { + } catch (error: any) { addAlert( t("updateFlowError", { error: error.response?.data?.errorMessage || error, diff --git a/src/authentication/form/CreateFlow.tsx b/src/authentication/form/CreateFlow.tsx index 1d10c94d46..d99a041823 100644 --- a/src/authentication/form/CreateFlow.tsx +++ b/src/authentication/form/CreateFlow.tsx @@ -34,7 +34,7 @@ export const CreateFlow = () => { try { await adminClient.authenticationManagement.createFlow(flow); addAlert(t("flowCreatedSuccess"), AlertVariant.success); - } catch (error) { + } catch (error: any) { addAlert( t("flowCreateError", { error: error.response?.data?.errorMessage || error, diff --git a/src/client-scopes/ClientScopesSection.tsx b/src/client-scopes/ClientScopesSection.tsx index 637251ddd3..b663c3d8fc 100644 --- a/src/client-scopes/ClientScopesSection.tsx +++ b/src/client-scopes/ClientScopesSection.tsx @@ -90,7 +90,7 @@ export const ClientScopesSection = () => { for (const scope of selectedScopes) { try { await removeScope(adminClient, scope); - } catch (error) { + } catch (error: any) { console.warn( "could not remove scope", error.response?.data?.errorMessage || error diff --git a/src/client-scopes/add/RoleMappingForm.tsx b/src/client-scopes/add/RoleMappingForm.tsx index bd724411d5..e77ab99efa 100644 --- a/src/client-scopes/add/RoleMappingForm.tsx +++ b/src/client-scopes/add/RoleMappingForm.tsx @@ -92,7 +92,7 @@ export const RoleMappingForm = () => { try { await adminClient.clientScopes.addProtocolMapper({ id }, mapping); addAlert(t("mapperCreateSuccess")); - } catch (error) { + } catch (error: any) { addAlert(t("mapperCreateError", error)); } }; diff --git a/src/groups/GroupTable.tsx b/src/groups/GroupTable.tsx index c35ecb94f6..3913de00db 100644 --- a/src/groups/GroupTable.tsx +++ b/src/groups/GroupTable.tsx @@ -211,7 +211,7 @@ export const GroupTable = () => { } else { await adminClient.groups.create(move); } - } catch (error) { + } catch (error: any) { if (error.response) { throw error; } diff --git a/src/identity-providers/add/AddSamlConnect.tsx b/src/identity-providers/add/AddSamlConnect.tsx index 64dc3d295f..0ed36b73dd 100644 --- a/src/identity-providers/add/AddSamlConnect.tsx +++ b/src/identity-providers/add/AddSamlConnect.tsx @@ -45,7 +45,7 @@ export const AddSamlConnect = () => { history.push( `/${realm}/identity-providers/${id}/${provider.alias}/settings` ); - } catch (error) { + } catch (error: any) { addAlert( t("createError", { error: error.response?.data?.errorMessage || error, diff --git a/src/identity-providers/add/OpenIdConnectSettings.tsx b/src/identity-providers/add/OpenIdConnectSettings.tsx index 8890740644..299df64594 100644 --- a/src/identity-providers/add/OpenIdConnectSettings.tsx +++ b/src/identity-providers/add/OpenIdConnectSettings.tsx @@ -75,7 +75,7 @@ export const OpenIdConnectSettings = () => { ); const result = await response.json(); setupForm(result); - } catch (error) { + } catch (error: any) { setDiscoveryResult({ error }); } } diff --git a/src/identity-providers/add/SamlConnectSettings.tsx b/src/identity-providers/add/SamlConnectSettings.tsx index 0823427477..c3438290e2 100644 --- a/src/identity-providers/add/SamlConnectSettings.tsx +++ b/src/identity-providers/add/SamlConnectSettings.tsx @@ -94,7 +94,7 @@ export const SamlConnectSettings = () => { ); const result = await response.json(); setupForm(result); - } catch (error) { + } catch (error: any) { setDiscoveryResult({ error }); } } diff --git a/src/user-federation/UserFederationKerberosSettings.tsx b/src/user-federation/UserFederationKerberosSettings.tsx index 5a9cd4c4c7..6275408aaf 100644 --- a/src/user-federation/UserFederationKerberosSettings.tsx +++ b/src/user-federation/UserFederationKerberosSettings.tsx @@ -148,7 +148,7 @@ export const UserFederationKerberosSettings = () => { await adminClient.components.del({ id }); addAlert(t("userFedDeletedSuccess"), AlertVariant.success); history.replace(`/${realm}/user-federation`); - } catch (error) { + } catch (error: any) { addAlert("user-federation:userFedDeleteError", error); } },