Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions packages/@aws-cdk/alexa-ask/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@
>
> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib

![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)

> The APIs of higher level constructs in this module are experimental and under active development.
> They are subject to non-backward compatible changes or removal in any future version. These are
> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be
> announced in the release notes. This means that while you may use them, you may need to update
> your source code when upgrading to a newer version of this package.

---

<!--END STABILITY BANNER-->
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/alexa-ask/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"node": ">= 10.13.0 <13 || >=13.7.0"
},
"stability": "experimental",
"maturity": "experimental",
"maturity": "cfn-only",
"awscdkio": {
"announce": false
}
Expand Down
8 changes: 8 additions & 0 deletions packages/@aws-cdk/aws-acmpca/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
>
> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib

![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)

> The APIs of higher level constructs in this module are experimental and under active development.
> They are subject to non-backward compatible changes or removal in any future version. These are
> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be
> announced in the release notes. This means that while you may use them, you may need to update
> your source code when upgrading to a newer version of this package.

---

<!--END STABILITY BANNER-->
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-acmpca/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"node": ">= 10.13.0 <13 || >=13.7.0"
},
"stability": "experimental",
"maturity": "cfn-only",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?
Looks like it only have an l1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the certificate-authority.ts definitely makes it an L2.

"maturity": "experimental",
"awscdkio": {
"announce": false
}
Expand Down
8 changes: 0 additions & 8 deletions packages/@aws-cdk/aws-route53resolver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@
>
> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib

![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)

> The APIs of higher level constructs in this module are experimental and under active development.
> They are subject to non-backward compatible changes or removal in any future version. These are
> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be
> announced in the release notes. This means that while you may use them, you may need to update
> your source code when upgrading to a newer version of this package.

---

<!--END STABILITY BANNER-->
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-route53resolver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"node": ">= 10.13.0 <13 || >=13.7.0"
},
"stability": "experimental",
"maturity": "experimental",
"maturity": "cfn-only",
"awscdkio": {
"announce": false
}
Expand Down
30 changes: 28 additions & 2 deletions tools/pkglint/lib/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,32 @@ export class MaturitySetting extends ValidationRule {
maturity = 'deprecated';
}

const packageLevels = this.determinePackageLevels(pkg);

const hasL1s = packageLevels.some(level => level === 'l1');
const hasL2s = packageLevels.some(level => level === 'l2');
if (hasL2s) {
// validate that a package that contains L2s does not declare a 'cfn-only' maturity
if (maturity === 'cfn-only') {
pkg.report({
ruleName: this.name,
message: "Package that contains any L2s cannot declare a 'cfn-only' maturity",
fix: () => pkg.json.maturity = 'experimental',
});
}
} else if (hasL1s) {
// validate that a package that contains only L1s declares a 'cfn-only' maturity
if (maturity !== 'cfn-only') {
pkg.report({
ruleName: this.name,
message: "Package that contains only L1s cannot declare a maturity other than 'cfn-only'",
fix: () => pkg.json.maturity = 'cfn-only',
});
}
}

if (maturity) {
this.validateReadmeHasBanner(pkg, maturity, this.determinePackageLevels(pkg));
this.validateReadmeHasBanner(pkg, maturity, packageLevels);
}
}

Expand Down Expand Up @@ -342,7 +366,9 @@ export class MaturitySetting extends ValidationRule {
// to see if this package has L1s.
const hasL1 = !!pkg.json['cdk-build']?.cloudformation;

const libFiles = glob.sync('lib/*.ts');
const libFiles = glob.sync('lib/**/*.ts', {
ignore: 'lib/**/*.d.ts', // ignore the generated TS declaration files
});
const hasL2 = libFiles.some(f => !f.endsWith('.generated.ts') && !f.endsWith('index.ts'));

return [
Expand Down