Socket
Socket
Sign inDemoInstall

sharp

Package Overview
Dependencies
Maintainers
1
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sharp - npm Package Compare versions

Comparing version 0.18.1 to 0.18.2

4

binding.js

@@ -12,3 +12,3 @@ 'use strict';

const distBaseUrl = 'https://dl.bintray.com/lovell/sharp/';
const distBaseUrl = process.env.SHARP_DIST_BASE_URL || 'https://dl.bintray.com/lovell/sharp/';

@@ -77,3 +77,3 @@ // Use NPM-provided environment variable where available, falling back to require-based method for Electron

if (lddVersion) {
if (/(glibc|gnu libc|gentoo)/i.test(lddVersion)) {
if (/(glibc|gnu libc|gentoo|solus)/i.test(lddVersion)) {
const glibcVersion = lddVersion ? lddVersion.split(/\n/)[0].split(' ').slice(-1)[0].trim() : '';

@@ -80,0 +80,0 @@ if (glibcVersion && semver.lt(glibcVersion + '.0', '2.13.0')) {

@@ -143,2 +143,4 @@ <!-- Generated by documentation.js. Update this documentation by updating the source code. -->

- `options.predictor` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** compression predictor options: none, horizontal, float (optional, default `'none'`)
- `options.xres` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** horizontal resolution in pixels/mm (optional, default `1.0`)
- `options.yres` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** vertical resolution in pixels/mm (optional, default `1.0`)
- `options.squash` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** squash 8-bit images down to 1 bit (optional, default `false`)

@@ -145,0 +147,0 @@

@@ -7,2 +7,19 @@ # Changelog

#### v0.18.2 - 1<sup>st</sup> July 2017
* Expose libvips' xres and yres properties for TIFF output.
[#828](https://github.com/lovell/sharp/pull/828)
[@YvesBos](https://github.com/YvesBos)
* Ensure flip and flop operations work with auto-rotate.
[#837](https://github.com/lovell/sharp/issues/837)
[@rexxars](https://github.com/rexxars)
* Allow binary download URL override via SHARP_DIST_BASE_URL env variable.
[#841](https://github.com/lovell/sharp/issues/841)
* Add support for Solus Linux.
[#857](https://github.com/lovell/sharp/pull/857)
[@ekremkaraca](https://github.com/ekremkaraca)
#### v0.18.1 - 30<sup>th</sup> May 2017

@@ -9,0 +26,0 @@

@@ -13,3 +13,3 @@ # Installation

* Node v4+
* Node v4.5.0+
* C++11 compatible compiler such as gcc 4.8+, clang 3.0+ or MSVC 2013+

@@ -36,2 +36,3 @@ * [node-gyp](https://github.com/TooTallNate/node-gyp#installation) and its dependencies (includes Python)

* Amazon Linux 2016.03, 2016.09
* Solus

@@ -53,4 +54,13 @@ To use a globally-installed version of libvips instead of the provided binaries,

For Linux-based operating systems such as Alpine that use musl libc,
the smaller stack size means libvips' cache should be disabled
#### Alpine Linux
libvips is available in the
[testing repository](https://pkgs.alpinelinux.org/packages?name=vips-dev):
```sh
apk add vips-dev --update-cache --repository https://dl-3.alpinelinux.org/alpine/edge/testing/
```
The smaller stack size of musl libc means
libvips may need to be used without a cache
via `sharp.cache(false)` to avoid a stack overflow.

@@ -189,7 +199,7 @@

### Licences
### Pre-compiled libvips binaries
If a global installation of libvips that meets the
minimum version requirement cannot be found,
this module will download a pre-compiled bundle of libvips
this module will attempt to download a pre-compiled bundle of libvips
and its dependencies on Linux and Windows machines.

@@ -200,2 +210,13 @@

Should you wish to install these from your own location,
set the `SHARP_DIST_BASE_URL` environment variable, e.g.
```sh
SHARP_DIST_BASE_URL="https://hostname/path/" npm install sharp
```
to use `https://hostname/path/libvips-x.y.z-platform.tar.gz`.
### Licences
This module is licensed under the terms of the

@@ -202,0 +223,0 @@ [Apache 2.0 Licence](https://github.com/lovell/sharp/blob/master/LICENSE).

@@ -183,2 +183,4 @@ 'use strict';

tiffSquash: false,
tiffXres: 1.0,
tiffYres: 1.0,
tileSize: 256,

@@ -185,0 +187,0 @@ tileOverlap: 0,

@@ -217,2 +217,4 @@ 'use strict';

* @param {Boolean} [options.predictor='none'] - compression predictor options: none, horizontal, float
* @param {Number} [options.xres=1.0] - horizontal resolution in pixels/mm
* @param {Number} [options.yres=1.0] - vertical resolution in pixels/mm
* @param {Boolean} [options.squash=false] - squash 8-bit images down to 1 bit

@@ -237,2 +239,17 @@ * @returns {Sharp}

}
// resolution
if (is.object(options) && is.defined(options.xres)) {
if (is.number(options.xres)) {
this.options.tiffXres = options.xres;
} else {
throw new Error('Invalid Value for xres ' + options.xres + ' Only numeric values allowed for options.xres');
}
}
if (is.object(options) && is.defined(options.yres)) {
if (is.number(options.yres)) {
this.options.tiffYres = options.yres;
} else {
throw new Error('Invalid Value for yres ' + options.yres + ' Only numeric values allowed for options.yres');
}
}
// compression

@@ -239,0 +256,0 @@ if (is.defined(options) && is.defined(options.compression)) {

{
"name": "sharp",
"description": "High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP and TIFF images",
"version": "0.18.1",
"version": "0.18.2",
"author": "Lovell Fuller <npm@lovell.info>",

@@ -71,10 +71,10 @@ "homepage": "https://github.com/lovell/sharp",

"caw": "^2.0.0",
"color": "^1.0.3",
"got": "^7.0.0",
"color": "^2.0.0",
"got": "^7.1.0",
"nan": "^2.6.2",
"semver": "^5.3.0",
"tar": "^3.1.3"
"tar": "^3.1.5"
},
"devDependencies": {
"async": "^2.4.1",
"async": "^2.5.0",
"cc": "^1.0.1",

@@ -85,3 +85,3 @@ "documentation": "^4.0.0-rc.1",

"mocha": "^3.4.2",
"nyc": "^10.3.2",
"nyc": "^11.0.3",
"rimraf": "^2.6.1",

@@ -96,3 +96,3 @@ "semistandard": "^11.0.0",

"engines": {
"node": ">=4"
"node": ">=4.5.0"
},

@@ -99,0 +99,0 @@ "semistandard": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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