@@ -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.
14681453export let sys : System = ( ( ) => {
14691454 // NodeJS detects "\uFEFF" at the start of the string and *replaces* it with the actual
@@ -1492,8 +1477,6 @@ export let sys: System = (() => {
14921477 from ?( input : string , encoding ?: string ) : any ;
14931478 } = require ( "buffer" ) . Buffer ;
14941479
1495- const nodeVersion = getNodeMajorVersion ( ) ;
1496- const isNode4OrLater = nodeVersion ! >= 4 ;
14971480 const isLinuxOrMacOs = process . platform === "linux" || process . platform === "darwin" ;
14981481
14991482 const platform : string = _os . platform ( ) ;
@@ -1507,7 +1490,7 @@ export let sys: System = (() => {
15071490 // Note that if we ever emit as files like cjs/mjs, this check will be wrong.
15081491 const executingFilePath = __filename . endsWith ( "sys.js" ) ? _path . join ( _path . dirname ( __dirname ) , "__fake__.js" ) : __filename ;
15091492
1510- const fsSupportsRecursiveFsWatch = isNode4OrLater && ( process . platform === "win32" || process . platform === "darwin" ) ;
1493+ const fsSupportsRecursiveFsWatch = process . platform === "win32" || process . platform === "darwin" ;
15111494 const getCurrentDirectory = memoize ( ( ) => process . cwd ( ) ) ;
15121495 const { watchFile, watchDirectory } = createSystemWatchFunctions ( {
15131496 pollingWatchFileWorker : fsWatchFileWorker ,
0 commit comments