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

spritesmith

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spritesmith - npm Package Compare versions

Comparing version 3.1.1 to 3.2.0

2

CHANGELOG.md
# spritesmith changelog
3.2.0 - Removed support for Node.js < 4
3.1.1 - Added support for transpiled ES6 modules

@@ -3,0 +5,0 @@

5

package.json
{
"name": "spritesmith",
"description": "Utility that takes images and creates a spritesheet with JSON sprite data",
"version": "3.1.1",
"version": "3.2.0",
"homepage": "https://github.com/Ensighten/spritesmith",

@@ -24,3 +24,3 @@ "author": {

"engines": {
"node": ">= 0.10.0"
"node": ">= 4.0.0"
},

@@ -50,2 +50,3 @@ "scripts": {

"phantomjssmith": "~1.0.0",
"pixelmatch": "~4.0.2",
"twolfson-style": "~1.6.0",

@@ -52,0 +53,0 @@ "vinyl": "~1.1.0"

@@ -6,2 +6,3 @@ // Load in modules

var getPixels = require('get-pixels');
var pixelmatch = require('pixelmatch');
var Vinyl = require('vinyl');

@@ -102,3 +103,3 @@ var Spritesmith = require('../src/smith.js');

// Assert the actual image is the same expected
// Assert the actual image is close to the expected image
// DEV: We are using pngjs for decoding/encoding in the library but this is testing one more cycle

@@ -109,3 +110,7 @@ getPixels(actualImageBuff, 'image/png', function handleActualPixels (err, actualImage) {

if (err) { return done(err); }
assert.deepEqual(actualImage, expectedImage, 'Actual image does not match expected image');
assert.deepEqual(actualImage.shape, expectedImage.shape,
'Actual image shape does not match expected image shape');
var numDiffPixels = pixelmatch(actualImage.data, expectedImage.data, null,
actualImage.shape[0], actualImage.shape[1]);
assert(numDiffPixels < 10, 'Expected at most 10 pixels to be different but received ' + numDiffPixels);
done();

@@ -112,0 +117,0 @@ });

Sorry, the diff of this file is not supported yet

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