From efde8e948f548f86c1c090fe2b7ea255271c7f56 Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Mon, 11 Nov 2019 13:41:54 +0200 Subject: [PATCH] feat(cli): add @types/node to typescript init templates (#4947) Since it is very common for users to need to reference local files using `path.join` and `__dirname`, it is only pragmatic that we will include @types/node in the init template. We use a pinned version since experience shows that these types can get a bit messed up (see #3839) Supersedes #4462 Reverts #3840 --- .../lib/init-templates/app/typescript/package.template.json | 1 + .../lib/init-templates/lib/typescript/package.template.json | 1 + .../init-templates/sample-app/typescript/package.template.json | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json index 94137f0c0fb86..c78f0a4e5eb36 100644 --- a/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json +++ b/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json @@ -13,6 +13,7 @@ "devDependencies": { "@aws-cdk/assert": "^%cdk-version%", "@types/jest": "^24.0.18", + "@types/node": "10.3.0", "jest": "^24.9.0", "ts-jest": "^24.0.2", "aws-cdk": "^%cdk-version%", diff --git a/packages/aws-cdk/lib/init-templates/lib/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/lib/typescript/package.template.json index 89ea8dd73f51e..c69f12ba8fa92 100644 --- a/packages/aws-cdk/lib/init-templates/lib/typescript/package.template.json +++ b/packages/aws-cdk/lib/init-templates/lib/typescript/package.template.json @@ -11,6 +11,7 @@ "devDependencies": { "@aws-cdk/assert": "^%cdk-version%", "@types/jest": "^24.0.18", + "@types/node": "10.3.0", "jest": "^24.9.0", "ts-jest": "^24.0.2", "typescript": "~3.6.2" diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json index 530f72458570a..4c89280e1eee4 100644 --- a/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json +++ b/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json @@ -14,6 +14,7 @@ "aws-cdk": "^%cdk-version%", "@aws-cdk/assert": "^1.6.1", "@types/jest": "^24.0.18", + "@types/node": "10.3.0", "jest": "^24.9.0", "ts-jest": "^24.0.2", "ts-node": "^8.1.0",