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.2 to 0.18.3

38

binding.js

@@ -8,5 +8,6 @@ 'use strict';

const caw = require('caw');
const got = require('got');
const simpleGet = require('simple-get');
const semver = require('semver');
const tar = require('tar');
const detectLibc = require('detect-libc');

@@ -72,16 +73,12 @@ const distBaseUrl = process.env.SHARP_DIST_BASE_URL || 'https://dl.bintray.com/lovell/sharp/';

if (arch === 'ia32') {
error('Intel Architecture 32-bit systems require manual installation - please see http://sharp.dimens.io/en/stable/install/');
error('Intel Architecture 32-bit systems require manual installation of libvips - please see http://sharp.dimens.io/page/install');
}
// Ensure glibc >= 2.15
const lddVersion = process.env.LDD_VERSION;
if (lddVersion) {
if (/(glibc|gnu libc|gentoo|solus)/i.test(lddVersion)) {
const glibcVersion = lddVersion ? lddVersion.split(/\n/)[0].split(' ').slice(-1)[0].trim() : '';
if (glibcVersion && semver.lt(glibcVersion + '.0', '2.13.0')) {
error('glibc version ' + glibcVersion + ' requires manual installation - please see http://sharp.dimens.io/en/stable/install/');
}
} else {
error(lddVersion.split(/\n/)[0] + ' requires manual installation - please see http://sharp.dimens.io/en/stable/install/');
}
// Ensure glibc Linux
if (detectLibc.isNonGlibcLinux) {
error(`Use with ${detectLibc.family} libc requires manual installation of libvips - please see http://sharp.dimens.io/page/install`);
}
// Ensure glibc >= 2.13
if (detectLibc.family === detectLibc.GLIBC && detectLibc.version && semver.lt(`${detectLibc.version}.0`, '2.13.0')) {
error(`Use with glibc version ${detectLibc.version} requires manual installation of libvips - please see http://sharp.dimens.io/page/install`);
}
// Arch/platform-specific .tar.gz

@@ -103,3 +100,5 @@ const tarFilename = ['libvips', minimumLibvipsVersion, platformId()].join('-') + '.tar.gz';

});
const gotOpt = {
const url = distBaseUrl + tarFilename;
const simpleGetOpt = {
url: url,
agent: caw(null, {

@@ -109,10 +108,11 @@ protocol: 'https'

};
const url = distBaseUrl + tarFilename;
got.stream(url, gotOpt).on('response', function (response) {
simpleGet(simpleGetOpt, function (err, response) {
if (err) {
error('Download of ' + url + ' failed: ' + err.message);
}
if (response.statusCode !== 200) {
error(url + ' status code ' + response.statusCode);
}
}).on('error', function (err) {
error('Download of ' + url + ' failed: ' + err.message);
}).pipe(tmpFile);
response.pipe(tmpFile);
});
}

@@ -119,0 +119,0 @@ }

@@ -12,3 +12,3 @@ <!-- Generated by documentation.js. Update this documentation by updating the source code. -->

Gets, or when options are provided sets, the limits of _libvips'_ operation cache.
Gets or, when options are provided, sets the limits of _libvips'_ operation cache.
Existing entries in the cache will be trimmed after any change in limits.

@@ -20,3 +20,3 @@ This method always returns cache statistics,

- `options` **([Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) \| [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** Object with the following attributes, or Boolean where true uses default cache settings and false removes all caching.
- `options` **([Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) \| [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** Object with the following attributes, or Boolean where true uses default cache settings and false removes all caching (optional, default `true`)
- `options.memory` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** is the maximum memory in MB to use for this cache (optional, default `50`)

@@ -42,3 +42,3 @@ - `options.files` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** is the maximum number of files to hold open (optional, default `20`)

Gets, or when a concurrency is provided sets,
Gets or, when a concurrency is provided, sets
the number of threads _libvips'_ should create to process each image.

@@ -45,0 +45,0 @@ The default value is the number of CPU cores.

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

#### v0.18.3 - 13<sup>th</sup> September 2017
* Skip shrink-on-load when trimming.
[#888](https://github.com/lovell/sharp/pull/888)
[@kleisauke](https://github.com/kleisauke)
* Migrate from got to simple-get for basic auth support.
[#945](https://github.com/lovell/sharp/pull/945)
[@pbomb](https://github.com/pbomb)
#### v0.18.2 - 1<sup>st</sup> July 2017

@@ -9,0 +19,0 @@

@@ -103,2 +103,4 @@ # sharp

* [Yves Bos](https://github.com/YvesBos)
* [Nicolas Coden](https://github.com/ncoden)
* [Matt Parrish](https://github.com/pbomb)

@@ -105,0 +107,0 @@ Thank you!

@@ -50,3 +50,3 @@ # Installation

https://github.com/jcupitt/libvips#building-libvips-from-a-source-tarball
https://jcupitt.github.io/libvips/install.html#building-libvips-from-a-source-tarball

@@ -59,3 +59,3 @@ #### Alpine Linux

```sh
apk add vips-dev --update-cache --repository https://dl-3.alpinelinux.org/alpine/edge/testing/
apk add vips-dev fftw-dev --update-cache --repository https://dl-3.alpinelinux.org/alpine/edge/testing/
```

@@ -96,2 +96,5 @@

FreeBSD's gcc v4 and v5 need `CXXFLAGS=-D_GLIBCXX_USE_C99` set for C++11 support due to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193528
### Heroku

@@ -98,0 +101,0 @@

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

/**
* Gets, or when options are provided sets, the limits of _libvips'_ operation cache.
* Gets or, when options are provided, sets the limits of _libvips'_ operation cache.
* Existing entries in the cache will be trimmed after any change in limits.

@@ -20,3 +20,3 @@ * This method always returns cache statistics,

*
* @param {Object|Boolean} options - Object with the following attributes, or Boolean where true uses default cache settings and false removes all caching.
* @param {Object|Boolean} [options=true] - Object with the following attributes, or Boolean where true uses default cache settings and false removes all caching
* @param {Number} [options.memory=50] - is the maximum memory in MB to use for this cache

@@ -44,3 +44,3 @@ * @param {Number} [options.files=20] - is the maximum number of files to hold open

/**
* Gets, or when a concurrency is provided sets,
* Gets or, when a concurrency is provided, sets
* the number of threads _libvips'_ should create to process each image.

@@ -47,0 +47,0 @@ * The default value is the number of CPU cores.

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

@@ -40,3 +40,4 @@ "homepage": "https://github.com/lovell/sharp",

"Guy Maliar <guy@tailorbrands.com>",
"Nicolas Coden <nicolas@ncoden.fr>"
"Nicolas Coden <nicolas@ncoden.fr>",
"Matt Parrish <matt.r.parrish@gmail.com>"
],

@@ -73,5 +74,6 @@ "scripts": {

"color": "^2.0.0",
"got": "^7.1.0",
"detect-libc": "^0.2.0",
"nan": "^2.6.2",
"semver": "^5.3.0",
"simple-get": "^2.7.0",
"tar": "^3.1.5"

@@ -78,0 +80,0 @@ },

@@ -33,4 +33,7 @@ # sharp

.toFile('output.webp', (err, info) => ... );
// A Promises/A+ promise is returned when callback is not provided.
```
```javascript

@@ -37,0 +40,0 @@ sharp('input.jpg')

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