Skip to content

Commit e9029ed

Browse files
authored
Breaking Change: migrate to node v20 (#7457)
#### Details Update the code node version to node 20.x.x version. As lot of other packages are using or going to use Node 20.x.x. #### Pull request checklist <!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox --> - [ ] Addresses an existing issue: #0000 - [x] Ran `yarn fastpass` - [x] Added/updated relevant unit test(s) (and ran `yarn test`) - [x] Verified code coverage for the changes made. Check coverage report at: `<rootDir>/test-results/unit/coverage` - [x] PR title *AND* final merge commit title both start with a semantic tag (`fix:`, `chore:`, `feat(feature-name):`, `refactor:`). See `CONTRIBUTING.md`. - [ ] (UI changes only) Added screenshots/GIFs to description above - [ ] (UI changes only) Verified usability with NVDA/JAWS
1 parent 0fa1b2c commit e9029ed

File tree

8 files changed

+27
-18
lines changed

8 files changed

+27
-18
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
env:
1313
# Keep this in sync with /pipeline/install-node-prerequisites.yaml
14-
NODE_VERSION: 16.14.2
14+
NODE_VERSION: 20.17.0
1515

1616
jobs:
1717
build:

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ USER root
1212
# We need to update certificates before we can successfully update and install node
1313
# This is a workaround for https://github.com/nodesource/distributions/issues/1266
1414
#
15-
# We pin nodejs 16.x instead of accepting Playwright's default for consistency with
15+
# We pin nodejs 20.x instead of accepting Playwright's default for consistency with
1616
# our other build environments.
1717
RUN apt-get update && \
1818
apt-get install ca-certificates && \
1919
apt-get update && \
2020
apt-get install -y curl && \
21-
curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
22-
apt-get install -y --allow-downgrades nodejs=16.* && \
21+
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
22+
apt-get install -y --allow-downgrades nodejs=20.* && \
2323
rm -rf /var/lib/apt/lists/*
2424

2525
WORKDIR /app

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"url": "https://github.com/Microsoft/accessibility-insights-web"
1010
},
1111
"engines": {
12-
"node": ">=12.16.1"
12+
"node": ">=20.17.0"
1313
},
1414
"packageManager": "yarn@3.5.0",
1515
"workspaces": [
@@ -86,7 +86,7 @@
8686
"@types/jsdom": "^21.1.6",
8787
"@types/lodash": "^4.17.13",
8888
"@types/luxon": "^3.4.2",
89-
"@types/node": "^16.11.7",
89+
"@types/node": "^22.7.3",
9090
"@types/react": "^18.3.1",
9191
"@types/react-dom": "^18.3.0",
9292
"@types/react-helmet": "^6.1.11",
@@ -172,7 +172,7 @@
172172
"webextension-polyfill": "^0.12.0"
173173
},
174174
"resolutions": {
175-
"@types/node": "^16.11.7",
175+
"@types/node": "^22.7.3",
176176
"ansi-regex@^2.0.0": "^5.0.1",
177177
"license-check-and-add/yargs@^13.3.0": "^15.3.1",
178178
"nth-check@~1.0.1": "^2.0.1",

packages/report/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "accessibility-insights-report",
3-
"version": "5.2.0",
3+
"version": "6.0.0",
44
"description": "Accessibility Insights Report",
55
"license": "MIT",
66
"files": [

packages/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "accessibility-insights-ui",
3-
"version": "1.1.0",
3+
"version": "2.0.0",
44
"description": "Accessibility Insights UI Components",
55
"license": "MIT",
66
"files": [

pipeline/install-node-prerequisites.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ steps:
44
- task: NodeTool@0
55
inputs:
66
# Keep this in sync with /.github/workflows/ci.yml
7-
versionSpec: '16.14.2'
8-
displayName: use node 16.14.2
7+
versionSpec: '20.17.0'
8+
displayName: use node 20.17.0
99
timeoutInMinutes: 2
1010
retryCountOnTaskFailure: 2
1111

src/tests/unit/tests/reports/components/formatted-date.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ describe('FormattedDate', () => {
77
describe('render', () => {
88
test('end of last millennium', () => {
99
const date = DateTime.fromISO('1999-12-31T23:59:59', { zone: 'utc' }).toJSDate();
10-
testDate('en-us', date, '12/31/1999, 11:59:59 PM UTC');
10+
testDate('en-us', date, '12/31/1999, 11:59:59\u202fPM UTC');
1111
});
1212

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

1818
(platformSupportsNonEnLocales() ? test : test.skip)('German format', () => {

yarn.lock

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2419,10 +2419,12 @@ __metadata:
24192419
languageName: node
24202420
linkType: hard
24212421

2422-
"@types/node@npm:^16.11.7":
2423-
version: 16.18.97
2424-
resolution: "@types/node@npm:16.18.97"
2425-
checksum: 54f44aaeaa523d4c728177d070aeb20b8011e12ac45aff0d992e350e10cac4d899ac6429cd0f06a6c3a001c8a6cd204429b1a16628d82f1b1e4cc1cbdeca780f
2422+
"@types/node@npm:^22.7.3":
2423+
version: 22.7.3
2424+
resolution: "@types/node@npm:22.7.3"
2425+
dependencies:
2426+
undici-types: ~6.19.2
2427+
checksum: 1785ceb0d7b05b2a68df85ec89f2c76bc57a59f4f7a349966f2f7c8ee531d59dcba1adb4e3fddb19e0981ded96bf255291858e6b56dfe7984247b3a4f1227a22
24262428
languageName: node
24272429
linkType: hard
24282430

@@ -3059,7 +3061,7 @@ __metadata:
30593061
"@types/jsdom": ^21.1.6
30603062
"@types/lodash": ^4.17.13
30613063
"@types/luxon": ^3.4.2
3062-
"@types/node": ^16.11.7
3064+
"@types/node": ^22.7.3
30633065
"@types/react": ^18.3.1
30643066
"@types/react-dom": ^18.3.0
30653067
"@types/react-helmet": ^6.1.11
@@ -11977,6 +11979,13 @@ __metadata:
1197711979
languageName: node
1197811980
linkType: hard
1197911981

11982+
"undici-types@npm:~6.19.2":
11983+
version: 6.19.8
11984+
resolution: "undici-types@npm:6.19.8"
11985+
checksum: de51f1b447d22571cf155dfe14ff6d12c5bdaec237c765085b439c38ca8518fc360e88c70f99469162bf2e14188a7b0bcb06e1ed2dc031042b984b0bb9544017
11986+
languageName: node
11987+
linkType: hard
11988+
1198011989
"unique-filename@npm:^3.0.0":
1198111990
version: 3.0.0
1198211991
resolution: "unique-filename@npm:3.0.0"

0 commit comments

Comments
 (0)