Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(gatsby-plugin-sharp, gatsby-transformer-sharp): update dependencies #26259

Merged
merged 12 commits into from
Aug 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-manifest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@babel/runtime": "^7.10.3",
"gatsby-core-utils": "^1.3.18",
"semver": "^7.3.2",
"sharp": "^0.25.1"
"sharp": "^0.25.4"
},
"devDependencies": {
"@babel/cli": "^7.10.3",
Expand Down
18 changes: 9 additions & 9 deletions packages/gatsby-plugin-sharp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
},
"dependencies": {
"@babel/runtime": "^7.10.3",
"async": "^2.6.3",
"async": "^3.2.0",
"bluebird": "^3.7.2",
"fs-extra": "^8.1.0",
"fs-extra": "^9.0.1",
"gatsby-core-utils": "^1.3.18",
"got": "^8.3.2",
"imagemin": "^6.1.0",
"imagemin-mozjpeg": "^8.0.0",
"imagemin-pngquant": "^6.0.1",
"lodash": "^4.17.15",
"got": "^10.7.0",
"imagemin": "^7.0.1",
"imagemin-mozjpeg": "^9.0.0",
"imagemin-pngquant": "^9.0.0",
"lodash": "^4.17.19",
"mini-svg-data-uri": "^1.2.3",
"potrace": "^2.1.8",
"probe-image-size": "^4.1.1",
"probe-image-size": "^5.0.0",
"progress": "^2.0.3",
"semver": "^7.3.2",
"sharp": "^0.25.1",
"sharp": "^0.25.4",
"svgo": "1.3.2",
"uuid": "^8.3.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-plugin-sharp/src/__tests__/scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@ describe(`scheduler`, () => {
expect(got.post).toHaveBeenCalledWith(
process.env.GATSBY_CLOUD_IMAGE_SERVICE_URL,
{
body: {
json: {
file: job.inputPaths[0],
hash: expect.any(String),
transforms: job.args.operations,
options: job.args.pluginOptions,
},
json: true,
responseType: `json`,
}
)
})
Expand Down
8 changes: 4 additions & 4 deletions packages/gatsby-plugin-sharp/src/process-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ const compressPng = (pipeline, outputPath, options) =>
.buffer(sharpBuffer, {
plugins: [
imageminPngquant({
quality: `${options.pngQuality || options.quality}-${Math.min(
(options.pngQuality || options.quality) + 25,
100
)}`, // e.g. 40-65
quality: [
(options.pngQuality || options.quality) / 100,
Math.min(((options.pngQuality || options.quality) + 25) / 100, 1),
], // e.g. [0.4, 0.65]
speed: options.pngCompressionSpeed
? options.pngCompressionSpeed
: undefined,
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-plugin-sharp/src/scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ const scheduleJob = async (job, boundActionCreators, reporter) => {
if (process.env.GATSBY_CLOUD_IMAGE_SERVICE_URL) {
const cloudJob = got
.post(process.env.GATSBY_CLOUD_IMAGE_SERVICE_URL, {
body: {
json: {
file: job.inputPaths[0],
hash: createContentDigest(job),
transforms: job.args.operations,
options: job.args.pluginOptions,
},
json: true,
responseType: `json`,
})
.then(() => {})

Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-remark-copy-linked-files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"is-relative-url": "^3.0.0",
"lodash": "^4.17.15",
"path-is-inside": "^1.0.2",
"probe-image-size": "^4.1.1",
"probe-image-size": "^5.0.0",
"unist-util-visit": "^1.4.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-remark-images-contentful/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"is-relative-url": "^3.0.0",
"lodash": "^4.17.15",
"semver": "^7.3.2",
"sharp": "^0.25.1",
"sharp": "^0.25.4",
"unist-util-select": "^1.5.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/gatsby-transformer-sharp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"dependencies": {
"@babel/runtime": "^7.10.3",
"bluebird": "^3.7.2",
"fs-extra": "^8.1.0",
"fs-extra": "^9.0.1",
"potrace": "^2.1.8",
"probe-image-size": "^4.1.1",
"probe-image-size": "^5.0.0",
"semver": "^7.3.2",
"sharp": "^0.25.1"
"sharp": "^0.25.4"
},
"devDependencies": {
"@babel/cli": "^7.10.3",
Expand Down
10 changes: 3 additions & 7 deletions packages/gatsby-transformer-sharp/src/customize-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ const {
} = require(`gatsby-plugin-sharp`)

const sharp = require(`./safe-sharp`)
const fs = require(`fs`)
const fsExtra = require(`fs-extra`)
const fs = require(`fs-extra`)
const imageSize = require(`probe-image-size`)
const path = require(`path`)

Expand Down Expand Up @@ -434,14 +433,11 @@ const createFields = ({
imageName
)

if (
!fsExtra.existsSync(publicPath) &&
!inProgressCopy.has(publicPath)
) {
if (!fs.existsSync(publicPath) && !inProgressCopy.has(publicPath)) {
// keep track of in progress copy, we should rely on `existsSync` but
// a race condition exists between the exists check and the copy
inProgressCopy.add(publicPath)
fsExtra.copy(details.absolutePath, publicPath, err => {
fs.copy(details.absolutePath, publicPath, err => {
// this is no longer in progress
inProgressCopy.delete(publicPath)
if (err) {
Expand Down
Loading