From 631178112639d7d5d30bf83e3e1cfe59f2723408 Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Mon, 20 Apr 2026 16:34:05 +0900 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20axios=20=E3=81=AE=E6=9C=80=E4=BD=8E?= =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=92=201.2.1?= =?UTF-8?q?=20=E3=81=AB=E5=BC=95=E3=81=8D=E4=B8=8A=E3=81=92=20(Z=5FBUF=5FE?= =?UTF-8?q?RROR=20=E4=BF=AE=E6=AD=A3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit axios v1.1.3 で Content-Encoding ヘッダー付きの空ボディレスポンスに対して Z_BUF_ERROR が発生する問題を解消するため、最低バージョンを 1.2.1 に変更。 - dependencies: ^1.1.3 -> ^1.2.1 - peerDependencies: ^1.1.3 -> ^1.2.1 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b9f2479..45a68c0 100644 --- a/package.json +++ b/package.json @@ -57,12 +57,12 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "axios": "^1.1.3", + "axios": "^1.2.1", "crypto-js": "^4.1.1", "date-and-time": "^2.4.1" }, "peerDependencies": { - "axios": "^1.1.3", + "axios": "^1.2.1", "crypto-js": "^4.1.1", "date-and-time": "^2.4.1" } From a644acffbc1f3e7902430e492c53414b923a53b7 Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Mon, 20 Apr 2026 16:43:32 +0900 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20interceptor=20=E3=81=AE=E5=9E=8B?= =?UTF-8?q?=E3=82=92=20InternalAxiosRequestConfig=20=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit axios v1.2.0 以降、インターセプターのコールバック引数の型が AxiosRequestConfig から InternalAxiosRequestConfig に変更されたため、 型定義を合わせる。 --- src/modules/interceptor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/interceptor.ts b/src/modules/interceptor.ts index 599b5c9..6dd4039 100644 --- a/src/modules/interceptor.ts +++ b/src/modules/interceptor.ts @@ -1,7 +1,7 @@ import hmacSHA256 from "crypto-js/hmac-sha256"; import Hex from "crypto-js/enc-hex"; import date from "date-and-time"; -import axios, { AxiosError, AxiosInstance, AxiosRequestConfig } from "axios"; +import axios, { AxiosError, AxiosInstance, AxiosRequestConfig, InternalAxiosRequestConfig } from "axios"; export default function getAxiosInstance( baseURL: string, @@ -16,7 +16,7 @@ export default function getAxiosInstance( }; const instance = axios.create(requestConfig); instance.interceptors.request.use( - (config: AxiosRequestConfig) => { + (config: InternalAxiosRequestConfig) => { const now = date.format(new Date(), "YYYYMMDDHHmm", true); const secret = process.env.SAASUS_SECRET_KEY || ""; const apiKey = process.env.SAASUS_API_KEY || ""; From 9f8f55ea28490f1c653c961d3fbbdf9f41d17957 Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Mon, 20 Apr 2026 16:52:50 +0900 Subject: [PATCH 3/4] =?UTF-8?q?fix:=20interceptor=20=E3=83=86=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=81=AE=E5=9E=8B=E3=82=92=20InternalAxiosRequestConf?= =?UTF-8?q?ig=20=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __tests__/interceptor.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/__tests__/interceptor.test.ts b/__tests__/interceptor.test.ts index 01915fa..069f837 100644 --- a/__tests__/interceptor.test.ts +++ b/__tests__/interceptor.test.ts @@ -1,5 +1,6 @@ import { createRequest, RequestOptions } from "node-mocks-http"; import getAxiosInstance from "../src/modules/interceptor"; +import { InternalAxiosRequestConfig } from "axios"; import hmacSHA256 from "crypto-js/hmac-sha256"; import Hex from "crypto-js/enc-hex"; import date from "date-and-time"; @@ -31,9 +32,8 @@ describe("getAxiosInstance", () => { const instance = getAxiosInstance("https://api.dev.saasus.io/v1/auth"); - const fulfilledReq: Request = - // @ts-expect-error handlersでdoesn't exist エラーが出るため - instance.interceptors.request.handlers[0].fulfilled(request); + // @ts-expect-error handlersでdoesn't exist エラーが出るため + const fulfilledReq: InternalAxiosRequestConfig = instance.interceptors.request.handlers[0].fulfilled(request); const now = date.format(new Date(), "YYYYMMDDHHmm", true); const secret = process.env.SAASUS_SECRET_KEY || ""; From 3073161eca68f79686e5c4695147e0836a65fefd Mon Sep 17 00:00:00 2001 From: takashi-uchida Date: Mon, 20 Apr 2026 16:56:21 +0900 Subject: [PATCH 4/4] =?UTF-8?q?chore:=20=E3=83=90=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=82=92=201.13.2=20=E3=81=AB=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 45a68c0..1225b01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "saasus-sdk", - "version": "1.12.1", + "version": "1.13.2", "description": "Javascript SDK for SaaSus Platform", "main": "./dist/saasus-sdk.js", "module": "./dist/saasus-sdk.js",