@browserless/screenshot 10.5.0 → 10.5.2

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.
package/README.md CHANGED
@@ -24,4 +24,4 @@ Authored and maintained by [Microlink](https://microlink.io) with help from [con
24
24
 
25
25
  The [logo](https://thenounproject.com/term/browser/288309/) has been designed by [xinh studio](https://xinh.studio).
26
26
 
27
- > [microlink.io](https://microlink.io) · GitHub [microlinkhq](https://github.com/microlinkhq) · Twitter [@microlinkhq](https://twitter.com/microlinkhq)
27
+ > [microlink.io](https://microlink.io) · GitHub [microlinkhq](https://github.com/microlinkhq) · X [@microlinkhq](https://x.com/microlinkhq)
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@browserless/screenshot",
3
3
  "description": "Take a clean screenshot of any website",
4
4
  "homepage": "https://browserless.js.org/#/?id=screenshoturl-options",
5
- "version": "10.5.0",
5
+ "version": "10.5.2",
6
6
  "main": "src/index.js",
7
7
  "author": {
8
8
  "email": "hello@microlink.io",
@@ -28,13 +28,13 @@
28
28
  "screenshot"
29
29
  ],
30
30
  "dependencies": {
31
- "@browserless/goto": "^10.5.0",
31
+ "@browserless/goto": "^10.5.2",
32
32
  "@kikobeats/time-span": "~1.0.3",
33
33
  "debug-logfmt": "~1.2.1",
34
34
  "got": "~11.8.6",
35
35
  "is-html-content": "~1.0.0",
36
36
  "is-url-http": "~2.3.7",
37
- "jimp": "~0.22.10",
37
+ "jimp": "~0.22.12",
38
38
  "map-values-deep": "~1.0.2",
39
39
  "mime": "~3.0.0",
40
40
  "p-reflect": "~2.1.0",
@@ -44,7 +44,7 @@
44
44
  "svg-gradient": "~1.0.3"
45
45
  },
46
46
  "devDependencies": {
47
- "@browserless/test": "^10.3.0",
47
+ "@browserless/test": "^10.5.2",
48
48
  "ava": "5",
49
49
  "cheerio": "latest"
50
50
  },
@@ -65,5 +65,5 @@
65
65
  "timeout": "2m",
66
66
  "workerThreads": false
67
67
  },
68
- "gitHead": "35bf441dfc9a41e8326a6dbf59c6b3d4c1ea43a4"
68
+ "gitHead": "0cfe389ca008f8317df3237ec3a2f3a232eba849"
69
69
  }
@@ -2,8 +2,8 @@
2
2
 
3
3
  const jimp = require('jimp')
4
4
 
5
- module.exports = async buffer => {
6
- const image = await jimp.read(buffer)
5
+ module.exports = async uint8array => {
6
+ const image = await jimp.read(Buffer.from(uint8array))
7
7
  const firstPixel = image.getPixelColor(0, 0)
8
8
  const height = image.getHeight()
9
9
  const width = image.getWidth()
@@ -50,7 +50,7 @@ const compactJSON = payload => {
50
50
  return truncate(value, JSON_MAX_LENGTH)
51
51
  })
52
52
 
53
- const SPACE = 2
53
+ const SPACE = 4
54
54
  const SPACE_IDENTATION = ' '.repeat(SPACE)
55
55
 
56
56
  return (