From 481e350f39a2253b16e29b70701a4845832c3862 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Tue, 7 Sep 2021 11:21:00 +0100 Subject: [PATCH] Ensure 'versions' is populated from vendored libvips --- docs/changelog.md | 4 ++++ lib/utility.js | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index f82f27b4f..bdef2c9f0 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -4,6 +4,10 @@ Requires libvips v8.11.3 +### v0.29.2 - TBD + +* Ensure `sharp.versions` is populated from vendored libvips. + ### v0.29.1 - 7th September 2021 * Add `lightness` option to `modulate` operation. diff --git a/lib/utility.js b/lib/utility.js index dc1ad24e8..e24a5d7b1 100644 --- a/lib/utility.js +++ b/lib/utility.js @@ -4,6 +4,7 @@ const events = require('events'); const detectLibc = require('detect-libc'); const is = require('./is'); +const platformAndArch = require('./platform')(); const sharp = require('./sharp'); /** @@ -45,7 +46,7 @@ let versions = { vips: sharp.libvipsVersion() }; try { - versions = require(`../vendor/${versions.vips}/versions.json`); + versions = require(`../vendor/${versions.vips}/${platformAndArch}/versions.json`); } catch (err) {} /**