@revizly/sharp 0.35.0-revizly47 → 0.35.0-revizly48

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/dist/resize.cjs CHANGED
@@ -265,19 +265,19 @@ function resize (widthOrOptions, height, options) {
265
265
  if (is.defined(widthOrOptions)) {
266
266
  if (is.object(widthOrOptions) && !is.defined(options)) {
267
267
  options = widthOrOptions;
268
- } else if (is.integer(widthOrOptions) && widthOrOptions > 0) {
268
+ } else if (is.integer(widthOrOptions) && is.inRange(widthOrOptions, 1, 100000000)) {
269
269
  this.options.width = widthOrOptions;
270
270
  } else {
271
- throw is.invalidParameterError('width', 'positive integer', widthOrOptions);
271
+ throw is.invalidParameterError('width', 'positive integer between 1 and 100000000', widthOrOptions);
272
272
  }
273
273
  } else {
274
274
  this.options.width = -1;
275
275
  }
276
276
  if (is.defined(height)) {
277
- if (is.integer(height) && height > 0) {
277
+ if (is.integer(height) && is.inRange(height, 1, 100000000)) {
278
278
  this.options.height = height;
279
279
  } else {
280
- throw is.invalidParameterError('height', 'positive integer', height);
280
+ throw is.invalidParameterError('height', 'positive integer between 1 and 100000000', height);
281
281
  }
282
282
  } else {
283
283
  this.options.height = -1;
@@ -285,18 +285,18 @@ function resize (widthOrOptions, height, options) {
285
285
  if (is.object(options)) {
286
286
  // Width
287
287
  if (is.defined(options.width)) {
288
- if (is.integer(options.width) && options.width > 0) {
288
+ if (is.integer(options.width) && is.inRange(options.width, 1, 100000000)) {
289
289
  this.options.width = options.width;
290
290
  } else {
291
- throw is.invalidParameterError('width', 'positive integer', options.width);
291
+ throw is.invalidParameterError('width', 'positive integer between 1 and 100000000', options.width);
292
292
  }
293
293
  }
294
294
  // Height
295
295
  if (is.defined(options.height)) {
296
- if (is.integer(options.height) && options.height > 0) {
296
+ if (is.integer(options.height) && is.inRange(options.height, 1, 100000000)) {
297
297
  this.options.height = options.height;
298
298
  } else {
299
- throw is.invalidParameterError('height', 'positive integer', options.height);
299
+ throw is.invalidParameterError('height', 'positive integer between 1 and 100000000', options.height);
300
300
  }
301
301
  }
302
302
  // Fit
package/dist/resize.mjs CHANGED
@@ -265,19 +265,19 @@ function resize (widthOrOptions, height, options) {
265
265
  if (is.defined(widthOrOptions)) {
266
266
  if (is.object(widthOrOptions) && !is.defined(options)) {
267
267
  options = widthOrOptions;
268
- } else if (is.integer(widthOrOptions) && widthOrOptions > 0) {
268
+ } else if (is.integer(widthOrOptions) && is.inRange(widthOrOptions, 1, 100000000)) {
269
269
  this.options.width = widthOrOptions;
270
270
  } else {
271
- throw is.invalidParameterError('width', 'positive integer', widthOrOptions);
271
+ throw is.invalidParameterError('width', 'positive integer between 1 and 100000000', widthOrOptions);
272
272
  }
273
273
  } else {
274
274
  this.options.width = -1;
275
275
  }
276
276
  if (is.defined(height)) {
277
- if (is.integer(height) && height > 0) {
277
+ if (is.integer(height) && is.inRange(height, 1, 100000000)) {
278
278
  this.options.height = height;
279
279
  } else {
280
- throw is.invalidParameterError('height', 'positive integer', height);
280
+ throw is.invalidParameterError('height', 'positive integer between 1 and 100000000', height);
281
281
  }
282
282
  } else {
283
283
  this.options.height = -1;
@@ -285,18 +285,18 @@ function resize (widthOrOptions, height, options) {
285
285
  if (is.object(options)) {
286
286
  // Width
287
287
  if (is.defined(options.width)) {
288
- if (is.integer(options.width) && options.width > 0) {
288
+ if (is.integer(options.width) && is.inRange(options.width, 1, 100000000)) {
289
289
  this.options.width = options.width;
290
290
  } else {
291
- throw is.invalidParameterError('width', 'positive integer', options.width);
291
+ throw is.invalidParameterError('width', 'positive integer between 1 and 100000000', options.width);
292
292
  }
293
293
  }
294
294
  // Height
295
295
  if (is.defined(options.height)) {
296
- if (is.integer(options.height) && options.height > 0) {
296
+ if (is.integer(options.height) && is.inRange(options.height, 1, 100000000)) {
297
297
  this.options.height = options.height;
298
298
  } else {
299
- throw is.invalidParameterError('height', 'positive integer', options.height);
299
+ throw is.invalidParameterError('height', 'positive integer between 1 and 100000000', options.height);
300
300
  }
301
301
  }
302
302
  // Fit
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-revizly47",
4
+ "version": "0.35.0-revizly48",
5
5
  "author": "Lovell Fuller <npm@lovell.info>",
6
6
  "homepage": "https://sharp.pixelplumbing.com",
7
7
  "contributors": [
@@ -163,10 +163,10 @@
163
163
  "semver": "^7.8.5"
164
164
  },
165
165
  "optionalDependencies": {
166
- "@revizly/sharp-libvips-linux-arm64": "1.0.48",
167
- "@revizly/sharp-libvips-linux-x64": "1.0.48",
168
- "@revizly/sharp-linux-arm64": "0.35.0-revizly47",
169
- "@revizly/sharp-linux-x64": "0.35.0-revizly47"
166
+ "@revizly/sharp-libvips-linux-arm64": "1.0.49",
167
+ "@revizly/sharp-libvips-linux-x64": "1.0.49",
168
+ "@revizly/sharp-linux-arm64": "0.35.0-revizly48",
169
+ "@revizly/sharp-linux-x64": "0.35.0-revizly48"
170
170
  },
171
171
  "peerDependenciesMeta": {
172
172
  "@types/node": {
@@ -174,18 +174,18 @@
174
174
  }
175
175
  },
176
176
  "devDependencies": {
177
- "@biomejs/biome": "^2.5.5",
177
+ "@biomejs/biome": "^2.5.10",
178
178
  "@cpplint/cli": "^0.1.0",
179
- "@emnapi/runtime": "^1.11.2",
180
- "@revizly/sharp-libvips-dev": "1.0.48",
179
+ "@emnapi/runtime": "^1.11.3",
180
+ "@revizly/sharp-libvips-dev": "1.0.49",
181
181
  "@types/node": "*",
182
- "emnapi": "^1.11.2",
182
+ "emnapi": "^1.11.3",
183
183
  "exif-reader": "^2.0.3",
184
- "extract-zip": "^2.0.1",
184
+ "yauzl": "^3.4.0",
185
185
  "icc": "^4.0.0",
186
- "node-addon-api": "^8.9.0",
186
+ "node-addon-api": "^8.9.2",
187
187
  "node-gyp": "^12.4.0",
188
- "publint": "^0.3.21",
188
+ "publint": "^0.3.24",
189
189
  "tar-fs": "^3.1.3",
190
190
  "tsd": "^0.33.0"
191
191
  },
@@ -194,7 +194,7 @@
194
194
  "node": ">=20.9.0"
195
195
  },
196
196
  "config": {
197
- "libvips": ">=8.18.5"
197
+ "libvips": ">=8.18.6"
198
198
  },
199
199
  "funding": {
200
200
  "url": "https://opencollective.com/libvips"
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 < 5)
23
- #error "libvips version 8.18.5+ is required - please see https://sharp.pixelplumbing.com/install"
22
+ (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 18 && VIPS_MICRO_VERSION < 6)
23
+ #error "libvips version 8.18.6+ is required - please see https://sharp.pixelplumbing.com/install"
24
24
  #endif
25
25
 
26
26
  #if defined(__has_include)