astro-accelerator 7.1.28 → 7.1.29

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "7.1.28",
2
+ "version": "7.1.29",
3
3
  "author": "Steve Fenton",
4
4
  "name": "astro-accelerator",
5
5
  "description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
@@ -8,7 +8,6 @@
8
8
  "themes"
9
9
  ],
10
10
  "type": "module",
11
- "packageManager": "pnpm@12.6.0",
12
11
  "engines": {
13
12
  "node": ">=24",
14
13
  "pnpm": ">=10"
@@ -90,12 +89,5 @@
90
89
  "public/icons/**/*",
91
90
  "public/css/*",
92
91
  "public/js/*"
93
- ],
94
- "pnpm": {
95
- "overrides": {
96
- "postcss@<8.4.31": ">=8.4.31",
97
- "vite@<=5.0.11": ">=5.0.12",
98
- "zod@<=3.22.2": ">=3.22.3"
99
- }
100
- }
101
- }
92
+ ]
93
+ }
@@ -9,6 +9,8 @@ import fs from 'fs';
9
9
  import path from 'path';
10
10
  import sharp from 'sharp';
11
11
 
12
+ const quality = 70;
13
+
12
14
  const workingDirectory = process.cwd();
13
15
 
14
16
  const imageSize = await import(
@@ -128,12 +130,12 @@ for (const file of filesToProcess) {
128
130
  break;
129
131
  case '.webp':
130
132
  sharp(source)
131
- .webp({ quality: 80 })
133
+ .webp({ quality: quality })
132
134
  .toFile(destination + '.webp');
133
135
  break;
134
136
  case '.avif':
135
137
  sharp(source)
136
- .avif({ quality: 80 })
138
+ .avif({ quality: quality })
137
139
  .toFile(destination + '.avif');
138
140
  break;
139
141
  }
@@ -159,18 +161,17 @@ for (const file of filesToProcess) {
159
161
  await createDestinationFolder(resizeDestination);
160
162
 
161
163
  const metadata = await sharp(source).metadata();
162
- const avifQuality = 80;
163
164
 
164
165
  if (metadata.width > size[key]) {
165
166
  // Only resize if the image is larger than the target size
166
167
  sharp(source)
167
168
  .resize(size[key], null)
168
- .avif({ quality: avifQuality })
169
+ .avif({ quality: quality })
169
170
  .toFile(resizeDestination + '.avif');
170
171
  } else {
171
172
  // Don't resize as it's smaller than target size
172
173
  sharp(source)
173
- .avif({ quality: avifQuality })
174
+ .avif({ quality: quality })
174
175
  .toFile(resizeDestination + '.avif');
175
176
  }
176
177
  }
File without changes
File without changes