Skip to content
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

feat: migrate to node v20 #7457

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

env:
# Keep this in sync with /pipeline/install-node-prerequisites.yaml
NODE_VERSION: 16.14.2
NODE_VERSION: 20.17.0

jobs:
build:
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ USER root
# We need to update certificates before we can successfully update and install node
# This is a workaround for https://github.com/nodesource/distributions/issues/1266
#
# We pin nodejs 16.x instead of accepting Playwright's default for consistency with
# We pin nodejs 20.x instead of accepting Playwright's default for consistency with
# our other build environments.
RUN apt-get update && \
apt-get install ca-certificates && \
apt-get update && \
apt-get install -y curl && \
curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y --allow-downgrades nodejs=16.* && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y --allow-downgrades nodejs=20.* && \
rm -rf /var/lib/apt/lists/*

WORKDIR /app
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"url": "https://github.com/Microsoft/accessibility-insights-web"
},
"engines": {
"node": ">=12.16.1"
"node": ">=20.17.0"
},
"packageManager": "[email protected]",
"workspaces": [
Expand Down Expand Up @@ -86,7 +86,7 @@
"@types/jsdom": "^21.1.6",
"@types/lodash": "^4.14.202",
"@types/luxon": "^3.4.2",
"@types/node": "^16.11.7",
"@types/node": "^22.7.3",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@types/react-helmet": "^6.1.11",
Expand Down Expand Up @@ -172,7 +172,7 @@
"webextension-polyfill": "^0.12.0"
},
"resolutions": {
"@types/node": "^16.11.7",
"@types/node": "^22.7.3",
"ansi-regex@^2.0.0": "^5.0.1",
"license-check-and-add/yargs@^13.3.0": "^15.3.1",
"nth-check@~1.0.1": "^2.0.1",
Expand Down
4 changes: 2 additions & 2 deletions pipeline/install-node-prerequisites.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ steps:
- task: NodeTool@0
inputs:
# Keep this in sync with /.github/workflows/ci.yml
versionSpec: '16.14.2'
displayName: use node 16.14.2
versionSpec: '20.17.0'
displayName: use node 20.17.0
timeoutInMinutes: 2
retryCountOnTaskFailure: 2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ describe('FormattedDate', () => {
describe('render', () => {
test('end of last millennium', () => {
const date = DateTime.fromISO('1999-12-31T23:59:59', { zone: 'utc' }).toJSDate();
testDate('en-us', date, '12/31/1999, 11:59:59 PM UTC');
testDate('en-us', date, '12/31/1999, 11:59:59\u202fPM UTC');
});

test('start of this millennium', () => {
const date = DateTime.fromISO('2000-01-01T00:00:00', { zone: 'utc' }).toJSDate();
testDate('en-us', date, '1/1/2000, 12:00:00 AM UTC');
testDate('en-us', date, '1/1/2000, 12:00:00\u202fAM UTC');
});

(platformSupportsNonEnLocales() ? test : test.skip)('German format', () => {
Expand Down
19 changes: 14 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2452,10 +2452,12 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^16.11.7":
version: 16.18.97
resolution: "@types/node@npm:16.18.97"
checksum: 54f44aaeaa523d4c728177d070aeb20b8011e12ac45aff0d992e350e10cac4d899ac6429cd0f06a6c3a001c8a6cd204429b1a16628d82f1b1e4cc1cbdeca780f
"@types/node@npm:^22.7.3":
version: 22.7.3
resolution: "@types/node@npm:22.7.3"
dependencies:
undici-types: ~6.19.2
checksum: 1785ceb0d7b05b2a68df85ec89f2c76bc57a59f4f7a349966f2f7c8ee531d59dcba1adb4e3fddb19e0981ded96bf255291858e6b56dfe7984247b3a4f1227a22
languageName: node
linkType: hard

Expand Down Expand Up @@ -3101,7 +3103,7 @@ __metadata:
"@types/jsdom": ^21.1.6
"@types/lodash": ^4.14.202
"@types/luxon": ^3.4.2
"@types/node": ^16.11.7
"@types/node": ^22.7.3
"@types/react": ^18.3.1
"@types/react-dom": ^18.3.0
"@types/react-helmet": ^6.1.11
Expand Down Expand Up @@ -12034,6 +12036,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

"unique-filename@npm:^3.0.0":
version: 3.0.0
resolution: "unique-filename@npm:3.0.0"
Expand Down
Loading