11// Copyright (c) Microsoft Corporation.
22// Licensed under the MIT License.
33
4- import type { Kernel , KernelMessage , ServerConnection , Session } from '@jupyterlab/services' ;
4+ import { type Kernel , type KernelMessage , ServerConnection , type Session } from '@jupyterlab/services' ;
55import { Signal } from '@lumino/signaling' ;
6- import { createRequire } from 'module' ;
76
87import { logger } from '../../../platform/logging' ;
98import { Resource } from '../../../platform/common/types' ;
@@ -18,8 +17,6 @@ import { trackKernelResourceInformation } from '../../telemetry/helper';
1817import { RawKernelConnection } from './rawKernelConnection.node' ;
1918import { generateUuid } from '../../../platform/common/uuid' ;
2019
21- const require = createRequire ( import . meta. url ) ;
22-
2320/*
2421RawSession class implements a jupyterlab ISession object
2522This provides enough of the ISession interface so that our direct
@@ -49,8 +46,7 @@ export class RawSessionConnection implements Session.ISessionConnection {
4946 }
5047 get serverSettings ( ) : ServerConnection . ISettings {
5148 // We do not expect anyone to use this. Hence return a setting thats now expected to work, but at least compiles.
52- const jupyterLab = require ( '@jupyterlab/services' ) as typeof import ( '@jupyterlab/services' ) ; // NOSONAR
53- return jupyterLab . ServerConnection . makeSettings ( {
49+ return ServerConnection . makeSettings ( {
5450 wsUrl : 'RAW'
5551 } ) ;
5652 }
0 commit comments