- Upgrade to node v20 (#187)

This commit is contained in:
Simon J
2024-01-24 12:25:48 +11:00
committed by GitHub
parent 5ce2e4efb7
commit b7beb4c610
11 changed files with 7741 additions and 152371 deletions

View File

@@ -1,4 +1,4 @@
FROM node:16-bullseye FROM node:20-bullseye
LABEL maintainer=simojenki LABEL maintainer=simojenki

View File

@@ -11,7 +11,7 @@
}, },
"remoteUser": "node", "remoteUser": "node",
"features": { "features": {
"ghcr.io/devcontainers/features/docker-in-docker:1": { "ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest", "version": "latest",
"moby": true "moby": true
} }

View File

@@ -21,11 +21,11 @@ jobs:
- -
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: '16' node-version: 20
- -
run: yarn install run: npm install
- -
run: yarn test run: npm test
push_to_registry: push_to_registry:

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
fetch-timeout=60000

1
.nvmrc
View File

@@ -1 +0,0 @@
16.6.2

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +0,0 @@
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-1.22.19.cjs

View File

@@ -1,4 +1,4 @@
FROM node:16-bullseye-slim as build FROM node:20-bullseye-slim as build
WORKDIR /bonob WORKDIR /bonob
@@ -9,12 +9,11 @@ COPY typings ./typings
COPY web ./web COPY web ./web
COPY tests ./tests COPY tests ./tests
COPY jest.config.js . COPY jest.config.js .
COPY package.json .
COPY register.js . COPY register.js .
COPY .npmrc .
COPY tsconfig.json . COPY tsconfig.json .
COPY yarn.lock . COPY package.json .
COPY .yarnrc.yml . COPY package-lock.json .
COPY .yarn/releases ./.yarn/releases
ENV JEST_TIMEOUT=60000 ENV JEST_TIMEOUT=60000
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
@@ -29,24 +28,15 @@ RUN apt-get update && \
g++ && \ g++ && \
apt-get clean && \ apt-get clean && \
rm -rf /var/lib/apt/lists/* && \ rm -rf /var/lib/apt/lists/* && \
yarn config set network-timeout 600000 -g && \ npm install && \
yarn install \ npm test && \
--prefer-offline \ npm run gitinfo && \
--frozen-lockfile \ npm run build && \
--non-interactive \
--production=false && \
yarn test --no-cache && \
yarn gitinfo && \
yarn build && \
rm -Rf node_modules && \ rm -Rf node_modules && \
NODE_ENV=production yarn install \ NODE_ENV=production npm install --omit=dev
--prefer-offline \
--pure-lockfile \
--non-interactive \
--production=true
FROM node:16-bullseye-slim FROM node:20-bullseye-slim
LABEL maintainer="simojenki" \ LABEL maintainer="simojenki" \
org.opencontainers.image.source="https://github.com/simojenki/bonob" \ org.opencontainers.image.source="https://github.com/simojenki/bonob" \
@@ -62,7 +52,7 @@ EXPOSE $BNB_PORT
WORKDIR /bonob WORKDIR /bonob
COPY package.json . COPY package.json .
COPY yarn.lock . COPY package-lock.json .
COPY --from=build /bonob/build/src ./src COPY --from=build /bonob/build/src ./src
COPY --from=build /bonob/node_modules ./node_modules COPY --from=build /bonob/node_modules ./node_modules
@@ -75,7 +65,7 @@ RUN apt-get update && \
apt-get -y install --no-install-recommends \ apt-get -y install --no-install-recommends \
libvips \ libvips \
tzdata \ tzdata \
wget && \ wget && \
apt-get clean && \ apt-get clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

7686
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -7,32 +7,32 @@
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"dependencies": { "dependencies": {
"@svrooij/sonos": "^2.5.0", "@svrooij/sonos": "^2.5.0",
"@types/express": "^4.17.19", "@types/express": "^4.17.21",
"@types/fs-extra": "^11.0.2", "@types/fs-extra": "^11.0.4",
"@types/jsonwebtoken": "^9.0.3", "@types/jsonwebtoken": "^9.0.5",
"@types/jws": "^3.2.6", "@types/jws": "^3.2.9",
"@types/morgan": "^1.9.6", "@types/morgan": "^1.9.9",
"@types/node": "^16.11.7", "@types/node": "^20.11.5",
"@types/randomstring": "^1.1.9", "@types/randomstring": "^1.1.11",
"@types/underscore": "^1.11.11", "@types/underscore": "^1.11.15",
"@types/uuid": "^9.0.5", "@types/uuid": "^9.0.7",
"@types/xmldom": "0.1.32", "@types/xmldom": "0.1.34",
"axios": "^1.5.1", "axios": "^1.6.5",
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
"eta": "^2.0.1", "eta": "^2.2.0",
"express": "^4.18.2", "express": "^4.18.2",
"fp-ts": "^2.16.1", "fp-ts": "^2.16.2",
"fs-extra": "^11.1.1", "fs-extra": "^11.2.0",
"jsonwebtoken": "^9.0.2", "jsonwebtoken": "^9.0.2",
"jws": "^4.0.0", "jws": "^4.0.0",
"libxmljs2": "^0.32.0", "libxmljs2": "^0.33.0",
"morgan": "^1.10.0", "morgan": "^1.10.0",
"node-html-parser": "^6.1.10", "node-html-parser": "^6.1.12",
"randomstring": "^1.3.0", "randomstring": "^1.3.0",
"sharp": "^0.32.6", "sharp": "^0.33.2",
"soap": "^1.0.0", "soap": "^1.0.0",
"ts-md5": "^1.3.1", "ts-md5": "^1.3.1",
"typescript": "^5.2.2", "typescript": "^5.3.3",
"underscore": "^1.13.6", "underscore": "^1.13.6",
"urn-lib": "^2.0.0", "urn-lib": "^2.0.0",
"uuid": "^9.0.1", "uuid": "^9.0.1",
@@ -40,24 +40,31 @@
"xmldom-ts": "^0.3.1" "xmldom-ts": "^0.3.1"
}, },
"devDependencies": { "devDependencies": {
"@types/chai": "^4.3.7", "@types/chai": "^4.3.11",
"@types/jest": "^29.5.5", "@types/jest": "^29.5.11",
"@types/mocha": "^10.0.2", "@types/mocha": "^10.0.6",
"@types/supertest": "^2.0.14", "@types/supertest": "^6.0.2",
"@types/tmp": "^0.2.4", "@types/tmp": "^0.2.6",
"chai": "^4.3.10", "chai": "^5.0.0",
"get-port": "^7.0.0", "get-port": "^7.0.0",
"image-js": "^0.35.4", "image-js": "^0.35.5",
"jest": "^29.7.0", "jest": "^29.7.0",
"nodemon": "^3.0.1", "nodemon": "^3.0.3",
"supertest": "^6.3.3", "supertest": "^6.3.4",
"tmp": "^0.2.1", "tmp": "^0.2.1",
"ts-jest": "^29.1.1", "ts-jest": "^29.1.2",
"ts-mockito": "^2.6.1", "ts-mockito": "^2.6.1",
"ts-node": "^10.9.1", "ts-node": "^10.9.2",
"xmldom-ts": "^0.3.1", "xmldom-ts": "^0.3.1",
"xpath-ts": "^1.3.13" "xpath-ts": "^1.3.13"
}, },
"overrides": {
"axios-ntlm": "npm:dry-uninstall",
"axios": "$axios",
"@svrooij/sonos": {
"fast-xml-parser": "^4.3.3"
}
},
"scripts": { "scripts": {
"clean": "rm -Rf build node_modules", "clean": "rm -Rf build node_modules",
"build": "tsc", "build": "tsc",
@@ -66,6 +73,5 @@
"register-dev": "ts-node ./src/register.ts http://${BNB_DEV_HOST_IP}:4534", "register-dev": "ts-node ./src/register.ts http://${BNB_DEV_HOST_IP}:4534",
"test": "jest", "test": "jest",
"gitinfo": "git describe --tags > .gitinfo" "gitinfo": "git describe --tags > .gitinfo"
}, }
"packageManager": "yarn@1.22.19"
} }

4780
yarn.lock

File diff suppressed because it is too large Load Diff