Skip to content

Commit f46ce18

Browse files
RomainMullermergify[bot]
authored andcommitted
fix(init-templates): remove dependency on @types/node (#3840)
* fix(init-templates): remove dependency on @types/node That was not required anymore since we no longer require passing the command line arguments to the `app.run()` call. This dependency has the potential of causing collisions with the ES libraries included by the TypeScript compiler, and specifying a correct version can be a delicate exercise, especially as those templates have to keep working in the future. Additionally, pinned the TypeScript compiler version to the current minor, as recommended by the TypeScript maintainers (TypeScript does not honor SemVer, but guarantees no breaking change between stable releases, which they indicate by issuing a new major version). Fixes #3839 * also pin typescript compiler version to current minor
1 parent 64ace90 commit f46ce18

File tree

12 files changed

+13
-53
lines changed

12 files changed

+13
-53
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"nyc": "^14.1.1",
2121
"ts-jest": "^24.0.2",
2222
"tslint": "^5.19.0",
23-
"typescript": "^3.5.3"
23+
"typescript": "~3.5.3"
2424
},
2525
"repository": {
2626
"type": "git",

packages/aws-cdk/lib/init-templates/app/javascript/bin/%name%.template.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env node
22

3-
// @ts-ignore: Cannot find declaration file
4-
require('source-map-support/register');
53
const cdk = require('@aws-cdk/core');
64
const { %name.PascalCased%Stack } = require('../lib/%name%-stack');
75

packages/aws-cdk/lib/init-templates/app/javascript/package.template.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,12 @@
55
"%name%": "bin/%name%.js"
66
},
77
"scripts": {
8-
"test": "tsc",
9-
"test:watch": "tsc -w",
108
"cdk": "cdk"
119
},
1210
"devDependencies": {
13-
"@types/node": "8.10.45",
14-
"typescript": "^3.3.3333",
1511
"aws-cdk": "^%cdk-version%"
1612
},
1713
"dependencies": {
18-
"@aws-cdk/core": "^%cdk-version%",
19-
"source-map-support": "^0.5.9"
14+
"@aws-cdk/core": "^%cdk-version%"
2015
}
2116
}

packages/aws-cdk/lib/init-templates/app/javascript/tsconfig.json

Lines changed: 0 additions & 28 deletions
This file was deleted.

packages/aws-cdk/lib/init-templates/app/typescript/package.template.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
"cdk": "cdk"
1111
},
1212
"devDependencies": {
13-
"@types/node": "8.10.45",
14-
"typescript": "^3.3.3333",
13+
"aws-cdk": "^%cdk-version%",
1514
"ts-node": "^8.1.0",
16-
"aws-cdk": "^%cdk-version%"
15+
"typescript": "~3.5.3"
1716
},
1817
"dependencies": {
1918
"@aws-cdk/core": "^%cdk-version%",

packages/aws-cdk/lib/init-templates/lib/typescript/package.template.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@
55
"types": "lib/index.d.ts",
66
"scripts": {
77
"build": "tsc",
8-
"watch": "tsc -w",
9-
"test": "nodeunit test/test.*.js"
8+
"watch": "tsc -w"
109
},
1110
"devDependencies": {
12-
"@types/nodeunit": "^0.0.30",
13-
"nodeunit": "^0.11.2",
14-
"typescript": "^3.3.3333"
11+
"typescript": "~3.5.3"
1512
},
1613
"peerDependencies": {
1714
"@aws-cdk/core": "^%cdk-version%"

packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
"cdk": "cdk"
1111
},
1212
"devDependencies": {
13-
"@types/node": "8.10.45",
14-
"typescript": "^3.3.3333",
13+
"aws-cdk": "^%cdk-version%",
1514
"ts-node": "^8.1.0",
16-
"aws-cdk": "^%cdk-version%"
15+
"typescript": "~3.5.3"
1716
},
1817
"dependencies": {
1918
"@aws-cdk/aws-sns": "^%cdk-version%",

packages/decdk/package-lock.json

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

tools/awslint/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@types/fs-extra": "^8.0.0",
2929
"@types/yargs": "^13.0.2",
3030
"tslint": "^5.18.0",
31-
"typescript": "^3.5.3"
31+
"typescript": "~3.5.3"
3232
},
3333
"repository": {
3434
"type": "git",

0 commit comments

Comments
 (0)