Add a new doc, `aio/UPDATING.md`, with instructions on updating the
angular.io app to align with the latest Angular CLI/framework/Material.
Also, update the instructions on updating the docs examples apps.
PR Close#47250
With this change we replace AIO examples to use stable Angular packages.
The main reasons for this is that prereleases might contain bugs that
are not in the stable version especially in the Angular CLI were it's
not validated in G3.
PR Close#47092
The `mergeOverridenImplementation` processor tries to ensure that any
doc used with the `@overrideImplementation` annotation is not itself
public (and explicitly marks is as internal if it is).
Previously, it determined the public/private status of a doc by only
checking the value of the doc's `internal` property (which is mainly set
via the `@internal` annotation). This failed to account for docs marked
as "private exports" (such as those prefixed with `ɵ`), which are
essentially also treated as internal.
This would result in incorrect warnings. [Example warning][1]:
> Constructor doc forms/ɵFormControlCtor was not marked '@internal';
> adding this annotation.
This commit prevents the incorrect warning by also checking the value of
the doc's `privateExport` property to determine its public/private
status.
[1]: https://circleci.com/gh/angular/angular/1215057#step-104-164
PR Close#47201
Previously, error messages related to an overriden constructor doc would
stringify the doc as `[object Object]`, which is not helpful for
debugging the issue. For example:
> Constructor doc [object Object] was not marked '@internal'
This commit improves the error message by including the doc's ID
instead. For example, the above error message would become:
> Constructor doc forms/ɵFormControlCtor was not marked '@internal'
PR Close#47201
Adds suggestions for how to resolve the most common messages produced by the documentation linter.
Adds links to the Proselint and other style tests to the new documentation.
Updates pullapprove and navigation.
PR Close#47019
This update includes:
* installation directions for the current version of the Vale VSCode extension (v. 0.15.0)
* a workaround for if the current version of the extension doesn't work.
PR Close#47031
This commit updates docs extraction logic to avoid requiring the `@ngModule` tag on standalone types, since they don't have to be present in any NgModule.
PR Close#47024
All docs examples share the same `node_modules/` (symlinked into each
example from `aio/tools/examples/shared/node_modules/`). However, each
example type has a different `package.json`, which comes from
`aio/tools/examples/shared/boilerplate/*`). In order to ensure that the
dependencies in each example's `package.json` are the same as the ones
in the symlinked `node_modules/` (i.e. the ones that CI tests are run
with), we have a script (`yarn run sync-deps`) that can sync
dependencies from `shared/package.json` into the boilerplate
`package.json` files.
Previously, this script had to be run manually, which was easy to
forget/not know about and resulted in the boilerplate dependencies
often being out-of-sync with the ones in `shared/package.json` (and by
extension, the ones that were actually installed in `node_modules/`).
This commit helps keep the boilerplate dependencies up-to-date in the
following ways:
- Adds the `sync-deps` script to the `postinstall` scripts.
This ensures that dependencies remain in sync whenever someone
manually updates dependencies in `shared/package.json`.
- Runs the `sync-deps` script as a Renovate post-upgrade task.
This ensures that the depenencies remain in sync whenever Renovate
updates dependencies in `shared/package.json`.
For more info on configuring post-upgrade tasks in Renovate, see:
- [postUpgradeTasks][1]
- [allowedPostUpgradeCommands][2]
- [allowPostUpgradeCommandTemplating][3]
NOTE:
For the Renovate change to take effect, the [global config][4] in
`angular/dev-infra` also needs to be updated. This will be done in a
separate PR.
[1]: https://docs.renovatebot.com/configuration-options/#postupgradetasks
[2]: https://docs.renovatebot.com/self-hosted-configuration/#allowedpostupgradecommands
[3]: https://docs.renovatebot.com/self-hosted-configuration/#allowpostupgradecommandtemplating
[4]: 22d3067021/.github/ng-renovate/runner-config.js
PR Close#47009
Add the configuration and style files to support documentation linting. The `README.md` file includes instructions for installation and use of the lint tool.
PR Close#46897
With the recent lock file maintenance, the `@types/angular` dependency
ended up being duplicated. This seems to happen because we locked our
type dependency, but other Angular deps like `angular-route` had a
looser dependency, resulting in e.g. `1.7` types and `1.8` types to be
loaded.
This ultimately ended up breaking TypeScript's auto-discovering
of types and broke some example compilations e.g.
```
app/app.animations.ts(3,3): error TS2339: Property 'animation' does not exist on type 'IModule'.
app/app.config.ts(5,45): error TS2694: Namespace 'angular' has no exported member 'route'.
app/phone-detail/phone-detail.component.ajs.ts(10,37): error TS2694: Namespace 'angular' has no exported member 'route'.
```
We fix this by loosening the type dependency ranges, updating all of
these. Also we update AngularJS itself to the final version.
PR Close#46819
Previously, the "Description" column of the CLI command overview section
was populated based on the CLI command docs' `description` property.
Since #45225, the short description of CLI commands is stored in the
`shortDescription` property.
This commit restores the content of the "Description" column by using
the correct property to populate it.
Fixes#46489
PR Close#46502
The developer preview link was previously prefixed with the Github URL for
Angular's repo. However, it's meant to go to a guide page on AIO itself.
This commit removes the link prefix.
PR Close#46225
This commit adds a tag processor for `@developerPreview`. Adding this tag to
an exported symbol or to a decorator parameter causes an API status tag to
be shown for the API which links to the Developer Preview documentation.
PR Close#46050
Previously, `getImageDimensions()` would try to resolve image URLs
relative to the base path using `path.resolve()`. This resulted in
root-relative URLs (i.e. URLs starting with `/`) being treated as
absolute filesystem paths and thus resolving incorrectly
([example failure][1]).
This commit fixes it by using `.join()` instead, which is more
appropriate in this case. (Originally discussed [here][2].)
[1]: https://circleci.com/gh/angular/angular/1173150
[2]: https://github.com/angular/angular/pull/46134#issuecomment-1137191996
PR Close#46138
Update the docs examples to the latest prerelease versions of Angular
CLI and framework (v14.0.0-rc.0).
Also update the example apps to more closely align with new CLI apps.
See also the [diff][1] between a basic v13.0.0-rc.3 CLI app and a
v14.0.0-rc.0 one.
[1]: https://github.com/cexbrayat/angular-cli-diff/compare/13.0.0-rc.3...14.0.0-rc.0
PR Close#45997
Previously classs, interface and enum members where filtered with the default word ignore list. This lead to poor search results if a search for a member on the ignore list was performed.
PR Close#46060
Previously, the examples were split across shards based on the order in
which `globby()` returned them. This was based on the assumption that
`globby()`/the OS would list files in a deterministic order. However, it
turns out that examples can be listed in different orders between
executions, leading in them not being split correctly across shards on
CI (which further means that some examples may be tested multiple times
and others may not be tested at all).
You can see an example [here][1], where the `getting-started` example is
tested in both the 4th and 5th shards.
This commit fixes this by explicitly sorting the examples based on their
path.
[1]: https://circleci.com/gh/angular/angular/1165448
PR Close#46005