Skip to content

Update Node version #248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
name: Node.js CI

on: [ push ]
on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Read .nvmrc
id: node_version
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_ENV

- name: Set Up node
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ steps.node_version.outputs.NODE_VERSION }}
cache: 'yarn'
node-version: ${{ env.NODE_VERSION }}

- name: Install dependencies
- name: Cache Yarn cache
id: yarn-cache
uses: actions/cache@v4
with:
path: .yarn/cache
key: yarn-cache-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-v2
restore-keys: |
yarn-cache-${{ runner.os }}-

- name: Install dependencies (with immutable cache)
if: steps.yarn-cache.outputs.cache-hit == 'true'
run: yarn --immutable --immutable-cache

- name: Install dependencies (fallback)
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install

- name: Test and Build Codebase
run: yarn ci

run: yarn ci
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.17.0
v20.11.1
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ We use nvm to manage our Node engine version and, if necessary, to install an np
Note for Windows: **We recommend using WSL** for setting up NVM on Windows using the [instructions described here][wsl-install] then continue the steps below.

1. Install nvm [using their instructions][nvm-install].
2. We use Node 18.x -- ensure that the correct Node version is installed and activated by performing `nvm install` and then `nvm use`
2. We use Node 20.x -- ensure that the correct Node version is installed and activated by performing `nvm install` and then `nvm use`
3. We use Yarn 3.x please [follow the installation guidelines here][yarn-install]
4. We use husky 6.x to manage the git commit hooks that help to improve the quality of our commits. Please run:
`yarn husky install`
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "./lib/exports.js",
"types": "./lib/exports.d.ts",
"engines": {
"node": ">=18"
"node": ">=20"
},
"dependencies": {
"@alexsasharegan/simple-cache": "^3.3.3",
Expand Down Expand Up @@ -37,7 +37,7 @@
"@types/lodash": "^4.14.199",
"@types/mime-types": "^2.1.2",
"@types/mocha": "^10.0.2",
"@types/node": "^18.18.3",
"@types/node": "^20.4.5",
"@types/node-fetch": "^2.6.6",
"@types/power-assert": "^1.5.9",
"@types/regression": "^2.0.3",
Expand Down
19 changes: 14 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1651,10 +1651,12 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^18.18.3":
version: 18.18.3
resolution: "@types/node@npm:18.18.3"
checksum: ed97a832179e0cfbb93738021fe16d0bc5c0f34bea35269c23c9dd5f0ecc8be93dbe5efd51630189a099b31786a47c1bde115508831a7245613a55c3ad1a7d6b
"@types/node@npm:^20.4.5":
version: 20.17.54
resolution: "@types/node@npm:20.17.54"
dependencies:
undici-types: ~6.19.2
checksum: e10feb7cc9d53223691c155099ac52d5f91e48c351a1e1e2af0fdbf83181848cf7dc2c26782f4a646b67961054f6ed062df37575142c4e476547a966efcfc85d
languageName: node
linkType: hard

Expand Down Expand Up @@ -2258,7 +2260,7 @@ __metadata:
"@types/lodash": ^4.14.199
"@types/mime-types": ^2.1.2
"@types/mocha": ^10.0.2
"@types/node": ^18.18.3
"@types/node": ^20.4.5
"@types/node-fetch": ^2.6.6
"@types/power-assert": ^1.5.9
"@types/regression": ^2.0.3
Expand Down Expand Up @@ -8397,6 +8399,13 @@ __metadata:
languageName: node
linkType: hard

"undici-types@npm:~6.19.2":
version: 6.19.8
resolution: "undici-types@npm:6.19.8"
checksum: de51f1b447d22571cf155dfe14ff6d12c5bdaec237c765085b439c38ca8518fc360e88c70f99469162bf2e14188a7b0bcb06e1ed2dc031042b984b0bb9544017
languageName: node
linkType: hard

"universal-deep-strict-equal@npm:^1.2.1":
version: 1.2.2
resolution: "universal-deep-strict-equal@npm:1.2.2"
Expand Down