Skip to content

test: remove abort-controller shim dependency#4997

Open
trivikr wants to merge 2 commits intonodejs:mainfrom
trivikr:remove-npm-abort-controller
Open

test: remove abort-controller shim dependency#4997
trivikr wants to merge 2 commits intonodejs:mainfrom
trivikr:remove-npm-abort-controller

Conversation

@trivikr
Copy link
Copy Markdown
Member

@trivikr trivikr commented Apr 8, 2026

This relates to...

AbortController being stable in node v15.4.0: https://nodejs.org/api/globals.html#class-abortcontroller

Rationale

undici now requires Node.js >=22.19.0, so the abort-controller devDependency is no longer needed.
The test coverage can use the native AbortController directly.

Changes

  • remove abort-controller from devDependencies
  • update timeout tests to use the native global AbortController
  • simplify node tests to cover the native implementation only
  • align one timeout assertion with native abort behavior, which surfaces a DOMException reason

Features

N/A

Bug Fixes

N/A

Breaking Changes and Deprecations

N/A

Status

Signed-off-by: Kamat, Trivikram 16024985+trivikr@users.noreply.github.com

trivikr added 2 commits April 8, 2026 06:38
Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.93%. Comparing base (743aa89) to head (10f63c2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4997      +/-   ##
==========================================
+ Coverage   92.92%   92.93%   +0.01%     
==========================================
  Files         110      110              
  Lines       35729    35729              
==========================================
+ Hits        33201    33205       +4     
+ Misses       2528     2524       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@trivikr
Copy link
Copy Markdown
Member Author

trivikr commented Apr 8, 2026

Not sure why test/issue-3356.js is failing for node 22. It doesn't use AbortController.

It probably needs a retry, if maintainers think this change is useful.

Copy link
Copy Markdown
Member

@KhafraDev KhafraDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the point of the test is to support third party abortcontroller/abortsignal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants