From 180c8e650761b4d0702b26e97413fb7e7c40a1eb Mon Sep 17 00:00:00 2001 From: amitbardos Date: Sun, 4 Oct 2026 12:34:06 +0300 Subject: [PATCH] fix(deps): bump axios to 1.20.0 for high-severity advisories npm audit fails on axios 1.18.1 (GHSA-vh66-26gq-q6x8 and others, all fixed in 1.20.0). axios 1.20 resolves method return types through a conditional type that TypeScript can't infer from a generic entity type, so get/create/update cast to the type the response interceptor already returns. Co-Authored-By: Claude Opus 5.5 --- package-lock.json | 10 +++++----- package.json | 2 +- src/modules/entities.ts | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3a44778b..c990d81f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.8.52", "license": "MIT", "dependencies": { - "axios": "^1.18.1", + "axios": "^1.20.0", "partysocket": "^0.0.23", "socket.io-client": "^4.8.3", "uuid": "^13.0.2" @@ -1759,13 +1759,13 @@ } }, "node_modules/axios": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.18.1.tgz", - "integrity": "sha512-3nTvFlvpn9Zu/RkHUqtc7/+al4UpRW5az71ap5zccp6e8RAYEzhMTecX8Dz1wWDYrPpUoB1HAQEGEAEvUr7S9g==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.20.0.tgz", + "integrity": "sha512-r8aOh8j9cGKpgQAqpzrUHnSIc6a59Y3Xf/cv8sy1DrHCkZHzQGEuoq1tARk6qSyDdtQGSDgpb9kFlruzPvrgwg==", "license": "MIT", "dependencies": { "follow-redirects": "^1.16.0", - "form-data": "^4.0.5", + "form-data": "^4.0.6", "https-proxy-agent": "^5.0.1", "proxy-from-env": "^2.1.0" } diff --git a/package.json b/package.json index 0a16da34..9c8c4620 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "create-docs:process": "node scripts/mintlify-post-processing/file-processing/file-processing.js" }, "dependencies": { - "axios": "^1.18.1", + "axios": "^1.20.0", "partysocket": "^0.0.23", "socket.io-client": "^4.8.3", "uuid": "^13.0.2" diff --git a/src/modules/entities.ts b/src/modules/entities.ts index e999cb77..f4c32d4f 100644 --- a/src/modules/entities.ts +++ b/src/modules/entities.ts @@ -158,17 +158,17 @@ function createEntityHandler( // Get entity by ID async get(id: string): Promise { - return axios.get(`${baseURL}/${id}`); + return axios.get(`${baseURL}/${id}`) as Promise; }, // Create new entity async create(data: Partial): Promise { - return axios.post(baseURL, data); + return axios.post(baseURL, data) as Promise; }, // Update entity by ID async update(id: string, data: Partial): Promise { - return axios.put(`${baseURL}/${id}`, data); + return axios.put(`${baseURL}/${id}`, data) as Promise; }, // Delete entity by ID