Skip to content

Commit 4a920b5

Browse files
authored
fix(node): Update ANR min node version to v16.17.0 (#10107)
Upon testing the full range of Electron versions for release in CI, I found that starting a worker thread via a data uri requires at least node v16.17.0. This wasn't picked up by the tests in this repository because we only test the latest version of each major.
1 parent d305c8d commit 4a920b5

File tree

1 file changed

+4
-2
lines changed
  • packages/node/src/integrations/anr

1 file changed

+4
-2
lines changed

packages/node/src/integrations/anr/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ const anrIntegration = ((options: Partial<Options> = {}) => {
5656
return {
5757
name: INTEGRATION_NAME,
5858
setup(client: NodeClient) {
59-
if (NODE_VERSION.major < 16) {
60-
throw new Error('ANR detection requires Node 16 or later');
59+
if (NODE_VERSION.major < 16 || (NODE_VERSION.major === 16 && NODE_VERSION.minor < 17)) {
60+
throw new Error('ANR detection requires Node 16.17.0 or later');
6161
}
6262

6363
// setImmediate is used to ensure that all other integrations have been setup
@@ -68,6 +68,8 @@ const anrIntegration = ((options: Partial<Options> = {}) => {
6868

6969
/**
7070
* Starts a thread to detect App Not Responding (ANR) events
71+
*
72+
* ANR detection requires Node 16.17.0 or later
7173
*/
7274
// eslint-disable-next-line deprecation/deprecation
7375
export const Anr = convertIntegrationFnToClass(INTEGRATION_NAME, anrIntegration);

0 commit comments

Comments
 (0)