mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Expose own version as sharp.versions.sharp #3471
This commit is contained in:
@@ -43,7 +43,7 @@ const interpolators = {
|
||||
};
|
||||
|
||||
/**
|
||||
* An Object containing the version numbers of libvips and its dependencies.
|
||||
* An Object containing the version numbers of sharp, libvips and its dependencies.
|
||||
* @member
|
||||
* @example
|
||||
* console.log(sharp.versions);
|
||||
@@ -54,6 +54,7 @@ let versions = {
|
||||
try {
|
||||
versions = require(`../vendor/${versions.vips}/${platformAndArch}/versions.json`);
|
||||
} catch (_err) { /* ignore */ }
|
||||
versions.sharp = require('../package.json').version;
|
||||
|
||||
/**
|
||||
* An Object containing the platform and architecture
|
||||
|
||||
Reference in New Issue
Block a user