Skip to content

Commit c21e6b6

Browse files
authored
fix: use spec formdata (#958)
1 parent 3bd405a commit c21e6b6

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/plugin/gitlab/GitLab.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import fs from 'node:fs';
22
import path from 'node:path';
33
import got from 'got';
44
import { globby } from 'globby';
5-
import FormData from 'form-data';
5+
import { FormData, fileFromSync } from 'node-fetch';
66
import allSettled from 'promise.allsettled';
77
import _ from 'lodash';
88
import Release from '../GitRelease.js';
@@ -232,7 +232,7 @@ class GitLab extends Release {
232232
const endpoint = `projects/${id}/uploads`;
233233

234234
const body = new FormData();
235-
body.append('file', fs.createReadStream(filePath));
235+
body.set('file', fileFromSync(filePath));
236236
const options = { body };
237237

238238
try {

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"chalk": "5.1.2",
6666
"cosmiconfig": "8.0.0",
6767
"execa": "6.1.0",
68-
"form-data": "4.0.0",
6968
"git-url-parse": "13.1.0",
7069
"globby": "13.1.2",
7170
"got": "12.5.3",

0 commit comments

Comments
 (0)