-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(jsii-diff): allow external stability to be treated as error (#4076)
In certain situations one might want to treat changes to `external` APIs as errors. This could be to check the external APIs for any breaking changes and have an opportunity to selectively reject, heal or soften an upstream change. This change introduces a new cli option `--error-on` which can be one of three classes: | `--error-on` | Stabilities that cause an ERROR | | ------------------ | -------------------------------------------------- | | `prod` (default) | `stable`, `deprecated` | | `non-experimental` | `stable`, `deprecated`, `external` | | `all` | `stable`, `deprecated`, `experimental`, `external` | **Fixes `deprecated` APIs not being treated as `stable`.** In jsii, deprecations are treated as a stability. However for the purpose of jsii-diff they should be treated as stable. Otherwise one could do `stable -> deprecated, make breaking change, deprecated -> stable`, which should not be allowed. We also can't prohibit the transition from deprecated back to stable, as it's perfectly okay to un-deprecate an API. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
- Loading branch information
Showing
4 changed files
with
185 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.