From 00693d70a2e96437846988682224d0d2254e600d Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Fri, 7 Oct 2016 14:29:16 -0700 Subject: [PATCH] docs: add PUBLIC_API.md --- docs/PUBLIC_API.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 docs/PUBLIC_API.md diff --git a/docs/PUBLIC_API.md b/docs/PUBLIC_API.md new file mode 100644 index 0000000000..a55a429fca --- /dev/null +++ b/docs/PUBLIC_API.md @@ -0,0 +1,40 @@ +# Supported Public API Surface of Angular + +Our SemVer, timed-release cycle and deprecation policy currently applies to these npm packages: + +- `@angular/core` +- `@angular/common` +- `@angular/platform-browser` +- `@angular/platform-browser-dynamic` +- `@angular/platform-server` +- `@angular/platform-webworker` +- `@angular/platform-webworker-dynamic` +- `@angular/upgrade` +- `@angular/router` +- `@angular/forms` +- `@angular/http` + + +One intentional omission from this list is `@angular/compiler`, which is currently considered a low level api and is subject to internal changes. These changes will not affect any applications or libraries using the higher-level apis (the command line interface or JIT compilation via `@angular/platform-browser-dynamic`). Only very specific use-cases require direct access to the compiler API (mostly tooling integration for IDEs, linters, etc). If you are working on this kind of integration, please reach out to us first. + +Additionally only the command line usage (not direct use of APIs) of `@angular/compiler-cli` is covered. + +Other projects developed by the Angular team like angular-cli, Angular Material, benchpress, will be covered by these or similar guarantees in the future as they mature. + +Within the supported packages, we provide guarantees for: + +- symbols exported via the main entry point (e.g. `@angular/core`) and testing entry point (e.g. `@angular/core/testing`). This applies to both runtime/JavaScript values and TypeScript types. +- symbols exported via global namespace `ng` (e.g. `ng.core`) +- bundles located in the `bundles/` directory of our npm packages (e.g. `@angular/core/bundles/core.umd.js`) + + +We explicitly don't consider the following to be our public API surface: + +- any file/import paths within our package except for the `/`, `/testing` and `/bundles/*' +- constructors of injectable classes (services and directives) - please use DI to obtain instances of these classes +- any class members or symbols marked as `private` or prefixed with underscore +- extending any of our classes unless the support for this is specifically documented in the API docs +- the contents and API surface of the code generated by Angular's compiler (with one notable exception: the existence and name of `NgModuleFactory` instances exported from generated code is guaranteed) + + +Our peer dependencies (e.g. typescript, zone.js, or rxjs) are not considered part of our API surface, but they are included in our SemVer policies. We might update the required version of any of these dependencies in minor releases if the update doesn't cause breaking changes for Angular applications. Peer dependency updates that result in non-trivial breaking changes must be deferred to major Angular releases.