@tryghost/image-transform 1.0.15 → 1.0.19

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/transform.js +4 -0
  2. package/package.json +7 -7
package/lib/transform.js CHANGED
@@ -55,6 +55,10 @@ const unsafeResizeFromPath = (options = {}) => {
55
55
  */
56
56
  const unsafeResizeFromBuffer = (originalBuffer, {width, height} = {}) => {
57
57
  const sharp = require('sharp');
58
+
59
+ // Disable the internal libvips cache - https://sharp.pixelplumbing.com/api-utility#cache
60
+ sharp.cache(false);
61
+
58
62
  return sharp(originalBuffer)
59
63
  .resize(width, height, {
60
64
  // CASE: dont make the image bigger than it was
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@tryghost/image-transform",
3
- "version": "1.0.15",
4
- "repository": "https://github.com/TryGhost/Utils/tree/master/packages/image-transform",
3
+ "version": "1.0.19",
4
+ "repository": "https://github.com/TryGhost/Utils/tree/main/packages/image-transform",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
7
7
  "main": "index.js",
8
8
  "scripts": {
9
9
  "dev": "echo \"Implement me!\"",
10
- "test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
10
+ "test": "NODE_ENV=testing c8 --reporter text --reporter cobertura mocha './test/**/*.test.js'",
11
11
  "lint": "eslint . --ext .js --cache",
12
12
  "posttest": "yarn lint"
13
13
  },
@@ -19,18 +19,18 @@
19
19
  "access": "public"
20
20
  },
21
21
  "devDependencies": {
22
- "c8": "7.9.0",
23
- "mocha": "9.1.2",
22
+ "c8": "7.10.0",
23
+ "mocha": "9.1.3",
24
24
  "should": "13.2.3",
25
25
  "sinon": "11.1.2"
26
26
  },
27
27
  "dependencies": {
28
- "@tryghost/errors": "^0.2.15",
28
+ "@tryghost/errors": "^1.0.0",
29
29
  "bluebird": "^3.7.2",
30
30
  "fs-extra": "^9.1.0"
31
31
  },
32
32
  "optionalDependencies": {
33
33
  "sharp": "^0.29.0"
34
34
  },
35
- "gitHead": "9bdfa67ecfbee6666553845d4887d616abb87029"
35
+ "gitHead": "9cce0db03f9229f7829ad2d0119b4916ca44fc78"
36
36
  }