-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic detection of JS breaking changes #22983
Comments
Making an attempt at pinning down some heuristics. I'm ready to be heavily edited/corrected for spec correctness. An interface/type is considered a "return type" if it:
An interface/type is considered an "input type" if it:
An interface/type may be used as both a return type and an input type. Now some specific rules:
// Bar could be renamed and not break JS consumers, but it should still be flagged as breaking TS consumers.
interface Bar {
name: string;
}
function foo() : Bar;
I think a lot of the complexity here will be spidering through nested types, e.g. interface Feature {
name: string;
// adding a new required property to `Feature` is breaking even though it is not directly used as an input
}
interface Widget {
features: Feature[];
}
class FactoryClient {
produce(widget: Widget): ProductionResponse;
} |
Merge release sentinel 2023 03 01 preview (Azure#22983) * Adds base for updating Microsoft.SecurityInsights from version preview/2023-02-01-preview to version 2023-03-01-preview * Updates readme * Updates API version in new specs and examples * Update description of AAD (Azure#22508) * Update description of AAD AAD should be AADIP to prevent mistakes from customer * Add custom word AADIP AADIP = Azure Active Directory Identity Protection * Remove bing phishing feed msti connector (Azure#22706) * remove bing phishing feed from msti connector * revert to release-Sentinel-2023-03-01-preview * fixes * fixed validation issues * renamed example file * added response status codes for examples * Automation rules - 2023-03-01-preview - add entity trigger API (Azure#22523) * adjust version order * Fix cross-version breaking changes. Fix cross-version breaking changes. * Pull in metadata changes from stable version. * Update Metadata.json * Update Incidents.json add readonly flag for providerIncidentId. * Update readme.md GuidUsage AutoRest-Linter suppression. * Update readme.md suppress GuidUsage * Update readme.md Correct suppression. * Update readme.md Fix suppression. --------- Co-authored-by: shschwar <55053268+shschwar@users.noreply.github.com> Co-authored-by: aviyerMSFT <87452453+aviyerMSFT@users.noreply.github.com> Co-authored-by: loriatarms <105870291+loriatarms@users.noreply.github.com>
@timovv I think you have a simpler design to address the goal documented above. Is it documented somewhere? |
API Guard - JS
Breaking client code degrades our customer experience and will likely hurt Azure adoption. Such breaking changes must be detected before making a release and be handled according to the Azure SDK design guidelines:![BreakingChangeGuideline](https://user-images.githubusercontent.com/6074665/186195289-fcceab4f-408f-432f-b04b-638efb603195.png)
Breaking changes can be classified into source and behavioral breaking changes:
This work tracks building apiguard, a tool to detect source breaking changes between two input extracted APIs.
Design
The tool contains the following components:
Parsing
We use the API Extractor to generate *.api.json files that gets uploaded to https://apiview.dev/ and it is powered by @microsoft/api-extractor-model, a library for reading and writing those *.api.json files. This library can be leveraged to do the desired parsing.
Diffing
TBD
Rules list
TBD
APIView plugin
TBD
The text was updated successfully, but these errors were encountered: