Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@applitools/ufg-client

Package Overview
Dependencies
Maintainers
45
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/ufg-client - npm Package Compare versions

Comparing version 1.9.1 to 1.9.2

41

CHANGELOG.md
# Changelog
## [1.9.2](https://github.com/applitools/eyes.sdk.javascript1/compare/js/ufg-client@1.9.1...js/ufg-client@1.9.2) (2023-09-25)
### Code Refactoring
* use Uint8Array instead of Buffer for binary data representation ([#1928](https://github.com/applitools/eyes.sdk.javascript1/issues/1928)) ([d1472ab](https://github.com/applitools/eyes.sdk.javascript1/commit/d1472ab8fd49e9a240e99a44dbf1d180b6c7a54b))
### Dependencies
* @applitools/utils bumped to 1.6.1
#### Bug Fixes
* add browser entry point declaration and test ([#1933](https://github.com/applitools/eyes.sdk.javascript1/issues/1933)) ([5ba0720](https://github.com/applitools/eyes.sdk.javascript1/commit/5ba0720d62a9af8a9a2e1c2437c569e6ab19afd8))
#### Code Refactoring
* use Uint8Array instead of Buffer for binary data representation ([#1928](https://github.com/applitools/eyes.sdk.javascript1/issues/1928)) ([d1472ab](https://github.com/applitools/eyes.sdk.javascript1/commit/d1472ab8fd49e9a240e99a44dbf1d180b6c7a54b))
* @applitools/logger bumped to 2.0.11
#### Bug Fixes
* add browser entry point declaration and test ([#1933](https://github.com/applitools/eyes.sdk.javascript1/issues/1933)) ([5ba0720](https://github.com/applitools/eyes.sdk.javascript1/commit/5ba0720d62a9af8a9a2e1c2437c569e6ab19afd8))
* @applitools/req bumped to 1.6.1
#### Bug Fixes
* add browser entry point declaration and test ([#1933](https://github.com/applitools/eyes.sdk.javascript1/issues/1933)) ([5ba0720](https://github.com/applitools/eyes.sdk.javascript1/commit/5ba0720d62a9af8a9a2e1c2437c569e6ab19afd8))
* @applitools/image bumped to 1.1.6
#### Code Refactoring
* use Uint8Array instead of Buffer for binary data representation ([#1928](https://github.com/applitools/eyes.sdk.javascript1/issues/1928)) ([d1472ab](https://github.com/applitools/eyes.sdk.javascript1/commit/d1472ab8fd49e9a240e99a44dbf1d180b6c7a54b))
## [1.9.1](https://github.com/applitools/eyes.sdk.javascript1/compare/js/ufg-client@1.9.0...js/ufg-client@1.9.1) (2023-09-21)

@@ -4,0 +45,0 @@

18

dist/resources/fetch-resource.js

@@ -88,3 +88,3 @@ "use strict";

...resource,
value: Buffer.from(await response.arrayBuffer()),
value: new Uint8Array(await response.arrayBuffer()),
contentType: response.headers.get('Content-Type'),

@@ -174,3 +174,3 @@ })

return;
return new Promise(resolve => {
return new Promise(async (resolve) => {
const timer = setTimeout(() => {

@@ -181,7 +181,11 @@ controller.abort();

}, timeout);
response
.arrayBuffer()
.then(body => resolve({ response, body: Buffer.from(body) }))
.catch(() => resolve({ status: 599 }))
.finally(() => clearTimeout(timer));
try {
resolve({ response, body: Buffer.from(await response.arrayBuffer()) });
}
catch {
resolve({ status: 599 });
}
finally {
clearTimeout(timer);
}
});

@@ -188,0 +192,0 @@ },

@@ -168,3 +168,3 @@ "use strict";

if (/text\/css/.test(resource.contentType)) {
dependencyUrls = (0, extract_css_dependency_urls_1.extractCssDependencyUrls)(resource.value.toString(), {
dependencyUrls = (0, extract_css_dependency_urls_1.extractCssDependencyUrls)(new TextDecoder().decode(resource.value), {
resourceUrl: resource.url,

@@ -175,3 +175,3 @@ sourceUrl: settings === null || settings === void 0 ? void 0 : settings.sourceUrl,

else if (/image\/svg/.test(resource.contentType)) {
dependencyUrls = (0, extract_svg_dependency_urls_1.extractSvgDependencyUrls)(resource.value.toString(), {
dependencyUrls = (0, extract_svg_dependency_urls_1.extractSvgDependencyUrls)(new TextDecoder().decode(resource.value), {
resourceUrl: resource.url,

@@ -178,0 +178,0 @@ sourceUrl: settings === null || settings === void 0 ? void 0 : settings.sourceUrl,

@@ -6,3 +6,3 @@ "use strict";

function makeResourceDom({ cdt, resources }) {
const value = Buffer.from(JSON.stringify({
const value = new TextEncoder().encode(JSON.stringify({
resources: Object.fromEntries(Object.entries(resources).sort(([url1], [url2]) => (url1 > url2 ? 1 : -1))),

@@ -9,0 +9,0 @@ domNodes: cdt,

@@ -6,3 +6,3 @@ "use strict";

function makeResourceVhs({ vhsHash, resources, vhsType, platformName }) {
const value = Buffer.from(JSON.stringify({
const value = new TextEncoder().encode(JSON.stringify({
vhs: vhsHash,

@@ -9,0 +9,0 @@ resources: { ...resources, vhs: undefined },

@@ -93,3 +93,3 @@ "use strict";

function getResourceValue(value) {
return value ? (utils.types.isString(value) ? Buffer.from(value, 'base64') : value) : Buffer.alloc(0);
return value ? (utils.types.isString(value) ? Buffer.from(value, 'base64') : value) : new Uint8Array(0);
}
{
"name": "@applitools/ufg-client",
"version": "1.9.1",
"version": "1.9.2",
"homepage": "https://applitools.com",

@@ -43,6 +43,6 @@ "bugs": {

"dependencies": {
"@applitools/image": "1.1.5",
"@applitools/logger": "2.0.10",
"@applitools/req": "1.6.0",
"@applitools/utils": "1.6.0",
"@applitools/image": "1.1.6",
"@applitools/logger": "2.0.11",
"@applitools/req": "1.6.1",
"@applitools/utils": "1.6.1",
"abort-controller": "3.0.0",

@@ -49,0 +49,0 @@ "css-tree": "2.3.1",

@@ -1,2 +0,1 @@

/// <reference types="node" />
import type { Optional } from '@applitools/utils';

@@ -27,3 +26,3 @@ import type { Renderer } from '../types';

url: string;
value: Buffer;
value: Uint8Array;
contentType: string;

@@ -30,0 +29,0 @@ hash: HashedResource;

@@ -1,2 +0,1 @@

/// <reference types="node" />
import type { Location, Size, Region } from '@applitools/utils';

@@ -187,3 +186,3 @@ import { type Logger } from '@applitools/logger';

error?: any;
image: Buffer | string;
image: string;
size?: Size;

@@ -190,0 +189,0 @@ name?: string;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc