Skip to content

[fix] Use promise-based stream.promises.pipeline in DownloadUtil - #6236

Merged
vrubezhny merged 1 commit into
redhat-developer:mainfrom
vrubezhny:fix/download-util-promisify-deprecation
Oct 30, 2026
Merged

vrubezhny merged 1 commit into
redhat-developer:mainfrom
vrubezhny:fix/download-util-promisify-deprecation

Conversation

@vrubezhny

Copy link
Copy Markdown
Contributor
  • Replace promisify(stream.pipeline) with stream.promises.pipeline(): stream.pipeline already returns a Promise when called without a callback (Node.js >= 15), so wrapping it with promisify() triggered the DEP0174 deprecation warning ("Calling promisify on a function that returns a Promise is likely a mistake") whenever a file was downloaded
  • Update the DownloadUtil unit test mock to the promise-based pipeline shape

Assisted-By: OpenCode: GLM 5.3

- Replace promisify(stream.pipeline) with stream.promises.pipeline():
  stream.pipeline already returns a Promise when called without a
  callback (Node.js >= 15), so wrapping it with promisify() triggered
  the DEP0174 deprecation warning ("Calling promisify on a function
  that returns a Promise is likely a mistake") whenever a file was
  downloaded
- Update the DownloadUtil unit test mock to the promise-based
  pipeline shape

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
Assisted-By: OpenCode: GLM 5.3
@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.70%. Comparing base (d516eb4) to head (05afd17).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6236      +/-   ##
==========================================
- Coverage   53.71%   53.70%   -0.01%     
==========================================
  Files         131      131              
  Lines       12007    12006       -1     
  Branches     2699     2718      +19     
==========================================
- Hits         6449     6448       -1     
  Misses       5552     5552              
  Partials        6        6              

☔ View full report in Codecov by Harness.
📢 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.

@vrubezhny
vrubezhny merged commit 89b2e45 into redhat-developer:main Oct 30, 2026
6 checks passed
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.

1 participant