fix(ivy): escape all required characters in reexport aliases (#29194)

Previously, the compiler did not escape . or $, and this was causing issues
in google3. Now these characters are escaped.

PR Close #29194
This commit is contained in:
Alex Rickabaugh
2019-03-08 14:03:49 -08:00
committed by Kara Erickson
parent c37ec8b255
commit 3a6ba00286
2 changed files with 32 additions and 2 deletions

View File

@ -12,8 +12,8 @@ import * as ts from 'typescript';
import {FileToModuleHost, ReferenceEmitStrategy} from './emitter';
import {ImportMode, Reference} from './references';
// Escape anything that isn't alphanumeric, '/', '_', '.', or '$'.
const CHARS_TO_ESCAPE = /[^a-zA-Z0-9/_\.$]/g;
// Escape anything that isn't alphanumeric, '/' or '_'.
const CHARS_TO_ESCAPE = /[^a-zA-Z0-9/_]/g;
export class AliasGenerator {
constructor(private fileToModuleHost: FileToModuleHost) {}