Skip to content

Commit 38b01b9

Browse files
alan-agius4filipesilva
authored andcommitted
docs: update public api steps in contribution guidelines
1 parent b2ce610 commit 38b01b9

File tree

2 files changed

+8
-52
lines changed

2 files changed

+8
-52
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -281,36 +281,14 @@ changes to be accepted, the CLA must be signed. It's a quick process, we promise
281281
[stackoverflow]: http://stackoverflow.com/questions/tagged/angular-devkit
282282

283283
## <a name="public-api"></a> Updating the Public API
284-
Our Public API is protected with TS API Guardian. This is a tool that keeps track of public API surface of our packages.
284+
Our Public API surface is tracked using golden files.
285285

286-
To test if your change effect the public API you need to run the API guardian on that particular package.
287-
288-
For example in case `@angular-devkit/core` package was modified you need to run:
289-
290-
```bash
291-
yarn bazel test //goldens/public-api:angular_devkit_core_api
292-
```
293-
294-
You can also test all packages by running:
286+
You check all golden files by running:
295287
```bash
296-
yarn bazel test //goldens/public-api ...
288+
yarn public-api:check
297289
```
298290

299291
If you modified the public API, the test will fail. To update the golden files you need to run:
300-
301292
```bash
302-
yarn bazel run //goldens/public-api:angular_devkit_core_api.accept
293+
yarn public-api:update
303294
```
304-
305-
**Note**: In some cases we use aliased symbols to create namespaces.
306-
307-
Example:
308-
```javascript
309-
import * as foo from './foo';
310-
311-
export { foo };
312-
```
313-
There are currently not supported by the API guardian.
314-
To overcome this limitation we created `_golden-api.ts` in certain packages.
315-
316-
When adding a new API, it might be the case that you need to add it to `_golden-api.ts`.

scripts/templates/contributing.ejs

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -274,36 +274,14 @@ changes to be accepted, the CLA must be signed. It's a quick process, we promise
274274
[stackoverflow]: http://stackoverflow.com/questions/tagged/angular-devkit
275275

276276
## <a name="public-api"></a> Updating the Public API
277-
Our Public API is protected with TS API Guardian. This is a tool that keeps track of public API surface of our packages.
277+
Our Public API surface is tracked using golden files.
278278

279-
To test if your change effect the public API you need to run the API guardian on that particular package.
280-
281-
For example in case `@angular-devkit/core` package was modified you need to run:
282-
283-
```bash
284-
yarn bazel test //goldens/public-api:angular_devkit_core_api
285-
```
286-
287-
You can also test all packages by running:
279+
You check all golden files by running:
288280
```bash
289-
yarn bazel test //goldens/public-api ...
281+
yarn public-api:check
290282
```
291283

292284
If you modified the public API, the test will fail. To update the golden files you need to run:
293-
294285
```bash
295-
yarn bazel run //goldens/public-api:angular_devkit_core_api.accept
286+
yarn public-api:update
296287
```
297-
298-
**Note**: In some cases we use aliased symbols to create namespaces.
299-
300-
Example:
301-
```javascript
302-
import * as foo from './foo';
303-
304-
export { foo };
305-
```
306-
There are currently not supported by the API guardian.
307-
To overcome this limitation we created `_golden-api.ts` in certain packages.
308-
309-
When adding a new API, it might be the case that you need to add it to `_golden-api.ts`.

0 commit comments

Comments
 (0)