-
Notifications
You must be signed in to change notification settings - Fork 27k
fix(upgrade): make ngUpgrade work with testability API #7603
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
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
|
I signed it! |
|
CLAs look good, thanks! |
|
I've signed it before but you can have me resign any time you want @googlebot 😉 |
171889a to
2d12af4
Compare
|
cc @juliemr & whoever owns ngUpgrade |
`upgrade.js` taken from angular/angular#7603
modules/angular2/src/facade/lang.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably add a comment that this will only be available if it's using ngUpgrade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
afb1c45 to
f637e6e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not add resumeBooystrap in the type above ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's there. clang just put it on the same line as version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow ! Did clang-format really do that ?
That's pretty unexpected !
(But then again you can't argue with clang-format.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, I didn't put it on that line, so I think it must have been clang
|
@mhevery ping |
modules/angular2/src/facade/lang.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we keep angular1 in ngUpgrade only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could probably do some casting to access the angular object without expanding the interface
|
LGTM, except for the small nit-pick of keeping this to |
f637e6e to
768871a
Compare
|
Having a lot of trouble rebasing this, hopefully I'll get it working later today |
768871a to
adebb72
Compare
|
Ok, rebased. It's breaking travis because of angular/zone.js#283, which I've submitted a PR for and hopefully will be fixed on npm soon. For now I've changed the implementation of Edit: it says |
|
Rebasing on top of #7700 should make this Green. |
adebb72 to
9ee4cdb
Compare
|
Rebasing fixed tests. All comments addressed. |
|
Merging PR #7603 on behalf of @kara to branch presubmit-kara-pr-7603. |
`upgrade.js` taken from angular/angular#7603
`upgrade.js` taken from angular/angular#7603
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
(Docs not really relevant in this case)
This change makes the testability API work with hybrid apps. Specifically, it fixes deferred bootstrapping and waiting on ng2 components within ng1 apps
Currently deferred bootstrapping causes ngUpgrade to hang, and if an ng2 component uses
setTimeoutor the like the hybrid app's testability checks will totally ignore the fact that its ng2 components aren't yet stableNow deferred bootstrapping works, and the testability API will check both ng1 and ng2 stability
Only if someone is relying on their hybrid app to crash!
I have almost zero typescript knowledge so please tell me how to fix any style problems. I did compile/run tests though.