Skip to content

Commit

Permalink
Make changes from review
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthachatterjee committed Oct 28, 2019
1 parent 3109ef2 commit 3fbe931
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions packages/gatsby-transformer-screenshot/lambda/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const setup = require(`./starter-kit/setup`)

const createContentDigest = jest.fn().mockReturnValue(`contentDigest`)
const { createContentDigest } = require(`gatsby-core-utils`)

const AWS = require(`aws-sdk`)
const s3 = new AWS.S3({
Expand Down Expand Up @@ -55,9 +55,8 @@ exports.run = async (browser, url, width, height, fullPage) => {
throw new Error(`invalid bucket ${process.env.S3_BUCKET}`)
}

const keyBase = `${url}-(${width},${height})`
const contentDigest = createContentDigest({ url, width, height })
const key = `${digest}.png`
const key = `${contentDigest}.png`

const screenshotUrl = `https://s3-${region}.amazonaws.com/${
process.env.S3_BUCKET
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-transformer-sqip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"debug": "^3.2.6"
},
"peerDependencies": {
"gatsby": "^2.0.15",
"gatsby": "^2.0.0",
"gatsby-source-contentful": "^2.0.0",
"gatsby-transformer-sharp": "^2.0.0"
},
Expand Down

0 comments on commit 3fbe931

Please sign in to comment.