11210 Commits

Author SHA1 Message Date
George Kalpakas
a68c29da4b build(docs-infra): update size limits (#25997)
PR Close #25997
2018-10-03 13:26:32 -07:00
George Kalpakas
becb775d08 fix(docs-infra): ignore server-side redirected URLs in the SW (#25997)
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
2018-10-03 13:26:32 -07:00
George Kalpakas
a273491be0 build(docs-infra): downgrade @angular-devkit/build-angular to 0.6.7 (#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
2018-10-03 13:26:32 -07:00
George Kalpakas
7d45386262 build(docs-infra): upgrade @angular/* to 6.1.0-rc.3 and rxjs to 6.2.2 (#25997)
PR Close #25997
2018-10-03 13:26:32 -07:00
George Kalpakas
82fcb325a1 build(docs-infra): upgrade @angular/cli to 6.1.0-rc.3 and @angular-devkit/build-angular to 0.7.0-rc.3 (#25997)
PR Close #25997
2018-10-03 13:26:32 -07:00
George Kalpakas
115c874779 build(docs-infra): upgrade @angular/material to 6.0.2 (#25997)
PR Close #25997
2018-10-03 13:26:32 -07:00
George Kalpakas
8cbebc673d build(docs-infra): upgrade @angular/* to 6.0.2 and rxjs to 6.1.0 (#25997)
PR Close #25997
2018-10-03 13:26:32 -07:00
George Kalpakas
94b2673c1f build(docs-infra): upgrade @angular/cli to 6.0.3 (#25997)
PR Close #25997
2018-10-03 13:26:31 -07:00
George Kalpakas
bc73dcb448 build(docs-infra): remove unused dependencies (#25997)
PR Close #25997
2018-10-03 13:26:31 -07:00
George Kalpakas
fefa171d83 build(docs-infra): remove the dependency on rxjs-compat (#25997)
PR Close #25997
2018-10-03 13:26:31 -07:00
George Kalpakas
5c84b91543 build(docs-infra): enable ServiceWorker in cli config (#25997)
PR Close #25997
2018-10-03 13:26:31 -07:00
George Kalpakas
00b37310e1 fix(docs-infra): correctly show icon for fetch error when offline (#25997)
PR Close #25997
2018-10-03 13:26:31 -07:00
George Kalpakas
bc27b95771 refactor(docs-infra): move concept icons to more appropriate location (#25997)
PR Close #25997
2018-10-03 13:26:31 -07:00
George Kalpakas
31f352c043 refactor(docs-infra): remove unused images (#25997)
PR Close #25997
2018-10-03 13:26:31 -07:00
Alex Rickabaugh
ad62eaa612 feat(docs-infra): Convert AIO to use the new Service Worker 5.0.0. (#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
2018-10-03 13:26:31 -07:00
Pete Bacon Darwin
66c2d089f0 ci(docs-infra): run the script in the correct folder 2018-10-01 13:08:05 -07:00
Pete Bacon Darwin
c1bf82adb9 fix(docs-infra): remove unnecessary margin on short descriptions (#25768)
(This was added in 405d97431fa374afdd5cddc6780f8949ee76a2c6 but it is
not clear the reasoning. It looks better to remove it now.)

PR Close #25768
2018-10-01 09:36:37 -07:00
Pete Bacon Darwin
c05d24e0fe build(docs-infra): fix formatting of entry point export table (#25768)
Now that `list-table` cells are `pre` formatterd we must be careful
of what whitespace appears in text nodes.

PR Close #25768
2018-10-01 09:36:37 -07:00
Pete Bacon Darwin
adbb920ae8 build(docs-infra): simplify property syntax rendering (#25768)
PR Close #25768
2018-10-01 09:36:37 -07:00
Pete Bacon Darwin
f871fecf66 build(docs-infra): remove unused property table heading (#25768)
PR Close #25768
2018-10-01 09:36:37 -07:00
Pete Bacon Darwin
9f919f762a build(docs-infra): add short description "See more" link (#25768)
If there is additional (non-short) description then add in a
link to the short description to take the reader there.

PR Close #25768
2018-10-01 09:36:37 -07:00
Pete Bacon Darwin
6df45a6d47 build(docs-infra): pluralize NgModule(s) heading as appropriate (#25768)
PR Close #25768
2018-10-01 09:36:37 -07:00
Pete Bacon Darwin
71128e2392 build(docs-infra): improve directive selector rendering (#25768)
`:not(...)` blocks are now rendered as italic, while the
rest of the selector is bold.

PR Close #25768
2018-10-01 09:36:36 -07:00
Pete Bacon Darwin
38980f1813 build(docs-infra): move directive macros into memberHelpers.html (#25768)
PR Close #25768
2018-10-01 09:36:36 -07:00
Pete Bacon Darwin
76f30524be build(docs-infra): include directives etc in class descendants lists (#25768)
PR Close #25768
2018-10-01 09:36:36 -07:00
Pete Bacon Darwin
721343349b build(docs-infra): display inherited members on directives (#25768)
PR Close #25768
2018-10-01 09:36:36 -07:00
Pete Bacon Darwin
4c19a2dba9 build(docs-infra): directive inputs and outputs (#25768)
PR Close #25768
2018-10-01 09:36:36 -07:00
Pete Bacon Darwin
4aacbbe04b build(docs-infra): rename example template variable in directive pages (#25768)
PR Close #25768
2018-10-01 09:36:36 -07:00
Pete Bacon Darwin
19c2d5b3d4 build(docs-infra): remove class overview from directive pages (#25768)
PR Close #25768
2018-10-01 09:36:35 -07:00
Pete Bacon Darwin
2f79aab084 build(docs-infra): improve directive selector rendering (#25768)
If the documentation contains a `@selectors` tag then the content of that
is used to describe the selectors of a directive.

Otherwise the selector string is split and each selector is listed as
a list item in an unordered list.

PR Close #25768
2018-10-01 09:36:35 -07:00
Pete Bacon Darwin
63b178ec3d build(docs-infra): improve directive API doc templates (#25768)
Closes #22790
Closes #25530

PR Close #25768
2018-10-01 09:36:35 -07:00
Jordan Whitfield
a48bf0bdb6 docs: fix a typo in the Universal guide (#25853)
line 39: `highly-interactive` is the pre-qualifier of `Angular application`, which is the subject so the comma is not necessary (I think). I think this will make it easier for non-native speakers.

PR Close #25853
2018-09-28 09:36:10 -07:00
George Kalpakas
22dc8adae5 build: use separate tags for ivy builds in publish-build-artifacts.sh (#26159)
PR Close #26159
2018-09-28 09:35:33 -07:00
Alan Agius
04a023c31a build: pass stripExportPattern as an array of RegExp (#26012)
This is a workaround for https://github.com/bazelbuild/rules_nodejs/issues/317

PR Close #26012
2018-09-27 12:07:04 -07:00
George Kalpakas
c12e553ff1 fix(docs-infra): use correct parameters for paginated requests to GitHub (#25671)
As it turns out, in GitHub API paginated requests, page numbering is
1-based. (https://developer.github.com/v3/#pagination)

Starting at page 0 (which returns the first page), results in making the
same request twice and logging incorrect numbers (since the first 100
items are listed twice).

PR Close #25671
2018-09-26 15:26:25 -07:00
George Kalpakas
c8eb6182bc fix(docs-infra): fix preview server periodic clean-up (#25671)
Includes the following fixes:

- Fix cron entry format for clean-up script.
  Crontabs in `/etc` should not have a user field. No idea why it used
  to work before, but it started giving errors recently:
  `/bin/sh: root: not found`.

- Set required env variable in clean-up script. (Broken in cc6f36a9d.)
  This was producing the following error:
  `ERROR: Missing required environment variable 'AIO_CIRCLE_CI_TOKEN'!`

- Use the correct path for downloads to be removed. (Broken in cc6f36a9d.)

PR Close #25671
2018-09-26 15:26:25 -07:00
George Kalpakas
0a7a542edd test(docs-infra): remove unnecessary test helpers (#25671)
`supertest.Request` extends `Promise` and can be used directly without
"promisifying".

PR Close #25671
2018-09-26 15:26:25 -07:00
George Kalpakas
9d7ad34873 docs(docs-infra): update preview server docs to account for recent changes (#25671)
Mostly (but not exclusively) a follow-up to #23576.

PR Close #25671
2018-09-26 15:26:25 -07:00
George Kalpakas
63c2a2a74a ci(docs-infra): test PR previews on CI (#25671)
The deployment of PR previews is triggered by the notification webhook
of the `aio_preview` CircleCI job (which creates and stores the build
artifacts).

This commit adds a new job (`test_aio_preview`), which waits for the
preview to be deployed (for PRs that do have a preview) and then runs
some tests against it (currently only PWA tests).

Fixes #23818

PR Close #25671
2018-09-26 15:26:25 -07:00
George Kalpakas
2e0de01372 feat(docs-infra): add API endpoint for checking if PR can have preview (#25671)
There several reasons why PRs cannot have (public) previews:
- The PR did not affect any relevant files (e.g. non-spec files in
  `aio/` or `packages/`).
- The PR cannot be automatically verified as "trusted" (based on its
  author or labels).

Note:
The endpoint does not check whether there currently is a (public)
preview for the specified PR; only whether there can be one.

PR Close #25671
2018-09-26 15:26:25 -07:00
George Kalpakas
88e080003d fix(docs-infra): correctly check PR files on preview server (#25671)
According to the docs, the response of GitHub's [PR files API][1]
_"includes a maximum of 300 files"_. This means that if a PR contains
more files, it is possible that not all files are retrieved (which
could, for example, give a false negative for the "significant files
touched" check - not likely but possible).

This commit fixes it by using paginated requests to retrieve all changed
files.

[1]: https://developer.github.com/v3/pulls/#list-pull-requests-files

PR Close #25671
2018-09-26 15:26:25 -07:00
George Kalpakas
8a62f0a36c test(docs-infra): fix test for preview server's GithubPullRequests (#25671)
PR Close #25671
2018-09-26 15:26:25 -07:00
George Kalpakas
6c8863aa09 test(docs-infra): fix test for preview server's BuildCleaner completing prematurely (#25671)
PR Close #25671
2018-09-26 15:26:25 -07:00
George Kalpakas
fe92614c91 test(docs-infra): fix preview server unit tests on Windows (#25671)
Some tests where comparing actual with expected paths, without taking
into account that paths will be different on Windows.

This commit uses `path.resolve()` to convert expected paths to their
OS-specific form.

PR Close #25671
2018-09-26 15:26:25 -07:00
George Kalpakas
166bb8e048 test(docs-infra): add support for source-maps in preview server tests (#25671)
PR Close #25671
2018-09-26 15:26:25 -07:00
George Kalpakas
c7da5d8cfd refactor(docs-infra): use mockable logger (#25671)
Related discussion:
https://github.com/angular/angular/pull/23576#discussion_r187925949.

PR Close #25671
2018-09-26 15:26:25 -07:00
George Kalpakas
153738dce9 refactor(docs-infra): fix method name (getPrfromBranch --> getPrFromBranch) (#25671)
PR Close #25671
2018-09-26 15:26:25 -07:00
George Kalpakas
ce4aa5cb93 build(docs-infra): upgrade preview server dependencies (#25671)
PR Close #25671
2018-09-26 15:26:25 -07:00
George Kalpakas
0647582292 build(docs-infra): replace concurrently with npm-run-all for preview server dev (#25671)
`npm-run-all` works just as well, but is better at handling termination on Windows.

PR Close #25671
2018-09-26 15:26:25 -07:00
George Kalpakas
c5620d1c7a build(docs-infra): do not exit preview server dev script when build fails (#25671)
PR Close #25671
2018-09-26 15:26:25 -07:00