From 0fea219a6ace3d77150ed955ffbd614e7d1be6f0 Mon Sep 17 00:00:00 2001 From: Aleksandr Bogdanov Date: Wed, 20 Sep 2023 11:33:16 +0200 Subject: [PATCH 1/2] Avoid importing from '..' Import commands from their originating module, not from a re-export module. This is important for compatibility with import-in-the-middle and other import-altering code, otherwise this results in a partially-loaded module being passed into instrumentation code. --- src/classes/child.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/child.ts b/src/classes/child.ts index 14c8d478c0..ab770ea02f 100644 --- a/src/classes/child.ts +++ b/src/classes/child.ts @@ -1,7 +1,7 @@ import { ChildProcess, fork } from 'child_process'; import { Worker } from 'worker_threads'; import { AddressInfo, createServer } from 'net'; -import { ChildCommand, ParentCommand } from '../'; +import { ChildCommand, ParentCommand } from '../commands'; import { EventEmitter } from 'events'; /** From ee484b6600ccab8417dddbe84b3b3dad1082ba98 Mon Sep 17 00:00:00 2001 From: Aleksandr Bogdanov Date: Wed, 20 Sep 2023 15:33:49 +0200 Subject: [PATCH 2/2] Fix import --- src/classes/child.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/child.ts b/src/classes/child.ts index ab770ea02f..f0bed146a7 100644 --- a/src/classes/child.ts +++ b/src/classes/child.ts @@ -1,7 +1,7 @@ import { ChildProcess, fork } from 'child_process'; import { Worker } from 'worker_threads'; import { AddressInfo, createServer } from 'net'; -import { ChildCommand, ParentCommand } from '../commands'; +import { ChildCommand, ParentCommand } from '../interfaces'; import { EventEmitter } from 'events'; /**