Skip to content

Commit 5b4aa33

Browse files
authored
feat: upgrade to node20 and esm (#4)
* build: update all targets to `node20` Upgrades `typescript` configuration for `node20` and points the GitHub actions configuration and package file to be setup the same. * chore: fix imports for `esm` syntax Now we are on `node20` the import syntax requires the file extension be present. * docs: update readme with version information Add a new block at the top of the readme to explain the reason for the `v2` cut and supported node versions.
1 parent 7d0349e commit 5b4aa33

15 files changed

+292
-1286
lines changed
File renamed without changes.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ build.compile:
5656
src/main.ts \
5757
--bundle \
5858
--platform=node \
59-
--target=node16 \
60-
--format=cjs \
59+
--target=node20 \
60+
--format=esm \
6161
--tree-shaking=true \
6262
--outfile=build/action.js
6363

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ An action that can validate the given `version` input and ensure that it complie
66
If the action suceeds then the version and its breakdown can be accessed through outputs.
77
The input is analysed and the version is extracted if a [git-ref](https://git-scm.com/book/en/v2/Git-Internals-Git-References) has been provided.
88

9+
## Install
10+
11+
> It is **recommended** to use `v2` of this action.
12+
13+
This is because `v1` was built when `node@16` was the most current and supported version of `node`, now this is not that case as `node@16` has been [end of life since September 11th 2023](https://nodejs.org/en/blog/announcements/nodejs16-eol).
14+
Please make an active effort to move away from `v1` as it is now archived and will not be receiving any new updates (features or bug fixes) from now on.
15+
16+
| Action | Node | Comment |
17+
| ------ | ---- | ------- |
18+
| `matt-usurp/validate-semver@v2` | `node@20` | Recommended |
19+
| `matt-usurp/validate-semver@v1` | `node@16` | Archived |
20+
921
## Usage
1022

1123
The action can be used on its own or with an assigned `id` depending on the use case.
@@ -14,7 +26,7 @@ Otherwise the version and its breakdown are avaialbe through the outputs.
1426

1527
```yaml
1628
- id: semver
17-
uses: matt-usurp/validate-semver@v1
29+
uses: matt-usurp/validate-semver@v2
1830
with:
1931
version: ${{ github.ref }}
2032

action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ branding:
88
icon: tag
99

1010
runs:
11-
using: node16
12-
main: build/action.js
11+
using: node20
12+
main: build/action.mjs
1313

1414
inputs:
1515
version:

0 commit comments

Comments
 (0)