mirror of
https://github.com/lovell/sharp.git
synced 2026-02-04 13:46:19 +01:00
Compare commits
23 Commits
v0.34.4-rc
...
v0.34.4-rc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
905f69837e | ||
|
|
b0154ed83c | ||
|
|
93b814f849 | ||
|
|
6d4d44e2fa | ||
|
|
d8686e7c64 | ||
|
|
23a0e81d98 | ||
|
|
43b579c903 | ||
|
|
45f8717900 | ||
|
|
c270455007 | ||
|
|
1835288ab8 | ||
|
|
c1e33de33c | ||
|
|
0e4b648593 | ||
|
|
40be212bba | ||
|
|
8ceeda9ae9 | ||
|
|
16e248f93e | ||
|
|
b77c97067a | ||
|
|
660bbdb1c0 | ||
|
|
4164705113 | ||
|
|
c01e272db5 | ||
|
|
8607ff2f4a | ||
|
|
cd337e4de3 | ||
|
|
51d1a49abc | ||
|
|
dda00f63e6 |
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@@ -269,7 +269,7 @@ jobs:
|
||||
contents: read
|
||||
name: "build-wasm32 [package]"
|
||||
runs-on: ubuntu-24.04
|
||||
container: "emscripten/emsdk:4.0.11"
|
||||
container: "emscripten/emsdk:4.0.14"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Dependencies
|
||||
@@ -300,6 +300,7 @@ jobs:
|
||||
release:
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
runs-on: ubuntu-24.04
|
||||
needs:
|
||||
- build-native
|
||||
@@ -313,12 +314,11 @@ jobs:
|
||||
path: npm
|
||||
- name: Create npm workspace tarball
|
||||
run: tar -vcaf npm-workspace.tar.xz --directory npm --exclude=from-local-build.js .
|
||||
- name: Parse semver for tag
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: madhead/semver-utils@v4
|
||||
id: semver
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
version: ${{ github.ref_name }}
|
||||
node-version: '24'
|
||||
- name: Create release notes
|
||||
run: npm run package-release-notes
|
||||
- name: Create GitHub release for tag
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: ncipollo/release-action@v1
|
||||
@@ -327,4 +327,10 @@ jobs:
|
||||
artifactContentType: application/x-xz
|
||||
prerelease: ${{ contains(github.ref, '-rc') }}
|
||||
makeLatest: ${{ !contains(github.ref, '-rc') }}
|
||||
bodyFile: "docs/src/content/docs/changelog/v${{ steps.semver.outputs.major }}.${{ steps.semver.outputs.minor }}.${{ steps.semver.outputs.patch }}.md"
|
||||
bodyFile: release-notes.md
|
||||
- name: Publish platform-specific npm packages
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: cd npm && npm publish --workspaces --tag=${{ contains(github.ref, '-rc') && 'next' || 'latest' }} --dry-run
|
||||
- name: Publish sharp npm package
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: npm publish --tag=${{ contains(github.ref, '-rc') && 'next' || 'latest' }} --dry-run
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -16,3 +16,4 @@ package-lock.json
|
||||
.firebase
|
||||
.astro
|
||||
docs/dist
|
||||
release-notes.md
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/starlight": "^0.34.6",
|
||||
"astro": "^5.11.1",
|
||||
"@astrojs/starlight": "^0.35.2",
|
||||
"astro": "^5.13.5",
|
||||
"starlight-auto-sidebar": "^0.1.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,3 +323,6 @@ GitHub: https://github.com/hans00
|
||||
|
||||
Name: Thibaut Patel
|
||||
GitHub: https://github.com/tpatel
|
||||
|
||||
Name: Maël Nison
|
||||
GitHub: https://github.com/arcanis
|
||||
|
||||
@@ -61,6 +61,8 @@ const rgba = await sharp(rgb)
|
||||
|
||||
Extract a single channel from a multi-channel image.
|
||||
|
||||
The output colourspace will be either `b-w` (8-bit) or `grey16` (16-bit).
|
||||
|
||||
|
||||
**Throws**:
|
||||
|
||||
|
||||
@@ -3,8 +3,24 @@ title: v0.34.4 - TBD
|
||||
slug: changelog/v0.34.4
|
||||
---
|
||||
|
||||
* Upgrade to libvips v8.17.2 for upstream bug fixes.
|
||||
|
||||
* Ensure `autoOrient` occurs before non-90 angle rotation.
|
||||
[#4425](https://github.com/lovell/sharp/issues/4425)
|
||||
|
||||
* Ensure `autoOrient` removes existing metadata after shrink-on-load.
|
||||
[#4431](https://github.com/lovell/sharp/issues/4431)
|
||||
|
||||
* TypeScript: Ensure `KernelEnum` includes `linear`.
|
||||
[#4441](https://github.com/lovell/sharp/pull/4441)
|
||||
[@BayanBennett](https://github.com/BayanBennett)
|
||||
|
||||
* Ensure `unlimited` flag is passed upstream when reading TIFF images.
|
||||
[#4446](https://github.com/lovell/sharp/issues/4446)
|
||||
|
||||
* Support Electron memory cage when reading XMP metadata (regression in 0.34.3).
|
||||
[#4451](https://github.com/lovell/sharp/issues/4451)
|
||||
|
||||
* Add sharp-libvips rpath for yarn v5 support.
|
||||
[#4452](https://github.com/lovell/sharp/pull/4452)
|
||||
[@arcanis](https://github.com/arcanis)
|
||||
|
||||
@@ -25,7 +25,7 @@ rotation, extraction, compositing and gamma correction are available.
|
||||
Most modern macOS, Windows and Linux systems
|
||||
do not require any additional install or runtime dependencies.
|
||||
|
||||
```sh
|
||||
```sh frame="none"
|
||||
npm install sharp
|
||||
```
|
||||
|
||||
|
||||
@@ -12,11 +12,11 @@ If a package manager lockfile must support multiple platforms,
|
||||
please see the [cross-platform](#cross-platform) section
|
||||
to help decide which package manager is appropriate.
|
||||
|
||||
```sh
|
||||
```sh frame="none"
|
||||
npm install sharp
|
||||
```
|
||||
|
||||
```sh
|
||||
```sh frame="none"
|
||||
pnpm add sharp
|
||||
```
|
||||
|
||||
@@ -24,15 +24,15 @@ When using `pnpm`, you may need to add `sharp` to
|
||||
[ignoredBuiltDependencies](https://pnpm.io/settings#ignoredbuiltdependencies)
|
||||
to silence warnings.
|
||||
|
||||
```sh
|
||||
```sh frame="none"
|
||||
yarn add sharp
|
||||
```
|
||||
|
||||
```sh
|
||||
```sh frame="none"
|
||||
bun add sharp
|
||||
```
|
||||
|
||||
```sh
|
||||
```sh frame="none"
|
||||
deno run --allow-ffi ...
|
||||
```
|
||||
|
||||
@@ -75,7 +75,7 @@ npm `package-lock.json` files shared by multiple platforms can cause installatio
|
||||
Provides limited support via `--os`, `--cpu` and `--libc` flags.
|
||||
|
||||
To support macOS with Intel x64 and ARM64 CPUs:
|
||||
```sh
|
||||
```sh frame="none"
|
||||
npm install --cpu=x64 --os=darwin sharp
|
||||
npm install --cpu=arm64 --os=darwin sharp
|
||||
```
|
||||
@@ -83,7 +83,7 @@ npm install --cpu=arm64 --os=darwin sharp
|
||||
When the cross-target is Linux, the C standard library must be specified.
|
||||
|
||||
To support glibc (e.g. Debian) and musl (e.g. Alpine) Linux with Intel x64 CPUs:
|
||||
```sh
|
||||
```sh frame="none"
|
||||
npm install --cpu=x64 --os=linux --libc=glibc sharp
|
||||
npm install --cpu=x64 --os=linux --libc=musl sharp
|
||||
```
|
||||
@@ -129,7 +129,7 @@ Building from source requires:
|
||||
There is an install-time check for these dependencies.
|
||||
If `node-addon-api` or `node-gyp` cannot be found, try adding them via:
|
||||
|
||||
```sh
|
||||
```sh frame="none"
|
||||
npm install --save node-addon-api node-gyp
|
||||
```
|
||||
|
||||
@@ -152,19 +152,20 @@ Native text rendering is unsupported.
|
||||
|
||||
[Tile-based output](/api-output#tile) is unsupported.
|
||||
|
||||
```sh
|
||||
```sh frame="none"
|
||||
npm install --cpu=wasm32 sharp
|
||||
```
|
||||
|
||||
## FreeBSD
|
||||
|
||||
The `vips` package must be installed before `npm install` is run.
|
||||
The `vips` package must be installed before `npm install` is run,
|
||||
as well as the additional [building from source](#building-from-source) dependencies.
|
||||
|
||||
```sh
|
||||
```sh frame="none"
|
||||
pkg install -y pkgconf vips
|
||||
```
|
||||
|
||||
```sh
|
||||
```sh frame="none"
|
||||
cd /usr/ports/graphics/vips/ && make install clean
|
||||
```
|
||||
|
||||
@@ -213,7 +214,7 @@ Ensure sharp is excluded from bundling via the
|
||||
[externals](https://webpack.js.org/configuration/externals/)
|
||||
configuration.
|
||||
|
||||
```js
|
||||
```js frame="none"
|
||||
externals: {
|
||||
'sharp': 'commonjs sharp'
|
||||
}
|
||||
@@ -225,7 +226,7 @@ Ensure sharp is excluded from bundling via the
|
||||
[external](https://esbuild.github.io/api/#external)
|
||||
configuration.
|
||||
|
||||
```js
|
||||
```js frame="none"
|
||||
buildSync({
|
||||
entryPoints: ['app.js'],
|
||||
bundle: true,
|
||||
@@ -234,14 +235,14 @@ buildSync({
|
||||
})
|
||||
```
|
||||
|
||||
```sh
|
||||
```sh frame="none"
|
||||
esbuild app.js --bundle --platform=node --external:sharp
|
||||
```
|
||||
|
||||
For `serverless-esbuild`, ensure platform-specific binaries are installed
|
||||
via the `serverless.yml` configuration.
|
||||
|
||||
```yaml
|
||||
```yaml frame="none"
|
||||
custom:
|
||||
esbuild:
|
||||
external:
|
||||
@@ -259,7 +260,7 @@ Ensure `sharp` is unpacked from the ASAR archive file using the
|
||||
[asarUnpack](https://www.electron.build/app-builder-lib.interface.platformspecificbuildoptions#asarunpack)
|
||||
option.
|
||||
|
||||
```json
|
||||
```json frame="none"
|
||||
{
|
||||
"build": {
|
||||
"asar": true,
|
||||
@@ -277,7 +278,7 @@ Ensure `sharp` is unpacked from the ASAR archive file using the
|
||||
[unpack](https://js.electronforge.io/interfaces/_electron_forge_maker_squirrel.InternalOptions.Options.html#asar)
|
||||
option.
|
||||
|
||||
```json
|
||||
```json frame="none"
|
||||
{
|
||||
"packagerConfig": {
|
||||
"asar": {
|
||||
@@ -297,7 +298,7 @@ Ensure `sharp` is excluded from bundling via the
|
||||
[build.rollupOptions](https://vitejs.dev/config/build-options.html)
|
||||
configuration.
|
||||
|
||||
```js
|
||||
```js frame="none"
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
|
||||
@@ -13,7 +13,7 @@ environment variable, which defaults to 4.
|
||||
When using more than 4 physical CPU cores, set this environment variable
|
||||
before the Node.js process starts to increase the thread pool size.
|
||||
|
||||
```sh
|
||||
```sh frame="none"
|
||||
export UV_THREADPOOL_SIZE="$(lscpu -p | egrep -v "^#" | sort -u -t, -k 2,4 | wc -l)"
|
||||
```
|
||||
|
||||
@@ -28,7 +28,7 @@ To reduce memory fragmentation when using the default Linux glibc memory allocat
|
||||
[`MALLOC_ARENA_MAX`](https://www.gnu.org/software/libc/manual/html_node/Memory-Allocation-Tunables.html)
|
||||
environment variable before the Node.js process starts to reduce the number of memory pools.
|
||||
|
||||
```sh
|
||||
```sh frame="none"
|
||||
export MALLOC_ARENA_MAX="2"
|
||||
```
|
||||
|
||||
@@ -130,7 +130,7 @@ Note: jimp does not support premultiply/unpremultiply.
|
||||
|
||||
Requires Docker.
|
||||
|
||||
```sh
|
||||
```sh frame="none"
|
||||
git clone https://github.com/lovell/sharp.git
|
||||
cd sharp/test/bench
|
||||
./run-with-docker.sh
|
||||
|
||||
@@ -74,6 +74,8 @@ function ensureAlpha (alpha) {
|
||||
/**
|
||||
* Extract a single channel from a multi-channel image.
|
||||
*
|
||||
* The output colourspace will be either `b-w` (8-bit) or `grey16` (16-bit).
|
||||
*
|
||||
* @example
|
||||
* // green.jpg is a greyscale image containing the green channel of the input
|
||||
* await sharp(input)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const color = require('color');
|
||||
const color = require('@img/colour');
|
||||
const is = require('./is');
|
||||
|
||||
/**
|
||||
|
||||
1
lib/index.d.ts
vendored
1
lib/index.d.ts
vendored
@@ -1784,6 +1784,7 @@ declare namespace sharp {
|
||||
interface KernelEnum {
|
||||
nearest: 'nearest';
|
||||
cubic: 'cubic';
|
||||
linear: 'linear';
|
||||
mitchell: 'mitchell';
|
||||
lanczos2: 'lanczos2';
|
||||
lanczos3: 'lanczos3';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-darwin-arm64",
|
||||
"version": "0.34.4-rc.0",
|
||||
"version": "0.34.4-rc.2",
|
||||
"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.2.1"
|
||||
"@img/sharp-libvips-darwin-arm64": "1.2.2"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-darwin-x64",
|
||||
"version": "0.34.4-rc.0",
|
||||
"version": "0.34.4-rc.2",
|
||||
"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.2.1"
|
||||
"@img/sharp-libvips-darwin-x64": "1.2.2"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-linux-arm",
|
||||
"version": "0.34.4-rc.0",
|
||||
"version": "0.34.4-rc.2",
|
||||
"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.2.1"
|
||||
"@img/sharp-libvips-linux-arm": "1.2.2"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-linux-arm64",
|
||||
"version": "0.34.4-rc.0",
|
||||
"version": "0.34.4-rc.2",
|
||||
"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.2.1"
|
||||
"@img/sharp-libvips-linux-arm64": "1.2.2"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-linux-ppc64",
|
||||
"version": "0.34.4-rc.0",
|
||||
"version": "0.34.4-rc.2",
|
||||
"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.2.1"
|
||||
"@img/sharp-libvips-linux-ppc64": "1.2.2"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-linux-s390x",
|
||||
"version": "0.34.4-rc.0",
|
||||
"version": "0.34.4-rc.2",
|
||||
"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.2.1"
|
||||
"@img/sharp-libvips-linux-s390x": "1.2.2"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-linux-x64",
|
||||
"version": "0.34.4-rc.0",
|
||||
"version": "0.34.4-rc.2",
|
||||
"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.2.1"
|
||||
"@img/sharp-libvips-linux-x64": "1.2.2"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-linuxmusl-arm64",
|
||||
"version": "0.34.4-rc.0",
|
||||
"version": "0.34.4-rc.2",
|
||||
"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.2.1"
|
||||
"@img/sharp-libvips-linuxmusl-arm64": "1.2.2"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-linuxmusl-x64",
|
||||
"version": "0.34.4-rc.0",
|
||||
"version": "0.34.4-rc.2",
|
||||
"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.2.1"
|
||||
"@img/sharp-libvips-linuxmusl-x64": "1.2.2"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp",
|
||||
"version": "0.34.4-rc.0",
|
||||
"version": "0.34.4-rc.2",
|
||||
"private": "true",
|
||||
"workspaces": [
|
||||
"darwin-arm64",
|
||||
|
||||
9
npm/release-notes.js
Normal file
9
npm/release-notes.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const { readFileSync, writeFileSync } = require('node:fs');
|
||||
|
||||
const { version } = require('./package.json');
|
||||
const versionWithoutPreRelease = version.replace(/-rc\.\d+$/, '');
|
||||
|
||||
const markdown = readFileSync(`./docs/src/content/docs/changelog/v${versionWithoutPreRelease}.md`, 'utf8');
|
||||
const markdownWithoutFrontmatter = markdown.replace(/---\n.*?\n---\n+/s, '');
|
||||
|
||||
writeFileSync('./release-notes.md', markdownWithoutFrontmatter);
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-wasm32",
|
||||
"version": "0.34.4-rc.0",
|
||||
"version": "0.34.4-rc.2",
|
||||
"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.4.5"
|
||||
"@emnapi/runtime": "^1.5.0"
|
||||
},
|
||||
"cpu": [
|
||||
"wasm32"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-win32-arm64",
|
||||
"version": "0.34.4-rc.0",
|
||||
"version": "0.34.4-rc.2",
|
||||
"description": "Prebuilt sharp for use with Windows 64-bit ARM",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-win32-ia32",
|
||||
"version": "0.34.4-rc.0",
|
||||
"version": "0.34.4-rc.2",
|
||||
"description": "Prebuilt sharp for use with Windows x86 (32-bit)",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@img/sharp-win32-x64",
|
||||
"version": "0.34.4-rc.0",
|
||||
"version": "0.34.4-rc.2",
|
||||
"description": "Prebuilt sharp for use with Windows x64",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
|
||||
73
package.json
73
package.json
@@ -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.4-rc.0",
|
||||
"version": "0.34.4-rc.2",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
"contributors": [
|
||||
@@ -101,6 +101,7 @@
|
||||
"test-leak": "./test/leak/leak.sh",
|
||||
"test-types": "tsd",
|
||||
"package-from-local-build": "node npm/from-local-build.js",
|
||||
"package-release-notes": "node npm/release-notes.js",
|
||||
"docs-build": "node docs/build.mjs",
|
||||
"docs-serve": "cd docs && npm start",
|
||||
"docs-publish": "cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"
|
||||
@@ -136,63 +137,63 @@
|
||||
"vips"
|
||||
],
|
||||
"dependencies": {
|
||||
"color": "^4.2.3",
|
||||
"detect-libc": "^2.0.4",
|
||||
"@img/colour": "^1.0.0",
|
||||
"detect-libc": "^2.1.0",
|
||||
"semver": "^7.7.2"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-darwin-arm64": "0.34.4-rc.0",
|
||||
"@img/sharp-darwin-x64": "0.34.4-rc.0",
|
||||
"@img/sharp-libvips-darwin-arm64": "1.2.1",
|
||||
"@img/sharp-libvips-darwin-x64": "1.2.1",
|
||||
"@img/sharp-libvips-linux-arm": "1.2.1",
|
||||
"@img/sharp-libvips-linux-arm64": "1.2.1",
|
||||
"@img/sharp-libvips-linux-ppc64": "1.2.1",
|
||||
"@img/sharp-libvips-linux-s390x": "1.2.1",
|
||||
"@img/sharp-libvips-linux-x64": "1.2.1",
|
||||
"@img/sharp-libvips-linuxmusl-arm64": "1.2.1",
|
||||
"@img/sharp-libvips-linuxmusl-x64": "1.2.1",
|
||||
"@img/sharp-linux-arm": "0.34.4-rc.0",
|
||||
"@img/sharp-linux-arm64": "0.34.4-rc.0",
|
||||
"@img/sharp-linux-ppc64": "0.34.4-rc.0",
|
||||
"@img/sharp-linux-s390x": "0.34.4-rc.0",
|
||||
"@img/sharp-linux-x64": "0.34.4-rc.0",
|
||||
"@img/sharp-linuxmusl-arm64": "0.34.4-rc.0",
|
||||
"@img/sharp-linuxmusl-x64": "0.34.4-rc.0",
|
||||
"@img/sharp-wasm32": "0.34.4-rc.0",
|
||||
"@img/sharp-win32-arm64": "0.34.4-rc.0",
|
||||
"@img/sharp-win32-ia32": "0.34.4-rc.0",
|
||||
"@img/sharp-win32-x64": "0.34.4-rc.0"
|
||||
"@img/sharp-darwin-arm64": "0.34.4-rc.2",
|
||||
"@img/sharp-darwin-x64": "0.34.4-rc.2",
|
||||
"@img/sharp-libvips-darwin-arm64": "1.2.2",
|
||||
"@img/sharp-libvips-darwin-x64": "1.2.2",
|
||||
"@img/sharp-libvips-linux-arm": "1.2.2",
|
||||
"@img/sharp-libvips-linux-arm64": "1.2.2",
|
||||
"@img/sharp-libvips-linux-ppc64": "1.2.2",
|
||||
"@img/sharp-libvips-linux-s390x": "1.2.2",
|
||||
"@img/sharp-libvips-linux-x64": "1.2.2",
|
||||
"@img/sharp-libvips-linuxmusl-arm64": "1.2.2",
|
||||
"@img/sharp-libvips-linuxmusl-x64": "1.2.2",
|
||||
"@img/sharp-linux-arm": "0.34.4-rc.2",
|
||||
"@img/sharp-linux-arm64": "0.34.4-rc.2",
|
||||
"@img/sharp-linux-ppc64": "0.34.4-rc.2",
|
||||
"@img/sharp-linux-s390x": "0.34.4-rc.2",
|
||||
"@img/sharp-linux-x64": "0.34.4-rc.2",
|
||||
"@img/sharp-linuxmusl-arm64": "0.34.4-rc.2",
|
||||
"@img/sharp-linuxmusl-x64": "0.34.4-rc.2",
|
||||
"@img/sharp-wasm32": "0.34.4-rc.2",
|
||||
"@img/sharp-win32-arm64": "0.34.4-rc.2",
|
||||
"@img/sharp-win32-ia32": "0.34.4-rc.2",
|
||||
"@img/sharp-win32-x64": "0.34.4-rc.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@emnapi/runtime": "^1.4.5",
|
||||
"@img/sharp-libvips-dev": "1.2.1",
|
||||
"@img/sharp-libvips-dev-wasm32": "1.2.1",
|
||||
"@img/sharp-libvips-win32-arm64": "1.2.1",
|
||||
"@img/sharp-libvips-win32-ia32": "1.2.1",
|
||||
"@img/sharp-libvips-win32-x64": "1.2.1",
|
||||
"@emnapi/runtime": "^1.5.0",
|
||||
"@img/sharp-libvips-dev": "1.2.2",
|
||||
"@img/sharp-libvips-dev-wasm32": "1.2.2",
|
||||
"@img/sharp-libvips-win32-arm64": "1.2.2",
|
||||
"@img/sharp-libvips-win32-ia32": "1.2.2",
|
||||
"@img/sharp-libvips-win32-x64": "1.2.2",
|
||||
"@types/node": "*",
|
||||
"cc": "^3.0.1",
|
||||
"emnapi": "^1.4.5",
|
||||
"emnapi": "^1.5.0",
|
||||
"exif-reader": "^2.0.2",
|
||||
"extract-zip": "^2.0.1",
|
||||
"icc": "^3.0.0",
|
||||
"jsdoc-to-markdown": "^9.1.2",
|
||||
"license-checker": "^25.0.1",
|
||||
"mocha": "^11.7.1",
|
||||
"mocha": "^11.7.2",
|
||||
"node-addon-api": "^8.5.0",
|
||||
"node-gyp": "^11.2.0",
|
||||
"node-gyp": "^11.4.2",
|
||||
"nyc": "^17.1.0",
|
||||
"semistandard": "^17.0.0",
|
||||
"tar-fs": "^3.1.0",
|
||||
"tsd": "^0.32.0"
|
||||
"tsd": "^0.33.0"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"config": {
|
||||
"libvips": ">=8.17.1"
|
||||
"libvips": ">=8.17.2"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
|
||||
@@ -168,6 +168,7 @@
|
||||
# Ensure runtime linking is relative to sharp.node
|
||||
'-Wl,-rpath,\'@loader_path/../../sharp-libvips-<(platform_and_arch)/lib\'',
|
||||
'-Wl,-rpath,\'@loader_path/../../../sharp-libvips-<(platform_and_arch)/<(sharp_libvips_version)/lib\'',
|
||||
'-Wl,-rpath,\'@loader_path/../node_modules/@img/sharp-libvips-<(platform_and_arch)/lib\'',
|
||||
'-Wl,-rpath,\'@loader_path/../../node_modules/@img/sharp-libvips-<(platform_and_arch)/lib\'',
|
||||
'-Wl,-rpath,\'@loader_path/../../../node_modules/@img/sharp-libvips-<(platform_and_arch)/lib\'',
|
||||
'-Wl,-rpath,\'@loader_path/../../../../../@img-sharp-libvips-<(platform_and_arch)-npm-<(sharp_libvips_version)-<(sharp_libvips_yarn_locator)/node_modules/@img/sharp-libvips-<(platform_and_arch)/lib\''
|
||||
@@ -208,11 +209,9 @@
|
||||
'-Oz',
|
||||
'-sALLOW_MEMORY_GROWTH',
|
||||
'-sENVIRONMENT=node',
|
||||
'-sEXPORTED_FUNCTIONS=["emnapiInit", "_vips_shutdown", "_uv_library_shutdown"]',
|
||||
'-sEXPORTED_FUNCTIONS=emnapiInit,_vips_shutdown,_uv_library_shutdown',
|
||||
'-sNODERAWFS',
|
||||
'-sTEXTDECODER=0',
|
||||
'-sWASM_ASYNC_COMPILATION=0',
|
||||
'-sWASM_BIGINT'
|
||||
'-sWASM_ASYNC_COMPILATION=0'
|
||||
],
|
||||
'libraries': [
|
||||
'<!@(PKG_CONFIG_PATH="<!(node -p "require(\'@img/sharp-libvips-dev-wasm32/lib\')")/pkgconfig" pkg-config --static --libs vips-cpp)'
|
||||
|
||||
@@ -396,6 +396,7 @@ namespace sharp {
|
||||
imageType == ImageType::JPEG ||
|
||||
imageType == ImageType::PNG ||
|
||||
imageType == ImageType::SVG ||
|
||||
imageType == ImageType::TIFF ||
|
||||
imageType == ImageType::HEIF;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
#if (VIPS_MAJOR_VERSION < 8) || \
|
||||
(VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 17) || \
|
||||
(VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 17 && VIPS_MICRO_VERSION < 1)
|
||||
#error "libvips version 8.17.1+ is required - please see https://sharp.pixelplumbing.com/install"
|
||||
(VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 17 && VIPS_MICRO_VERSION < 2)
|
||||
#error "libvips version 8.17.2+ is required - please see https://sharp.pixelplumbing.com/install"
|
||||
#endif
|
||||
|
||||
#if defined(__has_include)
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
'-sAUTO_JS_LIBRARIES=0',
|
||||
'-sAUTO_NATIVE_LIBRARIES=0',
|
||||
'-sDEFAULT_TO_CXX=0',
|
||||
'-sNODEJS_CATCH_EXIT=0',
|
||||
'-sNODEJS_CATCH_REJECTION=0'
|
||||
],
|
||||
'defines': [
|
||||
|
||||
@@ -261,11 +261,11 @@ class MetadataWorker : public Napi::AsyncWorker {
|
||||
info.Set("iptc", Napi::Buffer<char>::NewOrCopy(env, baton->iptc, baton->iptcLength, sharp::FreeCallback));
|
||||
}
|
||||
if (baton->xmpLength > 0) {
|
||||
info.Set("xmp", Napi::Buffer<char>::NewOrCopy(env, baton->xmp, baton->xmpLength, sharp::FreeCallback));
|
||||
if (g_utf8_validate(static_cast<char const *>(baton->xmp), baton->xmpLength, nullptr)) {
|
||||
info.Set("xmpAsString",
|
||||
Napi::String::New(env, static_cast<char const *>(baton->xmp), baton->xmpLength));
|
||||
}
|
||||
info.Set("xmp", Napi::Buffer<char>::NewOrCopy(env, baton->xmp, baton->xmpLength, sharp::FreeCallback));
|
||||
}
|
||||
if (baton->tifftagPhotoshopLength > 0) {
|
||||
info.Set("tifftagPhotoshop",
|
||||
|
||||
@@ -82,7 +82,6 @@ describe('Image channel extraction', function () {
|
||||
const output = fixtures.path('output.extract-alpha-2-channel.png');
|
||||
sharp(fixtures.inputPngWithGreyAlpha)
|
||||
.extractChannel('alpha')
|
||||
.toColourspace('b-w')
|
||||
.toFile(output, function (err, info) {
|
||||
if (err) throw err;
|
||||
assert.strictEqual(1, info.channels);
|
||||
|
||||
@@ -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, '7e40558001');
|
||||
assert.strictEqual(locatorHash, '9773928ef2');
|
||||
delete process.env.npm_config_platform;
|
||||
delete process.env.npm_config_arch;
|
||||
delete process.env.npm_config_libc;
|
||||
|
||||
@@ -43,7 +43,7 @@ describe('Median filter', function () {
|
||||
.raw()
|
||||
.toBuffer();
|
||||
|
||||
assert.deepStrictEqual(data.subarray(0, 6), Buffer.from([0, 3, 15, 15, 63, 127]));
|
||||
assert.deepStrictEqual(data.subarray(0, 6), Buffer.from(row));
|
||||
});
|
||||
|
||||
it('invalid radius', () => {
|
||||
|
||||
Reference in New Issue
Block a user