astro 5.0.0 → 5.0.2

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.
@@ -114,7 +114,7 @@ class ContentLayer {
114
114
  logger.info("Content config changed");
115
115
  shouldClear = true;
116
116
  }
117
- if (previousAstroVersion !== "5.0.0") {
117
+ if (previousAstroVersion !== "5.0.2") {
118
118
  logger.info("Astro version changed");
119
119
  shouldClear = true;
120
120
  }
@@ -122,8 +122,8 @@ class ContentLayer {
122
122
  logger.info("Clearing content store");
123
123
  this.#store.clearAll();
124
124
  }
125
- if ("5.0.0") {
126
- await this.#store.metaStore().set("astro-version", "5.0.0");
125
+ if ("5.0.2") {
126
+ await this.#store.metaStore().set("astro-version", "5.0.2");
127
127
  }
128
128
  if (currentConfigDigest) {
129
129
  await this.#store.metaStore().set("config-digest", currentConfigDigest);
@@ -1,4 +1,4 @@
1
- const ASTRO_VERSION = "5.0.0";
1
+ const ASTRO_VERSION = "5.0.2";
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.0.0";
25
+ const currentVersion = "5.0.2";
26
26
  const isPrerelease = currentVersion.includes("-");
27
27
  if (!isPrerelease) {
28
28
  try {
@@ -38,7 +38,7 @@ function serverStart({
38
38
  host,
39
39
  base
40
40
  }) {
41
- const version = "5.0.0";
41
+ const version = "5.0.2";
42
42
  const localPrefix = `${dim("\u2503")} Local `;
43
43
  const networkPrefix = `${dim("\u2503")} Network `;
44
44
  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.0.0"}`
277
+ `v${"5.0.2"}`
278
278
  )} ${headline}`
279
279
  );
280
280
  }
@@ -75,6 +75,7 @@ class DevToolbarSelect extends HTMLElement {
75
75
  });
76
76
  }
77
77
  connectedCallback() {
78
+ this.element.name = "dev-toolbar-select";
78
79
  this.shadowRoot.append(this.element);
79
80
  this.updateStyle();
80
81
  }
@@ -109,6 +109,7 @@ class DevToolbarToggle extends HTMLElement {
109
109
  }
110
110
  connectedCallback() {
111
111
  this.input.type = "checkbox";
112
+ this.input.name = "dev-toolbar-toggle";
112
113
  this.shadowRoot.append(this.input);
113
114
  this.updateStyle();
114
115
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro",
3
- "version": "5.0.0",
3
+ "version": "5.0.2",
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",
@@ -92,7 +92,9 @@ declare module 'astro:content' {
92
92
  collection: C,
93
93
  id: E,
94
94
  ): E extends keyof DataEntryMap[C]
95
- ? Promise<DataEntryMap[C][E]>
95
+ ? string extends keyof DataEntryMap[C]
96
+ ? Promise<DataEntryMap[C][E]> | undefined
97
+ : Promise<DataEntryMap[C][E]>
96
98
  : Promise<CollectionEntry<C> | undefined>;
97
99
 
98
100
  /** Resolve an array of entry references from the same collection */