File tree Expand file tree Collapse file tree 9 files changed +39
-15
lines changed
Expand file tree Collapse file tree 9 files changed +39
-15
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ var ts;
132132})(ts || (ts = {}));
133133var ts;
134134(function (ts) {
135- ts.version = "2.1.5 ";
135+ ts.version = "2.1.6 ";
136136})(ts || (ts = {}));
137137(function (ts) {
138138 var createObject = Object.create;
@@ -2256,7 +2256,7 @@ var ts;
22562256 },
22572257 watchDirectory: function (directoryName, callback, recursive) {
22582258 var options;
2259- if (!directoryExists(directoryName)) {
2259+ if (!directoryExists(directoryName) || (isUNCPath(directoryName) && process.platform === "win32") ) {
22602260 return noOpFileWatcher;
22612261 }
22622262 if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) {
@@ -2271,6 +2271,9 @@ var ts;
22712271 }
22722272 ;
22732273 });
2274+ function isUNCPath(s) {
2275+ return s.length > 2 && s.charCodeAt(0) === 47 && s.charCodeAt(1) === 47;
2276+ }
22742277 },
22752278 resolvePath: function (path) {
22762279 return _path.resolve(path);
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ var ts;
137137})(ts || (ts = {}));
138138var ts;
139139(function (ts) {
140- ts.version = "2.1.5 ";
140+ ts.version = "2.1.6 ";
141141})(ts || (ts = {}));
142142(function (ts) {
143143 var createObject = Object.create;
@@ -2261,7 +2261,7 @@ var ts;
22612261 },
22622262 watchDirectory: function (directoryName, callback, recursive) {
22632263 var options;
2264- if (!directoryExists(directoryName)) {
2264+ if (!directoryExists(directoryName) || (isUNCPath(directoryName) && process.platform === "win32") ) {
22652265 return noOpFileWatcher;
22662266 }
22672267 if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) {
@@ -2276,6 +2276,9 @@ var ts;
22762276 }
22772277 ;
22782278 });
2279+ function isUNCPath(s) {
2280+ return s.length > 2 && s.charCodeAt(0) === 47 && s.charCodeAt(1) === 47;
2281+ }
22792282 },
22802283 resolvePath: function (path) {
22812284 return _path.resolve(path);
Original file line number Diff line number Diff line change @@ -3584,7 +3584,7 @@ declare namespace ts.performance {
35843584 function disable(): void;
35853585}
35863586declare namespace ts {
3587- const version = "2.1.5 ";
3587+ const version = "2.1.6 ";
35883588}
35893589declare namespace ts {
35903590 const enum Ternary {
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ var ts;
137137})(ts || (ts = {}));
138138var ts;
139139(function (ts) {
140- ts.version = "2.1.5 ";
140+ ts.version = "2.1.6 ";
141141})(ts || (ts = {}));
142142(function (ts) {
143143 var createObject = Object.create;
@@ -2261,7 +2261,7 @@ var ts;
22612261 },
22622262 watchDirectory: function (directoryName, callback, recursive) {
22632263 var options;
2264- if (!directoryExists(directoryName)) {
2264+ if (!directoryExists(directoryName) || (isUNCPath(directoryName) && process.platform === "win32") ) {
22652265 return noOpFileWatcher;
22662266 }
22672267 if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) {
@@ -2276,6 +2276,9 @@ var ts;
22762276 }
22772277 ;
22782278 });
2279+ function isUNCPath(s) {
2280+ return s.length > 2 && s.charCodeAt(0) === 47 && s.charCodeAt(1) === 47;
2281+ }
22792282 },
22802283 resolvePath: function (path) {
22812284 return _path.resolve(path);
Original file line number Diff line number Diff line change @@ -2148,7 +2148,7 @@ declare namespace ts {
21482148}
21492149declare namespace ts {
21502150 /** The version of the TypeScript compiler release */
2151- const version = "2.1.5 " ;
2151+ const version = "2.1.6 " ;
21522152}
21532153declare namespace ts {
21542154 type FileWatcherCallback = ( fileName : string , removed ?: boolean ) => void ;
Original file line number Diff line number Diff line change @@ -1186,7 +1186,7 @@ var ts;
11861186var ts;
11871187(function (ts) {
11881188 /** The version of the TypeScript compiler release */
1189- ts.version = "2.1.5 ";
1189+ ts.version = "2.1.6 ";
11901190})(ts || (ts = {}));
11911191/* @internal */
11921192(function (ts) {
@@ -3688,7 +3688,10 @@ var ts;
36883688 // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows
36893689 // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643)
36903690 var options;
3691- if (!directoryExists(directoryName)) {
3691+ if (!directoryExists(directoryName) || (isUNCPath(directoryName) && process.platform === "win32")) {
3692+ // do nothing if either
3693+ // - target folder does not exist
3694+ // - this is UNC path on Windows (https://github.com/Microsoft/TypeScript/issues/13874)
36923695 return noOpFileWatcher;
36933696 }
36943697 if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) {
@@ -3707,6 +3710,9 @@ var ts;
37073710 }
37083711 ;
37093712 });
3713+ function isUNCPath(s) {
3714+ return s.length > 2 && s.charCodeAt(0) === 47 /* slash */ && s.charCodeAt(1) === 47 /* slash */;
3715+ }
37103716 },
37113717 resolvePath: function (path) {
37123718 return _path.resolve(path);
Original file line number Diff line number Diff line change @@ -2148,7 +2148,7 @@ declare namespace ts {
21482148}
21492149declare namespace ts {
21502150 /** The version of the TypeScript compiler release */
2151- const version = "2.1.5 " ;
2151+ const version = "2.1.6 " ;
21522152}
21532153declare namespace ts {
21542154 type FileWatcherCallback = ( fileName : string , removed ?: boolean ) => void ;
Original file line number Diff line number Diff line change @@ -1186,7 +1186,7 @@ var ts;
11861186var ts;
11871187(function (ts) {
11881188 /** The version of the TypeScript compiler release */
1189- ts.version = "2.1.5 ";
1189+ ts.version = "2.1.6 ";
11901190})(ts || (ts = {}));
11911191/* @internal */
11921192(function (ts) {
@@ -3688,7 +3688,10 @@ var ts;
36883688 // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows
36893689 // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643)
36903690 var options;
3691- if (!directoryExists(directoryName)) {
3691+ if (!directoryExists(directoryName) || (isUNCPath(directoryName) && process.platform === "win32")) {
3692+ // do nothing if either
3693+ // - target folder does not exist
3694+ // - this is UNC path on Windows (https://github.com/Microsoft/TypeScript/issues/13874)
36923695 return noOpFileWatcher;
36933696 }
36943697 if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) {
@@ -3707,6 +3710,9 @@ var ts;
37073710 }
37083711 ;
37093712 });
3713+ function isUNCPath(s) {
3714+ return s.length > 2 && s.charCodeAt(0) === 47 /* slash */ && s.charCodeAt(1) === 47 /* slash */;
3715+ }
37103716 },
37113717 resolvePath: function (path) {
37123718 return _path.resolve(path);
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ var ts;
137137})(ts || (ts = {}));
138138var ts;
139139(function (ts) {
140- ts.version = "2.1.5 ";
140+ ts.version = "2.1.6 ";
141141})(ts || (ts = {}));
142142(function (ts) {
143143 var createObject = Object.create;
@@ -2261,7 +2261,7 @@ var ts;
22612261 },
22622262 watchDirectory: function (directoryName, callback, recursive) {
22632263 var options;
2264- if (!directoryExists(directoryName)) {
2264+ if (!directoryExists(directoryName) || (isUNCPath(directoryName) && process.platform === "win32") ) {
22652265 return noOpFileWatcher;
22662266 }
22672267 if (isNode4OrLater() && (process.platform === "win32" || process.platform === "darwin")) {
@@ -2276,6 +2276,9 @@ var ts;
22762276 }
22772277 ;
22782278 });
2279+ function isUNCPath(s) {
2280+ return s.length > 2 && s.charCodeAt(0) === 47 && s.charCodeAt(1) === 47;
2281+ }
22792282 },
22802283 resolvePath: function (path) {
22812284 return _path.resolve(path);
You can’t perform that action at this time.
0 commit comments