Socket
Socket
Sign inDemoInstall

sharp

Package Overview
Dependencies
29
Maintainers
1
Versions
151
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.33.1 to 0.33.2-rc.0

11

lib/libvips.js

@@ -10,2 +10,3 @@ // Copyright 2013 Lovell Fuller and others.

const semverGreaterThanOrEqualTo = require('semver/functions/gte');
const semverSatisfies = require('semver/functions/satisfies');
const detectLibc = require('detect-libc');

@@ -87,2 +88,11 @@

const isUnsupportedNodeRuntime = () => {
/* istanbul ignore next */
if (process.release?.name === 'node' && process.versions) {
if (!semverSatisfies(process.versions.node, engines.node)) {
return { found: process.versions.node, expected: engines.node };
}
}
};
/* istanbul ignore next */

@@ -179,2 +189,3 @@ const isEmscripten = () => {

buildSharpLibvipsLibDir,
isUnsupportedNodeRuntime,
runtimePlatformArch,

@@ -181,0 +192,0 @@ log,

2

lib/operation.js

@@ -27,2 +27,4 @@ // Copyright 2013 Lovell Fuller and others.

*
* Multi-page images can only be rotated by 180 degrees.
*
* Method order is important when rotating, resizing and/or extracting regions,

@@ -29,0 +31,0 @@ * for example `.rotate(x).extract(y)` will produce a different result to `.extract(y).rotate(x)`.

17

lib/sharp.js

@@ -10,3 +10,3 @@ // Copyright 2013 Lovell Fuller and others.

const { runtimePlatformArch, prebuiltPlatforms, minimumLibvipsVersion } = require('./libvips');
const { runtimePlatformArch, isUnsupportedNodeRuntime, prebuiltPlatforms, minimumLibvipsVersion } = require('./libvips');
const runtimePlatform = runtimePlatformArch();

@@ -48,4 +48,12 @@

// Common error messages
if (prebuiltPlatforms.includes(runtimePlatform)) {
if (isUnsupportedNodeRuntime()) {
const { found, expected } = isUnsupportedNodeRuntime();
help.push(
'- Please upgrade Node.js:',
` Found ${found}`,
` Requires ${expected}`
);
} else if (prebuiltPlatforms.includes(runtimePlatform)) {
const [os, cpu] = runtimePlatform.split('-');
const libc = os.endsWith('musl') ? ' --libc=musl' : '';
help.push(

@@ -58,4 +66,3 @@ '- Ensure optional dependencies can be installed:',

'- Add platform-specific dependencies:',
` npm install --os=${os} --cpu=${cpu} sharp`,
` npm install --force @img/sharp-${runtimePlatform}`
` npm install --os=${os.replace('musl', '')}${libc} --cpu=${cpu} sharp`
);

@@ -67,3 +74,3 @@ } else {

' npm install --cpu=wasm32 sharp',
' npm install --force @img/sharp-wasm32'
' npm install @img/sharp-wasm32'
);

@@ -70,0 +77,0 @@ }

{
"name": "sharp",
"description": "High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",
"version": "0.33.1",
"version": "0.33.2-rc.0",
"author": "Lovell Fuller <npm@lovell.info>",

@@ -144,32 +144,32 @@ "homepage": "https://sharp.pixelplumbing.com",

"optionalDependencies": {
"@img/sharp-darwin-arm64": "0.33.1",
"@img/sharp-darwin-x64": "0.33.1",
"@img/sharp-libvips-darwin-arm64": "1.0.0",
"@img/sharp-libvips-darwin-x64": "1.0.0",
"@img/sharp-libvips-linux-arm": "1.0.0",
"@img/sharp-libvips-linux-arm64": "1.0.0",
"@img/sharp-libvips-linux-s390x": "1.0.0",
"@img/sharp-libvips-linux-x64": "1.0.0",
"@img/sharp-libvips-linuxmusl-arm64": "1.0.0",
"@img/sharp-libvips-linuxmusl-x64": "1.0.0",
"@img/sharp-linux-arm": "0.33.1",
"@img/sharp-linux-arm64": "0.33.1",
"@img/sharp-linux-s390x": "0.33.1",
"@img/sharp-linux-x64": "0.33.1",
"@img/sharp-linuxmusl-arm64": "0.33.1",
"@img/sharp-linuxmusl-x64": "0.33.1",
"@img/sharp-wasm32": "0.33.1",
"@img/sharp-win32-ia32": "0.33.1",
"@img/sharp-win32-x64": "0.33.1"
"@img/sharp-darwin-arm64": "0.33.2-rc.0",
"@img/sharp-darwin-x64": "0.33.2-rc.0",
"@img/sharp-libvips-darwin-arm64": "1.0.1",
"@img/sharp-libvips-darwin-x64": "1.0.1",
"@img/sharp-libvips-linux-arm": "1.0.1",
"@img/sharp-libvips-linux-arm64": "1.0.1",
"@img/sharp-libvips-linux-s390x": "1.0.1",
"@img/sharp-libvips-linux-x64": "1.0.1",
"@img/sharp-libvips-linuxmusl-arm64": "1.0.1",
"@img/sharp-libvips-linuxmusl-x64": "1.0.1",
"@img/sharp-linux-arm": "0.33.2-rc.0",
"@img/sharp-linux-arm64": "0.33.2-rc.0",
"@img/sharp-linux-s390x": "0.33.2-rc.0",
"@img/sharp-linux-x64": "0.33.2-rc.0",
"@img/sharp-linuxmusl-arm64": "0.33.2-rc.0",
"@img/sharp-linuxmusl-x64": "0.33.2-rc.0",
"@img/sharp-wasm32": "0.33.2-rc.0",
"@img/sharp-win32-ia32": "0.33.2-rc.0",
"@img/sharp-win32-x64": "0.33.2-rc.0"
},
"devDependencies": {
"@emnapi/runtime": "^0.44.0",
"@img/sharp-libvips-dev": "1.0.0",
"@img/sharp-libvips-dev-wasm32": "1.0.0",
"@img/sharp-libvips-win32-ia32": "1.0.0",
"@img/sharp-libvips-win32-x64": "1.0.0",
"@emnapi/runtime": "^0.45.0",
"@img/sharp-libvips-dev": "1.0.1",
"@img/sharp-libvips-dev-wasm32": "1.0.1",
"@img/sharp-libvips-win32-ia32": "1.0.1",
"@img/sharp-libvips-win32-x64": "1.0.1",
"@types/node": "*",
"async": "^3.2.5",
"cc": "^3.0.1",
"emnapi": "^0.44.0",
"emnapi": "^0.45.0",
"exif-reader": "^2.0.0",

@@ -186,3 +186,3 @@ "extract-zip": "^2.0.1",

"tar-fs": "^3.0.4",
"tsd": "^0.29.0"
"tsd": "^0.30.3"
},

@@ -192,3 +192,3 @@ "license": "Apache-2.0",

"node": "^18.17.0 || ^20.3.0 || >=21.0.0",
"libvips": ">=8.15.0"
"libvips": ">=8.15.1"
},

@@ -195,0 +195,0 @@ "funding": {

@@ -11,3 +11,3 @@ # sharp

that provide support for Node-API v9, including
Node.js >= 18.17.0, Deno and Bun.
Node.js (^18.17.0 or >= 20.3.0), Deno and Bun.

@@ -14,0 +14,0 @@ Resizing an image is typically 4x-5x faster than using the

Sorry, the diff of this file is too big to display

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc