@@ -11,9 +11,6 @@ import { basename, delimiter, dirname, isAbsolute, normalize, resolve } from 'no
1111import { isMainThread } from 'node:worker_threads' ;
1212
1313import { isWindows } from './constants' ;
14- import { localize as localizationLocalize } from './localization' ;
15- import * as logger from './logger' ;
16- import { getOutputChannelLogger , note as loggerNote } from './logger' ;
1714import { ManualPromise } from './Utility/Async/manualPromise' ;
1815import { RemoteConnection } from './Utility/Remoting/snare' ;
1916import { is } from './Utility/System/guards' ;
@@ -30,10 +27,14 @@ import { is } from './Utility/System/guards';
3027let remoteConnection : RemoteConnection | undefined ;
3128
3229// In the main thread, grab the logger and localize functions directly.
33- const logFn = isMainThread ? logger . log : ( ) => { } ;
34- const noteFn = isMainThread ? loggerNote : ( ) => { } ;
35- const localizeFn = isMainThread ? localizationLocalize : ( info : { key : string ; comment : string [ ] } | string , message : string , ...args : ( string | number | boolean | undefined | null ) [ ] ) => message . replace ( / \{ ( \d + ) \} / g, ( _ , index ) => String ( args [ Number ( index ) ] ?? 'undefined' ) ) ;
36- const getOutputChannelLoggerFn = isMainThread ? getOutputChannelLogger : ( ) => undefined ;
30+ // eslint-disable-next-line @typescript-eslint/no-var-requires
31+ const logFn = isMainThread ? require ( './logger' ) . log : ( ) => { } ;
32+ // eslint-disable-next-line @typescript-eslint/no-var-requires
33+ const noteFn = isMainThread ? require ( './logger' ) . note : ( ) => { } ;
34+ // eslint-disable-next-line @typescript-eslint/no-var-requires
35+ const localizeFn = isMainThread ? require ( './localization' ) . localize : ( info : { key : string ; comment : string [ ] } | string , message : string , ...args : ( string | number | boolean | undefined | null ) [ ] ) => message . replace ( / \{ ( \d + ) \} / g, ( _ , index ) => String ( args [ Number ( index ) ] ?? 'undefined' ) ) ;
36+ // eslint-disable-next-line @typescript-eslint/no-var-requires
37+ const getOutputChannelLoggerFn = isMainThread ? require ( './logger' ) . getOutputChannelLogger : ( ) => undefined ;
3738
3839/**
3940 * Used when this is imported in a module running in a worker thread.
0 commit comments