Commit Graph

4516 Commits

Author SHA1 Message Date
Talha Azhar f4be101c08 docs: fix text jargon from DI notes (#41928)
PR Close #41928
2021-05-04 08:08:46 -07:00
Renovate Bot f42796a8f5 build: lock file maintenance (#41924)
PR Close #41924
2021-05-03 14:27:06 -07:00
iRealNirmal 741c295129 docs: update file structure document (#41923)
Since angular 11 extra package.json isn't generated and with version 12 strict mode is opt out bases.
Updated document to reflect the state

Closes #40841.

PR Close #41923
2021-05-03 14:26:38 -07:00
David Shevitz 3b589030a8 docs: Remove references to protractor from documentation (#41731)
PR Close #41731
2021-05-03 14:26:09 -07:00
Kapunahele Wong 253ed5d484 docs: improve accessibility of form-validation example (#41283)
PR Close #41283
2021-05-03 14:25:11 -07:00
George Kalpakas 6967f3ca28 build(docs-infra): revert `watchr` to v3.0.1 to restore `docs-watch` performance (#41903)
[`watchr` v4.0.0][1] changes the way watched directories are
scanned/watched, thus causing a great increase in the consumed CPU and
RAM. This affects the performance of the `docs-watch` and transitively
`serve-and-sync` npm scripts.
(For reference, on my local machine it goes from 0% CPU and 275MB RAM
with v3.0.1 to 50% CPU and 10GB RAM with v4+.)

This commit pins `watchr` to version 3.0.1 (which is the latest version
that does not cause performance issues) and disabled automatic updates
via Renovate.

[1]: https://github.com/bevry/watchr/releases/tag/v4.0.0

PR Close #41903
2021-05-03 10:05:31 -07:00
Mikhail f12d067539 docs(forms): reduce ambiguity in forms data flow wording (#41900)
PR Close #41900
2021-05-03 10:01:14 -07:00
Mathias Schäfer 74da3724e4 docs: Update link to Testing Angular online book (#41906)
The book has moved to a its own domain.
PR Close #41906
2021-04-30 14:34:48 -07:00
Renovate Bot 5a38f17683 build: update angular (#41871)
PR Close #41871
2021-04-30 14:31:09 -07:00
David Shevitz b5134e2e39 docs: remove references to Trusted Types due to incompatibility with Webpack 5 (#41754)
PR Close #41754
2021-04-30 14:30:31 -07:00
Igor Minar 72384a3357 fix(docs-infra): switch over to img[loading=lazy] for front page images (#34900)
This should speed up the perceived loading latency as the image loading won't block rendering.

https://addyosmani.com/blog/lazy-loading/

PR Close #34900
2021-04-30 14:16:23 -07:00
Wojciech Okoński ea89617880 docs(docs-infra): fix handling of client-side errors in networking (#36608)
Previously example for handling client-side errors in networking didn't work when there was no Internet connection.
Caught error is ProgressEvent in such case, not ErrorEvent and error.error.message is undefined.

PR Close #36608
2021-04-29 13:51:42 -07:00
George Kalpakas f3331a8350 build(docs-infra): upgrade cli command docs sources to ac6fc449e (#41878)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](2310e277b...ac6fc449e):

**Modified**
- help/add.json
- help/analytics.json
- help/deploy.json
- help/e2e.json
- help/help.json
- help/lint.json
- help/new.json
- help/run.json
- help/test.json

PR Close #41878
2021-04-29 10:09:09 -07:00
cexbrayat 79e82f22a5 docs: remove ts-node form dev deps (#41873)
Follow-up to #41826

The CLI now no longer installs `ts-node` since Protractor has been removed.
See https://github.com/angular/angular-cli/pull/20601 for the relevant PR in angular-cli.
This change has been released in the CLI v12.0.0-rc.1

PR Close #41873
2021-04-29 10:08:14 -07:00
Sam Severance d80ad951c6 docs: correct toh router tutorial (#41859)
* `SelectivePreloadingStrategyService` is already provided in the root
   module, so it should not be added to `AppRoutingModule` providers
   array

PR Close #41859
2021-04-29 10:05:30 -07:00
Teri Glover 55d9713664 docs: Edits to remove jargon (#41536)
PR Close #41536
2021-04-28 15:11:32 -07:00
Keen Yee Liau c31d6ea24e docs: remove tslint, codelyzer & protractor from dev deps (#41826)
TSLint and Codelyzer were deprecated in v11.
Protractor is no longer installed by default in new projects in v12.

PR Close #41826
2021-04-28 14:33:11 -07:00
Kapunahele Wong 695b72a972 docs: imrpove accessibility of lifecycle hooks example (#41071)
PR Close #41071
2021-04-28 14:26:34 -07:00
Kapunahele Wong 3ccad85b01 docs: add error page for NG6999 (#41708)
Adds page for NG6999 error for VE builds that attempt
to consume an Ivy-compiled library.
Will go here: https://angular.io/errors/NG6999

PR Close #41708
2021-04-28 14:22:46 -07:00
Pete Bacon Darwin 76c824b6da build(docs-infra): update to latest puppeteer (#41764)
The updates to WebDriver required an update to puppeteer to ensure
that the correct Chromium was downloaded.

PR Close #41764
2021-04-28 12:33:20 -07:00
Alan Agius 4f20cd16b4 build(docs-infra): add `assert` polyfill (#41764)
With this change we add the `assert` polyfill which is required because `timezone-mock` is a Node.JS library which is being used in Browser.

PR Close #41764
2021-04-28 12:33:20 -07:00
Alan Agius bdb8deaa51 build(docs-infra): remove `src/generated` from `ng test` configuration (#41764)
Assets are stored in memory during `ng test` hence since `src/generated` are unused we shouldn't include them.

PR Close #41764
2021-04-28 12:33:20 -07:00
Alan Agius 17ffb7480f build(docs-infra): update angular packages to `12.0.0-rc.0` (#41764)
Update Angular packages to `12.0.0-rc.0`

PR Close #41764
2021-04-28 12:33:20 -07:00
George Kalpakas 044b380e5a build: update remark packages (#41721)
This commit updates the `remark` packages to v12 instead of the latest
(v13), because v13 is a major breaking change that requires more
investigation and work.

More specifically, v13 replaces the internals of `remark` with a new
CommonMark-compliant parser. (See their [release notes][1] for more
info.)

This change causes our old `remark` plugins (in [renderMarkdown.js][2])
to stop working.

[1]: https://github.com/remarkjs/remark/releases/tag/13.0.0
[2]: d42019d412/aio/tools/transforms/remark-package/services/renderMarkdown.js (L17-L24)

PR Close #41721
2021-04-28 09:27:23 -07:00
George Kalpakas 3b7d4ebbd6 fix(docs-infra): do not redirect disambiguated URLs (#41842)
In #41788, logic was added to disambiguate case-insensitively equal docs
paths/URLs. This process includes appending a `-\d+` suffix to some
paths/URLs (for example, `/.../inject-1`). Unfortunately, some of the
Firebase redirects configured in `firebase.json` would match these URLs
and redirect them to non-existing paths.
Example failures: [stable][1], [next][2]

NOTE:
This was not picked up in the regular CI tests run for PRs, because the
local devserver and the preview server used to test PRs do not support
Firebase-like redirects.

This commit fixes this by ensuring these disambiguated paths/URLs are
not matched by the redirect rules by checking whether the part of the
suffix after the `-` contains any numeric digits. While this check is
not ideal, it should be good enough for our purpose, since the legacy
URLs that we do want to redirect contain suffixes such as `-class`,
`-function` and thus no numeric digits.

[1]: https://circleci.com/gh/angular/angular/974345
[2]: https://circleci.com/gh/angular/angular/974346

PR Close #41842
2021-04-27 14:05:23 -07:00
George Kalpakas 2076bde100 build(docs-infra): take disambiguated doc paths into account when generating the sitemap (#41842)
In ##41788, the `disambiguateDocsPathsProcessor` was introduced to fix
an issue with case-insensitively equal paths. This processor may alter
the paths of some docs and thus their final URL in the app.

Previously, both the `disambiguateDocPathsProcessor` and the
`createSitemap` processor (which relies on the docs' computed paths to
generate the sitemap file) were configured to run before the
"rendering-docs" phase. However, this resulted in the
`disambiguateDocPathsProcessor`'s running after `createSitemap`, which
meant that the sitemap did not include the updated doc paths.

This commit fixes it by ensuring that the
`disambiguateDocPathsProcessor` is explicitly run before the
`createSitemap` processor, so that the latter will be able to take into
account any changes made by the former.

PR Close #41842
2021-04-27 14:05:23 -07:00
George Kalpakas 1aee5a79c6 test(docs-infra): make it easier to identify the failing URL in `testFirebaseRedirection.spec.ts` (#41842)
This commit includes the URL under test in the test description in
`testFirebaseRedirection.spec.ts` to make it easier to identify the
affected URL when a test fails.

It also avoids unnecessarily creating multiple `FirebaseRedirector`
instances by sharing instances between tests.

PR Close #41842
2021-04-27 14:05:23 -07:00
George Kalpakas d1f5a9e44b test(docs-infra): update `firebase-test-utils` to support regex-based redirects (#41842)
This commit updates the utilities in `firebase-test-utils/` to also
support testing Firebase redirects that are configured using regular
expressions (via the `regex` property).
See the [Firebase docs][1] for more details.

[1]: https://firebase.google.com/docs/hosting/full-config#redirects

PR Close #41842
2021-04-27 14:05:23 -07:00
George Kalpakas ae1ce5f9c7 refactor(docs-infra): prepare `firebase-test-utils` for accepting regex-based redirects (#41842)
Currently, the utilities for testing Firebase redirects assume that the
redirects are configured using the glob-based `source` property.
However, Firebase also supports configuring redirects using regular
expressions (via the `regex` property).
See the [Firebase docs][1] for more details.

This commit refactors the utilities in `firebase-test-utils/` to make it
easy to add support for such regex-based redirect configurations.

[1]: https://firebase.google.com/docs/hosting/full-config#redirects

PR Close #41842
2021-04-27 14:05:23 -07:00
George Kalpakas 36e10e7932 test(docs-infra): fix `create-example` tests on Windows (#41842)
Previously, the tests in `create-example.spec.ts` made assertions using
some hard-coded absolute paths (something like `/foo/bar`). This caused
the tests to fail on Windows, where the absolute paths are prefixed with
the drive letter (something like `C:/foo/bar`).

This commit uses `path.resolve()` to ensure paths are converted to the
format used on the current OS.

PR Close #41842
2021-04-27 14:05:23 -07:00
Amadou Sall 3783976543 docs: remove the section "Using components vs services from other modules" (#41835)
This section states that "Importing a module with services means that you will have a new instance of that service". This is only true for lazy-loaded `NgModules`. For non-lazy-loaded modules, my understanding is that the providers arrays are flattened into the root injector meaning that importing a module with a service doesn't create a new instance of that service.

PR Close #41835
2021-04-27 10:16:49 -07:00
Pete Bacon Darwin 01d1c46b16 build(docs-infra): update dgeni-packages to fix version list (#41832)
The current version was not being computed correctly for
next and rc deployments of the angular.io website.

Fixes #41829

PR Close #41832
2021-04-27 10:15:29 -07:00
Joey Perrott 2f678fcedb build: update node version requirements (#41822)
Update the node version requirements to only include the LTS versions supported, rather
than accidently including the active versions.

PR Close #41822
2021-04-26 15:21:13 -07:00
Kapunahele Wong 09abee359d docs: add metadata documentation to httpClient (#41706)
PR Close #41706
2021-04-26 15:17:51 -07:00
Chau Tran e47ea2959c docs: add chau tran to GDE resources (#41817)
PR Close #41817
2021-04-26 15:16:40 -07:00
Pete Bacon Darwin 4b4f565df1 docs: fix links to docs with ambiguous paths (#41788)
These docs were linking directly to docs that have ambiguous paths.
These changes ensure that these links are not affected by the
disambiguation processing of those docs.

PR Close #41788
2021-04-26 12:12:00 -07:00
Pete Bacon Darwin 538286df16 build(docs-infra): add path disambiguation (#41788)
When two documents have the same `outputPath`, only differing by
letter casing, there can be problems on case-insensitive file-systems:
Only one of each of the docs would end up being written.

Moreover, the Webpack 5 bundler will error if it comes across files
that have this kind of ambiguous paths.

This commit adds a new docType: `disambiguator`, which will display
a list of the docs that match an ambiguous path. Each of the ambiguous
docs is then given a unique path and outputPath to ensure there are no
collisions.

PR Close #41788
2021-04-26 12:12:00 -07:00
Pete Bacon Darwin 2ede980fea build(docs-infra): no duplicate docTypes in postProcessHtml processor (#41788)
This processor was being initialized with the same docTypes twice.

PR Close #41788
2021-04-26 12:11:59 -07:00
Renovate Bot 9e113f9cc4 build: update to version (#41806)
PR Close #41806
2021-04-26 12:06:48 -07:00
George Kalpakas 99f2ffc740 build: update stemmer to version 2.0.0 (#41724)
NOTE:
`stemmer` v2.0.0 switched to ES modules (see
words/stemmer@03519229c8), which means
that the only way to consume it in our CommonJS setup (for example, in
[generateKeywords][1]) is via an async `import()`.

This commit makes the `generateKeywords` processor asynchronous in order
to be able to dynamically import and use `stemmer`.

[1]: 251bec159a/aio/tools/transforms/angular-base-package/processors/generateKeywords.js

PR Close #41724
2021-04-26 11:00:59 -07:00
George Kalpakas a938849148 fix(docs-infra): apply custom `autoLinkCode` filters to single-word `<code>` elements (#41709)
Previously, the `autoLinkCode` Dgeni post-processor would not apply the
custom filters when matching the whole contents of a `<code>` element.
This meant that custom filters would not be applied to single-word
`<code>` elements.

You can see occurrences of this issue in the following sections of the
"Reactive forms" guide:
- [Creating nested form groups][1]
  (look for `street, city, state, and zip controls`)
- [Using the FormBuilder service to generate controls][2]
  (look for `group method`)

This commit fixes this by also applying the custom filters when
processing the whole contents of a `<code>` element.

This commit also updates the `filterPipes` custom filter to allow
matching a pipe's name in a single-word `<code>` element (where there is
no preceeding `|` character).

[1]: https://v10.angular.io/guide/reactive-forms#creating-nested-form-groups
[2]: https://v10.angular.io/guide/reactive-forms#using-the-formbuilder-service-to-generate-controls

PR Close #41709
2021-04-26 10:59:08 -07:00
George Kalpakas de19b8bb88 fix(docs-infra): do not process generated nodes for auto-linking (#41709)
While generating the docs, when a `<code>` element is inspected for
auto-linking, the `autoLinkCode` Dgeni post-processor will break its
contents up into words and generate text nodes for those words that
should not be auto-linked.

Previously, our text node visitor would visit these generated text nodes
and try to auto-link them too. As a result, it would unnecessarily
process nodes that had already been checked (and could potentially
generate links that would otherwise be ignored).

You can see an occurrence of this issue in the
[Create the product list][1] section of the
"Getting started with Angular" tutorial (look for `<a>`).

This commit fixes this by ensuring the visitor will skip the current
node and any nodes generated by `autoLinkCode`.

[1]: https://v11.angular.io/start#create-the-product-list

PR Close #41709
2021-04-26 10:59:07 -07:00
George Kalpakas 6465b5056a build(docs-infra): fix e2e testing SystemJS-based docs examples (#41796)
This commits makes the SystemJS-based docs examples more self-contained
by ensuring the necessary WebDrivers are fetched before running the e2e
tests.
This is a follow-up to #41689. (See there for more discussion.)

PR Close #41796
2021-04-26 09:25:12 -07:00
George Kalpakas 27ad7624d0 fix(docs-infra): fix external link icons positioning (#41794)
While trying to fix the appearance of `<code>` elements inside of
anchors with external URLs in #41694, the positioning of external link
icons was broken for anchors that would span multiple lines (see #41774
for details).

This commit fixes the positioning of external link icons, while still
preserving the correct appearance of `<code>` elements inside anchors
with external URLs.

NOTE:
Different types of links with external URLs can be seen in the following
docs sections:
- http://localhost:4200/docs#assumptions
- http://localhost:4200/guide/http#security-xsrf-protection
- http://localhost:4200/guide/workspace-config#generation-schematics

Fixes #41774

PR Close #41794
2021-04-26 09:24:04 -07:00
Kapunahele Wong 01e546f116 docs: improve accessibility of architecture example (#41314)
PR Close #41314
2021-04-26 09:13:49 -07:00
Kapunahele Wong 326884736e docs: make inputs-outputs example more accessible (#41288)
PR Close #41288
2021-04-26 09:12:17 -07:00
Kapunahele Wong 70fb3e958b docs: improve accessibility of http example (#41057)
PR Close #41057
2021-04-26 09:11:07 -07:00
Sam Severance 9f88da220c docs: Indicate `HttpClientModule` being imported (#41749)
PR Close #41749
2021-04-23 11:38:34 -07:00
George Kalpakas 81f61b276b build(docs-infra): upgrade cli command docs sources to 2310e277b (#41780)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](064c3356e...2310e277b):

**Modified**
- help/build.json

PR Close #41780
2021-04-23 09:41:34 -07:00
Keen Yee Liau 64567d3d39 docs: Remove Protractor test from CI examples (#41733)
Protractor tests are no longer included in new projects starting from
Angular version 12.

PR Close #41733
2021-04-22 10:44:41 -07:00