Merge pull request #27035 from Microsoft/fixTypesVersionTests

Sanitize module resolution logs for typesVersions entries
This commit is contained in:
Ron Buckton authored and GitHub committed 2018-09-11 14:45:39 -07:00
commit f2a1a428ea
3 files changed
+25 -1

No files matched your search

+9
View File
@@ -7671,6 +7671,15 @@ namespace ts {
// It may be inefficient (we could just match (/[-[\]{}()*+?.,\\^$|#\s]/g), but this is future
// proof.
const reservedCharacterPattern = /[^\w\s\/]/g;
export function regExpEscape(text: string) {
return text.replace(reservedCharacterPattern, escapeRegExpCharacter);
}
function escapeRegExpCharacter(match: string) {
return "\\" + match;
}
const wildcardCharCodes = [CharacterCodes.asterisk, CharacterCodes.question];
export function hasExtension(fileName: string): boolean {