sharp 0.35.2-rc.0 → 0.35.2-rc.2

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.
@@ -424,10 +424,10 @@ function blur (options) {
424
424
  function dilate (width) {
425
425
  if (!is.defined(width)) {
426
426
  this.options.dilateWidth = 1;
427
- } else if (is.integer(width) && width > 0) {
427
+ } else if (is.integer(width) && is.inRange(width, 1, 65536)) {
428
428
  this.options.dilateWidth = width;
429
429
  } else {
430
- throw is.invalidParameterError('dilate', 'positive integer', dilate);
430
+ throw is.invalidParameterError('width', 'integer between 1 and 65536', width);
431
431
  }
432
432
  return this;
433
433
  }
@@ -447,10 +447,10 @@ function dilate (width) {
447
447
  function erode (width) {
448
448
  if (!is.defined(width)) {
449
449
  this.options.erodeWidth = 1;
450
- } else if (is.integer(width) && width > 0) {
450
+ } else if (is.integer(width) && is.inRange(width, 1, 65536)) {
451
451
  this.options.erodeWidth = width;
452
452
  } else {
453
- throw is.invalidParameterError('erode', 'positive integer', erode);
453
+ throw is.invalidParameterError('width', 'integer between 1 and 65536', width);
454
454
  }
455
455
  return this;
456
456
  }
@@ -424,10 +424,10 @@ function blur (options) {
424
424
  function dilate (width) {
425
425
  if (!is.defined(width)) {
426
426
  this.options.dilateWidth = 1;
427
- } else if (is.integer(width) && width > 0) {
427
+ } else if (is.integer(width) && is.inRange(width, 1, 65536)) {
428
428
  this.options.dilateWidth = width;
429
429
  } else {
430
- throw is.invalidParameterError('dilate', 'positive integer', dilate);
430
+ throw is.invalidParameterError('width', 'integer between 1 and 65536', width);
431
431
  }
432
432
  return this;
433
433
  }
@@ -447,10 +447,10 @@ function dilate (width) {
447
447
  function erode (width) {
448
448
  if (!is.defined(width)) {
449
449
  this.options.erodeWidth = 1;
450
- } else if (is.integer(width) && width > 0) {
450
+ } else if (is.integer(width) && is.inRange(width, 1, 65536)) {
451
451
  this.options.erodeWidth = width;
452
452
  } else {
453
- throw is.invalidParameterError('erode', 'positive integer', erode);
453
+ throw is.invalidParameterError('width', 'integer between 1 and 65536', width);
454
454
  }
455
455
  return this;
456
456
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "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.2-rc.0",
4
+ "version": "0.35.2-rc.2",
5
5
  "author": "Lovell Fuller <npm@lovell.info>",
6
6
  "homepage": "https://sharp.pixelplumbing.com",
7
7
  "contributors": [
@@ -163,41 +163,41 @@
163
163
  "semver": "^7.8.4"
164
164
  },
165
165
  "optionalDependencies": {
166
- "@img/sharp-darwin-arm64": "0.35.2-rc.0",
167
- "@img/sharp-darwin-x64": "0.35.2-rc.0",
168
- "@img/sharp-freebsd-wasm32": "0.35.2-rc.0",
169
- "@img/sharp-libvips-darwin-arm64": "1.3.0",
170
- "@img/sharp-libvips-darwin-x64": "1.3.0",
171
- "@img/sharp-libvips-linux-arm": "1.3.0",
172
- "@img/sharp-libvips-linux-arm64": "1.3.0",
173
- "@img/sharp-libvips-linux-ppc64": "1.3.0",
174
- "@img/sharp-libvips-linux-riscv64": "1.3.0",
175
- "@img/sharp-libvips-linux-s390x": "1.3.0",
176
- "@img/sharp-libvips-linux-x64": "1.3.0",
177
- "@img/sharp-libvips-linuxmusl-arm64": "1.3.0",
178
- "@img/sharp-libvips-linuxmusl-x64": "1.3.0",
179
- "@img/sharp-linux-arm": "0.35.2-rc.0",
180
- "@img/sharp-linux-arm64": "0.35.2-rc.0",
181
- "@img/sharp-linux-ppc64": "0.35.2-rc.0",
182
- "@img/sharp-linux-riscv64": "0.35.2-rc.0",
183
- "@img/sharp-linux-s390x": "0.35.2-rc.0",
184
- "@img/sharp-linux-x64": "0.35.2-rc.0",
185
- "@img/sharp-linuxmusl-arm64": "0.35.2-rc.0",
186
- "@img/sharp-linuxmusl-x64": "0.35.2-rc.0",
187
- "@img/sharp-webcontainers-wasm32": "0.35.2-rc.0",
188
- "@img/sharp-win32-arm64": "0.35.2-rc.0",
189
- "@img/sharp-win32-ia32": "0.35.2-rc.0",
190
- "@img/sharp-win32-x64": "0.35.2-rc.0"
166
+ "@img/sharp-darwin-arm64": "0.35.2-rc.2",
167
+ "@img/sharp-darwin-x64": "0.35.2-rc.2",
168
+ "@img/sharp-freebsd-wasm32": "0.35.2-rc.2",
169
+ "@img/sharp-libvips-darwin-arm64": "1.3.1-rc.0",
170
+ "@img/sharp-libvips-darwin-x64": "1.3.1-rc.0",
171
+ "@img/sharp-libvips-linux-arm": "1.3.1-rc.0",
172
+ "@img/sharp-libvips-linux-arm64": "1.3.1-rc.0",
173
+ "@img/sharp-libvips-linux-ppc64": "1.3.1-rc.0",
174
+ "@img/sharp-libvips-linux-riscv64": "1.3.1-rc.0",
175
+ "@img/sharp-libvips-linux-s390x": "1.3.1-rc.0",
176
+ "@img/sharp-libvips-linux-x64": "1.3.1-rc.0",
177
+ "@img/sharp-libvips-linuxmusl-arm64": "1.3.1-rc.0",
178
+ "@img/sharp-libvips-linuxmusl-x64": "1.3.1-rc.0",
179
+ "@img/sharp-linux-arm": "0.35.2-rc.2",
180
+ "@img/sharp-linux-arm64": "0.35.2-rc.2",
181
+ "@img/sharp-linux-ppc64": "0.35.2-rc.2",
182
+ "@img/sharp-linux-riscv64": "0.35.2-rc.2",
183
+ "@img/sharp-linux-s390x": "0.35.2-rc.2",
184
+ "@img/sharp-linux-x64": "0.35.2-rc.2",
185
+ "@img/sharp-linuxmusl-arm64": "0.35.2-rc.2",
186
+ "@img/sharp-linuxmusl-x64": "0.35.2-rc.2",
187
+ "@img/sharp-webcontainers-wasm32": "0.35.2-rc.2",
188
+ "@img/sharp-win32-arm64": "0.35.2-rc.2",
189
+ "@img/sharp-win32-ia32": "0.35.2-rc.2",
190
+ "@img/sharp-win32-x64": "0.35.2-rc.2"
191
191
  },
192
192
  "devDependencies": {
193
193
  "@biomejs/biome": "^2.5.0",
194
194
  "@cpplint/cli": "^0.1.0",
195
195
  "@emnapi/runtime": "^1.11.0",
196
- "@img/sharp-libvips-dev": "1.3.0",
197
- "@img/sharp-libvips-dev-wasm32": "1.3.0",
198
- "@img/sharp-libvips-win32-arm64": "1.3.0",
199
- "@img/sharp-libvips-win32-ia32": "1.3.0",
200
- "@img/sharp-libvips-win32-x64": "1.3.0",
196
+ "@img/sharp-libvips-dev": "1.3.1-rc.0",
197
+ "@img/sharp-libvips-dev-wasm32": "1.3.1-rc.0",
198
+ "@img/sharp-libvips-win32-arm64": "1.3.1-rc.0",
199
+ "@img/sharp-libvips-win32-ia32": "1.3.1-rc.0",
200
+ "@img/sharp-libvips-win32-x64": "1.3.1-rc.0",
201
201
  "@types/node": "*",
202
202
  "emnapi": "^1.11.0",
203
203
  "exif-reader": "^2.0.3",