astro 3.4.2 → 3.4.3

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,4 +1,4 @@
1
- const ASTRO_VERSION = "3.4.2";
1
+ const ASTRO_VERSION = "3.4.3";
2
2
  const SUPPORTED_MARKDOWN_FILE_EXTENSIONS = [
3
3
  ".markdown",
4
4
  ".mdown",
@@ -20,7 +20,7 @@ async function dev(inlineConfig) {
20
20
  base: restart.container.settings.config.base
21
21
  })
22
22
  );
23
- const currentVersion = "3.4.2";
23
+ const currentVersion = "3.4.3";
24
24
  if (currentVersion.includes("-")) {
25
25
  logger.warn(null, msg.prerelease({ currentVersion }));
26
26
  }
@@ -50,7 +50,7 @@ function serverStart({
50
50
  base,
51
51
  isRestart = false
52
52
  }) {
53
- const version = "3.4.2";
53
+ const version = "3.4.3";
54
54
  const localPrefix = `${dim("\u2503")} Local `;
55
55
  const networkPrefix = `${dim("\u2503")} Network `;
56
56
  const emptyPrefix = " ".repeat(11);
@@ -235,7 +235,7 @@ function printHelp({
235
235
  message.push(
236
236
  linebreak(),
237
237
  ` ${bgGreen(black(` ${commandName} `))} ${green(
238
- `v${"3.4.2"}`
238
+ `v${"3.4.3"}`
239
239
  )} ${headline}`
240
240
  );
241
241
  }
@@ -12,7 +12,7 @@ const toIdent = (k) => k.trim().replace(/(?:(?!^)\b\w|\s+|[^\w]+)/g, (match, ind
12
12
  });
13
13
  const toAttributeString = (value, shouldEscape = true) => shouldEscape ? String(value).replace(/&/g, "&").replace(/"/g, """) : value;
14
14
  const kebab = (k) => k.toLowerCase() === k ? k : k.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`);
15
- const toStyleString = (obj) => Object.entries(obj).map(([k, v]) => {
15
+ const toStyleString = (obj) => Object.entries(obj).filter(([k, v]) => typeof v === "string" && v.trim() || typeof v === "number").map(([k, v]) => {
16
16
  if (k[0] !== "-" && k[1] !== "-")
17
17
  return `${kebab(k)}:${v}`;
18
18
  return `${k}:${v}`;
@@ -350,7 +350,7 @@ if (inBrowser) {
350
350
  if ("onscrollend" in window)
351
351
  addEventListener("scrollend", onScroll);
352
352
  else
353
- addEventListener("scroll", throttle(onScroll, 300));
353
+ addEventListener("scroll", throttle(onScroll, 350), { passive: true });
354
354
  }
355
355
  for (const script of document.scripts) {
356
356
  script.dataset.astroExec = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro",
3
- "version": "3.4.2",
3
+ "version": "3.4.3",
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",