From b8a53d88441fd1c2bdf128b877f447a3b5e7eda1 Mon Sep 17 00:00:00 2001 From: Emil Stjerneman Date: Mon, 17 Jun 2024 00:21:37 +0200 Subject: [PATCH] Enforce node 20+ (#118) --- .github/workflows/validate.yml | 2 +- .nvmrc | 1 + CHANGELOG.md | 7 +++++++ package-lock.json | 3 +++ package.json | 7 +++++++ 5 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .nvmrc diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index a384479..f4c994f 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -17,7 +17,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - node-version: '18.16.x' + node-version-file: '.nvmrc' cache: 'npm' - name: Install dependencies run: npm ci diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..48b14e6 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20.14.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index fe90457..4e80502 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added +- .`nvmrc` file. +- Enforce node 20+. + +### Changed +- Dependabot uses node version from `.nvmrc`. + ### Fixed - RSSI sensors `device_class` should be `signal_strength`. diff --git a/package-lock.json b/package-lock.json index 4b7d8b4..23a2da0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,6 +36,9 @@ "rimraf": "^5.0.1", "ts-node": "^10.9.1", "typescript": "^5.3.2" + }, + "engines": { + "node": ">=20.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package.json b/package.json index 3d8d27e..6c9b116 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,10 @@ "name": "nodesos_mqtt", "version": "2.0.1", "description": "MQTT client to report state of LifeSOS security system and devices.", + "repository": { + "type": "git", + "url": "https://github.com/bratanon/nodesos_mqtt.git" + }, "license": "MIT", "author": "Emil Stjerneman ", "main": "./dist/index.js", @@ -56,5 +60,8 @@ "rimraf": "^5.0.1", "ts-node": "^10.9.1", "typescript": "^5.3.2" + }, + "engines": { + "node": ">=20.0.0" } }