Skip to content

Commit

Permalink
fix: add node 18 + 20 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel committed Aug 10, 2023
1 parent d75fc76 commit 3855d2c
Show file tree
Hide file tree
Showing 10 changed files with 197 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v12.16.3
v18.17.1
4 changes: 2 additions & 2 deletions dev/build-arm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# =========================
# --- BUILD NPM MODULES ---
# =========================
FROM node:16-alpine AS build
FROM node:18-alpine AS build

RUN apk add yarn g++ make cmake python3 --no-cache

Expand All @@ -14,7 +14,7 @@ RUN yarn --production --frozen-lockfile --non-interactive --network-timeout 1000
# ===============
# --- Release ---
# ===============
FROM node:16-alpine
FROM node:18-alpine
LABEL maintainer="requarks.io"

RUN apk add bash curl git openssh gnupg sqlite --no-cache && \
Expand Down
4 changes: 2 additions & 2 deletions dev/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ====================
# --- Build Assets ---
# ====================
FROM node:16-alpine AS assets
FROM node:18-alpine AS assets

RUN apk add yarn g++ make cmake python3 --no-cache

Expand All @@ -23,7 +23,7 @@ RUN yarn --production --frozen-lockfile --non-interactive
# ===============
# --- Release ---
# ===============
FROM node:16-alpine
FROM node:18-alpine
LABEL maintainer="requarks.io"

RUN apk add bash curl git openssh gnupg sqlite --no-cache && \
Expand Down
2 changes: 1 addition & 1 deletion dev/containers/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -- DEV DOCKERFILE --
# -- DO NOT USE IN PRODUCTION! --

FROM node:14
FROM node:18
LABEL maintainer "requarks.io"

RUN apt-get update && \
Expand Down
2 changes: 1 addition & 1 deletion dev/containers/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: "3"
services:
db:
container_name: wiki-db
image: postgres:9-alpine
image: postgres:15-alpine
environment:
POSTGRES_DB: wiki
POSTGRES_PASSWORD: wikijsrocks
Expand Down
2 changes: 1 addition & 1 deletion dev/examples/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"
services:

db:
image: postgres:11-alpine
image: postgres:15-alpine
environment:
POSTGRES_DB: wiki
POSTGRES_PASSWORD: wikijsrocks
Expand Down
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
"dev": true,
"scripts": {
"start": "node server",
"dev": "node dev",
"build": "webpack --profile --config dev/webpack/webpack.prod.js",
"watch": "webpack --config dev/webpack/webpack.dev.js",
"dev": "NODE_OPTIONS=--openssl-legacy-provider node dev",
"build": "NODE_OPTIONS=--openssl-legacy-provider webpack --profile --config dev/webpack/webpack.prod.js",
"watch": "NODE_OPTIONS=--openssl-legacy-provider webpack --config dev/webpack/webpack.dev.js",
"test": "eslint --format codeframe --ext .js,.vue . && pug-lint server/views && jest",
"cypress:open": "cypress open"
"cypress:open": "cypress open",
"postinstall": "patch-package"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -116,10 +117,10 @@
"markdown-it-mark": "3.0.1",
"markdown-it-mathjax": "2.0.0",
"markdown-it-multimd-table": "4.0.3",
"markdown-it-pivot-table": "1.0.1",
"markdown-it-sub": "1.0.0",
"markdown-it-sup": "1.0.0",
"markdown-it-task-lists": "2.1.1",
"markdown-it-pivot-table": "1.0.1",
"mathjax": "3.2.2",
"mime-types": "2.1.35",
"moment": "2.29.4",
Expand Down Expand Up @@ -154,12 +155,14 @@
"passport-saml": "3.2.4",
"passport-slack-oauth2": "1.1.1",
"passport-twitch-strategy": "2.2.0",
"patch-package": "8.0.0",
"pem-jwk": "2.0.0",
"pg": "8.9.0",
"pg-hstore": "2.3.4",
"pg-pubsub": "0.5.0",
"pg-query-stream": "4.3.0",
"pg-tsquery": "8.4.1",
"postinstall-postinstall": "2.1.0",
"pug": "3.0.2",
"punycode": "2.3.0",
"qr-image": "3.2.0",
Expand Down
14 changes: 14 additions & 0 deletions patches/extract-files+9.0.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/node_modules/extract-files/package.json b/node_modules/extract-files/package.json
index 636fa03..1b75f79 100644
--- a/node_modules/extract-files/package.json
+++ b/node_modules/extract-files/package.json
@@ -34,6 +34,9 @@
"import": "./public/index.mjs",
"require": "./public/index.js"
},
+ "./public/extractFiles": "./public/extractFiles.js",
+ "./public/isExtractableFile": "./public/isExtractableFile.js",
+ "./public/ReactNativeFile": "./public/ReactNativeFile.js",
"./public/": "./public/",
"./package": "./package.json",
"./package.json": "./package.json"
2 changes: 1 addition & 1 deletion server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const { gte } = require('semver')
// ----------------------------------------
// Check Node.js version
// ----------------------------------------
if (gte(process.version, '18.0.0')) {
if (gte(process.version, '21.0.0')) {
console.error('You\'re using an unsupported Node.js version. Please read the requirements.')
process.exit(1)
}
Expand Down
Loading

0 comments on commit 3855d2c

Please sign in to comment.