chore: fix packages transform for stability stripping#17388
Merged
mergify[bot] merged 2 commits intomasterfrom Nov 7, 2021
Merged
chore: fix packages transform for stability stripping#17388mergify[bot] merged 2 commits intomasterfrom
mergify[bot] merged 2 commits intomasterfrom
Conversation
iliapolo
commented
Nov 7, 2021
| '>', | ||
| '> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib', | ||
| ].join('\n'); | ||
| ].join('\n')}\n\n`; |
Contributor
Author
There was a problem hiding this comment.
We want to strip the newlines preceding the banner as well.

> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use.
>
> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib
iliapolo
commented
Nov 7, 2021
| > stable and safe to use. | ||
| > | ||
| > [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib`; | ||
| > [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib\n\n<!-- -->\n\n`; |
Contributor
Author
There was a problem hiding this comment.
Strip newlines as well as notice separators added by
aws-cdk/tools/@aws-cdk/pkglint/lib/rules.ts
Lines 534 to 542 in 9ef84f4
eladb
approved these changes
Nov 7, 2021
Collaborator
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Contributor
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
TikiTDO
pushed a commit
to TikiTDO/aws-cdk
that referenced
this pull request
Feb 21, 2022
In aws#17327, we stripped away the stability banner for `Cfn` resources from README's of alpha modules, since these modules don't actually contain L1 resources. Problem is that this stripping causes a bunch of `pkglint` violations on the `v2-main` branch, for example: ```console @aws-cdk/aws-iot-alpha: In package package.json -- 972 | @aws-cdk/aws-iot-alpha: - [package-info/maturity] Missing stability banner for experimental in README.md file (fixable) 973 | @aws-cdk/aws-iot-alpha: Error: Some package.json files had errors 974 | @aws-cdk/aws-iot-alpha: at main (/codebuild/output/src115445882/src/github.com/aws/aws-cdk/tools/@aws-cdk/pkglint/bin/pkglint.js:30:15) 975 | @aws-cdk/aws-iot-alpha: at Object.<anonym ``` This PR fixes the transform and makes the necessary changes so that `pkglint` will be happy. Note that this was not detected during merge of aws#17327 into master since on master, these packages are transformed into private packages, and hence are not validated. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #17327, we stripped away the stability banner for
Cfnresources from README's of alpha modules, since these modules don't actually contain L1 resources.Problem is that this stripping causes a bunch of
pkglintviolations on thev2-mainbranch, for example:This PR fixes the transform and makes the necessary changes so that
pkglintwill be happy.Note that this was not detected during merge of #17327 into master since on master, these packages are transformed into private packages, and hence are not validated.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license