Skip to content

Commit

Permalink
chore: make NPM dist tag explicit for all packages (aws#13109)
Browse files Browse the repository at this point in the history
Currently, our NPM tag strategy is uniform across all packages. This _mostly_
works, but for V2 it makes sense for `aws-cdk-lib` to be published with a dist
tag of 'latest' while still publishing all of the other libraries as 'next'.

This change is the first supporting change to enable us to have different dist
tags for different packages.
* Introduces a new pkglint rule that enforces that each package.json has a
  publishConfig and tag. For v1, this defaults to 'latest'; for v2 it will
  default to 'next'. These are the correct values, except for `aws-cdk-lib`,
  which will need to be manually changed to `latest`.
* Removes the disttag element from `release.json`.
* Changing `check-api-compatibility` to use the dist tags from  the individual
  `package.json` files, rather than from `release.json`.

Files to look at (all others are package.json changes):
* release.json
* scripts/check-api-compatibility.sh
* scripts/resolve-version-lib.js
* scripts/script-tests/resolve-version.test.js
* tools/pkglint/lib/rules.ts

Once this is approved, and merged up to V2, the change to flip the aws-cdk-lib
tag can be made. Finally, we will update our publishing infrastructure so these
new tags are respected.

related aws#13058


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
njlynch authored and NovakGu committed Feb 18, 2021
1 parent ef25336 commit 5f981c7
Show file tree
Hide file tree
Showing 200 changed files with 689 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,8 @@
"announce": false
},
"maturity": "stable",
"stability": "stable"
"stability": "stable",
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/alexa-ask/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,8 @@
"maturity": "cfn-only",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/app-delivery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,8 @@
},
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/assert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,8 @@
"maturity": "experimental",
"cdk-build": {
"jest": true
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,8 @@
"maturity": "deprecated",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-accessanalyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,8 @@
"maturity": "cfn-only",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-acmpca/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,8 @@
"maturity": "experimental",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-amazonmq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,8 @@
"maturity": "cfn-only",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-amplify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,8 @@
},
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
5 changes: 4 additions & 1 deletion packages/@aws-cdk/aws-apigateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -325,5 +325,8 @@
"awscdkio": {
"announce": false
},
"maturity": "stable"
"maturity": "stable",
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-apigatewayv2-authorizers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,8 @@
"maturity": "experimental",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-apigatewayv2-integrations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,8 @@
"maturity": "experimental",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-apigatewayv2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,8 @@
],
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-appconfig/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,8 @@
"maturity": "cfn-only",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-appflow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,8 @@
"maturity": "cfn-only",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
5 changes: 4 additions & 1 deletion packages/@aws-cdk/aws-applicationautoscaling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,8 @@
"awscdkio": {
"announce": false
},
"maturity": "stable"
"maturity": "stable",
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-applicationinsights/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,8 @@
"maturity": "cfn-only",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-appmesh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,5 +190,8 @@
"maturity": "developer-preview",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-appstream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,8 @@
"maturity": "cfn-only",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-appsync/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,8 @@
"maturity": "experimental",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-athena/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,8 @@
"maturity": "cfn-only",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-auditmanager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,8 @@
"maturity": "cfn-only",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-autoscaling-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,8 @@
"env": {
"AWSLINT_BASE_CONSTRUCT": true
}
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-autoscaling-hooktargets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,8 @@
"env": {
"AWSLINT_BASE_CONSTRUCT": true
}
},
"publishConfig": {
"tag": "latest"
}
}
5 changes: 4 additions & 1 deletion packages/@aws-cdk/aws-autoscaling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,8 @@
"awscdkio": {
"announce": false
},
"maturity": "stable"
"maturity": "stable",
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-autoscalingplans/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,8 @@
"maturity": "cfn-only",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-backup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,8 @@
"maturity": "experimental",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-batch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,8 @@
"maturity": "experimental",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-budgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,8 @@
"maturity": "cfn-only",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-cassandra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,8 @@
"maturity": "cfn-only",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-ce/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,8 @@
"maturity": "cfn-only",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
5 changes: 4 additions & 1 deletion packages/@aws-cdk/aws-certificatemanager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,8 @@
"awscdkio": {
"announce": false
},
"maturity": "stable"
"maturity": "stable",
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-chatbot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,8 @@
"maturity": "experimental",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-cloud9/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,8 @@
"maturity": "experimental",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
5 changes: 4 additions & 1 deletion packages/@aws-cdk/aws-cloudformation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,8 @@
"awscdkio": {
"announce": false
},
"maturity": "deprecated"
"maturity": "deprecated",
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-cloudfront-origins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,8 @@
"maturity": "stable",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-cloudfront/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,8 @@
},
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-cloudtrail/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,8 @@
"maturity": "stable",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-cloudwatch-actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,8 @@
"env": {
"AWSLINT_BASE_CONSTRUCT": true
}
},
"publishConfig": {
"tag": "latest"
}
}
5 changes: 4 additions & 1 deletion packages/@aws-cdk/aws-cloudwatch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,8 @@
"awscdkio": {
"announce": false
},
"maturity": "stable"
"maturity": "stable",
"publishConfig": {
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions packages/@aws-cdk/aws-codeartifact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,8 @@
"maturity": "cfn-only",
"awscdkio": {
"announce": false
},
"publishConfig": {
"tag": "latest"
}
}
5 changes: 4 additions & 1 deletion packages/@aws-cdk/aws-codebuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,5 +224,8 @@
"awscdkio": {
"announce": false
},
"maturity": "stable"
"maturity": "stable",
"publishConfig": {
"tag": "latest"
}
}
5 changes: 4 additions & 1 deletion packages/@aws-cdk/aws-codecommit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,8 @@
"awscdkio": {
"announce": false
},
"maturity": "stable"
"maturity": "stable",
"publishConfig": {
"tag": "latest"
}
}
Loading

0 comments on commit 5f981c7

Please sign in to comment.