Skip to content

Commit

Permalink
dep: Drop support of node 16 and require node 18
Browse files Browse the repository at this point in the history
Add the --openssl-legacy-provider flag to webpack commands
  • Loading branch information
tahini committed Nov 27, 2023
1 parent a919bd8 commit 871ede1
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 38 deletions.
29 changes: 1 addition & 28 deletions .github/workflows/transition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [18.x, 20.x]
env:
PROJECT_CONFIG: ${{ github.workspace }}/examples/config.js
steps:
Expand All @@ -35,33 +35,6 @@ jobs:
run: yarn test
- name: UI Test
run: yarn test:ui

# Because of https://github.com/chairemobilite/transition/issues/531, version 18 needs an additional environment variable. When fixed, we can use a version matrix instead
build-and-test-18:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
env:
PROJECT_CONFIG: ${{ github.workspace }}/examples/config.js
steps:
- uses: actions/checkout@v3
- name: copy env file
run: cp .env.example .env
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: yarn
- name: Compile
run: yarn compile
- name: Build Client bundle
run: yarn cross-env NODE_OPTIONS=--openssl-legacy-provider yarn build:prod
- name: Unit Test
run: yarn test
- name: UI Test
run: yarn test:ui

code-lint:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN cargo build


# Build Node app
FROM node:16-bullseye
FROM node:18-bookworm
WORKDIR /app
# Install all the json package dependencies in an intermediary image. To do so, we copy each package.json files
# and run yarn install which will download all the listed packages in the image.
Expand Down
2 changes: 1 addition & 1 deletion packages/chaire-lib-backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"name": "chaire-lib-backend",
"version": "0.2.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/chaire-lib-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"name": "chaire-lib-common",
"version": "0.2.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/chaire-lib-frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"name": "chaire-lib-frontend",
"version": "0.2.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/transition-backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"name": "transition-backend",
"version": "0.2.0-2",
Expand Down
2 changes: 1 addition & 1 deletion packages/transition-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"name": "transition-common",
"version": "0.2.0-2",
Expand Down
8 changes: 4 additions & 4 deletions packages/transition-frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"name": "transition-frontend",
"version": "0.2.0-2",
"description": "Transportation and travel survey analysis and simulation platform",
"repository": "github.com/chairemobilite/transition",
"license": "MIT",
"scripts": {
"build:dev": "webpack --watch --progress --colors --env development --mode development",
"build:prod": "webpack -p --progress --colors --env production --mode production",
"build:test": "cross-env NODE_ENV=test webpack -p --env test --mode development --watch --progress --colors",
"build:dev": "cross-env NODE_OPTIONS=\"--max_old_space_size=4096 --openssl-legacy-provider\" webpack --watch --progress --colors --env development --mode development",
"build:prod": "cross-env NODE_OPTIONS=\"--max_old_space_size=4096 --openssl-legacy-provider\" webpack -p --progress --colors --env production --mode production",
"build:test": "cross-env NODE_ENV=\"test --openssl-legacy-provider\" webpack -p --env test --mode development --watch --progress --colors",
"compile": "tsc && yarn copy-files",
"compile:dev": "yarn copy-files && tsc -w",
"clean": "rimraf lib/",
Expand Down

0 comments on commit 871ede1

Please sign in to comment.