chore: rewrite jsii targets for experimental packages during transformation#15890
Merged
mergify[bot] merged 1 commit intov2-mainfrom Aug 4, 2021
Merged
chore: rewrite jsii targets for experimental packages during transformation#15890mergify[bot] merged 1 commit intov2-mainfrom
mergify[bot] merged 1 commit intov2-mainfrom
Conversation
…mation As part of #15722, the decision was made to change the package.json files for experimental packages to add 'alpha' identifiers. This ends up causing issues for our ubergen-ed packages (i.e., aws-cdk-lib), which then try to include L1s for these packages under the 'alpha' namespaces. Instead, switch (back) to adding the alpha identifiers as part of the package transformation step. Reverted the change to the pkglint rules, and re-ran `yarn pkglint` to update the package.json files. I also did some light refactoring, since the method was a bit hard to read. fixes #15845
njlynch
commented
Aug 4, 2021
Comment on lines
+98
to
+109
| const jsiiTargets = packageJson.jsii.targets; | ||
| jsiiTargets.dotnet.namespace = jsiiTargets.dotnet.namespace.replace( | ||
| /^Amazon\.CDK\./, 'Amazon.CDK.Alpha.'); | ||
| jsiiTargets.java.package = jsiiTargets.java.package.replace( | ||
| /^software\.amazon\.awscdk\./, 'software.amazon.awscdk.alpha.'); | ||
| jsiiTargets.java.maven.artifactId = jsiiTargets.java.maven.artifactId.startsWith('cdk-') | ||
| ? jsiiTargets.java.maven.artifactId.replace(/cdk-/, 'cdk-alpha.') | ||
| : 'cdk-alpha.aws-' + jsiiTargets.java.maven.artifactId; | ||
| jsiiTargets.python.distName = jsiiTargets.python.distName.replace( | ||
| /^aws-cdk\./, 'aws-cdk.alpha.'); | ||
| jsiiTargets.python.module = jsiiTargets.python.module.replace( | ||
| /^aws_cdk\./, 'aws_cdk.alpha.'); |
Contributor
Author
There was a problem hiding this comment.
This is the only new code in this file - the rest is a refactor. Sourced from #15722 (comment)
Collaborator
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
nija-at
approved these changes
Aug 4, 2021
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). |
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.
As part of #15722, the decision was made to change the package.json files for
experimental packages to add 'alpha' identifiers. This ends up causing issues
for our ubergen-ed packages (i.e., aws-cdk-lib), which then try to include L1s
for these packages under the 'alpha' namespaces. Instead, switch (back) to
adding the alpha identifiers as part of the package transformation step.
Reverted the change to the pkglint rules, and re-ran
yarn pkglintto updatethe package.json files.
I also did some light refactoring, since the method was a bit hard to read.
fixes #15845
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license