astro 6.4.4 → 6.4.5

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.
@@ -1,6 +1,6 @@
1
1
  class BuildTimeAstroVersionProvider {
2
2
  // Injected during the build through esbuild define
3
- version = "6.4.4";
3
+ version = "6.4.5";
4
4
  }
5
5
  export {
6
6
  BuildTimeAstroVersionProvider
@@ -197,7 +197,7 @@ ${contentConfig.error.message}`
197
197
  logger.info("Content config changed");
198
198
  shouldClear = true;
199
199
  }
200
- if (previousAstroVersion && previousAstroVersion !== "6.4.4") {
200
+ if (previousAstroVersion && previousAstroVersion !== "6.4.5") {
201
201
  logger.info("Astro version changed");
202
202
  shouldClear = true;
203
203
  }
@@ -205,8 +205,8 @@ ${contentConfig.error.message}`
205
205
  logger.info("Clearing content store");
206
206
  this.#store.clearAll();
207
207
  }
208
- if ("6.4.4") {
209
- this.#store.metaStore().set("astro-version", "6.4.4");
208
+ if ("6.4.5") {
209
+ this.#store.metaStore().set("astro-version", "6.4.5");
210
210
  }
211
211
  if (currentConfigDigest) {
212
212
  this.#store.metaStore().set("content-config-digest", currentConfigDigest);
@@ -44,11 +44,9 @@ class BaseApp {
44
44
  return this.pipeline.logger;
45
45
  }
46
46
  get adapterLogger() {
47
- if (!this.#adapterLogger) {
48
- this.#adapterLogger = new AstroIntegrationLogger(
49
- this.logger.options,
50
- this.manifest.adapterName
51
- );
47
+ const currentOptions = this.logger.options;
48
+ if (!this.#adapterLogger || this.#adapterLogger.options !== currentOptions) {
49
+ this.#adapterLogger = new AstroIntegrationLogger(currentOptions, this.manifest.adapterName);
52
50
  }
53
51
  return this.#adapterLogger;
54
52
  }
@@ -1,4 +1,4 @@
1
- const ASTRO_VERSION = "6.4.4";
1
+ const ASTRO_VERSION = "6.4.5";
2
2
  const ASTRO_GENERATOR = `Astro v${ASTRO_VERSION}`;
3
3
  const REROUTE_DIRECTIVE_HEADER = "X-Astro-Reroute";
4
4
  const REWRITE_DIRECTIVE_HEADER_KEY = "X-Astro-Rewrite";
@@ -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.4.4";
40
+ const currentVersion = "6.4.5";
41
41
  const isPrerelease = currentVersion.includes("-");
42
42
  if (!isPrerelease) {
43
43
  try {
@@ -185,8 +185,8 @@ export declare const NoClientOnlyHint: {
185
185
  * ---
186
186
  * export async function getStaticPaths() {
187
187
  * return [
188
- * { params: { slug: "blog" } },
189
- * { params: { slug: "about" } }
188
+ * { params: { id: "blog" } },
189
+ * { params: { id: "about" } }
190
190
  * ];
191
191
  *}
192
192
  *---
@@ -208,8 +208,8 @@ export declare const InvalidGetStaticPathParam: {
208
208
  * ```ts title="pages/blog/[id].astro"
209
209
  * export async function getStaticPaths() {
210
210
  * return [ // <-- Array
211
- * { params: { slug: "blog" } }, // <-- Object
212
- * { params: { slug: "about" } }
211
+ * { params: { id: "blog" } }, // <-- Object
212
+ * { params: { id: "about" } }
213
213
  * ];
214
214
  *}
215
215
  * ```
@@ -231,8 +231,8 @@ export declare const InvalidGetStaticPathsEntry: {
231
231
  * ```ts title="pages/blog/[id].astro"
232
232
  * export async function getStaticPaths() {
233
233
  * return [ // <-- Array
234
- * { params: { slug: "blog" } },
235
- * { params: { slug: "about" } }
234
+ * { params: { id: "blog" } },
235
+ * { params: { id: "about" } }
236
236
  * ];
237
237
  *}
238
238
  * ```
@@ -9,6 +9,7 @@ import { createCallAction, createGetActionResult, hasActionPayload } from "../..
9
9
  import { AstroCookies } from "../cookies/index.js";
10
10
  import { Slots } from "../render/index.js";
11
11
  import {
12
+ appSymbol,
12
13
  ASTRO_GENERATOR,
13
14
  fetchStateSymbol,
14
15
  originPathnameSymbol,
@@ -192,9 +193,9 @@ class FetchState {
192
193
  if (pipeline.manifest.allowedDomains && pipeline.manifest.allowedDomains.length > 0) {
193
194
  this.#applyForwardedHeaders();
194
195
  }
195
- if (!Reflect.get(request, originPathnameSymbol)) {
196
+ if (!Reflect.get(this.request, originPathnameSymbol)) {
196
197
  setOriginPathname(
197
- request,
198
+ this.request,
198
199
  this.pathname,
199
200
  pipeline.manifest.trailingSlash,
200
201
  pipeline.manifest.buildFormat
@@ -727,6 +728,12 @@ class FetchState {
727
728
  this.clientAddress = forwardedFor;
728
729
  }
729
730
  }
731
+ const oldRequest = this.request;
732
+ this.request = new Request(this.url, oldRequest);
733
+ const app = Reflect.get(oldRequest, appSymbol);
734
+ if (app !== void 0) {
735
+ Reflect.set(this.request, appSymbol, app);
736
+ }
730
737
  }
731
738
  /**
732
739
  * Returns the resolved `props` for this render, computing them lazily
@@ -276,7 +276,7 @@ function printHelp({
276
276
  message.push(
277
277
  linebreak(),
278
278
  ` ${bgGreen(black(` ${commandName} `))} ${green(
279
- `v${"6.4.4"}`
279
+ `v${"6.4.5"}`
280
280
  )} ${headline}`
281
281
  );
282
282
  }
@@ -149,7 +149,7 @@ class BufferedRenderer {
149
149
  function createBufferedRenderer(destination, renderFunction) {
150
150
  return new BufferedRenderer(destination, renderFunction);
151
151
  }
152
- const isNode = typeof process !== "undefined" && Object.prototype.toString.call(process) === "[object process]" && !(typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers");
152
+ const isNode = typeof process !== "undefined" && Object.prototype.toString.call(process) === "[object process]";
153
153
  const isDeno = typeof Deno !== "undefined";
154
154
  function promiseWithResolvers() {
155
155
  let resolve, reject;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro",
3
- "version": "6.4.4",
3
+ "version": "6.4.5",
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",