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

@applitools/image

Package Overview
Dependencies
Maintainers
46
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/image - npm Package Compare versions

Comparing version 1.1.6 to 1.1.7

20

CHANGELOG.md
# Changelog
## [1.1.7](https://github.com/applitools/eyes.sdk.javascript1/compare/js/image@1.1.6...js/image@1.1.7) (2023-10-17)
### Bug Fixes
* avoid using ascii text decoder ([1b68d39](https://github.com/applitools/eyes.sdk.javascript1/commit/1b68d3945d96b17b9ab1f1a87d352206fd0c81d6))
### Code Refactoring
* disallow usage of global Buffer ([#1957](https://github.com/applitools/eyes.sdk.javascript1/issues/1957)) ([adcc082](https://github.com/applitools/eyes.sdk.javascript1/commit/adcc082f20f6b92e819b96424e995d9a69d99758))
### Dependencies
* @applitools/utils bumped to 1.6.2
#### Code Refactoring
* disallow usage of global Buffer ([#1957](https://github.com/applitools/eyes.sdk.javascript1/issues/1957)) ([adcc082](https://github.com/applitools/eyes.sdk.javascript1/commit/adcc082f20f6b92e819b96424e995d9a69d99758))
## [1.1.6](https://github.com/applitools/eyes.sdk.javascript1/compare/js/image@1.1.5...js/image@1.1.6) (2023-09-25)

@@ -4,0 +24,0 @@

2

dist/formats/bmp.js

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

function isBmpBuffer(buffer) {
return new TextDecoder('ascii').decode(buffer.subarray(0, 2)) === 'BM';
return new TextDecoder().decode(buffer.subarray(0, 2)) === 'BM';
}

@@ -32,0 +32,0 @@ exports.isBmpBuffer = isBmpBuffer;

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

function isGifBuffer(buffer) {
return ['GIF87a', 'GIF89a'].includes(new TextDecoder('ascii').decode(buffer.subarray(0, 6)));
return ['GIF87a', 'GIF89a'].includes(new TextDecoder().decode(buffer.subarray(0, 6)));
}

@@ -32,0 +32,0 @@ exports.isGifBuffer = isGifBuffer;

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

function isJpegBuffer(buffer) {
return ['JFIF', 'Exif'].includes(new TextDecoder('ascii').decode(buffer.subarray(6, 10)));
return ['JFIF', 'Exif'].includes(new TextDecoder().decode(buffer.subarray(6, 10)));
}

@@ -32,0 +32,0 @@ exports.isJpegBuffer = isJpegBuffer;

@@ -27,6 +27,7 @@ "use strict";

exports.toPng = exports.fromPngBuffer = exports.extractPngSize = exports.isPngBuffer = void 0;
const buffer_1 = require("buffer");
const png = __importStar(require("png-async"));
const utils = __importStar(require("@applitools/utils"));
function isPngBuffer(buffer) {
return new TextDecoder('ascii').decode(buffer.subarray(12, 16)) === 'IHDR';
return new TextDecoder().decode(buffer.subarray(12, 16)) === 'IHDR';
}

@@ -42,3 +43,3 @@ exports.isPngBuffer = isPngBuffer;

const image = new png.Image();
image.parse(Buffer.from(buffer), (err, image) => {
image.parse(buffer_1.Buffer.from(buffer), (err, image) => {
if (err)

@@ -53,5 +54,5 @@ return reject(err);

const wrapper = new png.Image({ width: image.width, height: image.height });
wrapper.data = Buffer.from(image.data);
wrapper.data = buffer_1.Buffer.from(image.data);
return utils.streams.toBuffer(wrapper.pack());
}
exports.toPng = toPng;

@@ -34,2 +34,3 @@ "use strict";

const gif_1 = require("./formats/gif");
const buffer_1 = require("buffer");
const fs_1 = __importDefault(require("fs"));

@@ -64,3 +65,3 @@ const path_1 = __importDefault(require("path"));

else if (utils.types.isBase64(data)) {
return makeImage(Buffer.from(data, 'base64'));
return makeImage(buffer_1.Buffer.from(data, 'base64'));
}

@@ -67,0 +68,0 @@ else if (utils.types.isString(data)) {

{
"name": "@applitools/image",
"version": "1.1.6",
"version": "1.1.7",
"description": "Image primitive used for capturing and manipulating screenshots",

@@ -36,6 +36,6 @@ "homepage": "https://applitools.com",

"build": "run --top-level tsc --project ./tsconfig.build.json",
"test": "run --top-level mocha './test/*.spec.ts'"
"test": "run --top-level mocha './test/**/*.spec.ts'"
},
"dependencies": {
"@applitools/utils": "1.6.1",
"@applitools/utils": "1.6.2",
"bmpimagejs": "1.0.4",

@@ -47,2 +47,3 @@ "jpeg-js": "0.4.4",

"devDependencies": {
"@applitools/test-utils": "^1.5.17",
"@types/node": "^12.20.55",

@@ -49,0 +50,0 @@ "@types/omggif": "^1.0.3",

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