-
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;
} |
@timovv I think you have a simpler design to address the goal documented above. Is it documented somewhere? |
Hi @deyaaeldeen, we deeply appreciate your input into this project. Regrettably, this issue has remained unresolved for over 2 years and inactive for 30 days, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support. |
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: