5d3ba8dec7
Previously the instructions were included in the golden files to monitor the frequency and rate of the instruction API changes for the purpose of understanding the stability of this API (as it was considered for becoming a public API and deployed to npm via generated code). This experiment has confirmed that the instruction API is not stable enough to be used as public API. We've since also came up with an alternative plan to compile libraries with the Ivy compiler for npm deployment and this plan does not rely on making Ivy instructions public. For these reasons, I'm removing the instructions from the golden files as it's no longer important to track them. The are three instructions that are still being included: `ɵɵdefineInjectable`, `ɵɵinject`, and `ɵɵInjectableDef`. These instructions are already generated by the VE compiler to support tree-shakable providers, and code depending on these instructions is already deployed to npm. For this reason we need to treat them as public api. This change also reduces the code review overhead, because changes to public api golden files now require multiple approvals. PR Close #38224 |
||
---|---|---|
.. | ||
bin | ||
lib | ||
test | ||
BUILD.bazel | ||
README.md | ||
index.bzl | ||
package.json |
README.md
Typescript API Guardian
Keeps track of public API surface of a typescript library.
Examples:
# Generate one declaration file
ts-api-guardian --out api_guard.d.ts index.d.ts
# Generate multiple declaration files
# (output location like typescript)
ts-api-guardian --outDir api_guard [--rootDir .] core/index.d.ts core/testing.d.ts
# Print usage
ts-api-guardian --help
# Check against one declaration file
ts-api-guardian --verify api_guard.d.ts index.d.ts
# Check against multiple declaration files
ts-api-guardian --verifyDir api_guard [--rootDir .] core/index.d.ts core/testing.d.ts
For developers
Build and test this library:
$ yarn bazel run //:install
$ yarn bazel test //tools/ts-api-guardian:all
Publish to NPM:
$ yarn bazel run @nodejs//:npm whoami # should be logged in as angular
$ grep version tools/ts-api-guardian/package.json # advance as needed
$ yarn bazel run //tools/ts-api-guardian:ts-api-guardian.publish