Skip to content

fix(zone.js): should have better backward compatibilities#38797

Closed
JiaLiPassion wants to merge 1 commit intoangular:masterfrom
JiaLiPassion:zone-package-breaking
Closed

fix(zone.js): should have better backward compatibilities#38797
JiaLiPassion wants to merge 1 commit intoangular:masterfrom
JiaLiPassion:zone-package-breaking

Conversation

@JiaLiPassion
Copy link
Contributor

@JiaLiPassion JiaLiPassion commented Sep 10, 2020

Close #38561, #38669

zone.js 0.11.1 introduces a breaking change to adpat Angular package format,
and it breaks the module loading order, https://github.com/angular/angular/blob/master/packages/zone.js/dist/zone/package.json#L6

so the syntax

import 'zone.js/dist/zone';

before 0.11, in IE11, the zone.js es5
format bundle will be imported, but after 0.11, the fesm2015 format bundle will
be imported, which will cause error.

And since the only purpose of the dist folder of zone.js bundles is to keep backward
compatibility, in the original commit, I use package redirect to implement that, but
it is not fully backward compatible, we should keep the same dist structure as 0.10.3.

@pullapprove pullapprove bot requested a review from devversion September 10, 2020 18:33
@JiaLiPassion JiaLiPassion added area: zones Issues related to zone.js target: minor This PR is targeted for the next minor release labels Sep 10, 2020
@ngbot ngbot bot modified the milestone: needsTriage Sep 10, 2020
@mhevery mhevery added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Sep 10, 2020
@JiaLiPassion JiaLiPassion removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Sep 11, 2020
@JiaLiPassion JiaLiPassion changed the title fix(zone.js): should keep full backward compatibilities fix(zone.js): should have better backward compatibilities Sep 11, 2020
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JiaLiPassion JiaLiPassion force-pushed the zone-package-breaking branch 3 times, most recently from 39ca4a8 to 6d8ba9b Compare September 12, 2020 00:29
Close angular#38561, angular#38669

zone.js 0.11.1 introduces a breaking change to adpat Angular package format,
and it breaks the module loading order, before 0.11, in IE11, the `zone.js` es5
format bundle will be imported, but after 0.11, the `fesm2015` format bundle will
be imported, which causes error.

And since the only purpose of the `dist` folder of zone.js bundles is to keep backward
 compatibility, in the original commit, I use package redirect to implement that, but
it is not fully backward compatible, we should keep the same dist structure as `0.10.3`.
@mhevery mhevery added the action: merge The PR is ready for merge by the caretaker label Sep 15, 2020
@mhevery
Copy link
Contributor

mhevery commented Sep 15, 2020

presubmit

@mhevery mhevery closed this in a33d630 Sep 17, 2020
@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 Oct 18, 2020
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 area: zones Issues related to zone.js cla: yes target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zone.js can't patch XHR requests on IE11

4 participants