Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ngcc): do not add trailing commas in UMD imports #34545

Closed
wants to merge 2 commits into from

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Dec 23, 2019

Previously, if UmdRenderingFormatter#addImports() was called with an empty list of imports to add (i.e. no new imports were needed), it would add trailing commas in several locations (arrays, function arguments, function parameters), thus making the code imcompatible with legacy browsers such as IE11.

This commit fixes it by ensuring that no trailing commas are added if addImports() is called with an empty list of imports.
This is a follow-up to #34353.

Fixes #34525.

Previously, if `UmdRenderingFormatter#addImports()` was called with an
empty list of imports to add (i.e. no new imports were needed), it would
add trailing commas in several locations (arrays, function arguments,
function parameters), thus making the code imcompatible with legacy
browsers such as IE11.

This commit fixes it by ensuring that no trailing commas are added if
`addImports()` is called with an empty list of imports.
This is a follow-up to angular#34353.

Fixes angular#34525
@gkalpak gkalpak added comp: ngcc state: WIP target: patch This PR is targeted for the next patch release type: bug/fix labels Dec 23, 2019
@ngbot ngbot bot modified the milestone: needsTriage Dec 23, 2019
@mary-poppins
Copy link

You can preview 0e6f183 at https://pr34545-0e6f183.ngbuilds.io/.

@gkalpak gkalpak added action: merge The PR is ready for merge by the caretaker and removed state: WIP labels Dec 23, 2019
@gkalpak gkalpak marked this pull request as ready for review December 23, 2019 15:56
@gkalpak gkalpak requested review from a team as code owners December 23, 2019 15:56
@mary-poppins
Copy link

You can preview c20cc4f at https://pr34545-c20cc4f.ngbuilds.io/.

alxhub pushed a commit that referenced this pull request Jan 7, 2020
Previously, if `UmdRenderingFormatter#addImports()` was called with an
empty list of imports to add (i.e. no new imports were needed), it would
add trailing commas in several locations (arrays, function arguments,
function parameters), thus making the code imcompatible with legacy
browsers such as IE11.

This commit fixes it by ensuring that no trailing commas are added if
`addImports()` is called with an empty list of imports.
This is a follow-up to #34353.

Fixes #34525

PR Close #34545
@alxhub alxhub closed this in 10e2935 Jan 7, 2020
@gkalpak gkalpak deleted the fix-ngcc-umd-no-imports branch January 8, 2020 10:57
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 8, 2020
@pullapprove pullapprove bot requested a review from IgorMinar February 8, 2020 16:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes target: patch This PR is targeted for the next patch release type: bug/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ngcc: processed umd bundles fail with syntax errors in IE11
4 participants