diff --git a/package-lock.json b/package-lock.json index 35e16de8a..74a9018b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2877,6 +2877,15 @@ "node": ">= 6" } }, + "node_modules/formdata-node": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-6.0.3.tgz", + "integrity": "sha512-8e1++BCiTzUno9v5IZ2J6bv4RU+3UKDmqWUQD0MIMVCd9AdhWkO1gw57oo1mNEX1dMq2EGI+FbWz4B92pscSQg==", + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", diff --git a/package.json b/package.json index cce81d7b5..0dec96d41 100644 --- a/package.json +++ b/package.json @@ -71,8 +71,8 @@ "vitest": "^2.1.8" }, "dependencies": { - "axios": "^1.7.9", - "form-data": "^4.0.1", - "tslib": "^2.8.1" + "axios": "^1.7.7", + "formdata-node": "^6.0.3", + "tslib": "^2.7.0" } } diff --git a/src/serviceDesk/serviceDesk.ts b/src/serviceDesk/serviceDesk.ts index 9437d6b2b..ec3d824f1 100644 --- a/src/serviceDesk/serviceDesk.ts +++ b/src/serviceDesk/serviceDesk.ts @@ -1,4 +1,4 @@ -import * as FormData from 'form-data'; +import { FormData } from 'formdata-node'; import * as Models from './models'; import * as Parameters from './parameters'; import { Callback } from '../callback'; @@ -124,7 +124,6 @@ export class ServiceDesk { headers: { 'X-Atlassian-Token': 'no-check', 'Content-Type': 'multipart/form-data', - ...formData.getHeaders?.(), }, data: formData, }; diff --git a/src/version2/issueAttachments.ts b/src/version2/issueAttachments.ts index c1961e3af..33bad5b82 100644 --- a/src/version2/issueAttachments.ts +++ b/src/version2/issueAttachments.ts @@ -1,5 +1,4 @@ -// @ts-expect-error Wrong form data typings -import FormData from 'form-data'; +import { FormData } from 'formdata-node'; import * as Models from './models'; import * as Parameters from './parameters'; import { Callback } from '../callback'; @@ -434,7 +433,6 @@ export class IssueAttachments { headers: { 'X-Atlassian-Token': 'no-check', 'Content-Type': 'multipart/form-data', - ...formData.getHeaders?.(), }, data: formData, maxBodyLength: Infinity, diff --git a/src/version3/issueAttachments.ts b/src/version3/issueAttachments.ts index cbae4311f..b134f7a4f 100644 --- a/src/version3/issueAttachments.ts +++ b/src/version3/issueAttachments.ts @@ -1,5 +1,4 @@ -// @ts-expect-error Wrong form data typings -import FormData from 'form-data'; +import { FormData } from 'formdata-node'; import * as Models from './models'; import * as Parameters from './parameters'; import { Callback } from '../callback'; @@ -434,7 +433,6 @@ export class IssueAttachments { headers: { 'X-Atlassian-Token': 'no-check', 'Content-Type': 'multipart/form-data', - ...formData.getHeaders?.(), }, data: formData, maxBodyLength: Infinity,