Skip to content

Commit

Permalink
scaffold: Automatically use the latest graph-cli version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jannis Pohlmann committed Mar 14, 2019
1 parent 1bf7373 commit be125ee
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"js-yaml": "^3.12.0",
"keytar": "^4.3.0",
"node-fetch": "^2.3.0",
"pkginfo": "^0.4.1",
"prettier": "^1.13.5",
"request": "^2.88.0"
},
Expand Down
5 changes: 4 additions & 1 deletion src/scaffold.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const fs = require('fs-extra')
const path = require('path')
const prettier = require('prettier')
const pkginfo = require('pkginfo')(module)

const { getSubgraphBasename } = require('./command-helpers/subgraph')
const { step } = require('./command-helpers/spinner')
const { ascTypeForEthereum, valueTypeForAsc } = require('./codegen/types')
Expand Down Expand Up @@ -31,7 +33,7 @@ const generatePackageJson = ({ subgraphName }) =>
subgraphName,
},
dependencies: {
'@graphprotocol/graph-cli': '0.7.2',
'@graphprotocol/graph-cli': `${module.exports.version}`,
'@graphprotocol/graph-ts': '0.5.1',
},
}),
Expand Down Expand Up @@ -186,6 +188,7 @@ const writeScaffold = async (scaffold, directory, spinner) => {
}

module.exports = {
...module.exports,
abiEvents,
generateScaffold,
writeScaffold,
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3809,6 +3809,11 @@ pkg-dir@^3.0.0:
dependencies:
find-up "^3.0.0"

pkginfo@^0.4.1:
version "0.4.1"
resolved "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff"
integrity sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8=

pluralize@^7.0.0:
version "7.0.0"
resolved "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777"
Expand Down

0 comments on commit be125ee

Please sign in to comment.