Compare commits

...

10 Commits

Author SHA1 Message Date
Steven
3c7dbb8fba
fix(types): update autoOrient type to include undefined (#4362)
This PR fixes the following error:

```
node_modules/.pnpm/sharp@0.34.0/node_modules/sharp/lib/index.d.ts(1590,15): error TS2430: Interface 'OverlayOptions' incorrectly extends interface 'SharpOptions'.
  Types of property 'autoOrient' are incompatible.
    Type 'boolean | undefined' is not assignable to type 'boolean'.
      Type 'undefined' is not assignable to type 'boolean'.
```
2025-04-04 21:53:46 +01:00
Lovell Fuller
a9e191328f Prevent glib assertions and checks #4351 2025-04-04 15:42:34 +01:00
Lovell Fuller
7323dbee98 Docs: update path to logo 2025-04-04 15:35:46 +01:00
Lovell Fuller
d7a771ca7a Docs: update path to logo 2025-04-04 15:33:34 +01:00
Lovell Fuller
7d0585fad1 Docs: remove outdated redirects/rewrites 2025-04-04 15:30:07 +01:00
Lovell Fuller
ddc1eb8c4c Release v0.34.0 (part 2 - see c26e67c) 2025-04-04 14:38:27 +01:00
Lovell Fuller
c26e67cc5b Release v0.34.0 2025-04-04 13:44:11 +01:00
Lovell Fuller
a00ee26d17 Prevent glib assertions and checks #4351 2025-04-04 12:41:33 +01:00
Lovell Fuller
6dfb60cda2 Prevent prebuilt Linux sharp binaries from exporting symbols
The prebuilt Linux libvips binaries already do this
2025-04-04 09:49:37 +01:00
Lovell Fuller
dbb7606129 Prerelease v0.34.0-rc.1 2025-04-03 15:29:32 +01:00
22 changed files with 64 additions and 150 deletions

View File

@ -208,7 +208,7 @@ jobs:
contents: write
name: wasm32 - prebuild
runs-on: ubuntu-24.04
container: "emscripten/emsdk:4.0.5"
container: "emscripten/emsdk:4.0.6"
steps:
- name: Checkout
uses: actions/checkout@v4

View File

@ -1,6 +1,6 @@
# sharp
<img src="https://cdn.jsdelivr.net/gh/lovell/sharp@main/docs/image/sharp-logo.svg" width="160" height="160" alt="sharp logo" align="right">
<img src="https://cdn.jsdelivr.net/gh/lovell/sharp@main/docs/public/sharp-logo.svg" width="160" height="160" alt="sharp logo" align="right">
The typical use case for this high speed Node-API module
is to convert large images in common formats to

View File

@ -11,99 +11,6 @@
{ "key": "X-Frame-Options", "value": "SAMEORIGIN" }
]
}
],
"redirects": [
{
"source": "**/install/**",
"destination": "/install",
"type": 301
},
{
"source": "/page/install",
"destination": "/install",
"type": 301
},
{
"source": "**/api-constructor/**",
"destination": "/api-constructor",
"type": 301
},
{
"source": "**/api-input/**",
"destination": "/api-input",
"type": 301
},
{
"source": "**/api-output/**",
"destination": "/api-output",
"type": 301
},
{
"source": "**/api-resize/**",
"destination": "/api-resize",
"type": 301
},
{
"source": "**/api-compsite/**",
"destination": "/api-compsite",
"type": 301
},
{
"source": "**/api-operation/**",
"destination": "/api-operation",
"type": 301
},
{
"source": "**/api-colour/**",
"destination": "/api-colour",
"type": 301
},
{
"source": "**/api-channel/**",
"destination": "/api-channel",
"type": 301
},
{
"source": "**/api-utility/**",
"destination": "/api-utility",
"type": 301
},
{
"source": "/page/api",
"destination": "/api-constructor",
"type": 301
},
{
"source": "**/performance/**",
"destination": "/performance",
"type": 301
},
{
"source": "/page/performance",
"destination": "/performance",
"type": 301
},
{
"source": "**/changelog/**",
"destination": "/changelog",
"type": 301
},
{
"source": "/page/changelog",
"destination": "/changelog",
"type": 301
},
{
"source": "/en/**",
"destination": "/",
"type": 301
}
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}

View File

@ -6,7 +6,7 @@ title: Changelog
Requires libvips v8.16.1
### v0.34.0 - TBD
### v0.34.0 - 4th April 2025
* Breaking: Support array of input images to be joined or animated.
[#1580](https://github.com/lovell/sharp/issues/1580)

View File

@ -2,7 +2,7 @@
title: "High performance Node.js image processing"
---
<img src="https://cdn.jsdelivr.net/gh/lovell/sharp@main/docs/image/sharp-logo.svg" width="160" height="160" alt="sharp logo" align="right">
<img src="https://cdn.jsdelivr.net/gh/lovell/sharp@main/docs/public/sharp-logo.svg" width="160" height="160" alt="sharp logo" align="right">
The typical use case for this high speed Node-API module
is to convert large images in common formats to

2
lib/index.d.ts vendored
View File

@ -971,7 +971,7 @@ declare namespace sharp {
*
* Using this option will remove the EXIF `Orientation` tag, if any.
*/
autoOrient?: boolean;
autoOrient?: boolean | undefined;
/**
* When to abort processing of invalid pixel data, one of (in order of sensitivity):
* 'none' (least), 'truncated', 'error' or 'warning' (most), highers level imply lower levels, invalid metadata will always abort. (optional, default 'warning')

View File

@ -1,6 +1,6 @@
{
"name": "@img/sharp-darwin-arm64",
"version": "0.34.0-rc.0",
"version": "0.34.0",
"description": "Prebuilt sharp for use with macOS 64-bit ARM",
"author": "Lovell Fuller <npm@lovell.info>",
"homepage": "https://sharp.pixelplumbing.com",
@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-darwin-arm64": "1.1.0-rc4"
"@img/sharp-libvips-darwin-arm64": "1.1.0"
},
"files": [
"lib"

View File

@ -1,6 +1,6 @@
{
"name": "@img/sharp-darwin-x64",
"version": "0.34.0-rc.0",
"version": "0.34.0",
"description": "Prebuilt sharp for use with macOS x64",
"author": "Lovell Fuller <npm@lovell.info>",
"homepage": "https://sharp.pixelplumbing.com",
@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-darwin-x64": "1.1.0-rc4"
"@img/sharp-libvips-darwin-x64": "1.1.0"
},
"files": [
"lib"

View File

@ -1,6 +1,6 @@
{
"name": "@img/sharp-linux-arm",
"version": "0.34.0-rc.0",
"version": "0.34.0",
"description": "Prebuilt sharp for use with Linux (glibc) ARM (32-bit)",
"author": "Lovell Fuller <npm@lovell.info>",
"homepage": "https://sharp.pixelplumbing.com",
@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-linux-arm": "1.1.0-rc4.1"
"@img/sharp-libvips-linux-arm": "1.1.0"
},
"files": [
"lib"

View File

@ -1,6 +1,6 @@
{
"name": "@img/sharp-linux-arm64",
"version": "0.34.0-rc.0",
"version": "0.34.0",
"description": "Prebuilt sharp for use with Linux (glibc) 64-bit ARM",
"author": "Lovell Fuller <npm@lovell.info>",
"homepage": "https://sharp.pixelplumbing.com",
@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-linux-arm64": "1.1.0-rc4"
"@img/sharp-libvips-linux-arm64": "1.1.0"
},
"files": [
"lib"

View File

@ -1,6 +1,6 @@
{
"name": "@img/sharp-linux-ppc64",
"version": "0.34.0-rc.0",
"version": "0.34.0",
"description": "Prebuilt sharp for use with Linux (glibc) ppc64",
"author": "Lovell Fuller <npm@lovell.info>",
"homepage": "https://sharp.pixelplumbing.com",
@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-linux-ppc64": "1.1.0-rc4"
"@img/sharp-libvips-linux-ppc64": "1.1.0"
},
"files": [
"lib"

View File

@ -1,6 +1,6 @@
{
"name": "@img/sharp-linux-s390x",
"version": "0.34.0-rc.0",
"version": "0.34.0",
"description": "Prebuilt sharp for use with Linux (glibc) s390x",
"author": "Lovell Fuller <npm@lovell.info>",
"homepage": "https://sharp.pixelplumbing.com",
@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-linux-s390x": "1.1.0-rc4"
"@img/sharp-libvips-linux-s390x": "1.1.0"
},
"files": [
"lib"

View File

@ -1,6 +1,6 @@
{
"name": "@img/sharp-linux-x64",
"version": "0.34.0-rc.0",
"version": "0.34.0",
"description": "Prebuilt sharp for use with Linux (glibc) x64",
"author": "Lovell Fuller <npm@lovell.info>",
"homepage": "https://sharp.pixelplumbing.com",
@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-linux-x64": "1.1.0-rc4"
"@img/sharp-libvips-linux-x64": "1.1.0"
},
"files": [
"lib"

View File

@ -1,6 +1,6 @@
{
"name": "@img/sharp-linuxmusl-arm64",
"version": "0.34.0-rc.0",
"version": "0.34.0",
"description": "Prebuilt sharp for use with Linux (musl) 64-bit ARM",
"author": "Lovell Fuller <npm@lovell.info>",
"homepage": "https://sharp.pixelplumbing.com",
@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-linuxmusl-arm64": "1.1.0-rc4"
"@img/sharp-libvips-linuxmusl-arm64": "1.1.0"
},
"files": [
"lib"

View File

@ -1,6 +1,6 @@
{
"name": "@img/sharp-linuxmusl-x64",
"version": "0.34.0-rc.0",
"version": "0.34.0",
"description": "Prebuilt sharp for use with Linux (musl) x64",
"author": "Lovell Fuller <npm@lovell.info>",
"homepage": "https://sharp.pixelplumbing.com",
@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-linuxmusl-x64": "1.1.0-rc4"
"@img/sharp-libvips-linuxmusl-x64": "1.1.0"
},
"files": [
"lib"

View File

@ -1,6 +1,6 @@
{
"name": "@img/sharp",
"version": "0.34.0-rc.0",
"version": "0.34.0",
"private": "true",
"workspaces": [
"darwin-arm64",

View File

@ -1,6 +1,6 @@
{
"name": "@img/sharp-wasm32",
"version": "0.34.0-rc.0",
"version": "0.34.0",
"description": "Prebuilt sharp for use with wasm32",
"author": "Lovell Fuller <npm@lovell.info>",
"homepage": "https://sharp.pixelplumbing.com",
@ -31,7 +31,7 @@
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"dependencies": {
"@emnapi/runtime": "^1.3.1"
"@emnapi/runtime": "^1.4.0"
},
"cpu": [
"wasm32"

View File

@ -1,6 +1,6 @@
{
"name": "@img/sharp-win32-ia32",
"version": "0.34.0-rc.0",
"version": "0.34.0",
"description": "Prebuilt sharp for use with Windows x86 (32-bit)",
"author": "Lovell Fuller <npm@lovell.info>",
"homepage": "https://sharp.pixelplumbing.com",

View File

@ -1,6 +1,6 @@
{
"name": "@img/sharp-win32-x64",
"version": "0.34.0-rc.0",
"version": "0.34.0",
"description": "Prebuilt sharp for use with Windows x64",
"author": "Lovell Fuller <npm@lovell.info>",
"homepage": "https://sharp.pixelplumbing.com",

View File

@ -1,7 +1,7 @@
{
"name": "sharp",
"description": "High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",
"version": "0.34.0-rc.0",
"version": "0.34.0",
"author": "Lovell Fuller <npm@lovell.info>",
"homepage": "https://sharp.pixelplumbing.com",
"contributors": [
@ -142,36 +142,36 @@
"semver": "^7.7.1"
},
"optionalDependencies": {
"@img/sharp-darwin-arm64": "0.34.0-rc.0",
"@img/sharp-darwin-x64": "0.34.0-rc.0",
"@img/sharp-libvips-darwin-arm64": "1.1.0-rc4",
"@img/sharp-libvips-darwin-x64": "1.1.0-rc4",
"@img/sharp-libvips-linux-arm": "1.1.0-rc4.1",
"@img/sharp-libvips-linux-arm64": "1.1.0-rc4",
"@img/sharp-libvips-linux-ppc64": "1.1.0-rc4",
"@img/sharp-libvips-linux-s390x": "1.1.0-rc4",
"@img/sharp-libvips-linux-x64": "1.1.0-rc4",
"@img/sharp-libvips-linuxmusl-arm64": "1.1.0-rc4",
"@img/sharp-libvips-linuxmusl-x64": "1.1.0-rc4",
"@img/sharp-linux-arm": "0.34.0-rc.0",
"@img/sharp-linux-arm64": "0.34.0-rc.0",
"@img/sharp-linux-s390x": "0.34.0-rc.0",
"@img/sharp-linux-x64": "0.34.0-rc.0",
"@img/sharp-linuxmusl-arm64": "0.34.0-rc.0",
"@img/sharp-linuxmusl-x64": "0.34.0-rc.0",
"@img/sharp-wasm32": "0.34.0-rc.0",
"@img/sharp-win32-ia32": "0.34.0-rc.0",
"@img/sharp-win32-x64": "0.34.0-rc.0"
"@img/sharp-darwin-arm64": "0.34.0",
"@img/sharp-darwin-x64": "0.34.0",
"@img/sharp-libvips-darwin-arm64": "1.1.0",
"@img/sharp-libvips-darwin-x64": "1.1.0",
"@img/sharp-libvips-linux-arm": "1.1.0",
"@img/sharp-libvips-linux-arm64": "1.1.0",
"@img/sharp-libvips-linux-ppc64": "1.1.0",
"@img/sharp-libvips-linux-s390x": "1.1.0",
"@img/sharp-libvips-linux-x64": "1.1.0",
"@img/sharp-libvips-linuxmusl-arm64": "1.1.0",
"@img/sharp-libvips-linuxmusl-x64": "1.1.0",
"@img/sharp-linux-arm": "0.34.0",
"@img/sharp-linux-arm64": "0.34.0",
"@img/sharp-linux-s390x": "0.34.0",
"@img/sharp-linux-x64": "0.34.0",
"@img/sharp-linuxmusl-arm64": "0.34.0",
"@img/sharp-linuxmusl-x64": "0.34.0",
"@img/sharp-wasm32": "0.34.0",
"@img/sharp-win32-ia32": "0.34.0",
"@img/sharp-win32-x64": "0.34.0"
},
"devDependencies": {
"@emnapi/runtime": "^1.3.1",
"@img/sharp-libvips-dev": "1.1.0-rc4",
"@img/sharp-libvips-dev-wasm32": "1.1.0-rc4",
"@img/sharp-libvips-win32-ia32": "1.1.0-rc4",
"@img/sharp-libvips-win32-x64": "1.1.0-rc4",
"@emnapi/runtime": "^1.4.0",
"@img/sharp-libvips-dev": "1.1.0",
"@img/sharp-libvips-dev-wasm32": "1.1.0",
"@img/sharp-libvips-win32-ia32": "1.1.0",
"@img/sharp-libvips-win32-x64": "1.1.0",
"@types/node": "*",
"cc": "^3.0.1",
"emnapi": "^1.3.1",
"emnapi": "^1.4.0",
"exif-reader": "^2.0.2",
"extract-zip": "^2.0.1",
"icc": "^3.0.0",

View File

@ -19,7 +19,10 @@
'type': 'shared_library',
'defines': [
'_VIPS_PUBLIC=__declspec(dllexport)',
'_ALLOW_KEYWORD_MACROS'
'_ALLOW_KEYWORD_MACROS',
'G_DISABLE_ASSERT',
'G_DISABLE_CAST_CHECKS',
'G_DISABLE_CHECKS'
],
'sources': [
'<(sharp_libvips_cplusplus_dir)/VConnection.cpp',
@ -80,6 +83,9 @@
}, {
'target_name': 'sharp-<(platform_and_arch)',
'defines': [
'G_DISABLE_ASSERT',
'G_DISABLE_CAST_CHECKS',
'G_DISABLE_CHECKS',
'NAPI_VERSION=9',
'NODE_ADDON_API_DISABLE_DEPRECATED',
'NODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS'
@ -179,6 +185,7 @@
'-Wl,-s',
'-Wl,--disable-new-dtags',
'-Wl,-z,nodelete',
'-Wl,-Bsymbolic-functions',
'-Wl,-rpath=\'$$ORIGIN/../../sharp-libvips-<(platform_and_arch)/lib\'',
'-Wl,-rpath=\'$$ORIGIN/../../../sharp-libvips-<(platform_and_arch)/<(sharp_libvips_version)/lib\'',
'-Wl,-rpath=\'$$ORIGIN/../../node_modules/@img/sharp-libvips-<(platform_and_arch)/lib\'',

View File

@ -179,7 +179,7 @@ describe('libvips binaries', function () {
process.env.npm_config_arch = 's390x';
process.env.npm_config_libc = '';
const locatorHash = libvips.yarnLocator();
assert.strictEqual(locatorHash, 'e34c58507a');
assert.strictEqual(locatorHash, '9b2ea457de');
delete process.env.npm_config_platform;
delete process.env.npm_config_arch;
delete process.env.npm_config_libc;