Skip to content

Commit cb69c8a

Browse files
Update LKG
1 parent d97bb67 commit cb69c8a

7 files changed

+7
-96
lines changed

lib/tsc.js

+1-17
Original file line numberDiff line numberDiff line change
@@ -4915,20 +4915,6 @@ function patchWriteFileEnsuringDirectory(sys2) {
49154915
(path2) => sys2.directoryExists(path2)
49164916
);
49174917
}
4918-
function getNodeMajorVersion() {
4919-
if (typeof process === "undefined") {
4920-
return void 0;
4921-
}
4922-
const version2 = process.version;
4923-
if (!version2) {
4924-
return void 0;
4925-
}
4926-
const dot = version2.indexOf(".");
4927-
if (dot === -1) {
4928-
return void 0;
4929-
}
4930-
return parseInt(version2.substring(1, dot));
4931-
}
49324918
var sys = (() => {
49334919
const byteOrderMarkIndicator = "\uFEFF";
49344920
function getNodeSystem() {
@@ -4945,14 +4931,12 @@ var sys = (() => {
49454931
let activeSession;
49464932
let profilePath = "./profile.cpuprofile";
49474933
const Buffer2 = require("buffer").Buffer;
4948-
const nodeVersion = getNodeMajorVersion();
4949-
const isNode4OrLater = nodeVersion >= 4;
49504934
const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
49514935
const platform = _os.platform();
49524936
const useCaseSensitiveFileNames = isFileSystemCaseSensitive();
49534937
const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
49544938
const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;
4955-
const fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin");
4939+
const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin";
49564940
const getCurrentDirectory = memoize(() => process.cwd());
49574941
const { watchFile: watchFile2, watchDirectory } = createSystemWatchFunctions({
49584942
pollingWatchFileWorker: fsWatchFileWorker,

lib/tsserver.js

+3-23
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,6 @@ __export(server_exports, {
884884
getNodeForGeneratedName: () => getNodeForGeneratedName,
885885
getNodeId: () => getNodeId,
886886
getNodeKind: () => getNodeKind,
887-
getNodeMajorVersion: () => getNodeMajorVersion,
888887
getNodeModifiers: () => getNodeModifiers,
889888
getNodeModulePathParts: () => getNodeModulePathParts,
890889
getNonAssignedNameOfDeclaration: () => getNonAssignedNameOfDeclaration,
@@ -8356,20 +8355,6 @@ function patchWriteFileEnsuringDirectory(sys2) {
83568355
(path2) => sys2.directoryExists(path2)
83578356
);
83588357
}
8359-
function getNodeMajorVersion() {
8360-
if (typeof process === "undefined") {
8361-
return void 0;
8362-
}
8363-
const version2 = process.version;
8364-
if (!version2) {
8365-
return void 0;
8366-
}
8367-
const dot = version2.indexOf(".");
8368-
if (dot === -1) {
8369-
return void 0;
8370-
}
8371-
return parseInt(version2.substring(1, dot));
8372-
}
83738358
var sys = (() => {
83748359
const byteOrderMarkIndicator = "\uFEFF";
83758360
function getNodeSystem() {
@@ -8386,14 +8371,12 @@ var sys = (() => {
83868371
let activeSession;
83878372
let profilePath = "./profile.cpuprofile";
83888373
const Buffer2 = require("buffer").Buffer;
8389-
const nodeVersion = getNodeMajorVersion();
8390-
const isNode4OrLater = nodeVersion >= 4;
83918374
const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
83928375
const platform = _os.platform();
83938376
const useCaseSensitiveFileNames = isFileSystemCaseSensitive();
83948377
const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
83958378
const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;
8396-
const fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin");
8379+
const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin";
83978380
const getCurrentDirectory = memoize(() => process.cwd());
83988381
const { watchFile: watchFile2, watchDirectory } = createSystemWatchFunctions({
83998382
pollingWatchFileWorker: fsWatchFileWorker,
@@ -168595,7 +168578,6 @@ __export(ts_exports3, {
168595168578
getNodeForGeneratedName: () => getNodeForGeneratedName,
168596168579
getNodeId: () => getNodeId,
168597168580
getNodeKind: () => getNodeKind,
168598-
getNodeMajorVersion: () => getNodeMajorVersion,
168599168581
getNodeModifiers: () => getNodeModifiers,
168600168582
getNodeModulePathParts: () => getNodeModulePathParts,
168601168583
getNonAssignedNameOfDeclaration: () => getNonAssignedNameOfDeclaration,
@@ -181109,8 +181091,7 @@ function initializeNodeSystem() {
181109181091
}
181110181092
}
181111181093
const libDirectory = getDirectoryPath(normalizePath(sys2.getExecutingFilePath()));
181112-
const nodeVersion = getNodeMajorVersion();
181113-
const useWatchGuard = process.platform === "win32" && nodeVersion >= 4;
181094+
const useWatchGuard = process.platform === "win32";
181114181095
const originalWatchDirectory = sys2.watchDirectory.bind(sys2);
181115181096
const logger = createLogger();
181116181097
Debug.loggingHost = {
@@ -181665,7 +181646,7 @@ function start({ args, logger, cancellationToken, serverMode, unknownServerMode,
181665181646
logger.info(`Starting TS Server`);
181666181647
logger.info(`Version: ${version}`);
181667181648
logger.info(`Arguments: ${args.join(" ")}`);
181668-
logger.info(`Platform: ${platform} NodeVersion: ${getNodeMajorVersion()} CaseSensitive: ${sys.useCaseSensitiveFileNames}`);
181649+
logger.info(`Platform: ${platform} NodeVersion: ${process.version} CaseSensitive: ${sys.useCaseSensitiveFileNames}`);
181669181650
logger.info(`ServerMode: ${serverMode} hasUnknownServerMode: ${unknownServerMode}`);
181670181651
setStackTraceLimit();
181671181652
if (Debug.isDebugging) {
@@ -182544,7 +182525,6 @@ start(initializeNodeSystem(), require("os").platform());
182544182525
getNodeForGeneratedName,
182545182526
getNodeId,
182546182527
getNodeKind,
182547-
getNodeMajorVersion,
182548182528
getNodeModifiers,
182549182529
getNodeModulePathParts,
182550182530
getNonAssignedNameOfDeclaration,

lib/tsserverlibrary.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -8286,7 +8286,6 @@ declare namespace ts {
82868286
negative: boolean;
82878287
base10Value: string;
82888288
}
8289-
function getNodeMajorVersion(): number | undefined;
82908289
enum FileWatcherEventKind {
82918290
Created = 0,
82928291
Changed = 1,

lib/tsserverlibrary.js

+1-19
Original file line numberDiff line numberDiff line change
@@ -6137,20 +6137,6 @@ ${lanes.join("\n")}
61376137
(path2) => sys2.directoryExists(path2)
61386138
);
61396139
}
6140-
function getNodeMajorVersion() {
6141-
if (typeof process === "undefined") {
6142-
return void 0;
6143-
}
6144-
const version2 = process.version;
6145-
if (!version2) {
6146-
return void 0;
6147-
}
6148-
const dot = version2.indexOf(".");
6149-
if (dot === -1) {
6150-
return void 0;
6151-
}
6152-
return parseInt(version2.substring(1, dot));
6153-
}
61546140
function setSys(s) {
61556141
sys = s;
61566142
}
@@ -6198,14 +6184,12 @@ ${lanes.join("\n")}
61986184
let activeSession;
61996185
let profilePath = "./profile.cpuprofile";
62006186
const Buffer2 = require("buffer").Buffer;
6201-
const nodeVersion = getNodeMajorVersion();
6202-
const isNode4OrLater = nodeVersion >= 4;
62036187
const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
62046188
const platform = _os.platform();
62056189
const useCaseSensitiveFileNames = isFileSystemCaseSensitive();
62066190
const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
62076191
const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;
6208-
const fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin");
6192+
const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin";
62096193
const getCurrentDirectory = memoize(() => process.cwd());
62106194
const { watchFile: watchFile2, watchDirectory } = createSystemWatchFunctions({
62116195
pollingWatchFileWorker: fsWatchFileWorker,
@@ -179181,7 +179165,6 @@ ${e.message}`;
179181179165
getNodeForGeneratedName: () => getNodeForGeneratedName,
179182179166
getNodeId: () => getNodeId,
179183179167
getNodeKind: () => getNodeKind,
179184-
getNodeMajorVersion: () => getNodeMajorVersion,
179185179168
getNodeModifiers: () => getNodeModifiers,
179186179169
getNodeModulePathParts: () => getNodeModulePathParts,
179187179170
getNonAssignedNameOfDeclaration: () => getNonAssignedNameOfDeclaration,
@@ -181540,7 +181523,6 @@ ${e.message}`;
181540181523
getNodeForGeneratedName: () => getNodeForGeneratedName,
181541181524
getNodeId: () => getNodeId,
181542181525
getNodeKind: () => getNodeKind,
181543-
getNodeMajorVersion: () => getNodeMajorVersion,
181544181526
getNodeModifiers: () => getNodeModifiers,
181545181527
getNodeModulePathParts: () => getNodeModulePathParts,
181546181528
getNonAssignedNameOfDeclaration: () => getNonAssignedNameOfDeclaration,

lib/typescript.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -4311,7 +4311,6 @@ declare namespace ts {
43114311
negative: boolean;
43124312
base10Value: string;
43134313
}
4314-
function getNodeMajorVersion(): number | undefined;
43154314
enum FileWatcherEventKind {
43164315
Created = 0,
43174316
Changed = 1,

lib/typescript.js

+1-18
Original file line numberDiff line numberDiff line change
@@ -6137,20 +6137,6 @@ ${lanes.join("\n")}
61376137
(path2) => sys2.directoryExists(path2)
61386138
);
61396139
}
6140-
function getNodeMajorVersion() {
6141-
if (typeof process === "undefined") {
6142-
return void 0;
6143-
}
6144-
const version2 = process.version;
6145-
if (!version2) {
6146-
return void 0;
6147-
}
6148-
const dot = version2.indexOf(".");
6149-
if (dot === -1) {
6150-
return void 0;
6151-
}
6152-
return parseInt(version2.substring(1, dot));
6153-
}
61546140
function setSys(s) {
61556141
sys = s;
61566142
}
@@ -6198,14 +6184,12 @@ ${lanes.join("\n")}
61986184
let activeSession;
61996185
let profilePath = "./profile.cpuprofile";
62006186
const Buffer2 = require("buffer").Buffer;
6201-
const nodeVersion = getNodeMajorVersion();
6202-
const isNode4OrLater = nodeVersion >= 4;
62036187
const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
62046188
const platform = _os.platform();
62056189
const useCaseSensitiveFileNames = isFileSystemCaseSensitive();
62066190
const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
62076191
const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;
6208-
const fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin");
6192+
const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin";
62096193
const getCurrentDirectory = memoize(() => process.cwd());
62106194
const { watchFile: watchFile2, watchDirectory } = createSystemWatchFunctions({
62116195
pollingWatchFileWorker: fsWatchFileWorker,
@@ -168362,7 +168346,6 @@ ${options.prefix}` : "\n" : options.prefix
168362168346
getNodeForGeneratedName: () => getNodeForGeneratedName,
168363168347
getNodeId: () => getNodeId,
168364168348
getNodeKind: () => getNodeKind,
168365-
getNodeMajorVersion: () => getNodeMajorVersion,
168366168349
getNodeModifiers: () => getNodeModifiers,
168367168350
getNodeModulePathParts: () => getNodeModulePathParts,
168368168351
getNonAssignedNameOfDeclaration: () => getNonAssignedNameOfDeclaration,

lib/typingsInstaller.js

+1-17
Original file line numberDiff line numberDiff line change
@@ -4349,20 +4349,6 @@ function patchWriteFileEnsuringDirectory(sys2) {
43494349
(path3) => sys2.directoryExists(path3)
43504350
);
43514351
}
4352-
function getNodeMajorVersion() {
4353-
if (typeof process === "undefined") {
4354-
return void 0;
4355-
}
4356-
const version2 = process.version;
4357-
if (!version2) {
4358-
return void 0;
4359-
}
4360-
const dot = version2.indexOf(".");
4361-
if (dot === -1) {
4362-
return void 0;
4363-
}
4364-
return parseInt(version2.substring(1, dot));
4365-
}
43664352
var sys = (() => {
43674353
const byteOrderMarkIndicator = "\uFEFF";
43684354
function getNodeSystem() {
@@ -4379,14 +4365,12 @@ var sys = (() => {
43794365
let activeSession;
43804366
let profilePath = "./profile.cpuprofile";
43814367
const Buffer2 = require("buffer").Buffer;
4382-
const nodeVersion = getNodeMajorVersion();
4383-
const isNode4OrLater = nodeVersion >= 4;
43844368
const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
43854369
const platform = _os.platform();
43864370
const useCaseSensitiveFileNames = isFileSystemCaseSensitive();
43874371
const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
43884372
const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;
4389-
const fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin");
4373+
const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin";
43904374
const getCurrentDirectory = memoize(() => process.cwd());
43914375
const { watchFile, watchDirectory } = createSystemWatchFunctions({
43924376
pollingWatchFileWorker: fsWatchFileWorker,

0 commit comments

Comments
 (0)