@applitools/screenshoter 3.12.13 → 3.12.14

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.12.14](https://github.com/Applitools-Dev/sdk/compare/js/screenshoter@3.12.13...js/screenshoter@3.12.14) (2026-03-01)
4
+
5
+
6
+ ### Performance Improvements
7
+
8
+ * use sharp to accelerate png performance in all js packages ([#3547](https://github.com/Applitools-Dev/sdk/issues/3547)) ([6e3c7b9](https://github.com/Applitools-Dev/sdk/commit/6e3c7b9e34815f470032ece52a161001592ad1b1))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/image bumped to 1.2.7
14
+ #### Performance Improvements
15
+
16
+ * use sharp to accelerate png performance in all js packages ([#3547](https://github.com/Applitools-Dev/sdk/issues/3547)) ([6e3c7b9](https://github.com/Applitools-Dev/sdk/commit/6e3c7b9e34815f470032ece52a161001592ad1b1))
17
+
3
18
  ## [3.12.13](https://github.com/Applitools-Dev/sdk/compare/js/screenshoter@3.12.12...js/screenshoter@3.12.13) (2026-02-16)
4
19
 
5
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/screenshoter",
3
- "version": "3.12.13",
3
+ "version": "3.12.14",
4
4
  "description": "Applitools universal screenshoter for web and native applications",
5
5
  "keywords": [
6
6
  "applitools",
@@ -56,7 +56,7 @@
56
56
  "appium:setup": "mkdir -p ./logs && appium --address 127.0.0.1 --port 4723 --base-path /wd/hub --log-level error:info --log ./logs/appium.log --relaxed-security &"
57
57
  },
58
58
  "dependencies": {
59
- "@applitools/image": "1.2.6",
59
+ "@applitools/image": "1.2.7",
60
60
  "@applitools/logger": "2.2.8",
61
61
  "@applitools/snippets": "2.7.0",
62
62
  "@applitools/utils": "1.14.1"
@@ -82,7 +82,8 @@
82
82
  "appium>appium-base-driver>ws>utf-8-validate": false,
83
83
  "appium>appium-tizen-driver>jimp>@babel/polyfill>core-js": false,
84
84
  "appium>appium-tizen-driver>jimp>core-js": false,
85
- "appium>appium-windows-driver": false
85
+ "appium>appium-windows-driver": false,
86
+ "@applitools/image>sharp": false
86
87
  }
87
88
  }
88
89
  }
@@ -50,7 +50,7 @@ async function takeStitchedScreenshot({
50
50
 
51
51
  logger.verbose('Getting initial image...')
52
52
  let image = await takeViewportScreenshot({name: 'initial', captureStatusBar})
53
- const firstImage = framed ? makeImage(image) : null
53
+ const firstImage = framed ? makeImage(image, logger) : null
54
54
 
55
55
  const scrollerRegion = await scroller.getClientRegion()
56
56
  const targetRegion = region
@@ -90,14 +90,14 @@ async function takeStitchedScreenshot({
90
90
  logger.verbose('Part regions', partRegions)
91
91
 
92
92
  logger.verbose('Creating stitched image composition container')
93
- const stitchedImage = makeImage({auto: true})
93
+ const stitchedImage = makeImage({auto: true}, logger)
94
94
 
95
95
  logger.verbose('Adding initial image...')
96
96
  stitchedImage.copy(image, {x: 0, y: 0})
97
97
 
98
98
  logger.verbose('Getting the rest of the image parts...')
99
99
 
100
- let lastImage = framed ? makeImage(firstImage) : null
100
+ let lastImage = framed ? makeImage(firstImage, logger) : null
101
101
  let scrollerRegionShift = {x: 0, y: 0}
102
102
  for (const partRegion of partRegions) {
103
103
  const partName = `${partRegion.x}_${partRegion.y}_${partRegion.width}x${partRegion.height}`
@@ -140,7 +140,7 @@ async function takeStitchedScreenshot({
140
140
 
141
141
  logger.verbose('Getting image...')
142
142
  image = await takeViewportScreenshot({name: partName})
143
- lastImage = framed ? makeImage(image) : null
143
+ lastImage = framed ? makeImage(image, logger) : null
144
144
 
145
145
  logger.verbose('cropping...')
146
146
  image.crop(cropPartRegion)
@@ -31,7 +31,7 @@ function makeTakeDefaultScreenshot({driver, stabilization = {}, debug, logger})
31
31
  return async function takeScreenshot({name} = {}) {
32
32
  logger.verbose('Taking screenshot (default)...')
33
33
  const viewport = await driver.getViewport()
34
- const image = makeImage(await driver.takeScreenshot())
34
+ const image = makeImage(await driver.takeScreenshot(), logger)
35
35
  await image.debug({...debug, name, suffix: 'original'})
36
36
 
37
37
  if (stabilization.scale) image.scale(stabilization.scale)
@@ -51,7 +51,7 @@ function makeTakeMainContextScreenshot({driver, stabilization = {}, debug, logge
51
51
  const viewport = await driver.getViewport()
52
52
  const originalContext = driver.currentContext
53
53
  await driver.mainContext.focus()
54
- const image = makeImage(await driver.takeScreenshot())
54
+ const image = makeImage(await driver.takeScreenshot(), logger)
55
55
  await originalContext.focus()
56
56
  await image.debug({...debug, name, suffix: 'original'})
57
57
 
@@ -70,7 +70,7 @@ function makeTakeSafari11Screenshot({driver, stabilization = {}, debug, logger})
70
70
  return async function takeScreenshot({name} = {}) {
71
71
  logger.verbose('Taking safari 11 driver screenshot...')
72
72
  const viewport = await driver.getViewport()
73
- const image = makeImage(await driver.takeScreenshot())
73
+ const image = makeImage(await driver.takeScreenshot(), logger)
74
74
  await image.debug({...debug, name, suffix: 'original'})
75
75
 
76
76
  if (stabilization.scale) image.scale(stabilization.scale)
@@ -94,7 +94,7 @@ function makeTakeMarkedScreenshot({driver, stabilization = {}, debug, logger}) {
94
94
  return async function takeScreenshot({name} = {}) {
95
95
  logger.verbose('Taking viewport screenshot (using markers)...')
96
96
  const viewport = await driver.getViewport()
97
- const image = makeImage(await driver.takeScreenshot())
97
+ const image = makeImage(await driver.takeScreenshot(), logger)
98
98
  await image.debug({...debug, name, suffix: 'original'})
99
99
 
100
100
  if (stabilization.scale) image.scale(stabilization.scale)
@@ -126,7 +126,7 @@ function makeTakeMarkedScreenshot({driver, stabilization = {}, debug, logger}) {
126
126
  await utils.general.sleep(100)
127
127
 
128
128
  try {
129
- const image = makeImage(await driver.takeScreenshot())
129
+ const image = makeImage(await driver.takeScreenshot(), logger)
130
130
 
131
131
  if (stabilization.rotate) image.rotate(stabilization.rotate)
132
132
  else if (viewport.orientation.startsWith('landscape') && image.width < image.height) image.rotate(-90)
@@ -153,7 +153,7 @@ function makeTakeNativeScreenshot({driver, stabilization = {}, debug, logger}) {
153
153
  return async function takeScreenshot({name, captureStatusBar, keepNavigationBar} = {}) {
154
154
  logger.verbose('Taking native driver screenshot...')
155
155
  const viewport = await driver.getViewport({keepNavigationBar})
156
- const image = makeImage(await driver.takeScreenshot())
156
+ const image = makeImage(await driver.takeScreenshot(), logger)
157
157
  await image.debug({...debug, name, suffix: 'original'})
158
158
 
159
159
  if (stabilization.scale) image.scale(stabilization.scale)