From 797788ae39b41b014bf462031c844082e0ba9ec1 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Mon, 1 Nov 2021 21:21:16 +0000 Subject: [PATCH] chore: use fixed deprecated list for strip-deprecated (#17260) This is a continuation (and the final piece!) of https://github.com/aws/jsii/pull/3085 and https://github.com/aws/aws-cdk/pull/17120. Changes cdk-build to use the fixed deprecated list, rather than stripping all deprecated elements. This will enable us to deprecate new elements going forward without stripping them from v2 and breaking customers. closes #16566 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- tools/@aws-cdk/cdk-build-tools/lib/package-info.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts b/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts index 5b79a2d675a0a..b264d3043b1b6 100644 --- a/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts +++ b/tools/@aws-cdk/cdk-build-tools/lib/package-info.ts @@ -99,7 +99,7 @@ export function packageCompiler(compilers: CompilerOverrides, options?: CDKBuild if (isJsii()) { const args = ['--silence-warnings=reserved-word']; if (options?.stripDeprecated) { - args.push('--strip-deprecated'); + args.push(`--strip-deprecated ${path.join(__dirname, '..', '..', '..', '..', 'deprecated_apis.txt')}`); } return [compilers.jsii || require.resolve('jsii/bin/jsii'), ...args]; } else {