Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RefasterJS] Add support for correctly handling goog.require inside a…
… goog.module. - Attempts to detect whether a file should use const foo = goog.require or just goog.require. - If using short names, rewrite the template to use aliases as appropriate. - Fix sorting so the goog.require statements added by SuggestedFix are handled better. The sorting still isn't ideal (but there's the sort imports script + g4 fix). - Use originalName in place of name nodes when replacing (otherwise de-sugared code will be emitted). - To accomplish all this, modify the compiler to preserve goog.module sugar when running refasterjs. At least for the given refactorings, replacements on the sugared + de-sugared source code apply cleanly to the original source. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=160205920
- Loading branch information
Showing
18 changed files
with
466 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.