Commit Graph

19 Commits

Author SHA1 Message Date
Judy Bogart a00f82797b docs: document golden file requirement (#33900)
PR Close #33900
2020-01-07 10:58:53 -08:00
Alan Agius 5f95796b61 test: fix ts api guardian and public guard tests on windows (#30105)
This change addresses several issues with ts-api-guardian and public api guards related tests in Windows

The fixes contain 3 main changes:
1) In `stripExportPattern` - replace `^` with `^^^^`  in RegExp due to a double escaping requirment under Windows. Note that under Linux this the extra character has no effect because it's still a valid RegExp in Js.

2. Force `*.patch` files to always be with a LF line sequence instead of CRLF in windows

3. When adding JSDoc comments consider the presence of a carriage return in a line new feed

Partially addresses #29785

PR Close #30105
2019-04-26 16:32:22 -07:00
Ben Lesh ddadb8e22c refactor(ivy): Update @publicApi to @codeGenApi on ivy instructions (#29820)
- Removes `@publicApi` annotation from ivy instructions
- Adds new `@codeGenApi` annotation to ivy instructions
- Updates ts_api_guardian to support the new annotation properly

PR Close #29820
2019-04-11 08:19:23 -07:00
Ben Lesh 1c07061246 refactor: change error message (#29594)
Removes usage of whitelist from error messages, comments and test descriptions in ts_api_guardian

Related to #28539

PR Close #29594
2019-04-02 10:29:33 -07:00
Miško Hevery 60e403bf6d build: ts-api-guardian should support interface with value types (#27223)
This fixes an issue where a value would hide the type.

```
export interface Foo {
  someMethod(): void;
}

export const Foo: Function = ...;
```

In the above example the `Foo` constant will hide the `interface Foo` symbol.
This change properly saves the interface in addition to the type.

PR Close #27223
2018-11-27 13:42:23 -08:00
Alan Agius 6b1780d77e build: avoid writing `\r` in windows (#26888)
In windows when using readFile `\n` are replaced with `\r\n` which causes issues when comparing golden files

PR Close #26888
2018-11-13 10:50:21 -08:00
Alan Agius 7865abf667 build: fix api guardian path for windows (#26888)
At the moment, `path.posix.relative` will break paths in windows as it will return something like
```
Error: Source file "../C:/users/alag/_bazel_alag/3tbqurya/execroot/angular/bazel-out/x64_windows-fastbuild/bin/packages/core/core.d.ts" not found
```

PR Close #26888
2018-11-13 10:50:21 -08:00
Paul Gschwendtner 9ad54d74d2 build: fix ts-api-guardian does not work on windows w/ bazel (#26761)
* Fixes that the `ts-api-guardian` package does not work on Windows with Bazel. This is because `ts-api-guardian` does not resolve the runfiles through theNodeJS `require` function that properly handles runfiles within Bazel.

PR Close #26761
2018-10-30 13:45:58 -04:00
Paul Gschwendtner 0e1cceed50 build: add option to disable ts-api-guardian default angular tag rules (#26761)
Since the API guardian can be also used by other projects, we should not set up the default Angular project tag rules unless specified explicitly through a given command option (`useAngularTagRules`)

PR Close #26761
2018-10-30 13:45:58 -04:00
Igor Minar 4f250726aa build: fix the accept binary path in ts-api-guardian error message (#26602)
Fixes #26589

PR Close #26602
2018-10-29 12:59:47 -04:00
Pete Bacon Darwin c5949f85ef build: update ts-api-guardian jsdoc tag requirements (#26595)
Now `@experimental` tags are banned; and `@publicApi`
tags are required on exports.

PR Close #26595
2018-10-19 14:35:52 -07:00
Pete Bacon Darwin 2ea57cdcc3 build: refactor ts-api-guardian jsdoc tag handling (#26595)
Allow the jsdoc tag processing to be configured by
type (export, member, param) and by action (required,
banned, toCopy).

This is a pre-requisite to moving over to using `@publicApi`
tags rather than `@stable` and `@experimental`.

PR Close #26595
2018-10-19 14:35:52 -07:00
Alan Agius aac08e0438 build: pass `stripExportPattern` as an array of `RegExp` (#26012)
This is a workaround for https://github.com/bazelbuild/rules_nodejs/issues/317

PR Close #26012
2018-09-27 12:07:03 -07:00
Paul Gschwendtner fa70a2a650 build(bazel): entry point file couldn't be resolved [ts-api-guardian] (#25052)
* When using `ts-api-guardian` on Windows, the input file can't be found due to wrong normalized path delimiters.

PR Close #25052
2018-08-01 13:29:27 -07:00
Pete Bacon Darwin ac316be79b build: remove unnecessary stability check (#23176)
Previously, it was necessary to attach on of the three "stability"
jsdoc tags (`@stable`, `@deprecated` or `@experimental`) to each
public API export.

To ensure that the public API was correctly tagged, the `ts-api-guardian`
would check that one of these tags appeared on every public export.

Now the doc-gen is able to compute that a code item is stable if
it does not contain the `@experimental` nor `@deprecated` tags.

Therefore there is no need to provide the `@stable` tag any more; and
this tag has now been marked as deprecated - i.e. it should not be used.

The ts-api-guardian has been modified in this commit so that it no longer
warns/fails if the `@stable` is missing.

PR Close #23176
2018-04-05 10:03:39 -07:00
Alex Eagle 689f351092 build: expose flatModuleOutFile option on ng_module (#22814)
This lets projects like Material change ng_package "bundle index" files to non-conflicting paths

Currently packages like @angular/core ship with the generated metadata
in a path like 'core.js' which overwrites one of the inputs.

Angular material puts the generated file in a path like 'index.js'

Either way these files generated by ng_module rules have the potential
to collide with inputs given by the user, which results in an error.

Instead, give users the freedom to choose a different non-conflicting name.

Also this refactors the ng_package rule, removing the redundant
secondary_entry_points attribute.

Instead, we assume that any ng_module in the deps with a module_name
attribute is a secondary entry point.

PR Close #22814
2018-03-20 13:28:57 -07:00
Alan e8326e600d fix: overloading a function doesn't generate all of the signatures (#22569)
PR Close #22569
2018-03-09 13:07:36 -08:00
Alex Eagle 4f60968704 test(bazel): Build and test ts-api-guardian locally (#22544)
Also use it to test the public API for core and common

Once we have an ng_package for every package, we can remove
the npm dependency on ts-api-guardian and the gulp-based
public api check.

PR Close #22544
2018-03-02 15:00:00 -08:00
Alex Eagle 25faf808a5 build: copy ts-api-guardian sources (#22544)
This is an exact mirror of 750f651eca

PR Close #22544
2018-03-02 15:00:00 -08:00