Skip to content

[6.1.x] update angular.io to the new ServiceWorker #25997

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

Closed
wants to merge 19 commits into from

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Sep 18, 2018

This essentially backports #19795 to 6.1.x.
(Related: Jira FW-289)

@gkalpak gkalpak changed the base branch from master to 6.1.x September 18, 2018 12:16
@gkalpak gkalpak added action: review The PR is still awaiting reviews from at least one requested reviewer comp: docs-infra labels Sep 18, 2018
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

@mary-poppins
Copy link

You can preview a95c21f at https://pr25997-a95c21f.ngbuilds.io/.

@gkalpak
Copy link
Member Author

gkalpak commented Sep 20, 2018

Rebased on master and backported #25999.

@gkalpak gkalpak force-pushed the 6.1.x-build-aio-new-sw branch from a95c21f to bf84855 Compare September 20, 2018 08:48
@mary-poppins
Copy link

You can preview bf84855 at https://pr25997-bf84855.ngbuilds.io/.

@gkalpak
Copy link
Member Author

gkalpak commented Sep 24, 2018

This should be updated to incorporate #26042 once that is released.
UPDATE: #26145 includes the fix from #26042 and should be backported into this PR once merged.

@mary-poppins
Copy link

You can preview 9824792 at https://pr25997-9824792.ngbuilds.io/.

@gkalpak
Copy link
Member Author

gkalpak commented Oct 1, 2018

Backported #26145 into this PR.
This is now failing, because #26136 hasn't be backported to patch 😕
UPDATE: Merged now as 66c2d08.

@IgorMinar IgorMinar added cla: yes and removed cla: no labels Oct 3, 2018
@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

@IgorMinar IgorMinar added the action: merge The PR is ready for merge by the caretaker label Oct 3, 2018
alxhub added a commit that referenced this pull request Oct 3, 2018
…25997)

AIO is currently using a beta version of @angular/service-worker.
Since that was implemented, the SW has been rewritten and released
as part of Angular 5.0.0. This commit updates AIO to use the latest
implementation, with an appropriate configuration file that caches
the various AIO assets in useful ways.

PR Close #25997
alxhub pushed a commit that referenced this pull request Oct 3, 2018
alxhub pushed a commit that referenced this pull request Oct 3, 2018
alxhub pushed a commit that referenced this pull request Oct 3, 2018
alxhub pushed a commit that referenced this pull request Oct 3, 2018
alxhub pushed a commit that referenced this pull request Oct 3, 2018
alxhub pushed a commit that referenced this pull request Oct 3, 2018
alxhub pushed a commit that referenced this pull request Oct 3, 2018
alxhub pushed a commit that referenced this pull request Oct 3, 2018
…25997)

The is a bug in versions 0.6.8+ that breaks when trying to use Jasmine's
mock clock.

Related to angular/angular-cli#11626.

PR Close #25997
alxhub pushed a commit that referenced this pull request Oct 3, 2018
This allows URLs to be passed through to the server (where they are
properly redirected), instead of serving `index.html` from the SW.

Known issue:
`/docs/` will be passed through to the server. `/docs` (without the
trailing slash) will be correctly treated as a navigation URL and
handled by the SW.
We don't link to `/docs/` from within the app, but if there are external
links to `/docs/` they will require a round-trip to the server and will
not work in offline mode.

PR Close #25997
alxhub pushed a commit that referenced this pull request Oct 3, 2018
alxhub pushed a commit that referenced this pull request Oct 3, 2018
#25999) (#25997)

Firebase used to do it automatically (with `cleanUrls: true`), but it
stopped doing it unless the resulting URL corresponds to an existing
file (which is not always the case in angular.io; e.g. the resulting URL
might be matched by a new redirect rule).
This change in Firebase hosting behavior resulted in some URLs not being
correctly redirected (e.g. URLs to the archived v2 site, or `.html`
suffixed URLs from 3rd-party sites).

This commit fixes it, by configuring Firebase hosting to strip off the
`.html` extension and redirect (if no other redirect rule matched).

PR Close #25999

PR Close #25997
alxhub pushed a commit that referenced this pull request Oct 3, 2018
alxhub pushed a commit that referenced this pull request Oct 3, 2018
alxhub pushed a commit that referenced this pull request Oct 3, 2018
@gkalpak
Copy link
Member Author

gkalpak commented Oct 3, 2018

This seems to have been merged. Closing...

@gkalpak gkalpak closed this Oct 3, 2018
@gkalpak gkalpak deleted the 6.1.x-build-aio-new-sw branch October 5, 2018 08:31
@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 Sep 14, 2019
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants