mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-20 22:51:17 -05:00
Responding to PR feedback
This commit is contained in:
@@ -672,7 +672,7 @@ namespace ts {
|
||||
|
||||
// Skip over any minified JavaScript files (ending in ".min.js")
|
||||
// Skip over dotted files and folders as well
|
||||
const IgnoreFileNamePattern = /(\.min\.js$)|([\\/]\.[\w.])/;
|
||||
const ignoreFileNamePattern = /(\.min\.js$)|([\\/]\.[\w.])/;
|
||||
/**
|
||||
* Parse the contents of a config file (tsconfig.json).
|
||||
* @param json The contents of the config file to parse
|
||||
@@ -969,7 +969,7 @@ namespace ts {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (IgnoreFileNamePattern.test(file)) {
|
||||
if (ignoreFileNamePattern.test(file)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1055,8 +1055,8 @@ namespace ts {
|
||||
// Remove any subpaths under an existing recursively watched directory.
|
||||
for (const key in wildcardDirectories) {
|
||||
if (hasProperty(wildcardDirectories, key)) {
|
||||
for (const recursiveKey in recursiveKeys) {
|
||||
if (containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
|
||||
for (const recursiveKey of recursiveKeys) {
|
||||
if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames)) {
|
||||
delete wildcardDirectories[key];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1211,7 +1211,7 @@ namespace ts {
|
||||
export function isJsxOrTsxExtension(ext: string): boolean {
|
||||
return ext === ".jsx" || ext === ".tsx";
|
||||
}
|
||||
|
||||
|
||||
export function changeExtension<T extends string | Path>(path: T, newExtension: string): T {
|
||||
return <T>(removeFileExtension(path) + newExtension);
|
||||
}
|
||||
|
||||
@@ -381,7 +381,15 @@ namespace ts {
|
||||
continue;
|
||||
}
|
||||
const name = combinePaths(path, entry);
|
||||
const stat = _fs.statSync(name);
|
||||
|
||||
let stat: any;
|
||||
try {
|
||||
stat = _fs.statSync(name);
|
||||
}
|
||||
catch (e) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (stat.isFile()) {
|
||||
files.push(entry);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user