Skip to content
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

feat(jsii-diff): allow external stability to be treated as error #4076

Merged
merged 4 commits into from
May 10, 2023

Conversation

mrgrain
Copy link
Contributor

@mrgrain mrgrain commented May 1, 2023

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.

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 1, 2023
packages/jsii-diff/bin/jsii-diff.ts Outdated Show resolved Hide resolved
@mrgrain mrgrain force-pushed the mrgrain/feat/diff-external branch 3 times, most recently from 53bca30 to 84e50a2 Compare May 3, 2023 11:55
@mrgrain mrgrain force-pushed the mrgrain/feat/diff-external branch from 361942c to c28447f Compare May 3, 2023 13:01
@mergify
Copy link
Contributor

mergify bot commented May 4, 2023

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label May 4, 2023
@mergify
Copy link
Contributor

mergify bot commented May 4, 2023

Merging (with squash)...

@mrgrain mrgrain removed the pr/ready-to-merge This PR is ready to be merged. label May 10, 2023
@mrgrain mrgrain changed the title feat(jsii-diff): allow any stability to be treated as error feat(jsii-diff): allow external stability to be treated as error May 10, 2023
@mergify
Copy link
Contributor

mergify bot commented May 10, 2023

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label May 10, 2023
@mergify
Copy link
Contributor

mergify bot commented May 10, 2023

Merging (with squash)...

@mergify mergify bot merged commit 95689ea into main May 10, 2023
33 checks passed
@mergify mergify bot deleted the mrgrain/feat/diff-external branch May 10, 2023 11:04
@mergify mergify bot removed the pr/ready-to-merge This PR is ready to be merged. label May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants