Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: withastro/astro
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: astro@4.0.3
Choose a base ref
...
head repository: withastro/astro
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: astro@4.0.4
Choose a head ref
  • 17 commits
  • 64 files changed
  • 18 contributors

Commits on Dec 7, 2023

  1. Allow async functions in the Vercel edge middleware integration (#9334)

    Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
    Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
    Co-authored-by: lilnasy <69170106+lilnasy@users.noreply.github.com>
    3 people authored Dec 7, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    dfbc707 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1aa7fe8 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    270c6cc View commit details
  4. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1b4e918 View commit details

Commits on Dec 8, 2023

  1. feat(badges): add github badge (#9231)

    Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
    Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
    Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
    4 people authored Dec 8, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a7a46b1 View commit details
  2. feat(examples): make content collections type explicit

    Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
    Co-authored-by: Bjorn Lu <34116392+bluwy@users.noreply.github.com>
    Co-authored-by: Florian Lefebvre <69633530+florian-lefebvre@users.noreply.github.com>
    4 people authored Dec 8, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1a4d593 View commit details
  3. fix: markdown formatting issue

    Co-authored-by: Florian Lefebvre <69633530+florian-lefebvre@users.noreply.github.com>
    martrapp and florian-lefebvre authored Dec 8, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    85c9a61 View commit details
  4. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    26f7023 View commit details
  5. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    65ddb02 View commit details
  6. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1e342e3 View commit details
  7. [ci] format

    lilnasy authored and astrobot-houston committed Dec 8, 2023
    Copy the full SHA
    9d29ef1 View commit details
  8. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bebf5cf View commit details

Commits on Dec 11, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a0dc4a4 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ea09182 View commit details
  3. Ensure astro add only installs stable versions (#9387)

    * fix(add): update peerDependency resolution logic to exclude prereleases
    
    * chore: add changeset
    natemoo-re authored Dec 11, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a7c75b3 View commit details
  4. [ci] format

    ematipico authored and astrobot-houston committed Dec 11, 2023
    Copy the full SHA
    d656797 View commit details
  5. [ci] release (#9365)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    astrobot-houston and github-actions[bot] authored Dec 11, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f47b85c View commit details
Showing with 411 additions and 196 deletions.
  1. +8 −0 README.md
  2. +1 −1 examples/basics/package.json
  3. +2 −2 examples/blog/package.json
  4. +1 −0 examples/blog/src/content/config.ts
  5. +1 −1 examples/component/package.json
  6. +1 −1 examples/framework-alpine/package.json
  7. +1 −1 examples/framework-lit/package.json
  8. +3 −3 examples/framework-multiple/package.json
  9. +1 −1 examples/framework-preact/package.json
  10. +1 −1 examples/framework-react/package.json
  11. +1 −1 examples/framework-solid/package.json
  12. +2 −2 examples/framework-svelte/package.json
  13. +2 −2 examples/framework-vue/package.json
  14. +10 −19 examples/framework-vue/src/components/Counter.vue
  15. +2 −2 examples/hackernews/package.json
  16. +1 −1 examples/integration/package.json
  17. +2 −2 examples/middleware/package.json
  18. +1 −1 examples/minimal/package.json
  19. +1 −1 examples/non-html-pages/package.json
  20. +1 −1 examples/portfolio/package.json
  21. +1 −0 examples/portfolio/src/content/config.ts
  22. +3 −3 examples/ssr/package.json
  23. +2 −2 examples/view-transitions/package.json
  24. +1 −1 examples/with-markdoc/package.json
  25. +2 −2 examples/with-markdown-plugins/package.json
  26. +1 −1 examples/with-markdown-shiki/package.json
  27. +2 −2 examples/with-mdx/package.json
  28. +1 −1 examples/with-nanostores/package.json
  29. +2 −2 examples/with-tailwindcss/package.json
  30. +1 −1 examples/with-vitest/package.json
  31. +21 −0 packages/astro/CHANGELOG.md
  32. +2 −1 packages/astro/package.json
  33. +47 −10 packages/astro/src/cli/add/index.ts
  34. +17 −2 packages/astro/src/core/build/buildPipeline.ts
  35. +13 −5 packages/astro/src/core/build/generate.ts
  36. +2 −2 packages/astro/src/core/build/index.ts
  37. +2 −16 packages/astro/src/core/build/plugin.ts
  38. +36 −21 packages/astro/src/core/build/static-build.ts
  39. +14 −0 packages/astro/src/core/build/util.ts
  40. +1 −0 packages/astro/src/core/logger/core.ts
  41. +15 −0 packages/astro/src/core/routing/manifest/create.ts
  42. +7 −0 packages/astro/test/astro-basic.test.js
  43. +10 −0 packages/astro/test/fixtures/astro-basic/src/pages/get-static-paths-with-mjs/[...file].js
  44. +21 −0 packages/astro/test/i18n-routing.test.js
  45. +10 −0 packages/astro/test/redirects.test.js
  46. +9 −0 packages/integrations/mdx/CHANGELOG.md
  47. +2 −2 packages/integrations/mdx/package.json
  48. +6 −0 packages/integrations/node/CHANGELOG.md
  49. +2 −2 packages/integrations/node/package.json
  50. +8 −0 packages/integrations/svelte/CHANGELOG.md
  51. +6 −1 packages/integrations/svelte/client-v5.js
  52. +2 −2 packages/integrations/svelte/package.json
  53. +6 −2 packages/integrations/svelte/server-v5.js
  54. +10 −0 packages/integrations/vercel/CHANGELOG.md
  55. +4 −4 packages/integrations/vercel/README.md
  56. +1 −1 packages/integrations/vercel/package.json
  57. +14 −15 packages/integrations/vercel/src/lib/redirects.ts
  58. +1 −1 packages/integrations/vercel/src/serverless/middleware.ts
  59. +5 −5 packages/integrations/vercel/test/redirects.test.js
  60. +6 −0 packages/integrations/vue/CHANGELOG.md
  61. +2 −2 packages/integrations/vue/package.json
  62. +6 −0 packages/markdown/remark/CHANGELOG.md
  63. +1 −4 packages/markdown/remark/package.json
  64. +43 −40 pnpm-lock.yaml
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -8,6 +8,14 @@
<br/><br/>
</p>

<div align="center">

![Build Status](https://github.com/withastro/astro/actions/workflows/ci.yml/badge.svg)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/withastro/astro/blob/main/LICENSE)
[![npm version](https://badge.fury.io/js/astro.svg)](https://badge.fury.io/js/astro)

</div>

## Install

The **recommended** way to install the latest version of Astro is by running the command below:
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.0.3"
"astro": "^4.0.4"
}
}
4 changes: 2 additions & 2 deletions examples/blog/package.json
Original file line number Diff line number Diff line change
@@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^2.0.0",
"@astrojs/mdx": "^2.0.1",
"@astrojs/rss": "^4.0.1",
"@astrojs/sitemap": "^3.0.3",
"astro": "^4.0.3"
"astro": "^4.0.4"
}
}
1 change: 1 addition & 0 deletions examples/blog/src/content/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineCollection, z } from 'astro:content';

const blog = defineCollection({
type: 'content',
// Type-check frontmatter using a schema
schema: z.object({
title: z.string(),
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^4.0.3"
"astro": "^4.0.4"
},
"peerDependencies": {
"astro": "^3.0.0"
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
@@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.3.1",
"@types/alpinejs": "^3.13.5",
"alpinejs": "^3.13.3",
"astro": "^4.0.3"
"astro": "^4.0.4"
}
}
2 changes: 1 addition & 1 deletion examples/framework-lit/package.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/lit": "^3.0.3",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^4.0.3",
"astro": "^4.0.4",
"lit": "^2.8.0"
}
}
6 changes: 3 additions & 3 deletions examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
@@ -14,9 +14,9 @@
"@astrojs/preact": "^3.0.1",
"@astrojs/react": "^3.0.7",
"@astrojs/solid-js": "^3.0.2",
"@astrojs/svelte": "^5.0.0",
"@astrojs/vue": "^4.0.2",
"astro": "^4.0.3",
"@astrojs/svelte": "^5.0.1",
"@astrojs/vue": "^4.0.3",
"astro": "^4.0.4",
"preact": "^10.19.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
2 changes: 1 addition & 1 deletion examples/framework-preact/package.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.0.1",
"@preact/signals": "^1.2.1",
"astro": "^4.0.3",
"astro": "^4.0.4",
"preact": "^10.19.2"
}
}
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
"@astrojs/react": "^3.0.7",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"astro": "^4.0.3",
"astro": "^4.0.4",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
2 changes: 1 addition & 1 deletion examples/framework-solid/package.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^3.0.2",
"astro": "^4.0.3",
"astro": "^4.0.4",
"solid-js": "^1.8.5"
}
}
4 changes: 2 additions & 2 deletions examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/svelte": "^5.0.0",
"astro": "^4.0.3",
"@astrojs/svelte": "^5.0.1",
"astro": "^4.0.4",
"svelte": "^4.2.5"
}
}
4 changes: 2 additions & 2 deletions examples/framework-vue/package.json
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/vue": "^4.0.2",
"astro": "^4.0.3",
"@astrojs/vue": "^4.0.3",
"astro": "^4.0.4",
"vue": "^3.3.8"
}
}
29 changes: 10 additions & 19 deletions examples/framework-vue/src/components/Counter.vue
Original file line number Diff line number Diff line change
@@ -1,31 +1,22 @@
<script setup lang="ts">
import { ref } from 'vue';
const count = ref(0);
const add = () => count.value++;
const subtract = () => count.value--;
</script>

<template>
<div class="counter">
<button @click="subtract()">-</button>
<button @click="subtract">-</button>
<pre>{{ count }}</pre>
<button @click="add()">+</button>
<button @click="add">+</button>
</div>
<div class="counter-message">
<slot />
</div>
</template>

<script lang="ts">
import { ref } from 'vue';
export default {
setup() {
const count = ref(0);
const add = () => (count.value = count.value + 1);
const subtract = () => (count.value = count.value - 1);
return {
count,
add,
subtract,
};
},
};
</script>

<style>
.counter {
display: grid;
4 changes: 2 additions & 2 deletions examples/hackernews/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/node": "^7.0.0",
"astro": "^4.0.3"
"@astrojs/node": "^7.0.1",
"astro": "^4.0.4"
}
}
2 changes: 1 addition & 1 deletion examples/integration/package.json
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^4.0.3"
"astro": "^4.0.4"
},
"peerDependencies": {
"astro": "^3.0.0"
4 changes: 2 additions & 2 deletions examples/middleware/package.json
Original file line number Diff line number Diff line change
@@ -12,8 +12,8 @@
"server": "node dist/server/entry.mjs"
},
"dependencies": {
"@astrojs/node": "^7.0.0",
"astro": "^4.0.3",
"@astrojs/node": "^7.0.1",
"astro": "^4.0.4",
"html-minifier": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.0.3"
"astro": "^4.0.4"
}
}
2 changes: 1 addition & 1 deletion examples/non-html-pages/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.0.3"
"astro": "^4.0.4"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.0.3"
"astro": "^4.0.4"
}
}
1 change: 1 addition & 0 deletions examples/portfolio/src/content/config.ts
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ import { defineCollection, z } from 'astro:content';

export const collections = {
work: defineCollection({
type: 'content',
schema: z.object({
title: z.string(),
description: z.string(),
6 changes: 3 additions & 3 deletions examples/ssr/package.json
Original file line number Diff line number Diff line change
@@ -12,9 +12,9 @@
"server": "node dist/server/entry.mjs"
},
"dependencies": {
"@astrojs/node": "^7.0.0",
"@astrojs/svelte": "^5.0.0",
"astro": "^4.0.3",
"@astrojs/node": "^7.0.1",
"@astrojs/svelte": "^5.0.1",
"astro": "^4.0.4",
"svelte": "^4.2.5"
}
}
4 changes: 2 additions & 2 deletions examples/view-transitions/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
},
"devDependencies": {
"@astrojs/tailwind": "^5.0.3",
"@astrojs/node": "^7.0.0",
"astro": "^4.0.3"
"@astrojs/node": "^7.0.1",
"astro": "^4.0.4"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdoc/package.json
Original file line number Diff line number Diff line change
@@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.8.0",
"astro": "^4.0.3"
"astro": "^4.0.4"
}
}
4 changes: 2 additions & 2 deletions examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/markdown-remark": "^4.0.0",
"astro": "^4.0.3",
"@astrojs/markdown-remark": "^4.0.1",
"astro": "^4.0.4",
"hast-util-select": "^6.0.2",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",
2 changes: 1 addition & 1 deletion examples/with-markdown-shiki/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.0.3"
"astro": "^4.0.4"
}
}
4 changes: 2 additions & 2 deletions examples/with-mdx/package.json
Original file line number Diff line number Diff line change
@@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^2.0.0",
"@astrojs/mdx": "^2.0.1",
"@astrojs/preact": "^3.0.1",
"astro": "^4.0.3",
"astro": "^4.0.4",
"preact": "^10.19.2"
}
}
2 changes: 1 addition & 1 deletion examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.0.1",
"@nanostores/preact": "^0.5.0",
"astro": "^4.0.3",
"astro": "^4.0.4",
"nanostores": "^0.9.5",
"preact": "^10.19.2"
}
4 changes: 2 additions & 2 deletions examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
@@ -11,10 +11,10 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^2.0.0",
"@astrojs/mdx": "^2.0.1",
"@astrojs/tailwind": "^5.0.3",
"@types/canvas-confetti": "^1.6.3",
"astro": "^4.0.3",
"astro": "^4.0.4",
"autoprefixer": "^10.4.15",
"canvas-confetti": "^1.9.1",
"postcss": "^8.4.28",
2 changes: 1 addition & 1 deletion examples/with-vitest/package.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^4.0.3",
"astro": "^4.0.4",
"vitest": "^0.34.2"
}
}
21 changes: 21 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# astro

## 4.0.4

### Patch Changes

- [#9380](https://github.com/withastro/astro/pull/9380) [`ea0918259`](https://github.com/withastro/astro/commit/ea0918259964947523827bac6abe88ad3841dbb9) Thanks [@ematipico](https://github.com/ematipico)! - Correctly handle the rendering of i18n routes when `output: "hybrid"` is set

- [#9374](https://github.com/withastro/astro/pull/9374) [`65ddb0271`](https://github.com/withastro/astro/commit/65ddb027111514d41481f7455c0f0f03f8f608a8) Thanks [@bluwy](https://github.com/bluwy)! - Fixes an issue where prerendered route paths that end with `.mjs` were removed from the final build

- [#9375](https://github.com/withastro/astro/pull/9375) [`26f7023d6`](https://github.com/withastro/astro/commit/26f7023d6928de75c363df0fa759a6255cb73ef3) Thanks [@bluwy](https://github.com/bluwy)! - Prettifies generated route names injected by integrations

- [#9387](https://github.com/withastro/astro/pull/9387) [`a7c75b333`](https://github.com/withastro/astro/commit/a7c75b3339e6b1562d0d16ab6ef482840c51df68) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Fixes an edge case with `astro add` that could install a prerelease instead of a stable release version.

**Prior to this change**
`astro add svelte` installs `svelte@5.0.0-next.22`

**After this change**
`astro add svelte` installs `svelte@4.2.8`

- Updated dependencies [[`270c6cc27`](https://github.com/withastro/astro/commit/270c6cc27f20995883fcdabbff9b56d7f041f9e4)]:
- @astrojs/markdown-remark@4.0.1

## 4.0.3

### Patch Changes
3 changes: 2 additions & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "astro",
"version": "4.0.3",
"version": "4.0.4",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
@@ -200,6 +200,7 @@
"@types/probe-image-size": "^7.2.3",
"@types/prompts": "^2.4.8",
"@types/resolve": "^1.20.5",
"@types/semver": "^7.5.2",
"@types/send": "^0.17.4",
"@types/server-destroy": "^1.0.3",
"@types/unist": "^3.0.2",
Loading