Skip to content

Commit

Permalink
fix: use spec formdata (#958)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmywarting authored Dec 27, 2022
1 parent 3bd405a commit c21e6b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/plugin/gitlab/GitLab.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fs from 'node:fs';
import path from 'node:path';
import got from 'got';
import { globby } from 'globby';
import FormData from 'form-data';
import { FormData, fileFromSync } from 'node-fetch';
import allSettled from 'promise.allsettled';
import _ from 'lodash';
import Release from '../GitRelease.js';
Expand Down Expand Up @@ -232,7 +232,7 @@ class GitLab extends Release {
const endpoint = `projects/${id}/uploads`;

const body = new FormData();
body.append('file', fs.createReadStream(filePath));
body.set('file', fileFromSync(filePath));
const options = { body };

try {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"chalk": "5.1.2",
"cosmiconfig": "8.0.0",
"execa": "6.1.0",
"form-data": "4.0.0",
"git-url-parse": "13.1.0",
"globby": "13.1.2",
"got": "12.5.3",
Expand Down

0 comments on commit c21e6b6

Please sign in to comment.