astro 6.3.6 → 6.3.7
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/cli/infra/build-time-astro-version-provider.js +1 -1
- package/dist/content/content-layer.js +3 -3
- package/dist/core/app/node.js +3 -0
- package/dist/core/build/vite-build-config.js +7 -2
- package/dist/core/constants.js +1 -1
- package/dist/core/dev/dev.js +1 -1
- package/dist/core/messages/runtime.js +1 -1
- package/dist/core/util/pathname.js +5 -3
- package/dist/manifest/virtual-module.js +2 -1
- package/dist/runtime/server/jsx.js +1 -1
- package/dist/virtual-modules/i18n.js +1 -1
- package/package.json +3 -3
|
@@ -191,7 +191,7 @@ ${contentConfig.error.message}`
|
|
|
191
191
|
logger.info("Content config changed");
|
|
192
192
|
shouldClear = true;
|
|
193
193
|
}
|
|
194
|
-
if (previousAstroVersion && previousAstroVersion !== "6.3.
|
|
194
|
+
if (previousAstroVersion && previousAstroVersion !== "6.3.7") {
|
|
195
195
|
logger.info("Astro version changed");
|
|
196
196
|
shouldClear = true;
|
|
197
197
|
}
|
|
@@ -199,8 +199,8 @@ ${contentConfig.error.message}`
|
|
|
199
199
|
logger.info("Clearing content store");
|
|
200
200
|
this.#store.clearAll();
|
|
201
201
|
}
|
|
202
|
-
if ("6.3.
|
|
203
|
-
this.#store.metaStore().set("astro-version", "6.3.
|
|
202
|
+
if ("6.3.7") {
|
|
203
|
+
this.#store.metaStore().set("astro-version", "6.3.7");
|
|
204
204
|
}
|
|
205
205
|
if (currentConfigDigest) {
|
|
206
206
|
this.#store.metaStore().set("content-config-digest", currentConfigDigest);
|
package/dist/core/app/node.js
CHANGED
|
@@ -219,6 +219,9 @@ function makeRequestBody(req, bodySizeLimit) {
|
|
|
219
219
|
if (typeof req.body === "string" && req.body.length > 0) {
|
|
220
220
|
return { body: Buffer.from(req.body) };
|
|
221
221
|
}
|
|
222
|
+
if (req.body instanceof ArrayBuffer || ArrayBuffer.isView(req.body)) {
|
|
223
|
+
return { body: req.body };
|
|
224
|
+
}
|
|
222
225
|
if (typeof req.body === "object" && req.body !== null && Object.keys(req.body).length > 0) {
|
|
223
226
|
return { body: Buffer.from(JSON.stringify(req.body)) };
|
|
224
227
|
}
|
|
@@ -118,11 +118,16 @@ function createViteBuildConfig(opts) {
|
|
|
118
118
|
target: "esnext",
|
|
119
119
|
outDir: fileURLToPath(getClientOutputDirectory(settings)),
|
|
120
120
|
copyPublicDir: true,
|
|
121
|
-
sourcemap: viteConfig.environments?.client?.build?.sourcemap ?? false,
|
|
122
|
-
minify: true,
|
|
121
|
+
sourcemap: viteConfig.environments?.client?.build?.sourcemap ?? viteConfig.build?.sourcemap ?? false,
|
|
122
|
+
minify: viteConfig.environments?.client?.build?.minify ?? viteConfig.build?.minify ?? true,
|
|
123
123
|
rollupOptions: {
|
|
124
124
|
preserveEntrySignatures: "exports-only",
|
|
125
125
|
output: {
|
|
126
|
+
// Inherit top-level rollup output options (e.g. compact) as a
|
|
127
|
+
// base, then layer Astro defaults on top so that Astro's
|
|
128
|
+
// naming functions are preserved unless explicitly overridden
|
|
129
|
+
// via the environment-specific config.
|
|
130
|
+
...viteConfig.build?.rollupOptions?.output,
|
|
126
131
|
entryFileNames(chunkInfo) {
|
|
127
132
|
return `${settings.config.build.assets}/${cleanChunkName(chunkInfo.name)}.[hash].js`;
|
|
128
133
|
},
|
package/dist/core/constants.js
CHANGED
package/dist/core/dev/dev.js
CHANGED
|
@@ -37,7 +37,7 @@ async function dev(inlineConfig) {
|
|
|
37
37
|
await telemetry.record([]);
|
|
38
38
|
const restart = await createContainerWithAutomaticRestart({ inlineConfig, fs });
|
|
39
39
|
const logger = restart.container.logger;
|
|
40
|
-
const currentVersion = "6.3.
|
|
40
|
+
const currentVersion = "6.3.7";
|
|
41
41
|
const isPrerelease = currentVersion.includes("-");
|
|
42
42
|
if (!isPrerelease) {
|
|
43
43
|
try {
|
|
@@ -4,16 +4,18 @@ class MultiLevelEncodingError extends Error {
|
|
|
4
4
|
this.name = "MultiLevelEncodingError";
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
+
const ENCODING_REGEX = /%25[0-9a-fA-F]{2}/;
|
|
7
8
|
function validateAndDecodePathname(pathname) {
|
|
9
|
+
if (ENCODING_REGEX.test(pathname)) {
|
|
10
|
+
throw new MultiLevelEncodingError();
|
|
11
|
+
}
|
|
8
12
|
let decoded;
|
|
9
13
|
try {
|
|
10
14
|
decoded = decodeURI(pathname);
|
|
11
15
|
} catch (_e) {
|
|
12
16
|
throw new Error("Invalid URL encoding");
|
|
13
17
|
}
|
|
14
|
-
|
|
15
|
-
const decodedStillHasEncoding = /%[0-9a-fA-F]{2}/.test(decoded);
|
|
16
|
-
if (hasDecoding && decodedStillHasEncoding) {
|
|
18
|
+
if (ENCODING_REGEX.test(decoded)) {
|
|
17
19
|
throw new MultiLevelEncodingError();
|
|
18
20
|
}
|
|
19
21
|
return decoded;
|
|
@@ -17,7 +17,8 @@ function virtualModulePlugin({ settings }) {
|
|
|
17
17
|
defaultLocale: ${JSON.stringify(config.i18n.defaultLocale)},
|
|
18
18
|
locales: ${JSON.stringify(config.i18n.locales)},
|
|
19
19
|
routing: ${JSON.stringify(routing)},
|
|
20
|
-
fallback: ${JSON.stringify(config.i18n.fallback)}
|
|
20
|
+
fallback: ${JSON.stringify(config.i18n.fallback)},
|
|
21
|
+
domains: ${JSON.stringify(config.i18n.domains)}
|
|
21
22
|
};`;
|
|
22
23
|
}
|
|
23
24
|
let imageCode = "const image = undefined;";
|
|
@@ -75,7 +75,7 @@ Did you forget to import the component or is it possible there is a typo?`);
|
|
|
75
75
|
}
|
|
76
76
|
case (!vnode.type && vnode.type !== 0):
|
|
77
77
|
return "";
|
|
78
|
-
case (typeof vnode.type === "string" && vnode.type !== ClientOnlyPlaceholder):
|
|
78
|
+
case (typeof vnode.type === "string" && vnode.type !== ClientOnlyPlaceholder && !vnode.type.includes("-")):
|
|
79
79
|
return markHTMLString(await renderElement(result, vnode.type, vnode.props ?? {}));
|
|
80
80
|
}
|
|
81
81
|
if (vnode.type) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.7",
|
|
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",
|
|
@@ -165,8 +165,8 @@
|
|
|
165
165
|
"yargs-parser": "^22.0.0",
|
|
166
166
|
"zod": "^4.3.6",
|
|
167
167
|
"@astrojs/internal-helpers": "0.9.1",
|
|
168
|
-
"@astrojs/
|
|
169
|
-
"@astrojs/
|
|
168
|
+
"@astrojs/telemetry": "3.3.2",
|
|
169
|
+
"@astrojs/markdown-remark": "7.1.2"
|
|
170
170
|
},
|
|
171
171
|
"optionalDependencies": {
|
|
172
172
|
"sharp": "^0.34.0"
|