mirror of
https://github.com/lovell/sharp.git
synced 2026-02-05 06:06:18 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5bed3a7d52 | ||
|
|
ece111280b |
@@ -4,6 +4,11 @@
|
|||||||
|
|
||||||
Requires libvips v8.6.1.
|
Requires libvips v8.6.1.
|
||||||
|
|
||||||
|
#### v0.20.7 - 21<sup>st</sup> August 2018
|
||||||
|
|
||||||
|
* Use copy+unlink if rename operation fails during installation.
|
||||||
|
[#1345](https://github.com/lovell/sharp/issues/1345)
|
||||||
|
|
||||||
#### v0.20.6 - 20<sup>th</sup> August 2018
|
#### v0.20.6 - 20<sup>th</sup> August 2018
|
||||||
|
|
||||||
* Add removeAlpha operation to remove alpha channel, if any.
|
* Add removeAlpha operation to remove alpha channel, if any.
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ const npmLog = require('npmlog');
|
|||||||
const semver = require('semver');
|
const semver = require('semver');
|
||||||
const simpleGet = require('simple-get');
|
const simpleGet = require('simple-get');
|
||||||
const tar = require('tar');
|
const tar = require('tar');
|
||||||
|
const copyFileSync = require('fs-copy-file-sync');
|
||||||
|
|
||||||
const agent = require('../lib/agent');
|
const agent = require('../lib/agent');
|
||||||
const libvips = require('../lib/libvips');
|
const libvips = require('../lib/libvips');
|
||||||
@@ -82,7 +83,14 @@ try {
|
|||||||
response.pipe(tmpFile);
|
response.pipe(tmpFile);
|
||||||
});
|
});
|
||||||
tmpFile.on('close', function () {
|
tmpFile.on('close', function () {
|
||||||
fs.renameSync(tarPathTemp, tarPathCache);
|
try {
|
||||||
|
// Attempt to rename
|
||||||
|
fs.renameSync(tarPathTemp, tarPathCache);
|
||||||
|
} catch (err) {
|
||||||
|
// Fall back to copy and unlink
|
||||||
|
copyFileSync(tarPathTemp, tarPathCache);
|
||||||
|
fs.unlinkSync(tarPathTemp);
|
||||||
|
}
|
||||||
extractTarball(tarPathCache);
|
extractTarball(tarPathCache);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "sharp",
|
"name": "sharp",
|
||||||
"description": "High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP and TIFF images",
|
"description": "High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP and TIFF images",
|
||||||
"version": "0.20.6",
|
"version": "0.20.7",
|
||||||
"author": "Lovell Fuller <npm@lovell.info>",
|
"author": "Lovell Fuller <npm@lovell.info>",
|
||||||
"homepage": "https://github.com/lovell/sharp",
|
"homepage": "https://github.com/lovell/sharp",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
|
|||||||
Reference in New Issue
Block a user