From ebb2a5c1d770d825f5a2c3ea8a4a9d6eef7a0c34 Mon Sep 17 00:00:00 2001 From: Bad3r Date: Tue, 21 Feb 2023 15:07:35 +0000 Subject: [PATCH] chore(dep): bump NodeJS from 16.x to 18.x LTS (#8406) * chore(dep): bump NodeJS to LTS 18.x * update nginx image CVE-2022-43551 * upgrade node version in GH workflows * update nodejs version in dev docs * upgrade tldraw version nodejs version to 18.x * update static/yarn.lock * fix yarn.lock electron version --------- Co-authored-by: situ2001 --- .github/workflows/build-android.yml | 2 +- .github/workflows/build-desktop-release.yml | 2 +- .github/workflows/build-ios-release.yml | 2 +- .github/workflows/build-ios.yml | 2 +- .github/workflows/build-stage.yml | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/db.yml | 2 +- .github/workflows/e2e.yml | 2 +- .github/workflows/graph-parser.yml | 2 +- Dockerfile | 4 ++-- docs/develop-logseq-on-windows.md | 10 +++++----- static/yarn.lock | 4 ++-- tldraw/apps/tldraw-logseq/package.json | 2 +- tldraw/package.json | 2 +- tldraw/packages/core/package.json | 2 +- tldraw/packages/react/package.json | 2 +- tldraw/yarn.lock | 13 ++++--------- 17 files changed, 26 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 407b47ec8..c2aa0e4ee 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -42,7 +42,7 @@ on: env: CLOJURE_VERSION: '1.10.1.763' - NODE_VERSION: '16' + NODE_VERSION: '18' JAVA_VERSION: '11' jobs: diff --git a/.github/workflows/build-desktop-release.yml b/.github/workflows/build-desktop-release.yml index 42fc8c63e..5db281dd3 100644 --- a/.github/workflows/build-desktop-release.yml +++ b/.github/workflows/build-desktop-release.yml @@ -48,7 +48,7 @@ on: env: CLOJURE_VERSION: '1.10.1.763' - NODE_VERSION: '16' + NODE_VERSION: '18' jobs: compile-cljs: diff --git a/.github/workflows/build-ios-release.yml b/.github/workflows/build-ios-release.yml index 325904151..48c8fa7da 100644 --- a/.github/workflows/build-ios-release.yml +++ b/.github/workflows/build-ios-release.yml @@ -12,7 +12,7 @@ on: env: CLOJURE_VERSION: '1.10.1.763' - NODE_VERSION: '16' + NODE_VERSION: '18' JAVA_VERSION: '11' jobs: diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index 3a46371bf..6130d0146 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -17,7 +17,7 @@ on: env: CLOJURE_VERSION: '1.10.1.763' - NODE_VERSION: '16' + NODE_VERSION: '18' JAVA_VERSION: '11' jobs: diff --git a/.github/workflows/build-stage.yml b/.github/workflows/build-stage.yml index b056a90eb..b05975079 100644 --- a/.github/workflows/build-stage.yml +++ b/.github/workflows/build-stage.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v2 with: - node-version: 16 + node-version: 18 - name: Install clojure run: | diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 15a08dd42..665bb5cc9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ env: # This is the same as 1.8. JAVA_VERSION: '8' # This is the latest node version we can run. - NODE_VERSION: '16' + NODE_VERSION: '18' BABASHKA_VERSION: '1.0.168' jobs: diff --git a/.github/workflows/db.yml b/.github/workflows/db.yml index 7356a8dfa..d2e22de03 100644 --- a/.github/workflows/db.yml +++ b/.github/workflows/db.yml @@ -24,7 +24,7 @@ env: # This is the same as 1.8. JAVA_VERSION: '8' # This is the latest node version we can run. - NODE_VERSION: '16' + NODE_VERSION: '18' BABASHKA_VERSION: '1.0.168' jobs: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9da4fced9..a864a095c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -20,7 +20,7 @@ env: # This is the same as 1.8. JAVA_VERSION: '8' # This is the latest node version we can run. - NODE_VERSION: '16' + NODE_VERSION: '18' BABASHKA_VERSION: '1.0.168' jobs: diff --git a/.github/workflows/graph-parser.yml b/.github/workflows/graph-parser.yml index ca3680b0e..1b3de9858 100644 --- a/.github/workflows/graph-parser.yml +++ b/.github/workflows/graph-parser.yml @@ -28,7 +28,7 @@ env: # This is the same as 1.8. JAVA_VERSION: '8' # This is the latest node version we can run. - NODE_VERSION: '16' + NODE_VERSION: '18' BABASHKA_VERSION: '1.0.168' jobs: diff --git a/Dockerfile b/Dockerfile index 7714bed3c..aa22e8dee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ gpg # install NodeJS & yarn -RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - +RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | \ tee /etc/apt/trusted.gpg.d/yarn.gpg && \ @@ -34,7 +34,7 @@ RUN yarn config set network-timeout 240000 -g && yarn install RUN yarn release # Web App Runner image -FROM nginx:stable-alpine +FROM nginx:1.23.3-alpine COPY --from=builder /data/static /usr/share/nginx/html diff --git a/docs/develop-logseq-on-windows.md b/docs/develop-logseq-on-windows.md index e89806a33..e056ac671 100644 --- a/docs/develop-logseq-on-windows.md +++ b/docs/develop-logseq-on-windows.md @@ -6,12 +6,12 @@ This is a guide on creating Logseq development environment on Windows with `Powe ## Pre-requisites * Ensure `Set-ExecutionPolicy Unrestricted` (or other equivalent) * Good network connection. Here's [An example of setting up proxy in PowerShell](#an-example-of-setting-up-proxy-in-powershell) -* Node.js 16.x +* Node.js 18.x * Clojure (follow this [Guidance](https://clojure.org/guides/getting_started#_installation_on_windows)) * JRE 8 (required for Clojure) * Visual Studio (required for desktop app) -(updated 20220218. May confirm via JAVA_VERSION and NODE_VERSION in [THIS FILE](https://github.com/logseq/logseq/blob/master/.github/workflows/build.yml)) +(updated 20230215. May confirm via JAVA_VERSION and NODE_VERSION in [THIS FILE](https://github.com/logseq/logseq/blob/master/.github/workflows/build.yml)) ### An example of installing pre-requisites on Windows * Install [Chocolatey](https://chocolatey.org/) @@ -19,10 +19,10 @@ This is a guide on creating Logseq development environment on Windows with `Powe * Install NVM for Windows, Node.js, and Yarn ``` choco install nvm - nvm install 16.13 (or whatever version) - nvm use 16.13 + nvm install 18.12.0 (or whatever version) + nvm use 18.12.0 npm install -g yarn - nvm use 16.13 + nvm use 18.12.0 ``` * Install [clj-on-windows](https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows) diff --git a/static/yarn.lock b/static/yarn.lock index 458072e62..6cebfd0bf 100644 --- a/static/yarn.lock +++ b/static/yarn.lock @@ -2099,8 +2099,8 @@ electron-winstaller@^5.0.0: electron@*, electron@20.3.8: version "20.3.8" - resolved "https://registry.yarnpkg.com/electron/-/electron-20.3.8.tgz#94a4b2bb89a3e6bbeb824365cfd0f65658bc1a2c" - integrity sha512-P93ZWoJjXEVwsjUJ4q6640KZ4+rmWMZ9O5IB1eq/L9S52ZYsXo0o82afpPXq3j8vpneY0N5J62hgRzC1ZKzYmw== + resolved "https://registry.yarnpkg.com/electron/-/electron-20.3.11.tgz#dd3a1a26edecd012a807ae96409d52d0a0cc4f11" + integrity sha512-+dZRzUCDIeVcOqha4hW/y/rNOjoM23rcuLQgrdzayj2FHfgs8mud6fAzvTeJN3TT2c6em/u5cZYQXqdrYcZqAg== dependencies: "@electron/get" "^1.14.1" "@types/node" "^16.11.26" diff --git a/tldraw/apps/tldraw-logseq/package.json b/tldraw/apps/tldraw-logseq/package.json index fbe987068..0a4179c50 100644 --- a/tldraw/apps/tldraw-logseq/package.json +++ b/tldraw/apps/tldraw-logseq/package.json @@ -23,7 +23,7 @@ "@tldraw/core": "2.0.0-alpha.1", "@tldraw/react": "2.0.0-alpha.1", "@tldraw/vec": "2.0.0-alpha.1", - "@types/node": "^17.0.42", + "@types/node": "^18.13.0", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", "autoprefixer": "^10.4.13", diff --git a/tldraw/package.json b/tldraw/package.json index 8b3cdc7b4..0e0d54567 100644 --- a/tldraw/package.json +++ b/tldraw/package.json @@ -24,7 +24,7 @@ "pretty-quick": "pretty-quick --pattern 'tldraw/**/*.{js,jsx,ts,tsx,css,html}'" }, "devDependencies": { - "@types/node": "^17.0.42", + "@types/node": "^18.13.0", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", "@typescript-eslint/eslint-plugin": "^5.36.1", diff --git a/tldraw/packages/core/package.json b/tldraw/packages/core/package.json index 22ab41666..bf5460b6e 100644 --- a/tldraw/packages/core/package.json +++ b/tldraw/packages/core/package.json @@ -53,7 +53,7 @@ "devDependencies": { "@types/is-plain-object": "^2.0.4", "@types/mousetrap": "^1.6.11", - "@types/node": "^16.11.6", + "@types/node": "^18.13.0", "@types/rbush": "^3.0.0", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", diff --git a/tldraw/packages/react/package.json b/tldraw/packages/react/package.json index 07ee4e437..b686adc1b 100644 --- a/tldraw/packages/react/package.json +++ b/tldraw/packages/react/package.json @@ -52,7 +52,7 @@ "devDependencies": { "@types/is-plain-object": "^2.0.4", "@types/mousetrap": "^1.6.11", - "@types/node": "^16.11.6", + "@types/node": "^18.13.0", "@types/offscreencanvas": "^2019.6.4", "@types/rbush": "^3.0.0", "@types/react": "^17.0.0", diff --git a/tldraw/yarn.lock b/tldraw/yarn.lock index a436e3f26..7fd9f1dc3 100644 --- a/tldraw/yarn.lock +++ b/tldraw/yarn.lock @@ -1091,15 +1091,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.6.tgz#31743bc5772b6ac223845e18c3fc26f042713c83" integrity sha512-EdxgKRXgYsNITy5mjjXjVE/CS8YENSdhiagGrLqjG0pvA2owgJ6i4l7wy/PFZGC0B1/H20lWKN7ONVDNYDZm7A== -"@types/node@^16.11.6": - version "16.11.49" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.49.tgz#560b1ea774b61e19a89c3fc72d2dcaa3863f38b2" - integrity sha512-Abq9fBviLV93OiXMu+f6r0elxCzRwc0RC5f99cU892uBITL44pTvgvEqlRlPRi8EGcO1z7Cp8A4d0s/p3J/+Nw== - -"@types/node@^17.0.42": - version "17.0.45" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190" - integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw== +"@types/node@^18.13.0": + version "18.13.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.13.0.tgz#0400d1e6ce87e9d3032c19eb6c58205b0d3f7850" + integrity sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg== "@types/node@^18.7.20": version "18.8.3"