@@ -1449,21 +1449,6 @@ declare const global: any;
14491449declare const __filename : string ;
14501450declare const __dirname : string ;
14511451
1452- export function getNodeMajorVersion ( ) : number | undefined {
1453- if ( typeof process === "undefined" ) {
1454- return undefined ;
1455- }
1456- const version : string = process . version ;
1457- if ( ! version ) {
1458- return undefined ;
1459- }
1460- const dot = version . indexOf ( "." ) ;
1461- if ( dot === - 1 ) {
1462- return undefined ;
1463- }
1464- return parseInt ( version . substring ( 1 , dot ) ) ;
1465- }
1466-
14671452// TODO: GH#18217 this is used as if it's certainly defined in many places.
14681453// eslint-disable-next-line prefer-const
14691454export let sys : System = ( ( ) => {
@@ -1493,8 +1478,6 @@ export let sys: System = (() => {
14931478 from ?( input : string , encoding ?: string ) : any ;
14941479 } = require ( "buffer" ) . Buffer ;
14951480
1496- const nodeVersion = getNodeMajorVersion ( ) ;
1497- const isNode4OrLater = nodeVersion ! >= 4 ;
14981481 const isLinuxOrMacOs = process . platform === "linux" || process . platform === "darwin" ;
14991482
15001483 const platform : string = _os . platform ( ) ;
@@ -1508,7 +1491,7 @@ export let sys: System = (() => {
15081491 // Note that if we ever emit as files like cjs/mjs, this check will be wrong.
15091492 const executingFilePath = __filename . endsWith ( "sys.js" ) ? _path . join ( _path . dirname ( __dirname ) , "__fake__.js" ) : __filename ;
15101493
1511- const fsSupportsRecursiveFsWatch = isNode4OrLater && ( process . platform === "win32" || process . platform === "darwin" ) ;
1494+ const fsSupportsRecursiveFsWatch = process . platform === "win32" || process . platform === "darwin" ;
15121495 const getCurrentDirectory = memoize ( ( ) => process . cwd ( ) ) ;
15131496 const { watchFile, watchDirectory } = createSystemWatchFunctions ( {
15141497 pollingWatchFileWorker : fsWatchFileWorker ,
0 commit comments