Skip to content

Commit

Permalink
#327: Package form-data replaced to formdata-node for add esm sup…
Browse files Browse the repository at this point in the history
…port
  • Loading branch information
MrRefactoring committed Jan 3, 2025
1 parent df8e9d2 commit 9ca3605
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 59 deletions.
163 changes: 113 additions & 50 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
},
"dependencies": {
"axios": "^1.7.9",
"form-data": "^4.0.1",
"formdata-node": "^6.0.3",
"tslib": "^2.8.1"
}
}
3 changes: 1 addition & 2 deletions src/serviceDesk/serviceDesk.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -124,7 +124,6 @@ export class ServiceDesk {
headers: {
'X-Atlassian-Token': 'no-check',
'Content-Type': 'multipart/form-data',
...formData.getHeaders?.(),
},
data: formData,
};
Expand Down
4 changes: 1 addition & 3 deletions src/version2/issueAttachments.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -434,7 +433,6 @@ export class IssueAttachments {
headers: {
'X-Atlassian-Token': 'no-check',
'Content-Type': 'multipart/form-data',
...formData.getHeaders?.(),
},
data: formData,
maxBodyLength: Infinity,
Expand Down
4 changes: 1 addition & 3 deletions src/version3/issueAttachments.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -434,7 +433,6 @@ export class IssueAttachments {
headers: {
'X-Atlassian-Token': 'no-check',
'Content-Type': 'multipart/form-data',
...formData.getHeaders?.(),
},
data: formData,
maxBodyLength: Infinity,
Expand Down

0 comments on commit 9ca3605

Please sign in to comment.