1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-21 23:04:45 -05:00

fix(ext/node): remove unimplemented promiseHook stubs (#25979)

`temporalio` sdk [will try to
use](faa64225a7/packages/worker/src/workflow/vm-shared.ts (L199-L202))
promiseHook if it is found. This patch removes the unimplemented stubs.

```ts
    if (promiseHooks) {
      // Node >=16.14 only
      this.stopPromiseHook = promiseHooks.createHook({
        init: (promise: Promise<unknown>, parent: Promise<unknown>) => {
```

Fixes https://github.com/denoland/deno/issues/25977
This commit is contained in:
Divy Srivastava 2024-10-02 12:52:05 +05:30 committed by GitHub
parent 3881b71734
commit 620e6b43a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -313,20 +313,6 @@ export class DefaultDeserializer extends Deserializer {
);
}
}
export const promiseHooks = {
onInit() {
notImplemented("v8.promiseHooks.onInit");
},
onSettled() {
notImplemented("v8.promiseHooks.onSetttled");
},
onBefore() {
notImplemented("v8.promiseHooks.onBefore");
},
createHook() {
notImplemented("v8.promiseHooks.createHook");
},
};
export default {
cachedDataVersionTag,
getHeapCodeStatistics,
@ -343,5 +329,4 @@ export default {
Deserializer,
DefaultSerializer,
DefaultDeserializer,
promiseHooks,
};