Skip to content

Commit 65f7015

Browse files
46ki75mrgrain
andauthored
fix(cli): remove unnecessary dom lib from default TypeScript config created with cdk init (#295)
Fixes #294 This change also removes `"dom"` from the `tsconfig.json` files of additional packages that are all intended to run in a Node.js environment, not in the browser. Since these packages are not expected to use any web runtime-specific APIs, removing `"dom"` helps prevent accidental use of browser-only types across the codebase. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license --------- Co-authored-by: Momo Kornher <[email protected]>
1 parent 3085cfc commit 65f7015

File tree

22 files changed

+21
-49
lines changed

22 files changed

+21
-49
lines changed

.github/workflows/codecov.yml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projenrc.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const CLI_SDK_V3_RANGE = '^3';
9292
const defaultTsOptions: NonNullable<TypeScriptWorkspaceOptions['tsconfig']>['compilerOptions'] = {
9393
target: 'ES2020',
9494
module: 'commonjs',
95-
lib: ['es2020', 'dom'],
95+
lib: ['es2020'],
9696
incremental: true,
9797
esModuleInterop: false,
9898
skipLibCheck: true,
@@ -1586,6 +1586,7 @@ const integRunner = configureProject(
15861586
tsconfig: {
15871587
compilerOptions: {
15881588
...defaultTsOptions,
1589+
lib: ['es2020', 'dom'],
15891590
},
15901591
},
15911592
jestOptions: jestOptionsForProject({

packages/@aws-cdk/cdk-cli-wrapper/tsconfig.dev.json

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/cdk-cli-wrapper/tsconfig.json

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/cli-lib-alpha/tsconfig.dev.json

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/cli-plugin-contract/tsconfig.dev.json

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/cli-plugin-contract/tsconfig.json

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/cloudformation-diff/tsconfig.dev.json

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/cloudformation-diff/tsconfig.json

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/node-bundle/tsconfig.dev.json

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)