Closed zermelo-wisen closed 1 month ago
Actually my first attempt was to make the Proxy trap for emit asynchronous and use fs.promisses version of readFile instead. But I "felt" it won't be correct even if I wasn't able to find an evidence.
Actually my first attempt was to make the Proxy trap for emit asynchronous and use fs.promisses version of readFile instead. But I "felt" it won't be correct even if I wasn't able to find an evidence.
Not sure what you mean with proxy trap, but here's roughly what I have in mind:
if (recording.finish()) {
res.writeHead(200);
const { path } = recording;
void (async () => {
res.end(await readFile(path));
await rm(path);
reset();
})();
} else {
res.writeHead(200).end("{}");
reset();
}
:tada: This PR is included in version 2.23.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Fixes #70