Skip to content

Commit 49dcc05

Browse files
authored
chore(cfn2ts): remove tag-reporting code (#25738)
Some code had snuck into `cfn2ts` in the course of implementing #25610 that wasn't supposed to be committed. Remove it again. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 334008f commit 49dcc05

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

tools/@aws-cdk/cfn2ts/lib/codegen.ts

-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ enum TreeAttributes {
1717
CFN_PROPS = 'aws:cdk:cloudformation:props'
1818
}
1919

20-
export const LEGACY_TAGGING: Record<string, string> = {};
21-
2220
interface Dictionary<T> { [key: string]: T; }
2321

2422
export interface CodeGeneratorOptions {
@@ -353,7 +351,6 @@ export default class CodeGenerator {
353351
this.code.line();
354352
for (const prop of Object.values(propMap)) {
355353
if (schema.isTagPropertyName(upcaseFirst(prop)) && schema.isTaggableResource(spec)) {
356-
LEGACY_TAGGING[cfnName] = upcaseFirst(prop);
357354
this.code.line(`this.tags = new ${TAG_MANAGER}(${tagType(spec)}, ${cfnResourceTypeName}, props.${prop}, { tagPropertyName: '${prop}' });`);
358355
} else {
359356
this.code.line(`this.${prop} = props.${prop};`);

tools/@aws-cdk/cfn2ts/lib/index.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as pkglint from '@aws-cdk/pkglint';
44
import * as fs from 'fs-extra';
55
import { AugmentationGenerator, AugmentationsGeneratorOptions } from './augmentation-generator';
66
import { CannedMetricsGenerator } from './canned-metrics-generator';
7-
import CodeGenerator, { CodeGeneratorOptions, LEGACY_TAGGING } from './codegen';
7+
import CodeGenerator, { CodeGeneratorOptions } from './codegen';
88
import { packageName } from './genspec';
99

1010
interface GenerateOutput {
@@ -141,8 +141,6 @@ export async function generateAll(
141141
moduleMap[name].files = outputFiles;
142142
}));
143143

144-
await fs.writeJson('tagging.json', LEGACY_TAGGING, { spaces: 2 });
145-
146144
return moduleMap;
147145
}
148146

0 commit comments

Comments
 (0)