@revizly/sharp 0.35.0-revizly24 → 0.35.0-revizly26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -41,28 +41,20 @@ npm install sharp
41
41
  const sharp = require('sharp');
42
42
  ```
43
43
 
44
- ### Callback
45
-
46
44
  ```javascript
47
- sharp(inputBuffer)
48
- .resize(320, 240)
45
+ await sharp(inputBuffer)
46
+ .resize({ width: 320, height: 240 })
49
47
  .toFile('output.webp', (err, info) => { ... });
50
48
  ```
51
49
 
52
- ### Promise
53
-
54
50
  ```javascript
55
- sharp('input.jpg')
56
- .rotate()
57
- .resize(200)
51
+ const output = await sharp('input.jpg')
52
+ .autoOrient()
53
+ .resize({ width: 200 })
58
54
  .jpeg({ mozjpeg: true })
59
- .toBuffer()
60
- .then( data => { ... })
61
- .catch( err => { ... });
55
+ .toBuffer();
62
56
  ```
63
57
 
64
- ### Async/await
65
-
66
58
  ```javascript
67
59
  const semiTransparentRedPng = await sharp({
68
60
  create: {
@@ -76,8 +68,6 @@ const semiTransparentRedPng = await sharp({
76
68
  .toBuffer();
77
69
  ```
78
70
 
79
- ### Stream
80
-
81
71
  ```javascript
82
72
  const roundedCorners = Buffer.from(
83
73
  '<svg><rect x="0" y="0" width="200" height="200" rx="50" ry="50"/></svg>'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@revizly/sharp",
3
3
  "description": "High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",
4
- "version": "0.35.0-revizly24",
4
+ "version": "0.35.0-revizly26",
5
5
  "author": "Lovell Fuller <npm@lovell.info>",
6
6
  "homepage": "https://sharp.pixelplumbing.com",
7
7
  "contributors": [
@@ -145,22 +145,22 @@
145
145
  "semver": "^7.7.4"
146
146
  },
147
147
  "optionalDependencies": {
148
- "@revizly/sharp-libvips-linux-arm64": "1.0.29",
149
- "@revizly/sharp-libvips-linux-x64": "1.0.29",
150
- "@revizly/sharp-linux-arm64": "0.35.0-revizly22",
151
- "@revizly/sharp-linux-x64": "0.35.0-revizly22"
148
+ "@revizly/sharp-libvips-linux-arm64": "1.0.30",
149
+ "@revizly/sharp-libvips-linux-x64": "1.0.30",
150
+ "@revizly/sharp-linux-arm64": "0.35.0-revizly24",
151
+ "@revizly/sharp-linux-x64": "0.35.0-revizly24"
152
152
  },
153
153
  "devDependencies": {
154
- "@biomejs/biome": "^2.4.8",
154
+ "@biomejs/biome": "^2.4.10",
155
155
  "@cpplint/cli": "^0.1.0",
156
- "@emnapi/runtime": "^1.9.1",
157
- "@revizly/sharp-libvips-dev": "1.0.29",
156
+ "@emnapi/runtime": "^1.9.2",
157
+ "@revizly/sharp-libvips-dev": "1.0.30",
158
158
  "@types/node": "*",
159
- "emnapi": "^1.9.1",
159
+ "emnapi": "^1.9.2",
160
160
  "exif-reader": "^2.0.3",
161
161
  "extract-zip": "^2.0.1",
162
162
  "icc": "^3.0.0",
163
- "node-addon-api": "^8.6.0",
163
+ "node-addon-api": "^8.7.0",
164
164
  "node-gyp": "^12.2.0",
165
165
  "tar-fs": "^3.1.2",
166
166
  "tsd": "^0.33.0"
@@ -170,7 +170,7 @@
170
170
  "node": ">=20.9.0"
171
171
  },
172
172
  "config": {
173
- "libvips": ">=8.18.1"
173
+ "libvips": ">=8.18.2"
174
174
  },
175
175
  "funding": {
176
176
  "url": "https://opencollective.com/libvips"
package/src/binding.gyp CHANGED
@@ -205,9 +205,12 @@
205
205
  }],
206
206
  ['OS == "emscripten"', {
207
207
  'product_extension': 'node.js',
208
+ 'cflags_cc': [
209
+ '-fwasm-exceptions'
210
+ ],
208
211
  'link_settings': {
209
212
  'ldflags': [
210
- '-fexceptions',
213
+ '-fwasm-exceptions',
211
214
  '--pre-js=<!(node -p "require.resolve(\'./emscripten/pre.js\')")',
212
215
  '-Oz',
213
216
  '-sALLOW_MEMORY_GROWTH',
package/src/common.h CHANGED
@@ -19,8 +19,8 @@
19
19
 
20
20
  #if (VIPS_MAJOR_VERSION < 8) || \
21
21
  (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 18) || \
22
- (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 18 && VIPS_MICRO_VERSION < 1)
23
- #error "libvips version 8.18.1+ is required - please see https://sharp.pixelplumbing.com/install"
22
+ (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 18 && VIPS_MICRO_VERSION < 2)
23
+ #error "libvips version 8.18.2+ is required - please see https://sharp.pixelplumbing.com/install"
24
24
  #endif
25
25
 
26
26
  #if defined(__has_include)