From 064a997387a5aa251898273b1b15ffc418e8135c Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Tue, 7 Feb 2017 17:12:05 -0800 Subject: [PATCH] Update LKG --- lib/tsc.js | 7 +++++-- lib/tsserver.js | 7 +++++-- lib/tsserverlibrary.d.ts | 2 +- lib/tsserverlibrary.js | 7 +++++-- lib/typescript.d.ts | 2 +- lib/typescript.js | 10 ++++++++-- lib/typescriptServices.d.ts | 2 +- lib/typescriptServices.js | 10 ++++++++-- lib/typingsInstaller.js | 7 +++++-- 9 files changed, 39 insertions(+), 15 deletions(-) diff --git a/lib/tsc.js b/lib/tsc.js index dfe001b2708ff..5146a0c155281 100644 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -132,7 +132,7 @@ var ts; })(ts || (ts = {})); var ts; (function (ts) { - ts.version = "2.1.5"; + ts.version = "2.1.6"; })(ts || (ts = {})); (function (ts) { var createObject = Object.create; @@ -2256,7 +2256,7 @@ var ts; }, watchDirectory: function (directoryName, callback, recursive) { var options; - if (!directoryExists(directoryName)) { + if (!directoryExists(directoryName) || (isUNCPath(directoryName) && process.platform === "win32")) { return noOpFileWatcher; } if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) { @@ -2271,6 +2271,9 @@ var ts; } ; }); + function isUNCPath(s) { + return s.length > 2 && s.charCodeAt(0) === 47 && s.charCodeAt(1) === 47; + } }, resolvePath: function (path) { return _path.resolve(path); diff --git a/lib/tsserver.js b/lib/tsserver.js index dc8c627dd3ee3..be80ac4de0ff8 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -137,7 +137,7 @@ var ts; })(ts || (ts = {})); var ts; (function (ts) { - ts.version = "2.1.5"; + ts.version = "2.1.6"; })(ts || (ts = {})); (function (ts) { var createObject = Object.create; @@ -2261,7 +2261,7 @@ var ts; }, watchDirectory: function (directoryName, callback, recursive) { var options; - if (!directoryExists(directoryName)) { + if (!directoryExists(directoryName) || (isUNCPath(directoryName) && process.platform === "win32")) { return noOpFileWatcher; } if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) { @@ -2276,6 +2276,9 @@ var ts; } ; }); + function isUNCPath(s) { + return s.length > 2 && s.charCodeAt(0) === 47 && s.charCodeAt(1) === 47; + } }, resolvePath: function (path) { return _path.resolve(path); diff --git a/lib/tsserverlibrary.d.ts b/lib/tsserverlibrary.d.ts index 3b0cfc13e1116..e155a24015c1b 100644 --- a/lib/tsserverlibrary.d.ts +++ b/lib/tsserverlibrary.d.ts @@ -3584,7 +3584,7 @@ declare namespace ts.performance { function disable(): void; } declare namespace ts { - const version = "2.1.5"; + const version = "2.1.6"; } declare namespace ts { const enum Ternary { diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js index 7d565bf28ca80..0c15abbcf800a 100644 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -137,7 +137,7 @@ var ts; })(ts || (ts = {})); var ts; (function (ts) { - ts.version = "2.1.5"; + ts.version = "2.1.6"; })(ts || (ts = {})); (function (ts) { var createObject = Object.create; @@ -2261,7 +2261,7 @@ var ts; }, watchDirectory: function (directoryName, callback, recursive) { var options; - if (!directoryExists(directoryName)) { + if (!directoryExists(directoryName) || (isUNCPath(directoryName) && process.platform === "win32")) { return noOpFileWatcher; } if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) { @@ -2276,6 +2276,9 @@ var ts; } ; }); + function isUNCPath(s) { + return s.length > 2 && s.charCodeAt(0) === 47 && s.charCodeAt(1) === 47; + } }, resolvePath: function (path) { return _path.resolve(path); diff --git a/lib/typescript.d.ts b/lib/typescript.d.ts index 5f4a69655489c..c6f3587a48cda 100644 --- a/lib/typescript.d.ts +++ b/lib/typescript.d.ts @@ -2148,7 +2148,7 @@ declare namespace ts { } declare namespace ts { /** The version of the TypeScript compiler release */ - const version = "2.1.5"; + const version = "2.1.6"; } declare namespace ts { type FileWatcherCallback = (fileName: string, removed?: boolean) => void; diff --git a/lib/typescript.js b/lib/typescript.js index 97804421ccaf1..6f78768e72c75 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -1186,7 +1186,7 @@ var ts; var ts; (function (ts) { /** The version of the TypeScript compiler release */ - ts.version = "2.1.5"; + ts.version = "2.1.6"; })(ts || (ts = {})); /* @internal */ (function (ts) { @@ -3688,7 +3688,10 @@ var ts; // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) var options; - if (!directoryExists(directoryName)) { + if (!directoryExists(directoryName) || (isUNCPath(directoryName) && process.platform === "win32")) { + // do nothing if either + // - target folder does not exist + // - this is UNC path on Windows (https://github.com/Microsoft/TypeScript/issues/13874) return noOpFileWatcher; } if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) { @@ -3707,6 +3710,9 @@ var ts; } ; }); + function isUNCPath(s) { + return s.length > 2 && s.charCodeAt(0) === 47 /* slash */ && s.charCodeAt(1) === 47 /* slash */; + } }, resolvePath: function (path) { return _path.resolve(path); diff --git a/lib/typescriptServices.d.ts b/lib/typescriptServices.d.ts index 90f148a7958b9..2a9648de852c3 100644 --- a/lib/typescriptServices.d.ts +++ b/lib/typescriptServices.d.ts @@ -2148,7 +2148,7 @@ declare namespace ts { } declare namespace ts { /** The version of the TypeScript compiler release */ - const version = "2.1.5"; + const version = "2.1.6"; } declare namespace ts { type FileWatcherCallback = (fileName: string, removed?: boolean) => void; diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index 97804421ccaf1..6f78768e72c75 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -1186,7 +1186,7 @@ var ts; var ts; (function (ts) { /** The version of the TypeScript compiler release */ - ts.version = "2.1.5"; + ts.version = "2.1.6"; })(ts || (ts = {})); /* @internal */ (function (ts) { @@ -3688,7 +3688,10 @@ var ts; // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) var options; - if (!directoryExists(directoryName)) { + if (!directoryExists(directoryName) || (isUNCPath(directoryName) && process.platform === "win32")) { + // do nothing if either + // - target folder does not exist + // - this is UNC path on Windows (https://github.com/Microsoft/TypeScript/issues/13874) return noOpFileWatcher; } if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) { @@ -3707,6 +3710,9 @@ var ts; } ; }); + function isUNCPath(s) { + return s.length > 2 && s.charCodeAt(0) === 47 /* slash */ && s.charCodeAt(1) === 47 /* slash */; + } }, resolvePath: function (path) { return _path.resolve(path); diff --git a/lib/typingsInstaller.js b/lib/typingsInstaller.js index 9545bf0bb21d0..0f6cec6adc147 100644 --- a/lib/typingsInstaller.js +++ b/lib/typingsInstaller.js @@ -137,7 +137,7 @@ var ts; })(ts || (ts = {})); var ts; (function (ts) { - ts.version = "2.1.5"; + ts.version = "2.1.6"; })(ts || (ts = {})); (function (ts) { var createObject = Object.create; @@ -2261,7 +2261,7 @@ var ts; }, watchDirectory: function (directoryName, callback, recursive) { var options; - if (!directoryExists(directoryName)) { + if (!directoryExists(directoryName) || (isUNCPath(directoryName) && process.platform === "win32")) { return noOpFileWatcher; } if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) { @@ -2276,6 +2276,9 @@ var ts; } ; }); + function isUNCPath(s) { + return s.length > 2 && s.charCodeAt(0) === 47 && s.charCodeAt(1) === 47; + } }, resolvePath: function (path) { return _path.resolve(path);