mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Fix implicit glob detection when ancestor directory contains . (#47418)
This commit is contained in:
parent
ce18254c77
commit
a158b7ed7d
@ -3509,7 +3509,7 @@ namespace ts {
|
||||
? WatchDirectoryFlags.Recursive : WatchDirectoryFlags.None
|
||||
};
|
||||
}
|
||||
if (isImplicitGlob(spec)) {
|
||||
if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) {
|
||||
return {
|
||||
key: useCaseSensitiveFileNames ? spec : toFileNameLowerCase(spec),
|
||||
flags: WatchDirectoryFlags.Recursive
|
||||
|
||||
@ -412,5 +412,14 @@ namespace ts {
|
||||
Diagnostics.Compiler_option_0_requires_a_value_of_type_1.code,
|
||||
/*noLocation*/ true);
|
||||
});
|
||||
|
||||
it("parses wildcard directories even when parent directories have dots", () => {
|
||||
const parsed = parseConfigFileTextToJson("/foo.bar/tsconfig.json", JSON.stringify({
|
||||
include: ["src"]
|
||||
}));
|
||||
|
||||
const parsedCommand = parseJsonConfigFileContent(parsed.config, sys, "/foo.bar");
|
||||
assert.deepEqual(parsedCommand.wildcardDirectories, { "/foo.bar/src": WatchDirectoryFlags.Recursive });
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user