Skip to content

Commit

Permalink
feat: support NodeJS 16
Browse files Browse the repository at this point in the history
  • Loading branch information
mKeRix committed Sep 13, 2021
1 parent 6e2bd42 commit b795995
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Expand Up @@ -5,11 +5,11 @@
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 10, 12, 14
"args": { "VARIANT": "14" }
"args": { "VARIANT": "16" }
},

// Set *default* container specific settings.json values on container create.
"settings": {
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Expand Up @@ -17,17 +17,17 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v2.4.0
with:
node-version: 14.x
node-version: 16.x
- name: Cache Node.js modules
uses: actions/cache@v2.1.6
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.OS }}-node-14.x-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.OS }}-node-16.x-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-14.x
${{ runner.OS }}-node-16.x
${{ runner.OS }}-
- name: Install dependencies
run: npm ci
Expand All @@ -38,7 +38,7 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x]
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -64,7 +64,7 @@ jobs:
CI: true
- name: Upload code coverage
uses: codecov/codecov-action@v2.0.2
if: matrix.node-version == '14.x'
if: matrix.node-version == '16.x'
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: Node.js ${{ matrix.node-version }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/gh-pages.yml
Expand Up @@ -22,14 +22,14 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2.4.0
with:
node-version: '14.x'
node-version: '16.x'
- name: Cache Node.js modules
uses: actions/cache@v2.1.6
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.OS }}-node-14.x-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.OS }}-node-16.x-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-14.x
${{ runner.OS }}-node-16.x
${{ runner.OS }}-
- name: Install dependencies
run: npm ci
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Expand Up @@ -15,17 +15,17 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v2.4.0
with:
node-version: 14.x
node-version: 16.x
- name: Cache Node.js modules
uses: actions/cache@v2.1.6
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.OS }}-node-14.x-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.OS }}-node-16.x-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-14.x
${{ runner.OS }}-node-16.x
${{ runner.OS }}-
- name: Install dependencies
run: npm ci
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
@@ -1,10 +1,10 @@
FROM node:14-alpine as build
FROM node:16-alpine as build
ARG ROOM_ASSISTANT_VERSION=latest

RUN apk add --no-cache python make g++ libusb-dev eudev-dev avahi-dev cairo-dev jpeg-dev pango-dev giflib-dev
RUN apk add --no-cache python3 make g++ libusb-dev eudev-dev avahi-dev cairo-dev jpeg-dev pango-dev giflib-dev
RUN npm install -g --unsafe-perm room-assistant@$ROOM_ASSISTANT_VERSION

FROM node:14-alpine
FROM node:16-alpine

WORKDIR /room-assistant

Expand Down
6 changes: 3 additions & 3 deletions dev.Dockerfile
@@ -1,11 +1,11 @@
FROM node:14-alpine as build
FROM node:16-alpine as build
WORKDIR /room-assistant

RUN apk add --no-cache python make g++ libusb-dev eudev-dev avahi-dev cairo-dev jpeg-dev pango-dev giflib-dev
RUN apk add --no-cache python3 make g++ libusb-dev eudev-dev avahi-dev cairo-dev jpeg-dev pango-dev giflib-dev
COPY ./*.tgz /room-assistant/
RUN npm install -g --unsafe-perm *.tgz

FROM node:14-alpine
FROM node:16-alpine

WORKDIR /room-assistant

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/installation.md
Expand Up @@ -14,7 +14,7 @@ Dedicated or resource-limited computers, like Raspberry Pis. Has least overhead

### Requirements

Please make sure you have either NodeJS 14.x or NodeJS 12.x installed. The version provided by Raspbian by default is outdated.
Please make sure you have either NodeJS 16.x, 14.x or 12.x installed. The version provided by Raspbian by default is outdated.
Installation guides for NodeJS can be found [here](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions). For Pi Zero devices you will need to use a [different installation process](./quickstart-pi-zero-w.md#installing-room-assistant).

room-assistant instances use some native dependencies for discovering each other in the local network using mDNS and providing health checks for systemd. You will require two additional system packages to get this working:
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/quickstart-pi.md
Expand Up @@ -30,7 +30,7 @@ This page will guide you through setting up a Raspberry Pi 3 or 4 to run room-as
1. Install NodeJS using the following commands.

```shell
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
```

Expand Down
3 changes: 2 additions & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -138,7 +138,7 @@
}
},
"engines": {
"node": ">= 12 < 15"
"node": ">= 12 < 17"
},
"lint-staged": {
"*.{ts,js}": "eslint"
Expand Down

0 comments on commit b795995

Please sign in to comment.