Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump minimum Node version to 20.8.1 #647

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
strategy:
matrix:
node-version:
- 18.0.0
- 19
- 20.8.1 # minimum supported Node version
- 20
- 21
fgreinacher marked this conversation as resolved.
Show resolved Hide resolved
os:
- ubuntu-latest
- macos-latest
Expand Down
7 changes: 4 additions & 3 deletions lib/publish.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { createReadStream, readFileSync } from "fs";
import { readFileSync } from "fs";
import pathlib from "path";
import fs from "fs-extra";
import { isPlainObject, template } from "lodash-es";
import FormData from "form-data";
import { FormData } from "formdata-node";
import { fileFromPath } from "formdata-node/file-from-path";
import urlJoin from "url-join";
import got from "got";
import _debug from "debug";
Expand Down Expand Up @@ -123,7 +124,7 @@ export default async (pluginConfig, context) => {

try {
const form = new FormData();
form.append("file", createReadStream(file));
form.append("file", await fileFromPath(file));
response = await got.post(uploadEndpoint, { ...apiOptions, ...proxy, body: form }).json();
} catch (error) {
logger.error("An error occurred while uploading %s to the GitLab project uploads API:\n%O", file, error);
Expand Down
83 changes: 19 additions & 64 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"debug": "^4.0.0",
"dir-glob": "^3.0.0",
"escape-string-regexp": "^5.0.0",
"form-data": "^4.0.0",
"formdata-node": "^6.0.3",
"fs-extra": "^11.0.0",
"globby": "^14.0.0",
"got": "^13.0.0",
Expand All @@ -41,7 +41,7 @@
"tempy": "1.0.1"
},
"engines": {
"node": ">=18"
"node": ">=20.8.1"
fgreinacher marked this conversation as resolved.
Show resolved Hide resolved
},
"files": [
"lib",
Expand Down