Promisify crashing node (or making it hang)

Version

v20.6.1

Platform

Linux xxx 6.2.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Mon Aug 14 13:42:26 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

Run this code:

import {promisify } from "node:util";


const asyncFunction = async () => 5;

await promisify(asyncFunction)();
console.log('This does not show');

How often does it reproduce? Is there a required condition?

Every time

What is the expected behavior? Why is that the expected behavior?

Anything but a silent crash... if it's not allowed throw an error, if you do accept async functions maybe promisify should be a noop since async functions already return promises...

I'm no node developer

What do you see instead?

Status code 0, process exits.

Additional information

This bug breaks packages like this: semantic-release/commit-analyzer#525