Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(cdk-build-tools): backport feature flag based conditional from v2-main #13056

Merged
merged 2 commits into from
Feb 16, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions tools/cdk-build-tools/lib/feature-flag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ export function testFutureBehavior<T>(

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));
Expand All @@ -59,8 +58,7 @@ export function testLegacyBehavior<T>(

const major = cdkMajorVersion(repoRoot);
if (major === 2) {
// Temporarily disable CDKv2 behaviour
// return;
return;
}
const app = new cdkApp();
return test(name, () => fn(app));
Expand All @@ -78,4 +76,4 @@ function cdkMajorVersion(repoRoot: string) {
throw new Error(`version ${ver} is not a semver`);
}
return sem.major;
}
}