@tryghost/mg-fs-utils 0.8.2 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/FileCache.js +3 -3
  2. package/package.json +8 -8
package/lib/FileCache.js CHANGED
@@ -293,9 +293,9 @@ class FileCache {
293
293
  options = this.resolveImageFileName(options.filename);
294
294
  }
295
295
 
296
- // CASE: image manipulator is uncapable of transforming file (e.g. .gif)
297
- let fileExt = path.parse(options.filename).ext;
298
- if (options.optimize && imageTransform.canTransformFileExtension(fileExt)) {
296
+ // CASE: image manipulator is uncapable of transforming file (e.g. .bmp)
297
+ let fileExt = path.extname(options.filename).substr(1);
298
+ if (options.optimize && imageTransform.canTransformToFormat(fileExt)) {
299
299
  const optimizedStoragePath = options.storagePath;
300
300
  const originalStoragePath = imageTransform.generateOriginalImageName(options.storagePath);
301
301
  const optimizedData = await imageTransform.resizeFromBuffer(data, {width: 2000});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/mg-fs-utils",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-fs-utils",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -19,15 +19,15 @@
19
19
  "access": "public"
20
20
  },
21
21
  "dependencies": {
22
- "@tryghost/errors": "1.2.12",
23
- "@tryghost/image-transform": "1.0.32",
24
- "@tryghost/zip": "1.1.25",
22
+ "@tryghost/errors": "1.2.14",
23
+ "@tryghost/image-transform": "1.2.1",
24
+ "@tryghost/zip": "1.1.27",
25
25
  "adm-zip": "0.5.9",
26
- "csv-parse": "5.1.0",
27
- "date-fns": "2.28.0",
26
+ "csv-parse": "5.3.0",
27
+ "date-fns": "2.29.1",
28
28
  "fs-extra": "10.1.0",
29
29
  "lodash": "4.17.21",
30
- "sharp": "0.30.5"
30
+ "sharp": "0.30.7"
31
31
  },
32
- "gitHead": "d5086f08707d7f00b5174ee9cf0a53ff8f026b63"
32
+ "gitHead": "68aae057039319cd550afe37426c0db4145bd29e"
33
33
  }