From 7cd792c9fd76590d9f1be762296c76aa0c7bbe1a Mon Sep 17 00:00:00 2001 From: Momo Kornher Date: Wed, 15 Jan 2025 17:27:36 +0000 Subject: [PATCH] chore(toolkit): stricter config --- packages/@aws-cdk/toolkit/.npmignore | 1 + .../toolkit/lib/api/cloud-assembly/private/prepare-source.ts | 2 +- packages/@aws-cdk/toolkit/lib/toolkit.ts | 5 +++-- packages/@aws-cdk/toolkit/tsconfig.json | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/toolkit/.npmignore b/packages/@aws-cdk/toolkit/.npmignore index 745225e30b411..5f740729f8723 100644 --- a/packages/@aws-cdk/toolkit/.npmignore +++ b/packages/@aws-cdk/toolkit/.npmignore @@ -15,6 +15,7 @@ coverage tsconfig.json *.tsbuildinfo junit.xml +jest.config.js # Include .jsii !.jsii diff --git a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/prepare-source.ts b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/prepare-source.ts index f48d4a3217fc0..710080eb3d1a0 100644 --- a/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/prepare-source.ts +++ b/packages/@aws-cdk/toolkit/lib/api/cloud-assembly/private/prepare-source.ts @@ -11,7 +11,7 @@ import * as fs from 'fs-extra'; import { lte } from 'semver'; import type { AppSynthOptions } from './source-builder'; import { ToolkitError } from '../../errors'; -import { ActionAwareIoHost, asLogger, error, warn } from '../../io/private'; +import { ActionAwareIoHost, asLogger, error } from '../../io/private'; import { ToolkitServices } from '../../toolkit/private'; export { guessExecutable } from 'aws-cdk/lib/api/cxapp/exec'; diff --git a/packages/@aws-cdk/toolkit/lib/toolkit.ts b/packages/@aws-cdk/toolkit/lib/toolkit.ts index 6c6ca0bbc5473..542d221e733bf 100644 --- a/packages/@aws-cdk/toolkit/lib/toolkit.ts +++ b/packages/@aws-cdk/toolkit/lib/toolkit.ts @@ -8,7 +8,6 @@ import { HotswapMode } from 'aws-cdk/lib/api/hotswap/common'; import { StackActivityProgress } from 'aws-cdk/lib/api/util/cloudformation/stack-activity-monitor'; import { ResourceMigrator } from 'aws-cdk/lib/migrator'; import { obscureTemplate, serializeStructure } from 'aws-cdk/lib/serialize'; -import { Configuration } from 'aws-cdk/lib/settings'; import { tagsForStack } from 'aws-cdk/lib/tags'; import { CliIoHost } from 'aws-cdk/lib/toolkit/cli-io-host'; import { validateSnsTopicArn } from 'aws-cdk/lib/util/validate-notification-arn'; @@ -160,6 +159,8 @@ export class Toolkit extends CloudAssemblySourceBuilder { public async list(cx: ICloudAssemblySource, _options: ListOptions): Promise { const ioHost = withAction(this.ioHost, 'list'); const assembly = await this.assemblyFromSource(cx); + ioHost; + assembly; throw new Error('Not implemented yet'); } @@ -201,7 +202,7 @@ export class Toolkit extends CloudAssemblySourceBuilder { }); await migrator.tryMigrateResources(stackCollection, options); - const requireApproval = options.requireApproval ?? RequireApproval.BROADENING; + // const requireApproval = options.requireApproval ?? RequireApproval.BROADENING; const parameterMap = buildParameterMap(options.parameters?.parameters); diff --git a/packages/@aws-cdk/toolkit/tsconfig.json b/packages/@aws-cdk/toolkit/tsconfig.json index 95fd939a36cef..e5e0cf1849574 100644 --- a/packages/@aws-cdk/toolkit/tsconfig.json +++ b/packages/@aws-cdk/toolkit/tsconfig.json @@ -10,6 +10,8 @@ "strict": true, "noUncheckedIndexedAccess": true, "noImplicitOverride": true, + "noUnusedLocals": true, + "noUnusedParameters": true, "module": "NodeNext", "declaration": true, "declarationMap": true,