Skip to content

fix(node): Update ANR min node version to v16.17.0 #10107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/node/src/integrations/anr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ const anrIntegration = ((options: Partial<Options> = {}) => {
return {
name: INTEGRATION_NAME,
setup(client: NodeClient) {
if (NODE_VERSION.major < 16) {
throw new Error('ANR detection requires Node 16 or later');
if (NODE_VERSION.major < 16 || (NODE_VERSION.major === 16 && NODE_VERSION.minor < 17)) {
throw new Error('ANR detection requires Node 16.17.0 or later');
}

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

/**
* Starts a thread to detect App Not Responding (ANR) events
*
* ANR detection requires Node 16.17.0 or later
*/
// eslint-disable-next-line deprecation/deprecation
export const Anr = convertIntegrationFnToClass(INTEGRATION_NAME, anrIntegration);
Expand Down