astro 5.13.3 → 5.13.4

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.
@@ -164,7 +164,7 @@ ${contentConfig.error.message}`);
164
164
  logger.info("Content config changed");
165
165
  shouldClear = true;
166
166
  }
167
- if (previousAstroVersion && previousAstroVersion !== "5.13.3") {
167
+ if (previousAstroVersion && previousAstroVersion !== "5.13.4") {
168
168
  logger.info("Astro version changed");
169
169
  shouldClear = true;
170
170
  }
@@ -172,8 +172,8 @@ ${contentConfig.error.message}`);
172
172
  logger.info("Clearing content store");
173
173
  this.#store.clearAll();
174
174
  }
175
- if ("5.13.3") {
176
- await this.#store.metaStore().set("astro-version", "5.13.3");
175
+ if ("5.13.4") {
176
+ await this.#store.metaStore().set("astro-version", "5.13.4");
177
177
  }
178
178
  if (currentConfigDigest) {
179
179
  await this.#store.metaStore().set("content-config-digest", currentConfigDigest);
@@ -1,4 +1,4 @@
1
- const ASTRO_VERSION = "5.13.3";
1
+ const ASTRO_VERSION = "5.13.4";
2
2
  const REROUTE_DIRECTIVE_HEADER = "X-Astro-Reroute";
3
3
  const REWRITE_DIRECTIVE_HEADER_KEY = "X-Astro-Rewrite";
4
4
  const REWRITE_DIRECTIVE_HEADER_VALUE = "yes";
@@ -22,7 +22,7 @@ async function dev(inlineConfig) {
22
22
  await telemetry.record([]);
23
23
  const restart = await createContainerWithAutomaticRestart({ inlineConfig, fs });
24
24
  const logger = restart.container.logger;
25
- const currentVersion = "5.13.3";
25
+ const currentVersion = "5.13.4";
26
26
  const isPrerelease = currentVersion.includes("-");
27
27
  if (!isPrerelease) {
28
28
  try {
@@ -37,7 +37,7 @@ function serverStart({
37
37
  host,
38
38
  base
39
39
  }) {
40
- const version = "5.13.3";
40
+ const version = "5.13.4";
41
41
  const localPrefix = `${dim("\u2503")} Local `;
42
42
  const networkPrefix = `${dim("\u2503")} Network `;
43
43
  const emptyPrefix = " ".repeat(11);
@@ -274,7 +274,7 @@ function printHelp({
274
274
  message.push(
275
275
  linebreak(),
276
276
  ` ${bgGreen(black(` ${commandName} `))} ${green(
277
- `v${"5.13.3"}`
277
+ `v${"5.13.4"}`
278
278
  )} ${headline}`
279
279
  );
280
280
  }
@@ -1,4 +1,5 @@
1
- import { removeTrailingForwardSlash } from "../core/path.js";
1
+ import { hasFileExtension } from "@astrojs/internal-helpers/path";
2
+ import { appendForwardSlash, removeTrailingForwardSlash } from "../core/path.js";
2
3
  import { runWithErrorHandling } from "./controller.js";
3
4
  import { recordServerError } from "./error.js";
4
5
  import { handle500Response } from "./response.js";
@@ -20,6 +21,11 @@ async function handleRequest({
20
21
  pathname = decodeURI(url.pathname);
21
22
  }
22
23
  url.pathname = removeTrailingForwardSlash(config.base) + url.pathname;
24
+ if (config.trailingSlash === "never") {
25
+ url.pathname = removeTrailingForwardSlash(url.pathname);
26
+ } else if (config.trailingSlash === "always" && !hasFileExtension(url.pathname)) {
27
+ url.pathname = appendForwardSlash(url.pathname);
28
+ }
23
29
  let body = void 0;
24
30
  if (!(incomingRequest.method === "GET" || incomingRequest.method === "HEAD")) {
25
31
  let bytes = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro",
3
- "version": "5.13.3",
3
+ "version": "5.13.4",
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",
@@ -198,7 +198,7 @@
198
198
  "rollup": "^4.37.0",
199
199
  "sass": "^1.86.0",
200
200
  "typescript": "^5.8.3",
201
- "undici": "^7.5.0",
201
+ "undici": "^6.21.3",
202
202
  "unified": "^11.0.5",
203
203
  "vitest": "^3.0.9",
204
204
  "astro-scripts": "0.0.14"
@@ -13,7 +13,7 @@ const ENCODED_DOT = '%2E';
13
13
  function toActionProxy(actionCallback = {}, aggregatedPath = '') {
14
14
  return new Proxy(actionCallback, {
15
15
  get(target, objKey) {
16
- if (objKey in target || typeof objKey === 'symbol') {
16
+ if (target.hasOwnProperty(objKey) || typeof objKey === 'symbol') {
17
17
  return target[objKey];
18
18
  }
19
19
  // Add the key, encoding dots so they're not interpreted as nested properties.
@@ -26,6 +26,9 @@ function toActionProxy(actionCallback = {}, aggregatedPath = '') {
26
26
  Object.assign(action, {
27
27
  queryString: getActionQueryString(path),
28
28
  toString: () => action.queryString,
29
+ // redefine prototype methods as the object's own property, not the prototype's
30
+ bind: action.bind,
31
+ valueOf: () => action.valueOf,
29
32
  // Progressive enhancement info for React.
30
33
  $$FORM_ACTION: function () {
31
34
  const searchParams = new URLSearchParams(action.toString());