Skip to content

Commit

Permalink
fix(init-templates): remove dependency on @types/node (#3840)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
RomainMuller authored and mergify[bot] committed Aug 28, 2019
1 parent 64ace90 commit f46ce18
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 53 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"nyc": "^14.1.1",
"ts-jest": "^24.0.2",
"tslint": "^5.19.0",
"typescript": "^3.5.3"
"typescript": "~3.5.3"
},
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env node

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@
"%name%": "bin/%name%.js"
},
"scripts": {
"test": "tsc",
"test:watch": "tsc -w",
"cdk": "cdk"
},
"devDependencies": {
"@types/node": "8.10.45",
"typescript": "^3.3.3333",
"aws-cdk": "^%cdk-version%"
},
"dependencies": {
"@aws-cdk/core": "^%cdk-version%",
"source-map-support": "^0.5.9"
"@aws-cdk/core": "^%cdk-version%"
}
}
28 changes: 0 additions & 28 deletions packages/aws-cdk/lib/init-templates/app/javascript/tsconfig.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
"cdk": "cdk"
},
"devDependencies": {
"@types/node": "8.10.45",
"typescript": "^3.3.3333",
"aws-cdk": "^%cdk-version%",
"ts-node": "^8.1.0",
"aws-cdk": "^%cdk-version%"
"typescript": "~3.5.3"
},
"dependencies": {
"@aws-cdk/core": "^%cdk-version%",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
"types": "lib/index.d.ts",
"scripts": {
"build": "tsc",
"watch": "tsc -w",
"test": "nodeunit test/test.*.js"
"watch": "tsc -w"
},
"devDependencies": {
"@types/nodeunit": "^0.0.30",
"nodeunit": "^0.11.2",
"typescript": "^3.3.3333"
"typescript": "~3.5.3"
},
"peerDependencies": {
"@aws-cdk/core": "^%cdk-version%"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
"cdk": "cdk"
},
"devDependencies": {
"@types/node": "8.10.45",
"typescript": "^3.3.3333",
"aws-cdk": "^%cdk-version%",
"ts-node": "^8.1.0",
"aws-cdk": "^%cdk-version%"
"typescript": "~3.5.3"
},
"dependencies": {
"@aws-cdk/aws-sns": "^%cdk-version%",
Expand Down
2 changes: 1 addition & 1 deletion packages/decdk/package-lock.json

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

2 changes: 1 addition & 1 deletion tools/awslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@types/fs-extra": "^8.0.0",
"@types/yargs": "^13.0.2",
"tslint": "^5.18.0",
"typescript": "^3.5.3"
"typescript": "~3.5.3"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion tools/cdk-build-tools/package-lock.json

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

2 changes: 1 addition & 1 deletion tools/cdk-build-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"nyc": "^14.1.1",
"ts-jest": "^24.0.2",
"tslint": "^5.18.0",
"typescript": "^3.5.3",
"typescript": "~3.5.3",
"yargs": "^13.3.0"
},
"keywords": [
Expand Down

0 comments on commit f46ce18

Please sign in to comment.