From 2013a865c0012748ec1a246a84d965684272e927 Mon Sep 17 00:00:00 2001 From: Julien Wajsberg Date: Thu, 20 Feb 2025 11:57:45 +0100 Subject: [PATCH 1/2] Update node to v22 --- .circleci/config.yml | 2 +- .gitpod.yml | 2 +- .nvmrc | 2 +- appveyor.yml | 3 ++- package.json | 11 ++++++++++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b8ed74d510..539401cd94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 executors: node: docker: - - image: cimg/node:18.19 + - image: cimg/node:22.14 base: docker: - image: cimg/base:stable diff --git a/.gitpod.yml b/.gitpod.yml index 53729ca81e..732a10cc35 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,7 +1,7 @@ ports: - port: 4242 tasks: - - before: nvm install 18 + - before: nvm install 22 init: yarn install command: FX_PROFILER_HOST="0.0.0.0" yarn start - openMode: split-right diff --git a/.nvmrc b/.nvmrc index df5f0bcd6d..744ca17ec0 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18.19 +22.14 diff --git a/appveyor.yml b/appveyor.yml index 4377874a1d..95825a3c56 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,7 @@ +image: Visual Studio 2022 clone_depth: 5 environment: - nodejs_version: '18.19' + nodejs_version: '22.14' platform: x64 # flow needs 64b platforms branches: diff --git a/package.json b/package.json index cb572a549c..0822044e55 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,16 @@ { "private": true, "engines": { - "node": ">= 18.16 < 19" + "node": ">= 22 < 23" + }, + "devEngines": { + "runtime": { + "name": "node", + "version": ">= 22 < 23" + }, + "packageManager": { + "name": "yarn" + } }, "scripts": { "build:clean": "rimraf dist && mkdirp dist", From f4ca4b1f0d78fc12378864e259056976d8763d92 Mon Sep 17 00:00:00 2001 From: Julien Wajsberg Date: Thu, 20 Feb 2025 12:19:40 +0100 Subject: [PATCH 2/2] Update tests --- src/test/store/__snapshots__/receive-profile.test.js.snap | 4 ++-- src/test/store/__snapshots__/zipped-profiles.test.js.snap | 4 ++-- src/test/unit/fetch-source.test.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/store/__snapshots__/receive-profile.test.js.snap b/src/test/store/__snapshots__/receive-profile.test.js.snap index 6e83293c5f..6f0ff21fb7 100644 --- a/src/test/store/__snapshots__/receive-profile.test.js.snap +++ b/src/test/store/__snapshots__/receive-profile.test.js.snap @@ -9,7 +9,7 @@ Array [ ], Array [ "JSON parsing error:", - [SyntaxError: Unexpected token i in JSON at position 0], + [SyntaxError: Unexpected token 'i', "invalid" is not valid JSON], ], Array [ "Fetch response:", @@ -62,7 +62,7 @@ Array [ ], Array [ "JSON parsing error:", - [SyntaxError: Unexpected token i in JSON at position 0], + [SyntaxError: Unexpected token 'i', "invalid" is not valid JSON], ], Array [ "Fetch response:", diff --git a/src/test/store/__snapshots__/zipped-profiles.test.js.snap b/src/test/store/__snapshots__/zipped-profiles.test.js.snap index a8460152a2..94da214ffb 100644 --- a/src/test/store/__snapshots__/zipped-profiles.test.js.snap +++ b/src/test/store/__snapshots__/zipped-profiles.test.js.snap @@ -4,13 +4,13 @@ exports[`reducer zipFileState will fail when trying to load an invalid profile 1 Array [ Array [ "UnserializationError:", - [SyntaxError: Unexpected token o in JSON at position 1], + [SyntaxError: Unexpected token 'o', "not a profile" is not valid JSON], ], Array [ "Failed to process the profile in the archive with the following error:", ], Array [ - [Error: Unserializing the profile failed: SyntaxError: Unexpected token o in JSON at position 1], + [Error: Unserializing the profile failed: SyntaxError: Unexpected token 'o', "not a profile" is not valid JSON], ], ] `; diff --git a/src/test/unit/fetch-source.test.js b/src/test/unit/fetch-source.test.js index cb4dcc7c42..725455dd0b 100644 --- a/src/test/unit/fetch-source.test.js +++ b/src/test/unit/fetch-source.test.js @@ -445,7 +445,7 @@ describe('fetchSource', function () { errors: [ { type: 'BROWSER_API_MALFORMED_RESPONSE', - errorMessage: 'SyntaxError: Unexpected token I in JSON at position 1', + errorMessage: expect.stringMatching(/SyntaxError: Unexpected token/), }, { type: 'NO_KNOWN_CORS_URL',