astro 4.4.8 → 4.4.9
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/assets/build/generate.js +7 -1
- package/dist/assets/utils/proxy.js +1 -1
- package/dist/core/config/schema.d.ts +0 -12
- package/dist/core/config/schema.js +0 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/dev/dev.js +1 -1
- package/dist/core/logger/core.d.ts +1 -1
- package/dist/core/messages.js +2 -2
- package/package.json +4 -3
|
@@ -59,7 +59,13 @@ async function generateImagesForPath(originalFilePath, transformsAndPath, env, q
|
|
|
59
59
|
}
|
|
60
60
|
if (!env.isSSR && !isRemotePath(originalFilePath) && !globalThis.astroAsset.referencedImages?.has(transformsAndPath.originalSrcPath)) {
|
|
61
61
|
try {
|
|
62
|
-
|
|
62
|
+
if (transformsAndPath.originalSrcPath) {
|
|
63
|
+
env.logger.debug(
|
|
64
|
+
"assets",
|
|
65
|
+
`Deleting ${originalFilePath} as it's not referenced outside of image processing.`
|
|
66
|
+
);
|
|
67
|
+
await fs.promises.unlink(getFullImagePath(originalFilePath, env));
|
|
68
|
+
}
|
|
63
69
|
} catch (e) {
|
|
64
70
|
}
|
|
65
71
|
}
|
|
@@ -9,7 +9,7 @@ function getProxyCode(options, isSSR) {
|
|
|
9
9
|
if (name === 'fsPath') {
|
|
10
10
|
return ${stringifiedFSPath};
|
|
11
11
|
}
|
|
12
|
-
${!isSSR ? `globalThis.astroAsset.referencedImages.add(${stringifiedFSPath});` : ""}
|
|
12
|
+
${!isSSR ? `if (target[name] !== undefined) globalThis.astroAsset.referencedImages.add(${stringifiedFSPath});` : ""}
|
|
13
13
|
return target[name];
|
|
14
14
|
}
|
|
15
15
|
})
|
|
@@ -31,7 +31,6 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
31
31
|
name: string;
|
|
32
32
|
hooks?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
33
33
|
}>>;
|
|
34
|
-
db: z.ZodOptional<z.ZodDefault<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
|
|
35
34
|
integrations: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
36
35
|
name: z.ZodString;
|
|
37
36
|
hooks: z.ZodDefault<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
|
|
@@ -430,7 +429,6 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
430
429
|
[k: string]: unknown;
|
|
431
430
|
};
|
|
432
431
|
} | undefined;
|
|
433
|
-
db?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
434
432
|
prefetch?: boolean | {
|
|
435
433
|
prefetchAll?: boolean | undefined;
|
|
436
434
|
defaultStrategy?: "tap" | "hover" | "viewport" | "load" | undefined;
|
|
@@ -465,7 +463,6 @@ export declare const AstroConfigSchema: z.ZodObject<{
|
|
|
465
463
|
name: string;
|
|
466
464
|
hooks?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
467
465
|
} | undefined;
|
|
468
|
-
db?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
469
466
|
integrations?: unknown;
|
|
470
467
|
build?: {
|
|
471
468
|
format?: "file" | "directory" | "preserve" | undefined;
|
|
@@ -627,7 +624,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
627
624
|
name: string;
|
|
628
625
|
hooks?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
629
626
|
}>>;
|
|
630
|
-
db: z.ZodOptional<z.ZodDefault<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
|
|
631
627
|
integrations: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
632
628
|
name: z.ZodString;
|
|
633
629
|
hooks: z.ZodDefault<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
|
|
@@ -971,7 +967,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
971
967
|
[k: string]: unknown;
|
|
972
968
|
};
|
|
973
969
|
} | undefined;
|
|
974
|
-
db?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
975
970
|
prefetch?: boolean | {
|
|
976
971
|
prefetchAll?: boolean | undefined;
|
|
977
972
|
defaultStrategy?: "tap" | "hover" | "viewport" | "load" | undefined;
|
|
@@ -1018,7 +1013,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1018
1013
|
name: string;
|
|
1019
1014
|
hooks?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1020
1015
|
} | undefined;
|
|
1021
|
-
db?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1022
1016
|
integrations?: unknown;
|
|
1023
1017
|
prefetch?: boolean | {
|
|
1024
1018
|
prefetchAll?: boolean | undefined;
|
|
@@ -1168,7 +1162,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1168
1162
|
[k: string]: unknown;
|
|
1169
1163
|
};
|
|
1170
1164
|
} | undefined;
|
|
1171
|
-
db?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1172
1165
|
prefetch?: boolean | {
|
|
1173
1166
|
prefetchAll?: boolean | undefined;
|
|
1174
1167
|
defaultStrategy?: "tap" | "hover" | "viewport" | "load" | undefined;
|
|
@@ -1215,7 +1208,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1215
1208
|
name: string;
|
|
1216
1209
|
hooks?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1217
1210
|
} | undefined;
|
|
1218
|
-
db?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1219
1211
|
integrations?: unknown;
|
|
1220
1212
|
prefetch?: boolean | {
|
|
1221
1213
|
prefetchAll?: boolean | undefined;
|
|
@@ -1365,7 +1357,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1365
1357
|
[k: string]: unknown;
|
|
1366
1358
|
};
|
|
1367
1359
|
} | undefined;
|
|
1368
|
-
db?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1369
1360
|
prefetch?: boolean | {
|
|
1370
1361
|
prefetchAll?: boolean | undefined;
|
|
1371
1362
|
defaultStrategy?: "tap" | "hover" | "viewport" | "load" | undefined;
|
|
@@ -1412,7 +1403,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1412
1403
|
name: string;
|
|
1413
1404
|
hooks?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1414
1405
|
} | undefined;
|
|
1415
|
-
db?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1416
1406
|
integrations?: unknown;
|
|
1417
1407
|
prefetch?: boolean | {
|
|
1418
1408
|
prefetchAll?: boolean | undefined;
|
|
@@ -1562,7 +1552,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1562
1552
|
[k: string]: unknown;
|
|
1563
1553
|
};
|
|
1564
1554
|
} | undefined;
|
|
1565
|
-
db?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1566
1555
|
prefetch?: boolean | {
|
|
1567
1556
|
prefetchAll?: boolean | undefined;
|
|
1568
1557
|
defaultStrategy?: "tap" | "hover" | "viewport" | "load" | undefined;
|
|
@@ -1609,7 +1598,6 @@ export declare function createRelativeSchema(cmd: string, fileProtocolRoot: stri
|
|
|
1609
1598
|
name: string;
|
|
1610
1599
|
hooks?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1611
1600
|
} | undefined;
|
|
1612
|
-
db?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1613
1601
|
integrations?: unknown;
|
|
1614
1602
|
prefetch?: boolean | {
|
|
1615
1603
|
prefetchAll?: boolean | undefined;
|
|
@@ -61,7 +61,6 @@ const AstroConfigSchema = z.object({
|
|
|
61
61
|
output: z.union([z.literal("static"), z.literal("server"), z.literal("hybrid")]).optional().default("static"),
|
|
62
62
|
scopedStyleStrategy: z.union([z.literal("where"), z.literal("class"), z.literal("attribute")]).optional().default("attribute"),
|
|
63
63
|
adapter: z.object({ name: z.string(), hooks: z.object({}).passthrough().default({}) }).optional(),
|
|
64
|
-
db: z.object({}).passthrough().default({}).optional(),
|
|
65
64
|
integrations: z.preprocess(
|
|
66
65
|
// preprocess
|
|
67
66
|
(val) => Array.isArray(val) ? val.flat(Infinity).filter(Boolean) : val,
|
package/dist/core/constants.js
CHANGED
package/dist/core/dev/dev.js
CHANGED
|
@@ -23,7 +23,7 @@ async function dev(inlineConfig) {
|
|
|
23
23
|
base: restart.container.settings.config.base
|
|
24
24
|
})
|
|
25
25
|
);
|
|
26
|
-
const currentVersion = "4.4.
|
|
26
|
+
const currentVersion = "4.4.9";
|
|
27
27
|
if (currentVersion.includes("-")) {
|
|
28
28
|
logger.warn("SKIP_FORMAT", msg.prerelease({ currentVersion }));
|
|
29
29
|
}
|
|
@@ -7,7 +7,7 @@ export type LoggerLevel = 'debug' | 'info' | 'warn' | 'error' | 'silent';
|
|
|
7
7
|
* rather than specific to a single command, function, use, etc. The label will be
|
|
8
8
|
* shown in the log message to the user, so it should be relevant.
|
|
9
9
|
*/
|
|
10
|
-
export type LoggerLabel = 'add' | 'build' | 'check' | 'config' | 'content' | 'deprecated' | 'markdown' | 'router' | 'types' | 'vite' | 'watch' | 'middleware' | 'preferences' | 'redirects' | 'toolbar' | 'SKIP_FORMAT';
|
|
10
|
+
export type LoggerLabel = 'add' | 'build' | 'check' | 'config' | 'content' | 'deprecated' | 'markdown' | 'router' | 'types' | 'vite' | 'watch' | 'middleware' | 'preferences' | 'redirects' | 'toolbar' | 'assets' | 'SKIP_FORMAT';
|
|
11
11
|
export interface LogOptions {
|
|
12
12
|
dest: LogWritable<LogMessage>;
|
|
13
13
|
level: LoggerLevel;
|
package/dist/core/messages.js
CHANGED
|
@@ -36,7 +36,7 @@ function serverStart({
|
|
|
36
36
|
host,
|
|
37
37
|
base
|
|
38
38
|
}) {
|
|
39
|
-
const version = "4.4.
|
|
39
|
+
const version = "4.4.9";
|
|
40
40
|
const localPrefix = `${dim("\u2503")} Local `;
|
|
41
41
|
const networkPrefix = `${dim("\u2503")} Network `;
|
|
42
42
|
const emptyPrefix = " ".repeat(11);
|
|
@@ -261,7 +261,7 @@ function printHelp({
|
|
|
261
261
|
message.push(
|
|
262
262
|
linebreak(),
|
|
263
263
|
` ${bgGreen(black(` ${commandName} `))} ${green(
|
|
264
|
-
`v${"4.4.
|
|
264
|
+
`v${"4.4.9"}`
|
|
265
265
|
)} ${headline}`
|
|
266
266
|
);
|
|
267
267
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.9",
|
|
4
4
|
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "withastro",
|
|
@@ -164,8 +164,8 @@
|
|
|
164
164
|
"yargs-parser": "^21.1.1",
|
|
165
165
|
"zod": "^3.22.4",
|
|
166
166
|
"@astrojs/internal-helpers": "0.2.1",
|
|
167
|
-
"@astrojs/
|
|
168
|
-
"@astrojs/
|
|
167
|
+
"@astrojs/telemetry": "3.0.4",
|
|
168
|
+
"@astrojs/markdown-remark": "4.2.1"
|
|
169
169
|
},
|
|
170
170
|
"optionalDependencies": {
|
|
171
171
|
"sharp": "^0.32.6"
|
|
@@ -228,6 +228,7 @@
|
|
|
228
228
|
"dev": "astro-scripts dev --copy-wasm --prebuild \"src/runtime/server/astro-island.ts\" --prebuild \"src/runtime/client/{idle,load,media,only,visible}.ts\" \"src/**/*.{ts,js}\"",
|
|
229
229
|
"postbuild": "astro-scripts copy \"src/**/*.astro\" && astro-scripts copy \"src/**/*.wasm\"",
|
|
230
230
|
"test": "pnpm run test:node",
|
|
231
|
+
"test:match": "pnpm run test:node --match",
|
|
231
232
|
"test:e2e": "playwright test",
|
|
232
233
|
"test:e2e:match": "playwright test -g",
|
|
233
234
|
"test:node": "astro-scripts test \"test/**/*.test.js\""
|