astro 5.9.1 → 5.9.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.
@@ -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.9.1") {
167
+ if (previousAstroVersion && previousAstroVersion !== "5.9.2") {
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.9.1") {
176
- await this.#store.metaStore().set("astro-version", "5.9.1");
175
+ if ("5.9.2") {
176
+ await this.#store.metaStore().set("astro-version", "5.9.2");
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.9.1";
1
+ const ASTRO_VERSION = "5.9.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.9.1";
25
+ const currentVersion = "5.9.2";
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.9.1";
40
+ const version = "5.9.2";
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.9.1"}`
277
+ `v${"5.9.2"}`
278
278
  )} ${headline}`
279
279
  );
280
280
  }
@@ -19,11 +19,11 @@ function renderCspContent(result) {
19
19
  }
20
20
  let scriptResources = "'self'";
21
21
  if (result.scriptResources.length > 0) {
22
- scriptResources = result.scriptResources.map((r) => `'${r}'`).join(" ");
22
+ scriptResources = result.scriptResources.map((r) => `${r}`).join(" ");
23
23
  }
24
24
  let styleResources = "'self'";
25
25
  if (result.styleResources.length > 0) {
26
- styleResources = result.styleResources.map((r) => `'${r}'`).join(" ");
26
+ styleResources = result.styleResources.map((r) => `${r}`).join(" ");
27
27
  }
28
28
  const strictDynamic = result.isStrictDynamic ? ` strict-dynamic` : "";
29
29
  const scriptSrc = `script-src ${scriptResources} ${Array.from(finalScriptHashes).join(" ")}${strictDynamic};`;
@@ -1,7 +1,7 @@
1
1
  import type { SSRResult } from '../../types/public/internal.js';
2
2
  import type { TransitionAnimationPair, TransitionAnimationValue } from '../../types/public/view-transitions.js';
3
3
  export declare function createTransitionScope(result: SSRResult, hash: string): string;
4
- export declare function renderTransition(result: SSRResult, hash: string, animationName: TransitionAnimationValue | undefined, transitionName: string): Promise<string>;
4
+ export declare function renderTransition(result: SSRResult, hash: string, animationName: TransitionAnimationValue | undefined, transitionName: string): string;
5
5
  export declare function createAnimationScope(transitionName: string, animations: Record<string, TransitionAnimationPair>): {
6
6
  scope: string;
7
7
  styles: string;
@@ -1,5 +1,4 @@
1
1
  import cssesc from "cssesc";
2
- import { generateCspDigest } from "../../core/encryption.js";
3
2
  import { fade, slide } from "../../transitions/index.js";
4
3
  import { markHTMLString } from "./escape.js";
5
4
  const transitionNameMap = /* @__PURE__ */ new WeakMap();
@@ -40,7 +39,7 @@ function reEncode(s) {
40
39
  }
41
40
  return reEncodeInValidStart[result.codePointAt(0) ?? 0] ? "_" + result : result;
42
41
  }
43
- async function renderTransition(result, hash, animationName, transitionName) {
42
+ function renderTransition(result, hash, animationName, transitionName) {
44
43
  if (typeof (transitionName ?? "") !== "string") {
45
44
  throw new Error(`Invalid transition name {${transitionName}}`);
46
45
  }
@@ -58,9 +57,6 @@ async function renderTransition(result, hash, animationName, transitionName) {
58
57
  sheet.addModern("group", "animation: none");
59
58
  }
60
59
  const css = sheet.toString();
61
- if (result.shouldInjectCspMetaTags) {
62
- result._metadata.extraStyleHashes.push(await generateCspDigest(css, result.cspAlgorithm));
63
- }
64
60
  result._metadata.extraHead.push(markHTMLString(`<style>${css}</style>`));
65
61
  return scope;
66
62
  }
@@ -2215,7 +2215,7 @@ export interface ViteUserConfig extends OriginalViteUserConfig {
2215
2215
  * csp: {
2216
2216
  * styleDirective: {
2217
2217
  * resources: [
2218
- * "self",
2218
+ * "'self'",
2219
2219
  * "https://styles.cdn.example.com"
2220
2220
  * ]
2221
2221
  * }
@@ -2290,7 +2290,7 @@ export interface ViteUserConfig extends OriginalViteUserConfig {
2290
2290
  * csp: {
2291
2291
  * scriptDirective: {
2292
2292
  * resources: [
2293
- * "self",
2293
+ * "'self'",
2294
2294
  * "https://cdn.example.com"
2295
2295
  * ]
2296
2296
  * }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro",
3
- "version": "5.9.1",
3
+ "version": "5.9.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",
@@ -98,7 +98,7 @@
98
98
  "vendor"
99
99
  ],
100
100
  "dependencies": {
101
- "@astrojs/compiler": "^2.12.1",
101
+ "@astrojs/compiler": "^2.12.2",
102
102
  "@capsizecss/unpack": "^2.4.0",
103
103
  "@oslojs/encoding": "^1.1.0",
104
104
  "@rollup/pluginutils": "^5.1.4",
@@ -156,9 +156,9 @@
156
156
  "zod": "^3.24.2",
157
157
  "zod-to-json-schema": "^3.24.5",
158
158
  "zod-to-ts": "^1.2.0",
159
- "@astrojs/markdown-remark": "6.3.2",
160
159
  "@astrojs/internal-helpers": "0.6.1",
161
- "@astrojs/telemetry": "3.3.0"
160
+ "@astrojs/telemetry": "3.3.0",
161
+ "@astrojs/markdown-remark": "6.3.2"
162
162
  },
163
163
  "optionalDependencies": {
164
164
  "sharp": "^0.33.3"