From b30988ac0e106cb264ca0d4b3c4540f88169859c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 11 May 2024 18:52:07 +0200 Subject: [PATCH] fix(v8): remove trace_event starting with 12.6 (#807) Also add a custom error message when a dependency disappears to avoid the unhelpful `Cannot read properties of undefined (reading 'split')`. Refs: https://github.com/v8/v8/commit/f8fa22073a0db4a62775efba87ddee5f949a2095 --- lib/update-v8/constants.js | 3 ++- lib/update-v8/majorUpdate.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/update-v8/constants.js b/lib/update-v8/constants.js index d5101d09..31a99635 100644 --- a/lib/update-v8/constants.js +++ b/lib/update-v8/constants.js @@ -46,7 +46,8 @@ export const v8Deps = [ match: '/base\n', replace: '' }, - since: 55 + since: 55, + until: 125 }, { name: 'gtest', diff --git a/lib/update-v8/majorUpdate.js b/lib/update-v8/majorUpdate.js index 47c3f3ac..65936908 100644 --- a/lib/update-v8/majorUpdate.js +++ b/lib/update-v8/majorUpdate.js @@ -146,6 +146,9 @@ async function readDeps(nodeDir, depName) { let deps; eval(depsDeclaration); // eslint-disable-line no-eval const dep = deps[depName]; + if (!dep) { + throw new Error(`V8 dep "${depName}" not found in DEPS file`); + } if (typeof dep === 'object') { return dep.url.split('@'); }