-
Notifications
You must be signed in to change notification settings - Fork 3.4k
node:util
fixes
#19439
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
node:util
fixes
#19439
Conversation
Updated 7:23 PM PT - May 5th, 2025
❌ @dylan-conway, your commit 14bf1db has 1 failures in
🧪 To try this PR locally: bunx bun-pr 19439 That installs a local version of the PR into your bun-19439 --bun |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses issues related to function naming in node:util and adds a warning when promisifying functions that already return a Promise. Key changes include updates to the tests for util.promisify and util/types, modifications to timer promise functions in timers.promises.ts, and improvements to the internal promisify implementation.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
test/js/node/test/parallel/test-util-types-exists.js | Added tests ensuring util.types export consistency. |
test/js/node/test/parallel/test-util-promisify.js | Added tests for promisify behavior and warning emission; minor naming issue noted. |
test/js/node/test/parallel/test-util-promisify-custom-names.mjs | Validated correct function naming in custom promisification. |
src/js/node/timers.promises.ts | Refactored timer promise functions to use globalThis functions. |
src/js/node/readline.ts | Updated custom promisify assignment block style. |
src/js/node/fs.ts | Refactored exists[Symbol.for("nodejs.util.promisify.custom")]. |
src/js/internal/promisify.ts | Introduced validateFunction and improved warning emission. |
Comments suppressed due to low confidence (1)
test/js/node/test/parallel/test-util-promisify.js:53
- The function name 'promisifedFn' appears to be misspelled; consider renaming it to 'promisifiedFn' for consistency with other parts of the code.
function promisifedFn() {}
What does this PR do?
Fixes function names with 2 suffix, and adds warning for promisify in put already returning a promise.
Passes:
How did you verify your code works?