From b0d606426104e2c1dc5b1e25d6b26ee73f32e731 Mon Sep 17 00:00:00 2001 From: Julien Wajsberg Date: Wed, 19 Apr 2023 11:21:49 +0200 Subject: [PATCH 1/2] Upgrade node to v18.16 and update tests following the ICU change The ICU changes come from https://github.com/nodejs/node/pull/46646 in node v18.15. --- .circleci/config.yml | 2 +- .nvmrc | 2 +- appveyor.yml | 2 +- src/test/components/WindowTitle.test.js | 10 ++++------ .../ListOfPublishedProfiles.test.js.snap | 16 ++++++++-------- .../UploadedRecordingsHome.test.js.snap | 6 +++--- 6 files changed, 18 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 52b0b859e3..c408d57941 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 executors: node: docker: - - image: cimg/node:18.14 + - image: cimg/node:18.16 base: docker: - image: cimg/base:stable diff --git a/.nvmrc b/.nvmrc index 2ef3430431..b492b08635 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18.14 +18.16 diff --git a/appveyor.yml b/appveyor.yml index c686371818..8651872589 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ clone_depth: 5 environment: - nodejs_version: "18.14" + nodejs_version: "18.16" platform: x64 # flow needs 64b platforms branches: diff --git a/src/test/components/WindowTitle.test.js b/src/test/components/WindowTitle.test.js index 7916ae1c59..0a40840e2c 100644 --- a/src/test/components/WindowTitle.test.js +++ b/src/test/components/WindowTitle.test.js @@ -35,7 +35,7 @@ describe('WindowTitle', () => { ); expect(document.title).toBe( - 'Firefox – 1/1/1970, 12:00:00\u202FAM UTC – Firefox Profiler' + 'Firefox – 1/1/1970, 12:00:00 AM UTC – Firefox Profiler' ); }); @@ -56,7 +56,7 @@ describe('WindowTitle', () => { ); expect(document.title).toBe( - 'Firefox – macOS 10.14 – 1/1/1970, 12:00:00\u202FAM UTC – Firefox Profiler' + 'Firefox – macOS 10.14 – 1/1/1970, 12:00:00 AM UTC – Firefox Profiler' ); }); @@ -100,9 +100,7 @@ describe('WindowTitle', () => { ); - expect(document.title).toBe( - '1/1/1970, 12:00:00\u202FAM UTC – Firefox Profiler' - ); + expect(document.title).toBe('1/1/1970, 12:00:00 AM UTC – Firefox Profiler'); }); it('shows the correct title for uploaded recordings', () => { @@ -169,7 +167,7 @@ describe('WindowTitle', () => { ); expect(document.title).toBe( - 'bar/profile1.json – Firefox – 1/1/1970, 12:00:00\u202FAM UTC – Firefox Profiler' + 'bar/profile1.json – Firefox – 1/1/1970, 12:00:00 AM UTC – Firefox Profiler' ); }); }); diff --git a/src/test/components/__snapshots__/ListOfPublishedProfiles.test.js.snap b/src/test/components/__snapshots__/ListOfPublishedProfiles.test.js.snap index 8d25a786f7..5d7d25a30c 100644 --- a/src/test/components/__snapshots__/ListOfPublishedProfiles.test.js.snap +++ b/src/test/components/__snapshots__/ListOfPublishedProfiles.test.js.snap @@ -61,7 +61,7 @@ exports[`ListOfPublishedProfiles limits the number of rendered profiles with the
- 2:00 PM + 2:00 PM
- 1:00 PM + 1:00 PM
- 2:00 PM + 2:00 PM
- 1:00 PM + 1:00 PM
- Jul 3, 8:00 AM + Jul 3, 8:00 AM
- 2:00 PM + 2:00 PM
- Jul 3, 8:00 AM + Jul 3, 8:00 AM
- 2:00 PM + 2:00 PM
- 2:00 PM + 2:00 PM
- 1:00 PM + 1:00 PM
- Jul 3, 8:00 AM + Jul 3, 8:00 AM
Date: Wed, 19 Apr 2023 11:39:35 +0200 Subject: [PATCH 2/2] Add the node engine version constraint in package.json as well --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 293d1da708..0bf1fb73b2 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,8 @@ { "private": true, + "engines": { + "node": ">= 18.16 < 19" + }, "scripts": { "build:clean": "rimraf dist && mkdirp dist", "build:quiet": "yarn build:clean && cross-env NODE_ENV=development webpack",