Skip to content

Commit

Permalink
chore(migrate): improve warning (#28025)
Browse files Browse the repository at this point in the history
This feature is still under development and the warning isn't clear enough on that point.

I also added in a small improvement to compare the input language as lowercase. No need to throw an error just because someone types TypeScript instead of typescript.



----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
TheRealAmazonKendra authored Nov 16, 2023
1 parent 3278c19 commit 2272fe4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/aws-cdk/lib/cdk-toolkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,8 @@ export class CdkToolkit {
* @param options Options for CDK app creation
*/
public async migrate(options: MigrateOptions): Promise<void> {
warning('This is an experimental feature. We make no guarantees about the outcome or stability of the functionality.');
const language = options.language ?? 'typescript';
warning('This is an experimental feature and development on it is still in progress. We make no guarantees about the outcome or stability of the functionality.');
const language = options.language?.toLowerCase() ?? 'typescript';

try {
validateSourceOptions(options.fromPath, options.fromStack);
Expand Down

0 comments on commit 2272fe4

Please sign in to comment.