Skip to content

Commit 7581811

Browse files
authored
Merge branch 'master' into renovate-config
2 parents 3611895 + 8ab3ec7 commit 7581811

File tree

5 files changed

+1359
-920
lines changed

5 files changed

+1359
-920
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
22-
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
22+
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
2323
with:
2424
cache: npm
2525
node-version: lts/*

.github/workflows/test.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ jobs:
1313
strategy:
1414
matrix:
1515
node-version:
16-
- 18.0.0
17-
- 19
16+
- 20.8.1 # minimum supported Node version
17+
- 20
18+
- 21
1819
os:
1920
- ubuntu-latest
2021
- macos-latest
@@ -23,7 +24,7 @@ jobs:
2324
steps:
2425
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2526
- name: "Use Node.js ${{ matrix.node-version }}"
26-
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
27+
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
2728
with:
2829
node-version: "${{ matrix.node-version }}"
2930
cache: npm
@@ -37,7 +38,7 @@ jobs:
3738
steps:
3839
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3940
- name: "Use Node.js ${{ matrix.node-version }}"
40-
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
41+
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
4142
with:
4243
node-version: "${{ matrix.node-version }}"
4344
cache: npm

lib/publish.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { createReadStream, readFileSync } from "fs";
1+
import { readFileSync } from "fs";
22
import pathlib from "path";
33
import fs from "fs-extra";
44
import { isPlainObject, template } from "lodash-es";
5-
import FormData from "form-data";
5+
import { FormData } from "formdata-node";
6+
import { fileFromPath } from "formdata-node/file-from-path";
67
import urlJoin from "url-join";
78
import got from "got";
89
import _debug from "debug";
@@ -123,7 +124,7 @@ export default async (pluginConfig, context) => {
123124

124125
try {
125126
const form = new FormData();
126-
form.append("file", createReadStream(file));
127+
form.append("file", await fileFromPath(file));
127128
response = await got.post(uploadEndpoint, { ...apiOptions, ...proxy, body: form }).json();
128129
} catch (error) {
129130
logger.error("An error occurred while uploading %s to the GitLab project uploads API:\n%O", file, error);

0 commit comments

Comments
 (0)