Commit Graph

515 Commits

Author SHA1 Message Date
Stephen Fluin a3b6b109d8 docs: fix stackblitz example polyfills (#32969)
PR Close #32969
2019-10-02 13:20:37 -07:00
George Kalpakas 497d6b1323 ci: re-run flaky docs examples e2e tests in `test_docs_examples[_ivy]` jobs (#32497)
The docs examples e2e tests have been quite flaky recently. This causes
the `test_docs_examples` and `test_docs_examples_ivy` CircleCI jobs to
often fail (and block PRs) without a real reason.

This commit adds support for re-running failed docs examples e2e tests
and configures the `test_docs_examples` and `test_docs_examples_ivy`
jobs to try running each test that fails a second time, before giving up
and marking it as failed.

Closes #31841
Closes #31842

PR Close #32497
2019-09-05 18:10:31 -04:00
Joey Perrott 4b1251106e build: bump yarn requirement to 1.17.3 (#32344)
PR Close #32344
2019-08-28 17:13:05 -07:00
George Kalpakas 3e52e32dce build(docs-infra): add empty `codeGenApi` JSDoc tag definition (#32207)
This avoids warning such as the following ([example][1]):

```
warn: Invalid tags found -
  doc "platform-browser/ɵBROWSER_SANITIZATION_PROVIDERS__POST_R3__" (const)
  from file "platform-browser/src/browser.ts"
```

[1]: https://circleci.com/gh/angular/angular/427064

PR Close #32207
2019-08-28 09:41:21 -07:00
George Kalpakas 066b281979 docs(docs-infra): add note about setting up examples on Windows (#32355)
Closes #32321

PR Close #32355
2019-08-28 09:04:39 -07:00
Alex Rickabaugh ec4381dd40 feat: make the Ivy compiler the default for ngc (#32219)
This commit switches the default value of the enableIvy flag to true.
Applications that run ngc will now by default receive an Ivy build!

This does not affect the way Bazel builds in the Angular repo work, since
those are still switched based on the value of the --define=compile flag.
Additionally, projects using @angular/bazel still use View Engine builds
by default.

Since most of the Angular repo tests are still written against View Engine
(particularly because we still publish VE packages to NPM), this switch
also requires lots of `enableIvy: false` flags in tsconfigs throughout the
repo.

Congrats to the team for reaching this milestone!

PR Close #32219
2019-08-20 16:41:08 -07:00
JiaLiPassion ee486233e9 build(zone.js): update zone.js to 0.10.2 (#31975)
Bundle size changed in both zone.js(legacy) and zone-evergreen.js

- zone.js(legacy) package increased a little because the following feature and fixes.
1. #31699, handle MSPointer events PR
2. https://github.com/angular/zone.js/pull/1219 to add __zone_symbol__ customization support

- zone-evergreen.js package decreased because
1. the MSPointer PR only for legacy
2. the Object.defineProperty patch is moved to legacy #31660

PR Close #31975
2019-08-16 09:56:41 -07:00
George Kalpakas a574e462c9 build(docs-infra): ensure the locally built packages exist and are up-to-date in `yarn setup-local` (#31985)
The `setup-local` npm script uses `NgPackagesInstaller` to replace the
Angular packages with the locally built ones. Previously, it would (a)
assume that the packages were built and (b) it would do anything if the
currently installed versions already correspond to locally built
packages (even if not the latest version).
This could lead to all sorts of errors, such as:
- Confusing error messages, `dist/packages-dist/` was missing.
- Using outdated build artifacts from `dist/packages-dist/` without a
  warning.
- Not installing the latest locally built packages, because the ones
  installed already corresponded to locally built (but older) ones.

This commit fixes these issues by ensuring that:
- The local packages are always built before being used by
  `NgPackagesInstaller`.
- The local packages are installed, even if the ones install already
  correspond to local packages.

NOTE: Special `*-ci` scripts are introduced (for use on CI) that skip
      building the local packages, since that step would have been taken
      care of (in a more efficient way) in a previous CI step.

PR Close #31985
2019-08-05 12:56:44 -07:00
George Kalpakas 65cafa0eec fix(docs-infra): correctly handle multiple occurrences of an option in `NgPackagesInstaller` (#31985)
PR Close #31985
2019-08-05 12:56:43 -07:00
George Kalpakas 18aa173d39 feat(docs-infra): support building the local Angular packages in `NgPackagesInstaller` (#31985)
Previously, when `NgPackagesInstaller` needed to install the local
Angular packages to a project, it assumed the `dist/packages-dist/`
would exist and contain up-to-date built packages. I.e. it was up to the
user to have built the packages first (by running the appropriate
script).
However, many people not familiar with the `aio/` infrastructure assumed
that `yarn build-local` or `yarn build-with-ivy` would take care of all
the necessary steps.

To avoid getting confusing errors (or worse yet, using outdated local
packages), `NgPackagesInstaller` now has an option to build the packages
before using them.
One caveat is that the build script does not currently work on Windows,
so a warning is printed instead, letting the user know they need to
(somehow) take care of it themselves.

NOTE 1: Since the build script is using bazel, running it should not be
        expensive if the directory is up-to-date (i.e. no changes have
        been made to source code after the last build).
NOTE 2: This commit adds support for `--build-packages`, but does not
        change the default behavior (not building the packages). It will
        be turned on in a subsequent commit.

PR Close #31985
2019-08-05 12:56:43 -07:00
George Kalpakas bc8eb8508b refactor(docs-infra): minor refactorings and code simplification in `NgPackagesInstaller` (#31985)
PR Close #31985
2019-08-05 12:56:43 -07:00
Stefanie Fluin 382d3ed1d2 fix(docs-infra): ui polish (#31013)
- Change margin to the header so that the the label aligns with the header
- Make code in API pages pre-wrap so that you can see the actual text on the screen - helps with issue #27296
- Modified text to be title case in label API to be consistent with rest of app labels
- Removed unused table of contents SCSS file
- TOC SCSS file reorg cleanup
- Soften headers font-weight in API pages
- Make linenums ordered list inside code examples always show as numbers

PR Close #31013
2019-08-05 12:53:02 -07:00
George Kalpakas 2e84f4e0cd build(docs-infra): fix StackBlitz projects and ZIPs for `testing` guide examples (#31937)
- Update the `stackblitz.json` config files (used for generating
  Stackblitz projects and ZIP archives) to include the correct files
  (taking into account the current layout of the example projects).
- Update the boilerplate files for `testing` examples to match the
  current layout of the example projects.

PR Close #31937
2019-08-05 09:54:52 -07:00
George Kalpakas a5b12db7d6 build(docs-infra): correct list of files included in ZIPs to match current layout (#31937)
PR Close #31937
2019-08-05 09:54:52 -07:00
Adrien Crivelli 0386c964b5 build: secure yarn lock files (#31640)
See https://yarnpkg.com/blog/2019/07/12/recommended-security-update/

PR Close #31640
2019-07-29 16:10:23 -07:00
George Kalpakas 1bcd58cee8 refactor(docs-infra): remove `linenums=false` since it is now the default (#31674)
PR Close #31674
2019-07-24 14:38:54 -07:00
George Kalpakas d7ca263cc4 test(docs-infra): run tests in random order (and make them pass) (#31527)
This commit updates the necessary config files to run the angular.io and
docs tooling unit tests in random order (and fixes the tests that were
failing due to their dependence on the previous ordered execution).

Besides being a good idea anyway, running tests in random order is the
new [default behavior in jasmine@3.0.0][1], so this commit is in
preparation of upgrading jasmine to the latest version.

[1]: https://github.com/jasmine/jasmine/blob/v3.0.0/release_notes/3.0.md#breaking-changes

PR Close #31527
2019-07-18 10:17:13 -07:00
Pete Bacon Darwin 46c03bd866 build(docs-infra): never show linenums for triple-backticked code blocks (#31493)
PR Close #31493
2019-07-16 13:00:55 -04:00
Santosh Yadav 40705f3366 docs: include svg files in stackblitz and download examples (#31559)
Fixes #31537

PR Close #31559
2019-07-15 16:48:23 -04:00
Pete Bacon Darwin b65e11e3c3 build(docs-infra): display CLI positional option enum values (#31529)
Previously we on;ly displayed enum values for named options.
Now positional options get equal justice.

Fixes https://github.com/angular/angular-cli/issues/15040

PR Close #31529
2019-07-12 17:55:28 -04:00
Rudolf Olah 3246a8553c build(docs-infra): engine "yarn" versions can now be up to 1.16.0 (#31482)
PR Close #31482
2019-07-11 12:14:33 -04:00
Pete Bacon Darwin 1db3ac457c build(docs-infra): update dgeni-packages dependency (#31368)
The new version 0.27.5 now has the `post-process-html` package, so we
don't need it in angular/angular any more.

PR Close #31368
2019-07-02 11:28:23 -07:00
Brandon 2b5d52fbdc docs: add tests for lazy loading angularjs example (#30622)
PR Close #30622
2019-06-28 09:26:49 -07:00
George Kalpakas 261dc04d8e fix(docs-infra): detect docregions on more file types (`pug`, `svg`, `yml`) (#30559)
PR Close #30559
2019-06-27 15:56:26 -07:00
Kapunahele Wong 02d98ed823 docs: fix testing example (#31120)
PR Close #31120
2019-06-25 10:28:50 -07:00
Pete Bacon Darwin 3fb78aaacc feat(upgrade): provide unit test helpers for wiring up injectors (#16848)
Adds two new helper functions that can be used when unit testing Angular services
that depend upon upgraded AngularJS services, or vice versa.
The functions return a module (AngularJS or NgModule) that is configured to wire up
the Angular and AngularJS injectors without the need to actually bootstrap a full
hybrid application.

This makes it simpler and faster to unit test services.

PR Close #16848
2019-06-20 17:04:01 -07:00
George Kalpakas c34abf2cbc refactor(docs-infra): move auto-link filters to dedicated directory (#31051)
These filters have generic names (e.g. `filterPipes`), which do not make
their purpose obvious. Moving them to a dedicated `auto-link-filters`
directory should help with that.

PR Close #31051
2019-06-19 14:59:34 -07:00
George Kalpakas c6b180380a fix(docs-infra): do not auto-link `http://` to the `common/http` (#31051)
Previously, our auto-linking feature would match `http` in URLs (such as
`http://...`) to the `common/http` package and automatically create a
link to that, which was undesirable. While it is possible to work around
that via `<code class="no-auto-link">http://...</code>`, most people
didn't even realize the issue.

Since in this case it is possible to reliably know it is a false match,
this commit fixes it by applying a custom auto-link filter that ignores
all docs for `http`, if it comes before `://`.

Fixes #31012

PR Close #31051
2019-06-19 14:59:34 -07:00
Paul Gschwendtner e0969b2480 ci: update nodejs version to v10.16.0 (#31088)
Updates the NodeJS version to the latest stable version at the time of
writing (v10.16.0). We need to update our image to use a minimum NodeJS
version of v10.15.0 because new CLI apps automatically install a non-locked
version of selenium-webdriver that now requires NodeJS >= 10.15.0 since the
latest release of 17th June 2019 (4.0.0-alpha.3).

See CI failures: https://circleci.com/gh/angular/angular/359077

PR Close #31088
2019-06-17 13:07:27 -07:00
Pete Bacon Darwin 297222f892 build(docs-infra): fail hard if the CLI source is not what we expect (#30901)
Previously we just logged a warning but we should fail
to prevent silently allowing the docs to look wrong if
something changes on the CLI side of things.

PR Close #30901
2019-06-07 08:45:47 -07:00
Pete Bacon Darwin f440bd1793 build(docs-infra): fix CLI command github links (#30889)
The "view" links were broken because the version used to
compute the git tag for the GitHub URL included a build SHA.
Now we clean that off before using it in the URL.

The links are to the JSON schema that defines the documentation for
the command. This is accurate but confusing because the content for the
long description is stored in a separate markdown file referenced from this
schema file.
This commit adds a second set of links for the long description, if it exists,
which links directly to the markdown file.

Closes #30700

PR Close #30889
2019-06-06 08:49:37 -07:00
Brandon 812c231b0c docs: update example dependencies to 8.x release (#30755)
PR Close #30755
2019-06-04 11:53:55 -07:00
Michael Head 1315d23aa4 docs: increase color contrast on elements in tutorial
This increases the color contrast of elements in the tutorial (parts 1-6)
in order to meet WCAG 2.0 AA standards.
2019-05-31 15:23:32 -07:00
Santosh Yadav 876cd603f1 docs(docs-infra): remove deprecated `Buffer` usage from stackblitz builder (#30369)
Fixes #30364

PR Close #30369
2019-05-31 09:56:22 -07:00
Brandon 6debe9dfb9 docs(docs-infra): add common/upgrade to authors package for API docs (#30567)
This fixes an issue where the common/upgrade packge isn't included
on page reload when changes are made to the common/upgrade package

PR Close #30567
2019-05-21 13:09:09 -07:00
George Kalpakas ebfbc04000 ci(docs-infra): fix `test_docs_examples_ivy` job (#30593)
Context:
As part of the `test_docs_examples_ivy` job, we run 5 concurrent builds
on each VM (each for a different example/project). Additionally, all
example projects share the same `node_modules/` (via a symlink to
`aio/tools/examples/shared/node_modules/`), so all concurrent builds
operate on the same files.

Previously, we pre-ran ngcc with `--properties module` to process the
fesm5 bundles. Since we have switched to es2015 in 661a57d9e, we now
need the esm2015 bundles. As a result, the initial ngcc run is
redundant and ngcc runs again during each build (to process the fesm2015
bundles). Since there are 5 concurrent builds, we often end up with
multiple ngcc instances processing the same package and trying to write
to the same directories at the same time, causing a
`file already exists` error

This commit fixes it by pre-processing the esm2015 bundles, so there is
no need to re-run ngcc during each concurrent build.

Fixes #30577

PR Close #30593
2019-05-21 12:32:57 -07:00
Ben Lesh d7eaae6f22 refactor(ivy): Move instructions back to ɵɵ (#30546)
There is an encoding issue with using delta `Δ`, where the browser will attempt to detect the file encoding if the character set is not explicitly declared on a `<script/>` tag, and Chrome will find the `Δ` character and decide it is window-1252 encoding, which misinterprets the `Δ` character to be some other character that is not a valid JS identifier character

So back to the frog eyes we go.

```
    __
   /ɵɵ\
  ( -- ) - I am ineffable. I am forever.
 _/    \_
/  \  /  \
==  ==  ==
```

PR Close #30546
2019-05-20 16:37:47 -07:00
jenniferfell 1c3ee41902 docs: move old quick start content into new local setup guide (#29651)
PR Close #29651
2019-05-20 10:16:23 -07:00
Brandon Roberts 661a57d9e2 docs: update docs example dependencies to version 8 (#30385)
PR Close #30385
2019-05-17 14:16:55 -07:00
Brandon 6cb3b50a03 docs(docs-infra): add common/upgrade to API package sources (#30331)
Closes #30332

PR Close #30331
2019-05-16 11:47:16 -07:00
Jimmy Kasprzak 3a8f74e392 docs: fix example "testing" app compilation (#30427)
PR Close #30427
2019-05-15 14:12:22 -07:00
Ben Lesh cf86ed7b29 refactor(ivy): migrate ɵɵ prefix back to Δ (#30362)
Now that issues are resolved with Closure compiler, we can move back to our desired prefix of `Δ`.

PR Close #30362
2019-05-14 16:52:15 -07:00
Santosh Yadav 34e0d621fd build(docs-infra): update http-server to 0.11.1 (#30401)
Fixes #30363

PR Close #30401
2019-05-14 09:55:46 -07:00
JiaLiPassion 5ab809ddf9 build: upgrade zone.js to 0.9.1 (#30260)
Close 30203

resolves the issue that zone-legacy XHR issue

PR Close #30260
2019-05-10 14:25:56 -07:00
George Kalpakas d80ae6ba0d build(docs-infra): ensure hidden cli commands are excluded from `sitemap.xml` (#30395)
Previously, the processor that excludes certain cli commands
(`filterHiddenCommand`) was being run after the `createSitemap`
processor, resulting in those commands to be present in `sitemap.xml`,
while the actual pages where missing. This also resulted in 404s, when
search engine crawlers tried to index the missing URLs.

This commit fixes it by ensuring that the `filterHiddenCommand`
processor is run before the `createSitemap` processor.

PR Close #30395
2019-05-10 11:56:39 -07:00
arjunyel 4f055d4257 refactor: remove tslint no-use-before-declare rule (#30288)
PR Close #30288
2019-05-07 10:25:36 -07:00
George Kalpakas 282167a37f build(docs-infra): upgrade tslint to 5.15.0 and codelyzer to 5.0.0 (#29926)
This commit also changes the `tslint.json` config file to (reasonably
closely) match what the cli would generate for a new app.

PR Close #29926
2019-04-25 12:32:49 -07:00
George Kalpakas eb85c8a742 build(docs-infra): make type-checking stricter by enabling `noImplicitAny` (#29926)
PR Close #29926
2019-04-25 12:32:49 -07:00
George Kalpakas 6c1ae294dc build(docs-infra): upgrade @angular/cli to 8.0.0-beta.18 (#29926)
This commit also changes the config files and their layout to
(reasonably closely) match what the cli would generate for a new app.

Related Jira issue: [TOOL-815](https://angular-team.atlassian.net/browse/TOOL-815)

PR Close #29926
2019-04-25 12:32:49 -07:00
Dustin M. Eastway 00ea3983e3 docs(docs-infra): fix typo in the aio/tools/examples/README (#30041)
Remove an 'a' that was accidentally repeated twice in the aio/tools/examples/README.md file.

PR Close #30041
2019-04-24 11:33:23 -07:00