Repository navigation
Commit 9a40cad
authored
build: fix API docs extraction of directives and imported types (#33953)
* build: use the own entry point of import map targets in API extraction
The rule picked the shortest `index.d.ts` among a target and its dependencies, which mapped
`@angular/aria/private` to `src/cdk/platform`. Use the target's own one, and fail if it's missing.
* build: resolve relative imports outside of srcs during API extraction
Imports like `../private` didn't resolve, so directives whose host directives come from them were
documented as plain classes. Resolve them through `rootDirs` to the type declarations among the
inputs, and add a `deps` attribute to provide such declarations.
* build: use the import map in all API docs targets
The cdk/drag-drop and cdk/testing targets didn't use the wrapper in `tools/defaults.bzl`, so
imports like `@angular/core` didn't resolve there.
* build: ignore missing compiled stylesheets during API extraction
They aren't inputs of the action, like the `resets.css` of cdk/drag-drop, and don't affect the
docs.
* refactor(aria/combobox): import private APIs through a relative path
Use `../private`, like the other aria entry points.
* build: add deps to the API docs targets
Provides the declarations of their relative imports of other packages, which were missing (e.g.
`../scrolling` in cdk/drag-drop) or came from unrelated import map entries.
* build: map @angular/cdk/a11y and rxjs in API docs extraction
Types from them, like the aria `id` inputs and the `DragRef` events, were documented as `any`.
* build: fix wildcard path mappings of directories in API extraction
For a directory entry like `rxjs`, the wildcard pointed to its parent, so `rxjs/operators` didn't
resolve.
* build: fail API extraction on Angular compilation errors
Such errors made the extractor silently document directives as plain classes.
* refactor(aria/combobox): update API golden
The declarations no longer import from `@angular/aria/private`, like the other aria entry points.1 parent 7360f0b commit 9a40cad
19 files changed
Lines changed: 95 additions & 32 deletions
File tree
- goldens/aria/combobox
- src
- aria
- accordion
- combobox
- grid
- listbox
- tabs
- toolbar
- tree
- cdk
- drag-drop
- testing
- protractor
- selenium-webdriver
- testbed
- tools
- adev-api-extraction
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 8 | | |
13 | 9 | | |
14 | 10 | | |
| |||
56 | 52 | | |
57 | 53 | | |
58 | 54 | | |
59 | | - | |
| 55 | + | |
60 | 56 | | |
61 | 57 | | |
62 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
0 commit comments