Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,6 @@ tmpToolkitHelpers.package.addField('exports', {

tmpToolkitHelpers.eslint?.addRules({
'@cdklabs/no-throw-default-error': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
});

tmpToolkitHelpers.gitignore.addPatterns('test/**/*.map');
Expand Down Expand Up @@ -1218,7 +1217,6 @@ new S3DocsPublishing(toolkitLib, {
// Eslint rules
toolkitLib.eslint?.addRules({
'@cdklabs/no-throw-default-error': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'import/no-restricted-paths': ['error', {
zones: [{
target: './',
Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/cdk-build-tools/.eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions packages/@aws-cdk/cdk-build-tools/lib/compile.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { makeExecutable, shell } from './os';
import { CDKBuildOptions, CompilerOverrides, currentPackageJson, packageCompiler } from './package-info';
import { Timers } from './timer';
import type { CDKBuildOptions, CompilerOverrides } from './package-info';
import { currentPackageJson, packageCompiler } from './package-info';
import type { Timers } from './timer';

/**
* Run the compiler on the current package
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/cdk-build-tools/lib/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as path from 'path';
import * as process from 'process';
import * as fs from 'fs-extra';
import { shell, escape } from './os';
import { CDKBuildOptions, CompilerOverrides } from './package-info';
import { Timers } from './timer';
import type { CDKBuildOptions, CompilerOverrides } from './package-info';
import type { Timers } from './timer';

export async function lintCurrentPackage(
options: CDKBuildOptions,
Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/cdk-cli-wrapper/.eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions packages/@aws-cdk/cdk-cli-wrapper/lib/cdk-wrapper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ChildProcess } from 'child_process';
import { DefaultCdkOptions, DeployOptions, DestroyOptions, SynthOptions, ListOptions, StackActivityProgress, HotswapMode } from './commands';
import type { ChildProcess } from 'child_process';
import type { DefaultCdkOptions, DeployOptions, DestroyOptions, SynthOptions, ListOptions } from './commands';
import { StackActivityProgress, HotswapMode } from './commands';
import { exec, watch } from './utils';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cdk-cli-wrapper/lib/commands/deploy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DefaultCdkOptions, RequireApproval } from './common';
import type { DefaultCdkOptions, RequireApproval } from './common';

/**
* Options to use with cdk deploy
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cdk-cli-wrapper/lib/commands/destroy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DefaultCdkOptions } from './common';
import type { DefaultCdkOptions } from './common';

/**
* Options to use with cdk destroy
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cdk-cli-wrapper/lib/commands/list.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DefaultCdkOptions } from './common';
import type { DefaultCdkOptions } from './common';

/**
* Options for cdk list
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cdk-cli-wrapper/lib/commands/synth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DefaultCdkOptions } from './common';
import type { DefaultCdkOptions } from './common';

/**
* Options to use with cdk synth
Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/cli-lib-alpha/.eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/@aws-cdk/cli-lib-alpha/lib/cli.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import { SharedOptions, DeployOptions, DestroyOptions, BootstrapOptions, SynthOptions, ListOptions, StackActivityProgress, HotswapMode } from './commands';
import type { SharedOptions, DeployOptions, DestroyOptions, BootstrapOptions, SynthOptions, ListOptions } from './commands';
import { StackActivityProgress, HotswapMode } from './commands';
import { exec as runCli } from '../../../aws-cdk/lib';
// eslint-disable-next-line import/no-extraneous-dependencies
import { createAssembly, prepareContext, prepareDefaultEnvironment } from '../../../aws-cdk/lib/api/cxapp/exec';
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cli-lib-alpha/lib/commands/bootstrap.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SharedOptions } from './common';
import type { SharedOptions } from './common';

/**
* Options to use with cdk bootstrap
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cli-lib-alpha/lib/commands/deploy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SharedOptions, RequireApproval } from './common';
import type { SharedOptions, RequireApproval } from './common';

export enum HotswapMode {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cli-lib-alpha/lib/commands/destroy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SharedOptions } from './common';
import type { SharedOptions } from './common';

/**
* Options to use with cdk destroy
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cli-lib-alpha/lib/commands/list.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SharedOptions } from './common';
import type { SharedOptions } from './common';

/**
* Options for cdk list
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cli-lib-alpha/lib/commands/synth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SharedOptions } from './common';
import type { SharedOptions } from './common';

/**
* Options to use with cdk synth
Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/cli-plugin-contract/.eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/@aws-cdk/cloud-assembly-schema/.eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AwsDestination } from './aws-destination';
import type { AwsDestination } from './aws-destination';

/**
* A file asset
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AwsDestination } from './aws-destination';
import type { AwsDestination } from './aws-destination';

/**
* A file asset
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/cloud-assembly-schema/lib/assets/schema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DockerImageAsset } from './docker-image-asset';
import { FileAsset } from './file-asset';
import type { DockerImageAsset } from './docker-image-asset';
import type { FileAsset } from './file-asset';

/**
* Definitions for the asset manifest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Tag } from './metadata-schema';
import type { Tag } from './metadata-schema';

/**
* Identifier for the context provider
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ArtifactProperties } from './artifact-schema';
import { ContextProvider, ContextQueryProperties } from './context-queries';
import { MetadataEntry } from './metadata-schema';
import type { ArtifactProperties } from './artifact-schema';
import type { ContextProvider, ContextQueryProperties } from './context-queries';
import type { MetadataEntry } from './metadata-schema';

/**
* Type of cloud artifact.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DefaultCdkOptions, RequireApproval } from './common';
import type { DefaultCdkOptions, RequireApproval } from './common';

/**
* Options to use with cdk deploy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DefaultCdkOptions } from './common';
import type { DefaultCdkOptions } from './common';

/**
* Options to use with cdk destroy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TestCase } from './test-case';
import type { TestCase } from './test-case';
/**
* Definitions for the integration testing manifest
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DeployOptions, DestroyOptions } from './commands';
import type { DeployOptions, DestroyOptions } from './commands';

/**
* The set of options to control the workflow of the test runner
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/cloud-assembly-schema/lib/manifest.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as fs from 'fs';
import * as jsonschema from 'jsonschema';
import * as semver from 'semver';
import * as assets from './assets';
import type * as assets from './assets';
import * as assembly from './cloud-assembly';
import * as integ from './integ-tests';
import type * as integ from './integ-tests';

/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-require-imports */
Expand Down
6 changes: 4 additions & 2 deletions packages/@aws-cdk/cloud-assembly-schema/test/manifest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';
import * as semver from 'semver';
import type {
AssemblyManifest,
StackTagsMetadataEntry,
} from '../lib';
import {
ArtifactType,
AssemblyManifest,
ContextProvider,
Manifest,
StackTagsMetadataEntry,
} from '../lib';

const FIXTURES = path.join(__dirname, 'fixtures');
Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/cloudformation-diff/.eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/@aws-cdk/cloudformation-diff/lib/diff/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Resource } from '@aws-cdk/service-spec-types';
import type { Resource } from '@aws-cdk/service-spec-types';
import * as types from './types';
import { deepEqual, diffKeyedEntities, loadResourceModel } from './util';

Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/cloudformation-diff/lib/diff/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { AssertionError } from 'assert';
import { PropertyScrutinyType, ResourceScrutinyType, Resource as ResourceModel } from '@aws-cdk/service-spec-types';
import type { Resource as ResourceModel } from '@aws-cdk/service-spec-types';
import { PropertyScrutinyType, ResourceScrutinyType } from '@aws-cdk/service-spec-types';
import { deepEqual, loadResourceModel } from './util';
import { IamChanges } from '../iam/iam-changes';
import { SecurityGroupChanges } from '../network/security-group-changes';
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cloudformation-diff/lib/diff/util.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { loadAwsServiceSpecSync } from '@aws-cdk/aws-service-spec';
import { Resource, SpecDatabase } from '@aws-cdk/service-spec-types';
import type { Resource, SpecDatabase } from '@aws-cdk/service-spec-types';

/**
* Compares two objects for equality, deeply. The function handles arguments that are
Expand Down
9 changes: 5 additions & 4 deletions packages/@aws-cdk/cloudformation-diff/lib/format.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { format } from 'util';
import * as chalk from 'chalk';
import { DifferenceCollection, TemplateDiff } from './diff/types';
import type { DifferenceCollection, TemplateDiff } from './diff/types';
import { deepEqual } from './diff/util';
import { Difference, isPropertyDifference, ResourceDifference, ResourceImpact } from './diff-template';
import type { Difference, ResourceDifference } from './diff-template';
import { isPropertyDifference, ResourceImpact } from './diff-template';
import { formatTable } from './format-table';
import { IamChanges } from './iam/iam-changes';
import { SecurityGroupChanges } from './network/security-group-changes';
import type { IamChanges } from './iam/iam-changes';
import type { SecurityGroupChanges } from './network/security-group-changes';

// from cx-api
const PATH_METADATA_KEY = 'aws:cdk:path';
Expand Down
13 changes: 8 additions & 5 deletions packages/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { PropertyScrutinyType, ResourceScrutinyType } from '@aws-cdk/service-spec-types';
import * as chalk from 'chalk';
import { ISsoInstanceACAConfig, ISsoPermissionSet, SsoAssignment, SsoInstanceACAConfig, SsoPermissionSet } from './iam-identity-center';
import { ManagedPolicyAttachment, ManagedPolicyJson } from './managed-policy';
import { parseLambdaPermission, parseStatements, Statement, StatementJson } from './statement';
import { MaybeParsed } from '../diff/maybe-parsed';
import { PropertyChange, PropertyMap, ResourceChange } from '../diff/types';
import type { ISsoInstanceACAConfig, ISsoPermissionSet } from './iam-identity-center';
import { SsoAssignment, SsoInstanceACAConfig, SsoPermissionSet } from './iam-identity-center';
import type { ManagedPolicyJson } from './managed-policy';
import { ManagedPolicyAttachment } from './managed-policy';
import type { Statement, StatementJson } from './statement';
import { parseLambdaPermission, parseStatements } from './statement';
import type { MaybeParsed } from '../diff/maybe-parsed';
import type { PropertyChange, PropertyMap, ResourceChange } from '../diff/types';
import { DiffableCollection } from '../diffable';
import { renderIntrinsics } from '../render-intrinsics';
import { deepRemoveUndefined, dropIfEmpty, flatMap, makeComparator } from '../util';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { MaybeParsed, mkParsed } from '../diff/maybe-parsed';
import type { MaybeParsed } from '../diff/maybe-parsed';
import { mkParsed } from '../diff/maybe-parsed';

export class ManagedPolicyAttachment {
public static parseManagedPolicies(identityArn: string, arns: string | string[]): ManagedPolicyAttachment[] {
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/cloudformation-diff/lib/iam/statement.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { MaybeParsed, mkParsed, mkUnparseable } from '../diff/maybe-parsed';
import type { MaybeParsed } from '../diff/maybe-parsed';
import { mkParsed, mkUnparseable } from '../diff/maybe-parsed';
import { deepRemoveUndefined } from '../util';

// namespace object imports won't work in the bundle for function exports
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as chalk from 'chalk';
import { RuleJson, SecurityGroupRule } from './security-group-rule';
import { PropertyChange, ResourceChange } from '../diff/types';
import type { RuleJson } from './security-group-rule';
import { SecurityGroupRule } from './security-group-rule';
import type { PropertyChange, ResourceChange } from '../diff/types';
import { DiffableCollection } from '../diffable';
import { renderIntrinsics } from '../render-intrinsics';
import { deepRemoveUndefined, dropIfEmpty, makeComparator } from '../util';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as chalk from 'chalk';
import { fullDiff } from '../../lib';
import { MaybeParsed } from '../../lib/diff/maybe-parsed';
import { IamChangesJson } from '../../lib/iam/iam-changes';
import type { MaybeParsed } from '../../lib/diff/maybe-parsed';
import type { IamChangesJson } from '../../lib/iam/iam-changes';
import { deepRemoveUndefined } from '../../lib/util';
import { largeSsoPermissionSet, poldoc, policy, resource, role, template } from '../util';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ResourceChangeDetail } from '@aws-sdk/client-cloudformation';
import type { ResourceChangeDetail } from '@aws-sdk/client-cloudformation';
import * as utils from './util';
import { PropertyDifference, ResourceDifference, ResourceImpact, fullDiff } from '../lib';
import { TemplateAndChangeSetDiffMerger } from '../lib/diff/template-and-changeset-diff-merger';
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cloudformation-diff/test/util.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Change, DescribeChangeSetOutput } from '@aws-sdk/client-cloudformation';
import type { Change, DescribeChangeSetOutput } from '@aws-sdk/client-cloudformation';

export function template(resources: {[key: string]: any}) {
return { Resources: resources };
Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/node-bundle/.eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/@aws-cdk/node-bundle/src/api/_attributions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import * as fs from 'fs-extra';
import type { ModuleInfo } from 'license-checker';
import { shell } from './_shell';
import type { Package } from './bundle';
import { Violation, ViolationType, ViolationsReport } from './violation';
import type { Violation } from './violation';
import { ViolationType, ViolationsReport } from './violation';

const ATTRIBUTION_SEPARATOR = '\n----------------\n';

Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/node-bundle/src/api/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import * as esbuild from 'esbuild';
import * as fs from 'fs-extra';
import { Attributions } from './_attributions';
import { shell } from './_shell';
import { Violation, ViolationType, ViolationsReport } from './violation';
import type { Violation } from './violation';
import { ViolationType, ViolationsReport } from './violation';

const DEFAULT_ALLOWED_LICENSES = [
'Apache-2.0',
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk/node-bundle/src/cli-main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as path from 'path';
import * as fs from 'fs-extra';
import * as yargs from 'yargs';
import { Bundle, BundlePackOptions, BundleProps, BundleValidateOptions } from './api';
import type { BundlePackOptions, BundleProps, BundleValidateOptions } from './api';
import { Bundle } from './api';

function versionNumber(): string {
return fs.readJSONSync(path.join(__dirname, '..', 'package.json')).version;
Expand Down
Loading