Skip to content

Commit

Permalink
fix: upgrade init'ed and allowed versions of TypeScript (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
carnesen authored and ofrobots committed Sep 24, 2018
1 parent 77e7d6c commit 66da7ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -76,7 +76,7 @@
"typescript": "~3.0.0"
},
"peerDependencies": {
"typescript": "^2.7.1"
"typescript": "^2.7.1 || ^3.0.0"
},
"ava": {
"require": [
Expand Down
5 changes: 4 additions & 1 deletion src/init.ts
Expand Up @@ -114,7 +114,10 @@ export async function addScripts(
export async function addDependencies(
packageJson: PackageJson, options: Options): Promise<boolean> {
let edits = false;
const deps: Bag<string> = {'gts': `^${pkg.version}`, 'typescript': '~2.8.0'};
const deps: Bag<string> = {
gts: `^${pkg.version}`,
typescript: pkg.devDependencies.typescript
};

if (!packageJson.devDependencies) {
packageJson.devDependencies = {};
Expand Down

0 comments on commit 66da7ec

Please sign in to comment.