Skip to content

Commit e771d43

Browse files
committed
Update to use Node 18 for building, remove testing on Node 14, add testing on Node 19
1 parent db26977 commit e771d43

File tree

6 files changed

+18
-16
lines changed

6 files changed

+18
-16
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Install Node
1919
uses: actions/setup-node@v2
2020
with:
21-
node-version: "16"
21+
node-version: "18"
2222
cache: npm
2323
cache-dependency-path: 'src/*/package-lock.json'
2424
- name: Build and Test
@@ -44,9 +44,9 @@ jobs:
4444
fail-fast: false
4545
matrix:
4646
include:
47-
- { node: '14' }
4847
- { node: '16' }
49-
- { node: '17' }
48+
- { node: '18' }
49+
- { node: '19' }
5050
steps:
5151
- name: Install Node
5252
uses: actions/setup-node@v2

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: node_js
22
node_js:
3-
- '14'
3+
- '18'
44
- node
55
os: linux
66
addons:

ci/gitlab.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ before_script:
1010
- tar -xf geckodriver-linux64.tar.gz
1111
- install geckodriver /usr/local/bin
1212

13-
node:14:
14-
image: node:14
13+
node:16:
14+
image: node:16
1515
script:
1616
- PARALLEL_BUILD=false PARALLEL_E2E=false E2E_LAUNCH_DELAY=5 EXPLICIT_WAIT_TIMEOUT=20000 TEST_TIMEOUT=60000 DOCKER=true npm test
1717

18-
node:16:
19-
image: node:16
18+
node:18:
19+
image: node:18
2020
script:
2121
- PARALLEL_BUILD=false PARALLEL_E2E=false E2E_LAUNCH_DELAY=5 EXPLICIT_WAIT_TIMEOUT=20000 TEST_TIMEOUT=60000 DOCKER=true npm test
2222

deployment/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:14-alpine AS builder
1+
FROM node:18-alpine AS builder
22
RUN apk add --no-cache \
33
g++ \
44
git \
@@ -9,7 +9,7 @@ WORKDIR /refacto
99
COPY . .
1010
RUN DISABLE_OPENCOLLECTIVE=1 npm install --production
1111

12-
FROM node:14-alpine
12+
FROM node:18-alpine
1313
RUN addgroup -S refacto && adduser -S refacto -G refacto
1414
WORKDIR /refacto
1515
COPY --from=builder /refacto /refacto

docs/CONTRIBUTING.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,17 @@ installed (see [Running tests](#running-tests)).
169169

170170
### `error:0308010C:digital envelope routines::unsupported`
171171

172-
This project uses an old version of WebPack which is incompatible with Node 17. You can either
173-
downgrade to Node 16, or use the following command to build:
172+
This project uses an old version of WebPack which is incompatible with Node 17+.
173+
If you see this error, set the following environment variable for the command you are running:
174174

175175
```bash
176-
NODE_OPTIONS=--openssl-legacy-provider npm run build
176+
NODE_OPTIONS=--openssl-legacy-provider
177177
```
178178

179-
(same change for `test` etc.)
180-
181179
Specifically, WebPack uses an old OpenSSL algorithm for generating file hashes. This is not a
182180
security risk, and the resulting executable can (and should) be executed without using the
183181
legacy provider.
182+
183+
Fixing this properly requires updating to the next major version of WebPack, which is unfortunately
184+
not compatible with the NeutrinoJS build system used here. It will be necessary to replace neutrino
185+
with per-tool configuration to do the update.

src/backend/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": true,
44
"scripts": {
55
"prebuild": "rewrite-tsconfig",
6-
"build": "NODE_OPTIONS=--openssl-legacy-provider --mode production",
6+
"build": "NODE_OPTIONS=--openssl-legacy-provider webpack --mode production",
77
"start": "NODE_OPTIONS=--openssl-legacy-provider webpack --watch --mode development",
88
"lint:eslint": "rewrite-tsconfig && eslint --format codeframe --report-unused-disable-directives --max-warnings=0 src",
99
"lint:tsc": "rewrite-tsconfig && tsc",

0 commit comments

Comments
 (0)