From 5865f08b37d688ee057e82dd7acf90641b1978f5 Mon Sep 17 00:00:00 2001 From: Daniel James Smith Date: Mon, 13 Dec 2021 17:16:44 +0100 Subject: [PATCH] Bump node to v16 (#1189) * Pull in jslib * Update .nvmrc * Bump engines required to node 16 and npm 8 * Bump @types/node to 16 The dep on node 14.18 will get cleaned up once we bump electron * Modify build.yml to build with node 16 and npm 8 * Update requirements in README.md * Removed install of npm8 and renamed action step npm8 is included in node v16 * Pull jslib --- .github/workflows/build.yml | 30 +++++++++++----------------- .nvmrc | 2 +- README.md | 4 ++-- jslib | 2 +- package-lock.json | 40 +++++++++++++++++++++++++------------ package.json | 6 +++--- 6 files changed, 46 insertions(+), 38 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 656afde590..c6b6fa7af0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -93,7 +93,7 @@ jobs: - name: Set up Node uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: '14' + node-version: '16' - name: Cache npm id: npm-cache @@ -105,9 +105,8 @@ jobs: - name: Set Node options run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV - - name: Update NPM + - name: Install node-gyp run: | - npm install -g npm@7 npm install -g node-gyp node-gyp install $(node -v) @@ -192,7 +191,7 @@ jobs: - name: Set up Node uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: '14' + node-version: '16' - name: Cache npm id: npm-cache @@ -205,9 +204,8 @@ jobs: run: echo "NODE_OPTIONS=--max_old_space_size=4096" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append shell: pwsh - - name: Update NPM + - name: Install node-gyp run: | - npm install -g npm@7 npm install -g node-gyp node-gyp install $(node -v) @@ -369,7 +367,7 @@ jobs: - name: Set up Node uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: '14' + node-version: '16' - name: Cache npm id: npm-cache @@ -381,9 +379,8 @@ jobs: - name: Set Node options run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV - - name: Update NPM + - name: Install node-gyp run: | - npm install -g npm@7 npm install -g node-gyp node-gyp install $(node -v) @@ -517,7 +514,7 @@ jobs: - name: Set up Node uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: '14' + node-version: '16' - name: Cache npm id: npm-cache @@ -529,9 +526,8 @@ jobs: - name: Set Node options run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV - - name: Update NPM + - name: Install node-gyp run: | - npm install -g npm@7 npm install -g node-gyp node-gyp install $(node -v) @@ -705,7 +701,7 @@ jobs: - name: Set up Node uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: '14' + node-version: '16' - name: Cache npm id: npm-cache @@ -717,9 +713,8 @@ jobs: - name: Set Node options run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV - - name: Update NPM + - name: Install node-gyp run: | - npm install -g npm@7 npm install -g node-gyp node-gyp install $(node -v) @@ -885,7 +880,7 @@ jobs: - name: Set up Node uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 with: - node-version: '14' + node-version: '16' - name: Cache npm id: npm-cache @@ -897,9 +892,8 @@ jobs: - name: Set Node options run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV - - name: Update NPM + - name: Install node-gyp run: | - npm install -g npm@7 npm install -g node-gyp node-gyp install $(node -v) diff --git a/.nvmrc b/.nvmrc index cab13a7963..f0b10f153f 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v14.17.0 +v16.13.1 diff --git a/README.md b/README.md index 89a3069e35..74ffd4a518 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ The Bitwarden desktop app is written using Electron and Angular. The application **Requirements** -- [Node.js](https://nodejs.org) v14.17 or greater -- NPM v7 +- [Node.js](https://nodejs.org) v16.13.1 (LTS) or greater +- NPM v8 - Windows users: To compile the native node modules used in the app you will need the *Visual C++ toolset*, available through the standard Visual Studio installer. You will also need to install the *Microsoft Build Tools 2015* and *Windows 10 SDK 17134* as additional dependencies in the Visual Studio installer. diff --git a/jslib b/jslib index 6a179ab2df..8fc3cf50d2 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 6a179ab2dfacbc1dbd5dd4c185bc57cbac168994 +Subproject commit 8fc3cf50d2967212ffbbf0d57cac71d0774aa2a8 diff --git a/package-lock.json b/package-lock.json index 851c103591..aacb83a67f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,7 @@ "devDependencies": { "@angular/compiler-cli": "^12.2.13", "@ngtools/webpack": "^12.2.13", - "@types/node": "^14.14.43", + "@types/node": "^16.11.12", "@types/node-ipc": "^9.1.4", "clean-webpack-plugin": "^4.0.0", "concurrently": "^6.0.2", @@ -63,8 +63,8 @@ "webpack-node-externals": "^3.0.0" }, "engines": { - "node": "~14", - "npm": "~7" + "node": "~16", + "npm": "~8" } }, "jslib/angular": { @@ -111,7 +111,7 @@ }, "devDependencies": { "@types/lunr": "^2.3.3", - "@types/node": "^14.17.1", + "@types/node": "^16.11.12", "@types/node-forge": "^0.9.7", "@types/papaparse": "^5.2.5", "@types/tldjs": "^2.3.0", @@ -135,7 +135,7 @@ "keytar": "7.7.0" }, "devDependencies": { - "@types/node": "^14.17.1", + "@types/node": "^16.11.12", "rimraf": "^3.0.2", "typescript": "4.3.5" } @@ -1257,9 +1257,10 @@ "dev": true }, "node_modules/@types/node": { - "version": "14.18.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.0.tgz", - "integrity": "sha512-0GeIl2kmVMXEnx8tg1SlG6Gg8vkqirrW752KqolYo1PHevhhZN3bhJ67qHj+bQaINhX0Ra3TlWwRvMCd9iEfNQ==" + "version": "16.11.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.12.tgz", + "integrity": "sha512-+2Iggwg7PxoO5Kyhvsq9VarmPbIelXP070HMImEpbtGCoyWNINQj4wzjbQCXzdHTRXnqufutJb5KAURZANNBAw==", + "dev": true }, "node_modules/@types/node-forge": { "version": "0.9.10", @@ -3926,6 +3927,11 @@ "node": ">=12.0.0" } }, + "node_modules/electron/node_modules/@types/node": { + "version": "14.18.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.0.tgz", + "integrity": "sha512-0GeIl2kmVMXEnx8tg1SlG6Gg8vkqirrW752KqolYo1PHevhhZN3bhJ67qHj+bQaINhX0Ra3TlWwRvMCd9iEfNQ==" + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -10102,7 +10108,7 @@ "@microsoft/signalr": "5.0.10", "@microsoft/signalr-protocol-msgpack": "5.0.10", "@types/lunr": "^2.3.3", - "@types/node": "^14.17.1", + "@types/node": "^16.11.12", "@types/node-forge": "^0.9.7", "@types/papaparse": "^5.2.5", "@types/tldjs": "^2.3.0", @@ -10124,7 +10130,7 @@ "requires": { "@bitwarden/jslib-common": "file:../common", "@nodert-win10-rs4/windows.security.credentials.ui": "^0.4.4", - "@types/node": "^14.17.1", + "@types/node": "^16.11.12", "electron": "14.2.0", "electron-log": "4.4.1", "electron-store": "8.0.1", @@ -10603,9 +10609,10 @@ "dev": true }, "@types/node": { - "version": "14.18.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.0.tgz", - "integrity": "sha512-0GeIl2kmVMXEnx8tg1SlG6Gg8vkqirrW752KqolYo1PHevhhZN3bhJ67qHj+bQaINhX0Ra3TlWwRvMCd9iEfNQ==" + "version": "16.11.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.12.tgz", + "integrity": "sha512-+2Iggwg7PxoO5Kyhvsq9VarmPbIelXP070HMImEpbtGCoyWNINQj4wzjbQCXzdHTRXnqufutJb5KAURZANNBAw==", + "dev": true }, "@types/node-forge": { "version": "0.9.10", @@ -12409,6 +12416,13 @@ "@electron/get": "^1.0.1", "@types/node": "^14.6.2", "extract-zip": "^1.0.3" + }, + "dependencies": { + "@types/node": { + "version": "14.18.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.0.tgz", + "integrity": "sha512-0GeIl2kmVMXEnx8tg1SlG6Gg8vkqirrW752KqolYo1PHevhhZN3bhJ67qHj+bQaINhX0Ra3TlWwRvMCd9iEfNQ==" + } } }, "electron-builder": { diff --git a/package.json b/package.json index 3d198dd0ac..3c06d95f9b 100644 --- a/package.json +++ b/package.json @@ -249,7 +249,7 @@ "devDependencies": { "@angular/compiler-cli": "^12.2.13", "@ngtools/webpack": "^12.2.13", - "@types/node": "^14.14.43", + "@types/node": "^16.11.12", "@types/node-ipc": "^9.1.4", "clean-webpack-plugin": "^4.0.0", "concurrently": "^6.0.2", @@ -300,7 +300,7 @@ "sweetalert2": "^10.16.6" }, "engines": { - "node": "~14", - "npm": "~7" + "node": "~16", + "npm": "~8" } }