为什么从 cdk v2 版本中删除了 BitBucketSourceAction?

Why BitBucketSourceAction is removed from cdk v2 version?

我正在使用 AWS cdk 部署代码构建并使用 BitBucketSourceAction class 在代码管道中构建 bitbucket 源阶段。下面是我在使用 cdk v1 时使用的代码。但是升级到cdk v2后,我从库aws-cdk-lib中找不到这个class。如何从 V2 构建 bitbucket 源阶段?

import * as actions from '@aws-cdk/aws-codepipeline-actions';
...

      stageName: 'Source',
      actions: [
        new actions.BitBucketSourceAction({
          actionName: 'SourceAction',
          owner: owner,
          connectionArn: connectionArn,
          branch: branchName,
          output:sourceOutput,
          repo: bitbucketName,
        }),
      ],
    };

根据 1.x 版本的文档您应该使用 CodeStarConnectionsSourceAction 而不是 BitBucketSourceAction 因为它已被弃用。 CDK 2.x 主要版本从 aws-cdk-lib 包中删除了所有已弃用的包。

这里是参考文献:

BitBucket deprecated

Use this implementation

Migrating to CDK v2:

Deprecated properties, methods, and types in AWS CDK v1.x and its Construct Library have been removed completely from the CDK v2 API. In most supported languages, these APIs produce warnings under v1.x, so you may have already migrated to the replacement APIs. A complete list of deprecated APIs in CDK v1.x is available on GitHub.