astro-hotspot 0.1.0 → 0.2.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ ## 0.2.0 - 2026-07-31
6
+
7
+ - Added Astro 7 support — `astro` peer range is now `>=5.0.0 <8.0.0`
8
+ - Fixed Sharp 0.35 compatibility — the removed `failOnError` option is now `failOn: "none"`
9
+
10
+ ## 0.1.0 - 2026-05-22
11
+
12
+ - Initial release
package/dist/service.js CHANGED
@@ -50,7 +50,7 @@ const transform = async (inputBuffer, transformOptions, config) => {
50
50
  return baseSharpService.transform(inputBuffer, transformOptions, config);
51
51
  }
52
52
  const { default: sharp } = await import("sharp");
53
- const img = sharp(inputBuffer, { failOnError: false, pages: -1 }).rotate();
53
+ const img = sharp(inputBuffer, { failOn: "none", pages: -1 }).rotate();
54
54
  const meta = await img.metadata();
55
55
  const srcW = meta.width;
56
56
  const srcH = meta.height;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-hotspot",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Astro image service: hotspot cropping (x/y or '70% 34%') via Sharp's extract+resize",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -39,23 +39,25 @@
39
39
  },
40
40
  "files": [
41
41
  "dist",
42
- "README.md"
42
+ "README.md",
43
+ "CHANGELOG.md"
43
44
  ],
44
45
  "peerDependencies": {
45
- "astro": ">=5.0.0 <7.0.0",
46
+ "astro": ">=5.0.0 <8.0.0",
46
47
  "sharp": ">=0.33.0 <0.36.0"
47
48
  },
48
49
  "devDependencies": {
49
- "astro": "6.3.7",
50
- "prettier": "3.8.3",
51
- "sharp": "0.34.5",
50
+ "astro": "7.1.6",
51
+ "prettier": "3.9.6",
52
+ "sharp": "0.35.3",
52
53
  "typescript": "6.0.3",
53
- "vitest": "4.1.7"
54
+ "vitest": "4.1.10"
54
55
  },
55
56
  "scripts": {
56
57
  "build": "tsc",
57
58
  "check": "tsc --noEmit",
58
59
  "test": "vitest run",
59
- "format": "prettier --write ."
60
+ "format": "prettier --write .",
61
+ "format:check": "prettier --check ."
60
62
  }
61
63
  }