diff --git a/packages/gatsby-source-hacker-news/package.json b/packages/gatsby-source-hacker-news/package.json index d1d5c0e396e92..c21c0234ba7c0 100644 --- a/packages/gatsby-source-hacker-news/package.json +++ b/packages/gatsby-source-hacker-news/package.json @@ -25,13 +25,12 @@ ], "license": "MIT", "peerDependencies": { - "gatsby": "^2.0.0" + "gatsby": "^2.0.15" }, "repository": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-hacker-news", "scripts": { "build": "babel src --out-dir . --ignore **/__tests__", "prepare": "cross-env NODE_ENV=production npm run build", "watch": "babel -w src --out-dir . --ignore **/__tests__" - }, - "gitHead": "5bd5aebe066b9875354a81a4b9ed98722731c465" + } } diff --git a/packages/gatsby-source-hacker-news/src/gatsby-node.js b/packages/gatsby-source-hacker-news/src/gatsby-node.js index e53b2e2b06a9e..85c94aabd9d87 100644 --- a/packages/gatsby-source-hacker-news/src/gatsby-node.js +++ b/packages/gatsby-source-hacker-news/src/gatsby-node.js @@ -10,9 +10,8 @@ const get = query => exports.sourceNodes = async ({ actions, - getNode, + createContentDigest, createNodeId, - hasNodeChanged, }) => { const { createNode } = actions @@ -117,10 +116,7 @@ fragment commentsFragment on HackerNewsItem { storyNode.by = storyNode.by.id // Get content digest of node. - const contentDigest = crypto - .createHash(`md5`) - .update(JSON.stringify(storyNode)) - .digest(`hex`) + const contentDigest = createContentDigest(storyNode) storyNode.internal.contentDigest = contentDigest createNode(storyNode)