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 cf97c59
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 71 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
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
@@ -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
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"
},
"files": [
"lib",
Expand Down

0 comments on commit cf97c59

Please sign in to comment.