From c2bb42857de1e7e8b482103a31cf19ad958ae71a Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Tue, 16 Feb 2021 17:08:09 +0000 Subject: [PATCH] chore(cdk-build-tools): backport feature flag based conditional from v2-main (#13056) This was originally commented out - d7e028a1 - since this was not yet compatible with the v2-main branch. Since then, the v2-main branch has been updated - 7554246ab - with the necessary fixes and the conditional has been enabled there[1]. No effective change to master branch because of this. It reduces divergence of the two active branches. [1]: https://github.com/aws/aws-cdk/commit/7554246ab6d0819bc57d5e67cd9e4e10a3b7e742#diff-d325e066c7cdf5d2a8423e65b0190045defe711b4dc25adc0a94a11eef163ed9 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- tools/cdk-build-tools/lib/feature-flag.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/cdk-build-tools/lib/feature-flag.ts b/tools/cdk-build-tools/lib/feature-flag.ts index eec1d28d6e9e4..36b22588288aa 100644 --- a/tools/cdk-build-tools/lib/feature-flag.ts +++ b/tools/cdk-build-tools/lib/feature-flag.ts @@ -30,9 +30,8 @@ export function testFutureBehavior( const major = cdkMajorVersion(repoRoot); if (major === 2) { - // Temporaily disable CDKv2 behaviour - // const app = new cdkApp(); - // return test(name, async () => fn(app)); + const app = new cdkApp(); + return test(name, async () => fn(app)); } const app = new cdkApp({ context: flags }); return test(name, () => fn(app)); @@ -59,8 +58,7 @@ export function testLegacyBehavior( const major = cdkMajorVersion(repoRoot); if (major === 2) { - // Temporarily disable CDKv2 behaviour - // return; + return; } const app = new cdkApp(); return test(name, () => fn(app)); @@ -78,4 +76,4 @@ function cdkMajorVersion(repoRoot: string) { throw new Error(`version ${ver} is not a semver`); } return sem.major; -} \ No newline at end of file +}