@applitools/snippets 2.6.2 → 2.6.4
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 +14 -0
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.6.4](https://github.com/Applitools-Dev/sdk/compare/js/snippets@2.6.3...js/snippets@2.6.4) (2025-01-13)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* remove side-eyes and fix code scanning issues ([#2712](https://github.com/Applitools-Dev/sdk/issues/2712)) ([cda98e4](https://github.com/Applitools-Dev/sdk/commit/cda98e4748c73cd97c11f646a2b5e26ff9416892))
|
|
9
|
+
|
|
10
|
+
## [2.6.3](https://github.com/Applitools-Dev/sdk/compare/js/snippets@2.6.2...js/snippets@2.6.3) (2024-11-14)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* don't throw error on stale/missing non-target regions ([#2598](https://github.com/Applitools-Dev/sdk/issues/2598)) ([ae39ad9](https://github.com/Applitools-Dev/sdk/commit/ae39ad9fdb129a3f987ee5076660071b66dc1342))
|
|
16
|
+
|
|
3
17
|
## [2.6.2](https://github.com/Applitools-Dev/sdk/compare/js/snippets@2.6.1...js/snippets@2.6.2) (2024-11-07)
|
|
4
18
|
|
|
5
19
|
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
exports.addElementIds=function(arg){
|
|
2
|
-
var s=function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e=function(t){var e=t&&t[0]||null;return!e||("isConnected"in window.Node.prototype?!e.isConnected:document.documentElement.contains?!document.documentElement.contains(e):!e.ownerDocument.documentElement.contains(e))},
|
|
2
|
+
var s=function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e=function(t){var e=t&&t[0]||null;return!e||("isConnected"in window.Node.prototype?!e.isConnected:document.documentElement.contains?!document.documentElement.contains(e):!e.ownerDocument.documentElement.contains(e))},r=e;var o=function(t){if(!t.hasAttribute("data-applitools-fallback-selector")){if(r([t]))throw new Error("The element is not connected to the DOM: "+function(t){var e=t.attributes,r=t.tagName,o=t.children.length,n=[].slice.call(e).map((function(t){return t.name+'="'+t.value+'"'})).join(" ");return"<"+r+" "+n+(o?">":"/>")}(t));t.setAttribute("data-applitools-fallback-selector",function(t){var e=[];for(;t&&t.nodeType===Node.ELEMENT_NODE;)try{var r,o=t.tagName.toLowerCase(),n=[].slice.call((null==(r=t.parentNode)?void 0:r.children)||[]).indexOf(t);n>-1&&(o+=":nth-child("+(n+1)+")"),e.unshift(o),t=t.parentNode}catch(t){break}return e.length?e.join(" > "):"html"}(t))}},n=e;function a(t,e){if(n([t])){var r=function(t){if(null==t||!t.getAttribute)return{error:"invalid element: "+JSON.stringify(t)};var e=t.getAttribute("data-applitools-fallback-selector");return e}(t);if(!r)return{error:"Failed to recover from stale element"};if(r.error)return r;var l=document.querySelectorAll(r);if(!l||1!==l.length)return{error:"Failed to recover from stale element - selector found: "+r};var i=l[0];return i.setAttribute("data-applitools-selector",e),i.setAttribute("data-applitools-recovered",!0),a(i,e)}o(t);var u=t.getAttribute("data-applitools-selector"),c=u?u+" "+e:e;return t.setAttribute("data-applitools-selector",c),'[data-applitools-selector~="'+e+'"]'}return t((function(t){return t.map((function(t){var e=t[0],r=t[1];return e.map((function(t){var e=function(t){var e=[t];if(t.getRootNode)for(var r=t.getRootNode();r!==document&&r.constructor&&"ShadowRoot"===r.constructor.name;r=r.host.getRootNode())e.push(r.host);return e}(t);return e.map((function(t){return a(t,r)}))}))}))}))}();
|
|
3
3
|
return s(arg)
|
|
4
4
|
}
|
|
5
5
|
exports.addFallbackSelectorIfNeeded=function(arg){
|
|
@@ -91,7 +91,7 @@ var s=function(){"use strict";function t(t){return t&&t.__esModule&&Object.proto
|
|
|
91
91
|
return s(arg)
|
|
92
92
|
}
|
|
93
93
|
exports.getUserAgent=function(arg){
|
|
94
|
-
var s=function(){"use strict";function
|
|
94
|
+
var s=function(){"use strict";function n(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function t(){return t=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var e in r)({}).hasOwnProperty.call(r,e)&&(n[e]=r[e])}return n},t.apply(null,arguments)}var r="__EYES__APPLITOOLS__",e="userAgent";return window[r]=window[r]||{},n((function(){try{if(window[r][e]){var n=window[r][e];return"WIP"!==n.status&&delete window[r][e],JSON.stringify(n)}return window.navigator.userAgentData?(window[r][e]={status:"WIP"},window.navigator.userAgentData.getHighEntropyValues(["brands","platform","platformVersion","model"]).then((function(n){window[r][e]={status:"SUCCESS",value:t({legacy:window.navigator.userAgent},n)}})).catch((function(n){window[r][e]={status:"ERROR",error:n.message}}))):window[r][e]={status:"SUCCESS",value:window.navigator.userAgent},JSON.stringify(window[r][e])}catch(n){return window[r][e]={status:"ERROR",error:n.message},JSON.stringify(window[r][e])}}))}();
|
|
95
95
|
return s(arg)
|
|
96
96
|
}
|
|
97
97
|
exports.getViewport=function(arg){
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/snippets",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1.git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"playwright:setup": "yarn playwright install --with-deps chromium"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@babel/core": "^7.
|
|
26
|
+
"@babel/core": "^7.26.0",
|
|
27
27
|
"@babel/preset-env": "^7.23.2",
|
|
28
28
|
"@rollup/plugin-babel": "^6.0.4",
|
|
29
29
|
"@rollup/plugin-commonjs": "^25.0.7",
|