mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-19 23:06:15 +08:00
chore: upgrade node to 20.16.0 (#5688)
* nooOoOoOOoOoode * ci * nvm * env is back baby, cache * cache name, restore keys * remove restore keys * package lock * conditional node setup * unnecessary assertion * update rule * lock
This commit is contained in:
parent
fe7a67d0fb
commit
1110248f7b
57
.github/workflows/monkey-ci.yml
vendored
57
.github/workflows/monkey-ci.yml
vendored
|
@ -1,7 +1,7 @@
|
|||
name: Monkey CI
|
||||
|
||||
env:
|
||||
NODE_VERSION: "18.20.4"
|
||||
NODE_VERSION: "20.16.0"
|
||||
RECAPTCHA_SITE_KEY: "6Lc-V8McAAAAAJ7s6LGNe7MBZnRiwbsbiWts87aj"
|
||||
|
||||
permissions:
|
||||
|
@ -68,6 +68,7 @@ jobs:
|
|||
needs: [pre-ci]
|
||||
if: needs.pre-ci.outputs.should-build-be == 'true' || needs.pre-ci.outputs.should-build-fe == 'true' || needs.pre-ci.outputs.should-build-pkg == 'true' || needs.pre-ci.outputs.assets-json == 'true'
|
||||
steps:
|
||||
|
||||
- name: Checkout package-lock
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
|
@ -78,19 +79,21 @@ jobs:
|
|||
id: cache-npm
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
cache-name: node-modules
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
|
||||
name: Full checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
|
||||
name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
|
||||
name: Install dependencies
|
||||
run: npm install --prefer-offline --no-audit
|
||||
|
@ -111,14 +114,10 @@ jobs:
|
|||
id: cache-npm
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
cache-name: node-modules
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install --prefer-offline --no-audit
|
||||
|
@ -159,14 +158,10 @@ jobs:
|
|||
id: cache-npm
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
cache-name: node-modules
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install --prefer-offline --no-audit
|
||||
|
@ -200,14 +195,10 @@ jobs:
|
|||
id: cache-npm
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
cache-name: node-modules
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install --prefer-offline --no-audit
|
||||
|
@ -251,14 +242,10 @@ jobs:
|
|||
id: cache-npm
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
cache-name: node-modules
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install --prefer-offline --no-audit
|
||||
|
@ -294,14 +281,10 @@ jobs:
|
|||
id: cache-npm
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
cache-name: node-modules
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install --prefer-offline --no-audit
|
||||
|
|
2
.github/workflows/pretty-fix.yml
vendored
2
.github/workflows/pretty-fix.yml
vendored
|
@ -23,7 +23,7 @@ jobs:
|
|||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "18.20.4"
|
||||
node-version: "20.16.0"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm i prettier@2.5.1 --save-dev --save-exact
|
||||
|
|
|
@ -21,7 +21,7 @@ services:
|
|||
|
||||
api-server:
|
||||
container_name: monkeytype-api-server
|
||||
image: node:18.20.4
|
||||
image: node:20.16.0
|
||||
user: "node" ##this works as long as your local user has uid=1000
|
||||
restart: on-failure
|
||||
depends_on:
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"gen-docs": "tsx scripts/openapi.ts dist/static/api/openapi.json && redocly build-docs -o dist/static/api/internal.html internal@v2 && redocly bundle -o dist/static/api/public.json public-filter && redocly build-docs -o dist/static/api/public.html public@v2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "18.20.4"
|
||||
"node": "20.16.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@date-fns/utc": "1.2.0",
|
||||
|
|
|
@ -28,7 +28,7 @@ export function callController<
|
|||
status: 200 as TStatus,
|
||||
body: {
|
||||
message: result.message,
|
||||
data: result.data as TResponse,
|
||||
data: result.data,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
FROM node:18.20.4-alpine3.19
|
||||
FROM node:20.16.0-alpine3.19
|
||||
|
||||
##install wget, used by the applyConfig script
|
||||
RUN apk add wget
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:18.20.4-alpine3.19 AS builder
|
||||
FROM node:20.16.0-alpine3.19 AS builder
|
||||
WORKDIR /app
|
||||
|
||||
#ENV
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
## Prerequisites
|
||||
|
||||
This contribution guide is for cases in which you need to test the functionality of your changes, or if you need to take screenshots of your changes. You will need a computer with a stable internet connection, a text editor, Git, and NodeJS with version 18.20.4. There are some additional requirements depending on what you're looking to contribute, such as Firebase for authentication, and Mongo and Docker for the backend. Read the below sections to understand how to set up each of these tools.
|
||||
This contribution guide is for cases in which you need to test the functionality of your changes, or if you need to take screenshots of your changes. You will need a computer with a stable internet connection, a text editor, Git, and NodeJS with version 20.16.0. There are some additional requirements depending on what you're looking to contribute, such as Firebase for authentication, and Mongo and Docker for the backend. Read the below sections to understand how to set up each of these tools.
|
||||
|
||||
### Git
|
||||
|
||||
|
@ -33,9 +33,9 @@ Git is optional but we recommend you utilize it. Monkeytype uses the Git source
|
|||
|
||||
### NodeJS and NPM
|
||||
|
||||
Currently, the project is using version `18.20.4 LTS`.
|
||||
Currently, the project is using version `20.16.0 LTS`.
|
||||
|
||||
If you use `nvm` (if you use Windows, use [nvm-windows](https://github.com/coreybutler/nvm-windows)) then you can run `nvm install` and `nvm use` (you might need to specify the exact version eg: `nvm install 18.20.4` then `nvm use 18.20.4`) to use the version of Node.js in the `.nvmrc` file.
|
||||
If you use `nvm` (if you use Windows, use [nvm-windows](https://github.com/coreybutler/nvm-windows)) then you can run `nvm install` and `nvm use` (you might need to specify the exact version eg: `nvm install 20.16.0` then `nvm use 20.16.0`) to use the version of Node.js in the `.nvmrc` file.
|
||||
|
||||
Alternatively, you can navigate to the NodeJS [website](https://nodejs.org/en/) to download it from there.
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ name: monkeytype
|
|||
services:
|
||||
frontend:
|
||||
container_name: monkeytype-frontend
|
||||
image: node:18.20.4
|
||||
image: node:20.16.0
|
||||
user: "node" ##this works as long as your local user has uid=1000
|
||||
# restart: on-failure
|
||||
environment:
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
"docker": "docker compose -f docker/compose.dev.yml up"
|
||||
},
|
||||
"engines": {
|
||||
"node": "18.20.4"
|
||||
"node": "20.16.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"defaults"
|
||||
|
|
7044
package-lock.json
generated
7044
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -47,7 +47,7 @@
|
|||
"pr-check-other-json": "cd frontend && npx gulp pr-check-other-json"
|
||||
},
|
||||
"engines": {
|
||||
"node": "18.20.4"
|
||||
"node": "20.16.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "17.7.1",
|
||||
|
|
|
@ -77,12 +77,7 @@ module.exports = {
|
|||
"@typescript-eslint/no-unsafe-member-access": "off", //~105
|
||||
//
|
||||
|
||||
"@typescript-eslint/no-unnecessary-type-assertion": [
|
||||
"error",
|
||||
{
|
||||
typesToIgnore: ["HTMLElement", "Element"],
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
||||
"@typescript-eslint/no-confusing-void-expression": [
|
||||
"error",
|
||||
{ ignoreArrowShorthand: true },
|
||||
|
|
Loading…
Reference in a new issue