astro 5.0.7 → 5.0.8

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.7") {
117
+ if (previousAstroVersion !== "5.0.8") {
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.7") {
126
- await this.#store.metaStore().set("astro-version", "5.0.7");
125
+ if ("5.0.8") {
126
+ await this.#store.metaStore().set("astro-version", "5.0.8");
127
127
  }
128
128
  if (currentConfigDigest) {
129
129
  await this.#store.metaStore().set("config-digest", currentConfigDigest);
@@ -139,12 +139,12 @@ class AstroBuilder {
139
139
  viteConfig,
140
140
  key: keyPromise
141
141
  };
142
- const { internals, ssrOutputChunkNames, contentFileNames } = await viteBuild(opts);
142
+ const { internals, ssrOutputChunkNames } = await viteBuild(opts);
143
143
  const hasServerIslands = this.settings.serverIslandNameMap.size > 0;
144
144
  if (hasServerIslands && this.settings.buildOutput !== "server") {
145
145
  throw new AstroError(AstroErrorData.NoAdapterInstalledServerIslands);
146
146
  }
147
- await staticBuild(opts, internals, ssrOutputChunkNames, contentFileNames);
147
+ await staticBuild(opts, internals, ssrOutputChunkNames);
148
148
  this.timer.assetsStart = performance.now();
149
149
  Object.keys(assets).map((k) => {
150
150
  if (!assets[k]) return;
@@ -4,9 +4,8 @@ import type { StaticBuildOptions } from './types.js';
4
4
  export declare function viteBuild(opts: StaticBuildOptions): Promise<{
5
5
  internals: BuildInternals;
6
6
  ssrOutputChunkNames: string[];
7
- contentFileNames: undefined;
8
7
  }>;
9
- export declare function staticBuild(opts: StaticBuildOptions, internals: BuildInternals, ssrOutputChunkNames: string[], contentFileNames?: string[]): Promise<void>;
8
+ export declare function staticBuild(opts: StaticBuildOptions, internals: BuildInternals, ssrOutputChunkNames: string[]): Promise<void>;
10
9
  export declare function copyFiles(fromFolder: URL, toFolder: URL, includeDotfiles?: boolean): Promise<void[] | undefined>;
11
10
  /**
12
11
  * This function takes the virtual module name of any page entrypoint and
@@ -62,7 +62,6 @@ async function viteBuild(opts) {
62
62
  const ssrOutputs = viteBuildReturnToRollupOutputs(ssrOutput);
63
63
  const clientOutputs = viteBuildReturnToRollupOutputs(clientOutput ?? []);
64
64
  await runPostBuildHooks(container, ssrOutputs, clientOutputs);
65
- let contentFileNames = void 0;
66
65
  settings.timer.end("Client build");
67
66
  internals.ssrEntryChunk = void 0;
68
67
  if (opts.teardownCompiler) {
@@ -76,14 +75,14 @@ async function viteBuild(opts) {
76
75
  }
77
76
  }
78
77
  }
79
- return { internals, ssrOutputChunkNames, contentFileNames };
78
+ return { internals, ssrOutputChunkNames };
80
79
  }
81
- async function staticBuild(opts, internals, ssrOutputChunkNames, contentFileNames) {
80
+ async function staticBuild(opts, internals, ssrOutputChunkNames) {
82
81
  const { settings } = opts;
83
82
  if (settings.buildOutput === "static") {
84
83
  settings.timer.start("Static generate");
85
84
  await generatePages(opts, internals);
86
- await cleanServerOutput(opts, ssrOutputChunkNames, contentFileNames, internals);
85
+ await cleanServerOutput(opts, ssrOutputChunkNames, internals);
87
86
  settings.timer.end("Static generate");
88
87
  } else if (settings.buildOutput === "server") {
89
88
  settings.timer.start("Server generate");
@@ -262,9 +261,9 @@ async function cleanStaticOutput(opts, internals) {
262
261
  })
263
262
  );
264
263
  }
265
- async function cleanServerOutput(opts, ssrOutputChunkNames, contentFileNames, internals) {
264
+ async function cleanServerOutput(opts, ssrOutputChunkNames, internals) {
266
265
  const out = getOutDirWithinCwd(opts.settings.config.outDir);
267
- const files = ssrOutputChunkNames.filter((f) => f.endsWith(".mjs")).concat(contentFileNames ?? []);
266
+ const files = ssrOutputChunkNames.filter((f) => f.endsWith(".mjs"));
268
267
  if (internals.manifestFileName) {
269
268
  files.push(internals.manifestFileName);
270
269
  }
@@ -272,7 +271,9 @@ async function cleanServerOutput(opts, ssrOutputChunkNames, contentFileNames, in
272
271
  await Promise.all(
273
272
  files.map(async (filename) => {
274
273
  const url = new URL(filename, out);
275
- await fs.promises.rm(url);
274
+ const map = new URL(url + ".map");
275
+ await Promise.all([fs.promises.rm(url), fs.promises.rm(new URL(map)).catch((e) => {
276
+ })]);
276
277
  })
277
278
  );
278
279
  removeEmptyDirs(fileURLToPath(out));
@@ -315,6 +316,7 @@ async function ssrMoveAssets(opts) {
315
316
  const files = await glob(`**/*`, {
316
317
  cwd: fileURLToPath(serverAssets)
317
318
  });
319
+ console.log("FILES2", files);
318
320
  if (files.length > 0) {
319
321
  await Promise.all(
320
322
  files.map(async function moveAsset(filename) {
@@ -1,4 +1,4 @@
1
- const ASTRO_VERSION = "5.0.7";
1
+ const ASTRO_VERSION = "5.0.8";
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.7";
25
+ const currentVersion = "5.0.8";
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.7";
41
+ const version = "5.0.8";
42
42
  const localPrefix = `${dim("\u2503")} Local `;
43
43
  const networkPrefix = `${dim("\u2503")} Network `;
44
44
  const emptyPrefix = " ".repeat(11);
@@ -276,7 +276,7 @@ function printHelp({
276
276
  message.push(
277
277
  linebreak(),
278
278
  ` ${bgGreen(black(` ${commandName} `))} ${green(
279
- `v${"5.0.7"}`
279
+ `v${"5.0.8"}`
280
280
  )} ${headline}`
281
281
  );
282
282
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro",
3
- "version": "5.0.7",
3
+ "version": "5.0.8",
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",
@@ -159,8 +159,8 @@
159
159
  "zod-to-json-schema": "^3.23.5",
160
160
  "zod-to-ts": "^1.2.0",
161
161
  "@astrojs/internal-helpers": "0.4.2",
162
- "@astrojs/markdown-remark": "6.0.1",
163
- "@astrojs/telemetry": "3.2.0"
162
+ "@astrojs/telemetry": "3.2.0",
163
+ "@astrojs/markdown-remark": "6.0.1"
164
164
  },
165
165
  "optionalDependencies": {
166
166
  "sharp": "^0.33.3"