Skip to content

Commit

Permalink
Merge branch 'master' into blimmer/codebuild-env-var-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jan 15, 2021
2 parents a44bdb9 + 4ba0644 commit ccbcc83
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 21 deletions.
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",
"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

0 comments on commit ccbcc83

Please sign in to comment.