Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node 20 #2039

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Node 20 #2039

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
{
"name": "Gladys Assistant - Node.js",
"image": "mcr.microsoft.com/devcontainers/javascript-node:18",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
"forwardPorts": [1443, 1444],
"extensions": [
"dbaeumer.vscode-eslint",
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG TARGET
ARG VERSION
ARG BUILD_DATE

FROM $TARGET/node:18-alpine
FROM $TARGET/node:20-alpine

LABEL \
org.label-schema.build-date=$BUILD_DATE \
Expand Down
8 changes: 4 additions & 4 deletions docker/Dockerfile.buildx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# STEP 1
# Prepare server package*.json files
FROM node:18-alpine as json-files
FROM node:20-alpine as json-files
COPY ./server /json-files/server
WORKDIR /json-files/server/
RUN find . -type f \! -name "package*.json" -exec rm -r {} \;
Expand All @@ -10,7 +10,7 @@ COPY ./server/utils /json-files/server/utils

# STEP 3
# Gladys Bundle
FROM node:18-alpine as gladys
FROM node:20-alpine as gladys

# System dependencies
RUN apk add --no-cache \
Expand All @@ -30,7 +30,7 @@ ENV LD_LIBRARY_PATH /lib
WORKDIR /src/server

RUN apk add --no-cache --virtual .build-deps make gcc g++ python3 git libffi-dev linux-headers \
&& npm ci --unsafe-perm --production \
&& npm ci --no-audit --unsafe-perm --production \
&& npm cache clean --force \
&& apk del .build-deps

Expand All @@ -45,4 +45,4 @@ ENV SERVER_PORT 80
# Export listening port
EXPOSE 80

CMD ["node", "index.js"]
CMD ["node", "index.js"]
4 changes: 2 additions & 2 deletions front/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 front/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "gladys-front",
"engines": {
"node": "18.x",
"npm": "9.x"
"node": "20.x",
"npm": "10.x"
},
"scripts": {
"start": "per-env",
Expand Down
4 changes: 2 additions & 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "A privacy-first, open-source home assistant",
"main": "index.js",
"engines": {
"node": "18.x",
"npm": "9.x"
"node": "20.x",
"npm": "10.x"
},
"scripts": {
"postinstall": "npm run install-front:dev",
Expand Down
4 changes: 2 additions & 2 deletions server/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 server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"description": "",
"main": "index.js",
"engines": {
"node": "18.x",
"npm": "9.x"
"node": "20.x",
"npm": "10.x"
},
"scripts": {
"postinstall": "node ./cli/install_service_dependencies.js",
Expand Down
2 changes: 1 addition & 1 deletion server/services/usb/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const logger = require('../../utils/logger');
const UsbController = require('./api/usb.controller');

module.exports = function UsbService(gladys, serviceId) {
const SerialPort = require('serialport');
const { SerialPort } = require('serialport');
/**
* @public
* @description This function starts the service.
Expand Down