Skip to content

Commit

Permalink
fix(profiling): Make prune script compatible with node 22 (#14491)
Browse files Browse the repository at this point in the history
  • Loading branch information
chargome authored Dec 2, 2024
1 parent 0b349eb commit ecc91bc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/profiling-node/scripts/prune-profiler-binaries.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const NODE_TO_ABI = {
16: '93',
18: '108',
20: '115',
22: '127',
};

if (NODE) {
Expand All @@ -73,9 +74,13 @@ if (NODE) {
NODE = NODE_TO_ABI['18'];
} else if (NODE.startsWith('20')) {
NODE = NODE_TO_ABI['20'];
} else if (NODE.startsWith('22')) {
NODE = NODE_TO_ABI['22'];
} else {
ARGV_ERRORS.push(
'❌ Sentry: Invalid node version passed as argument, please make sure --target_node is a valid major node version. Supported versions are 16, 18 and 20.',
`❌ Sentry: Invalid node version passed as argument, please make sure --target_node is a valid major node version. Supported versions are ${Object.keys(
NODE_TO_ABI,
).join(', ')}.`,
);
}
}
Expand Down

0 comments on commit ecc91bc

Please sign in to comment.