@@ -1449,21 +1449,6 @@ declare const global: any;
1449
1449
declare const __filename : string ;
1450
1450
declare const __dirname : string ;
1451
1451
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
-
1467
1452
// TODO: GH#18217 this is used as if it's certainly defined in many places.
1468
1453
// eslint-disable-next-line prefer-const
1469
1454
export let sys : System = ( ( ) => {
@@ -1493,8 +1478,6 @@ export let sys: System = (() => {
1493
1478
from ?( input : string , encoding ?: string ) : any ;
1494
1479
} = require ( "buffer" ) . Buffer ;
1495
1480
1496
- const nodeVersion = getNodeMajorVersion ( ) ;
1497
- const isNode4OrLater = nodeVersion ! >= 4 ;
1498
1481
const isLinuxOrMacOs = process . platform === "linux" || process . platform === "darwin" ;
1499
1482
1500
1483
const platform : string = _os . platform ( ) ;
@@ -1508,7 +1491,7 @@ export let sys: System = (() => {
1508
1491
// Note that if we ever emit as files like cjs/mjs, this check will be wrong.
1509
1492
const executingFilePath = __filename . endsWith ( "sys.js" ) ? _path . join ( _path . dirname ( __dirname ) , "__fake__.js" ) : __filename ;
1510
1493
1511
- const fsSupportsRecursiveFsWatch = isNode4OrLater && ( process . platform === "win32" || process . platform === "darwin" ) ;
1494
+ const fsSupportsRecursiveFsWatch = process . platform === "win32" || process . platform === "darwin" ;
1512
1495
const getCurrentDirectory = memoize ( ( ) => process . cwd ( ) ) ;
1513
1496
const { watchFile, watchDirectory } = createSystemWatchFunctions ( {
1514
1497
pollingWatchFileWorker : fsWatchFileWorker ,
0 commit comments