Skip to content

Commit

Permalink
chore: bump minimum Node version to 20.8.1
Browse files Browse the repository at this point in the history
This bumps the minimum supported Node version to 20.8.1. Node 20 is the new LTS version
and some of our dependencies already dropped supported for Node 18.
Check out [our Node Support Policy](https://semantic-release.gitbook.io/semantic-release/support/node-support-policy)
to understand how we handle Node versions.

BREAKING CHANGE: Node 18 and 19 are not supported anymore. Users have to upgrade to Node 20.8.1 or later.
  • Loading branch information
fgreinacher committed Dec 21, 2023
1 parent c097f05 commit 1172a0d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
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
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
26 changes: 19 additions & 7 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"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 +42,7 @@
"tempy": "1.0.1"
},
"engines": {
"node": ">=18"
"node": ">=20.8.1"
},
"files": [
"lib",
Expand Down

0 comments on commit 1172a0d

Please sign in to comment.