Skip to content

Commit

Permalink
fix(ext/node): remove unimplemented promiseHook stubs (#25979)
Browse files Browse the repository at this point in the history
`temporalio` sdk [will try to
use](https://github.com/temporalio/sdk-typescript/blob/faa64225a7f57154931a38c1fe612fc6520943b2/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 #25977
  • Loading branch information
littledivy authored Oct 2, 2024
1 parent 3881b71 commit 620e6b4
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions ext/node/polyfills/v8.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -343,5 +329,4 @@ export default {
Deserializer,
DefaultSerializer,
DefaultDeserializer,
promiseHooks,
};

0 comments on commit 620e6b4

Please sign in to comment.