Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
chore(frontend): upgrade TypeScript to 5.9 and drop TS 7-removed options (#8682)
Andrew Huang5d09fdf843f6
diff --git a/frontend/package-lock.json b/frontend/package-lock.jsonindex 78ba5400f8..aea7dac5fa 100644--- a/frontend/package-lock.json+++ b/frontend/package-lock.json@@ -148,7 +148,7 @@"storybook-addon-tag-badges": "^3.0.0","tailwindcss": "^4.1.14","tw-animate-css": "^1.4.0",- "typescript": "~5.6.2",+ "typescript": "~5.9.3","typescript-eslint": "^8.70.0","vite": "^8.2.2","vite-plugin-node-polyfills": "^0.28.0",@@ -16526,27 +16526,6 @@"node": ">=6.10"}},- "node_modules/tsconfck": {- "version": "3.1.4",- "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.1.4.tgz",- "integrity": "sha512-kdqWFGVJqe+KGYvlSO9NIaWn9jT1Ny4oKVzAJsKii5eoE9snzTJzL4+MMVOMn+fikWGFmKEylcXL710V/kIPJQ==",- "dev": true,- "license": "MIT",- "bin": {- "tsconfck": "bin/tsconfck.js"- },- "engines": {- "node": "^18 || >=20"- },- "peerDependencies": {- "typescript": "^5.0.0"- },- "peerDependenciesMeta": {- "typescript": {- "optional": true- }- }- },"node_modules/tsconfig-paths": {"version": "3.15.0","resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",@@ -17231,9 +17210,9 @@}},"node_modules/typescript": {- "version": "5.6.3",- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz",- "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==",+ "version": "5.9.3",+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",+ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==","devOptional": true,"license": "Apache-2.0","bin": {@@ -17761,6 +17740,28 @@}}},+ "node_modules/vite-tsconfig-paths/node_modules/tsconfck": {+ "version": "3.1.6",+ "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.1.6.tgz",+ "integrity": "sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w==",+ "deprecated": "unmaintained",+ "dev": true,+ "license": "MIT",+ "bin": {+ "tsconfck": "bin/tsconfck.js"+ },+ "engines": {+ "node": "^18 || >=20"+ },+ "peerDependencies": {+ "typescript": "^5.0.0"+ },+ "peerDependenciesMeta": {+ "typescript": {+ "optional": true+ }+ }+ },"node_modules/vite/node_modules/lightningcss": {"version": "1.33.0","resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz",diff --git a/frontend/package.json b/frontend/package.jsonindex 93bf3450bd..2775e4385c 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -181,7 +181,7 @@"storybook-addon-tag-badges": "^3.0.0","tailwindcss": "^4.1.14","tw-animate-css": "^1.4.0",- "typescript": "~5.6.2",+ "typescript": "~5.9.3","typescript-eslint": "^8.70.0","vite": "^8.2.2","vite-plugin-node-polyfills": "^0.28.0",diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/shared/CreateUserStatementAlert.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/shared/CreateUserStatementAlert.tsxindex 80992a1d80..3599dfa19a 100644--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/shared/CreateUserStatementAlert.tsx+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/shared/CreateUserStatementAlert.tsx@@ -16,7 +16,7 @@ type Props = {};export const CreateUserStatementAlert = ({ statement }: Props) => {- const [, isCopied, setCopyState] = useTimedReset({ initialState: false });+ const [, isCopied, setCopyState] = useTimedReset<boolean>({ initialState: false });const handleCopy = () => {navigator.clipboard.writeText(statement);diff --git a/frontend/src/components/utilities/checks/password/checkIsPasswordBreached.ts b/frontend/src/components/utilities/checks/password/checkIsPasswordBreached.tsindex 4bcccc4e20..c964bcbff0 100644--- a/frontend/src/components/utilities/checks/password/checkIsPasswordBreached.ts+++ b/frontend/src/components/utilities/checks/password/checkIsPasswordBreached.ts@@ -45,7 +45,7 @@ export const checkPasswordBreachStatus = async (const HAVE_I_BEEN_PWNED_API_URL = "https://api.pwnedpasswords.com";const maxRetryAttempts = 3;- let encodedPwd: Uint8Array | undefined;+ let encodedPwd: Uint8Array<ArrayBuffer> | undefined;let hashedPwdBuffer: ArrayBuffer | undefined;try {diff --git a/frontend/src/hooks/api/pam/session-playback/decrypt.ts b/frontend/src/hooks/api/pam/session-playback/decrypt.tsindex 7a6918f1c3..c553fdd637 100644--- a/frontend/src/hooks/api/pam/session-playback/decrypt.ts+++ b/frontend/src/hooks/api/pam/session-playback/decrypt.ts@@ -22,7 +22,7 @@ export const PAM_PLAYBACK_MAX_EVENTS_PER_CHUNK = 50_000;export const PAM_PLAYBACK_MAX_CHUNKS = 10_000;export const PAM_PLAYBACK_MAX_TOTAL_EVENTS = 500_000;-const base64ToBytes = (b64: string): Uint8Array => {+const base64ToBytes = (b64: string): Uint8Array<ArrayBuffer> => {const bin = atob(b64);const out = new Uint8Array(bin.length);for (let i = 0; i < bin.length; i += 1) out[i] = bin.charCodeAt(i);@@ -56,7 +56,7 @@ export const buildChunkAad = async ({sessionId,chunkIndex,storageBackend-}: ChunkAadInput): Promise<Uint8Array> => {+}: ChunkAadInput): Promise<Uint8Array<ArrayBuffer>> => {const enc = new TextEncoder();const material = enc.encode(`${projectId}|${sessionId}|${chunkIndex}|${storageBackend}|${PAM_RECORDING_AAD_VERSION}`@@ -65,7 +65,7 @@ export const buildChunkAad = async ({return new Uint8Array(digest);};-const importSessionKey = (rawKey: Uint8Array): Promise<CryptoKey> =>+const importSessionKey = (rawKey: Uint8Array<ArrayBuffer>): Promise<CryptoKey> =>crypto.subtle.importKey("raw", rawKey, { name: "AES-GCM" }, false, ["decrypt"]);export type DecryptedChunkResult =@@ -80,7 +80,7 @@ export type DecryptedChunkResult =const fetchCiphertext = async (chunk: TPamPlaybackChunk,fallbackUrlBuilder: (chunkIndex: number) => string-): Promise<Uint8Array> => {+): Promise<Uint8Array<ArrayBuffer>> => {if (chunk.presignedGetUrl) {const resp = await fetch(chunk.presignedGetUrl, { credentials: "omit" });if (!resp.ok) {@@ -125,7 +125,7 @@ export const decryptOneChunk = async ({};}- let body: Uint8Array;+ let body: Uint8Array<ArrayBuffer>;try {body = await fetchCiphertext(chunk, fallbackUrlBuilder);} catch (err) {@@ -169,7 +169,7 @@ export const decryptOneChunk = async ({};}- let iv: Uint8Array;+ let iv: Uint8Array<ArrayBuffer>;try {iv = base64ToBytes(chunk.iv);} catch {diff --git a/frontend/src/pages/cert-manager/CertificateRequestsPage/components/CertificateRequestRow.tsx b/frontend/src/pages/cert-manager/CertificateRequestsPage/components/CertificateRequestRow.tsxindex 5d12b1c374..bf10af7247 100644--- a/frontend/src/pages/cert-manager/CertificateRequestsPage/components/CertificateRequestRow.tsx+++ b/frontend/src/pages/cert-manager/CertificateRequestsPage/components/CertificateRequestRow.tsx@@ -145,7 +145,11 @@ export const CertificateRequestRow = ({ request, onViewCertificates, application}return <Badge variant="project">Pending Approval</Badge>;default:- return <Badge variant="outline">{status.charAt(0).toUpperCase() + status.slice(1)}</Badge>;+ return (+ <Badge variant="outline">+ {req.status.charAt(0).toUpperCase() + req.status.slice(1)}+ </Badge>+ );}};diff --git a/frontend/src/pages/organization/ProductSettingsPage/SecretsManagement/honey-token-config/HoneyTokenModal.tsx b/frontend/src/pages/organization/ProductSettingsPage/SecretsManagement/honey-token-config/HoneyTokenModal.tsxindex c06b02a1b2..988fc7198b 100644--- a/frontend/src/pages/organization/ProductSettingsPage/SecretsManagement/honey-token-config/HoneyTokenModal.tsx+++ b/frontend/src/pages/organization/ProductSettingsPage/SecretsManagement/honey-token-config/HoneyTokenModal.tsx@@ -76,8 +76,8 @@ type Props = {export const HoneyTokenModal = ({ isOpen, onOpenChange }: Props) => {const [isTokenVisible, setIsTokenVisible] = useToggle(false);- const [, isTokenCopied, setTokenCopied] = useTimedReset({ initialState: false });- const [, isCommandCopied, setCommandCopied] = useTimedReset({ initialState: false });+ const [, isTokenCopied, setTokenCopied] = useTimedReset<boolean>({ initialState: false });+ const [, isCommandCopied, setCommandCopied] = useTimedReset<boolean>({ initialState: false });const { data: appConnections = [], isPending: isLoadingConnections } = useListAppConnections();const { data: existingConfig } = useGetHoneyTokenConfig(HoneyTokenType.AWS, {diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/HoneyTokenTableRow/HoneyTokenTableRow.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/HoneyTokenTableRow/HoneyTokenTableRow.tsxindex 52c723dd23..e37e8bcbbf 100644--- a/frontend/src/pages/secret-manager/OverviewPage/components/HoneyTokenTableRow/HoneyTokenTableRow.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/components/HoneyTokenTableRow/HoneyTokenTableRow.tsx@@ -80,7 +80,7 @@ export const HoneyTokenTableRow = ({onViewDetails}: Props) => {const [isExpanded, setIsExpanded] = useToggle(false);- const [, isNameCopied, setIsNameCopied] = useTimedReset({ initialState: false });+ const [, isNameCopied, setIsNameCopied] = useTimedReset<boolean>({ initialState: false });const isSingleEnvView = environments.length === 1;const totalCols = environments.length + 2;diff --git a/frontend/tsconfig.app.json b/frontend/tsconfig.app.jsonindex 1f6b29873a..ce5b770769 100644--- a/frontend/tsconfig.app.json+++ b/frontend/tsconfig.app.json@@ -7,7 +7,6 @@"lib": ["ES2021", "DOM", "DOM.Iterable"],"module": "ESNext","skipLibCheck": true,- "baseUrl": ".","paths": {"@app/*": ["./src/*"