Skip to content

Commit

Permalink
Merge branch 'withastro:main' into multi-jsx-warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
louisescher authored Jan 9, 2025
2 parents 8dc2140 + 0414f61 commit 4952d07
Show file tree
Hide file tree
Showing 126 changed files with 1,116 additions and 393 deletions.
5 changes: 0 additions & 5 deletions .changeset/big-mugs-approve.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/cold-clocks-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes a regression where the Astro Container didn't work during the build, using `pnpm`
5 changes: 0 additions & 5 deletions .changeset/mighty-pugs-retire.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/strange-carpets-drop.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/twelve-cobras-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/markdoc': patch
---

Fixes rendering code blocks within if tags
5 changes: 0 additions & 5 deletions .changeset/witty-lies-end.md

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dist/
.vercel
.netlify
_site/
.astro/
scripts/smoke/*-main/
scripts/memory/project/src/pages/
benchmark/projects/
Expand Down
2 changes: 2 additions & 0 deletions benchmark/make-project/_template.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
* previous artifacts here before generating files.
* @param {URL} projectDir
*/
// biome-ignore lint/correctness/noUnusedVariables: parameters here are template placeholders
// biome-ignore lint/correctness/noUnusedFunctionParameters: (same as above)
export async function run(projectDir) {}
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.1.2"
"astro": "^5.1.4"
}
}
4 changes: 2 additions & 2 deletions examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^4.0.3",
"@astrojs/mdx": "^4.0.4",
"@astrojs/rss": "^4.0.11",
"@astrojs/sitemap": "^3.2.1",
"astro": "^5.1.2"
"astro": "^5.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^5.1.2"
"astro": "^5.1.4"
},
"peerDependencies": {
"astro": "^4.0.0 || ^5.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/container-with-vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/react": "^4.1.2",
"astro": "^5.1.2",
"astro": "^5.1.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"vitest": "^3.0.0-beta.3"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"@astrojs/alpinejs": "^0.4.1",
"@types/alpinejs": "^3.13.10",
"alpinejs": "^3.14.3",
"astro": "^5.1.2"
"astro": "^5.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@astrojs/vue": "^5.0.4",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"astro": "^5.1.2",
"astro": "^5.1.4",
"preact": "^10.24.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@astrojs/preact": "^4.0.1",
"@preact/signals": "^2.0.0",
"astro": "^5.1.2",
"astro": "^5.1.4",
"preact": "^10.24.3"
}
}
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@astrojs/react": "^4.1.2",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"astro": "^5.1.2",
"astro": "^5.1.4",
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^5.0.1",
"astro": "^5.1.2",
"astro": "^5.1.4",
"solid-js": "^1.9.3"
}
}
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@astrojs/svelte": "^7.0.3",
"astro": "^5.1.2",
"astro": "^5.1.4",
"svelte": "^5.1.16"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@astrojs/vue": "^5.0.4",
"astro": "^5.1.2",
"astro": "^5.1.4",
"vue": "^3.5.12"
}
}
2 changes: 1 addition & 1 deletion examples/hackernews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
},
"dependencies": {
"@astrojs/node": "^9.0.0",
"astro": "^5.1.2"
"astro": "^5.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^5.1.2"
"astro": "^5.1.4"
},
"peerDependencies": {
"astro": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.1.2"
"astro": "^5.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.1.2"
"astro": "^5.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/node": "^9.0.0",
"@astrojs/svelte": "^7.0.3",
"astro": "^5.1.2",
"astro": "^5.1.4",
"svelte": "^5.1.16"
}
}
2 changes: 1 addition & 1 deletion examples/starlog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.1.2",
"astro": "^5.1.4",
"sass": "^1.80.6",
"sharp": "^0.33.3"
}
Expand Down
1 change: 1 addition & 0 deletions examples/starlog/src/components/BaseHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const { title = SiteTitle, name = SiteTitle, description = SiteDescription, ...s
---

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<SEO {title} {description} {name} {...seo} />

<link rel="preconnect" href="https://fonts.googleapis.com" />
Expand Down
3 changes: 2 additions & 1 deletion examples/toolbar-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"./app": "./dist/app.js"
},
"devDependencies": {
"astro": "^5.1.2"
"@types/node": "^18.17.8",
"astro": "^5.1.4"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.12.4",
"astro": "^5.1.2"
"astro": "^5.1.4"
}
}
4 changes: 2 additions & 2 deletions examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^4.0.3",
"@astrojs/mdx": "^4.0.4",
"@astrojs/preact": "^4.0.1",
"astro": "^5.1.2",
"astro": "^5.1.4",
"preact": "^10.24.3"
}
}
2 changes: 1 addition & 1 deletion examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@astrojs/preact": "^4.0.1",
"@nanostores/preact": "^0.5.2",
"astro": "^5.1.2",
"astro": "^5.1.4",
"nanostores": "^0.11.3",
"preact": "^10.24.3"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^4.0.3",
"@astrojs/mdx": "^4.0.4",
"@astrojs/tailwind": "^5.1.4",
"@types/canvas-confetti": "^1.6.4",
"astro": "^5.1.2",
"astro": "^5.1.4",
"autoprefixer": "^10.4.20",
"canvas-confetti": "^1.9.3",
"postcss": "^8.4.49",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^5.1.2",
"astro": "^5.1.4",
"vitest": "^3.0.0-beta.3"
}
}
50 changes: 50 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,55 @@
# astro

## 5.1.4

### Patch Changes

- [#12927](https://github.com/withastro/astro/pull/12927) [`ad2a752`](https://github.com/withastro/astro/commit/ad2a752662946e3a80849605f073812b06adf632) Thanks [@ematipico](https://github.com/ematipico)! - Fixes a bug where Astro attempted to decode a request URL multiple times, resulting in an unexpected behaviour when decoding the character `%`

- [#12912](https://github.com/withastro/astro/pull/12912) [`0c0c66b`](https://github.com/withastro/astro/commit/0c0c66bf0df23ab5a9bd2f147e303d8397d3222e) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Improves the config error for invalid combinations of `context` and `access` properties under `env.schema`

- [#12935](https://github.com/withastro/astro/pull/12935) [`3d47e6b`](https://github.com/withastro/astro/commit/3d47e6baff7a17d3ef09630b0d90362baef41f97) Thanks [@AirBorne04](https://github.com/AirBorne04)! - Fixes an issue where `Astro.locals` coming from an adapter weren't available in the `404.astro`, when using the `astro dev` command,

- [#12925](https://github.com/withastro/astro/pull/12925) [`44841fc`](https://github.com/withastro/astro/commit/44841fc281f8920b32f4b4a94deefeb3ad069cf3) Thanks [@ascorbic](https://github.com/ascorbic)! - Ensures image styles are not imported unless experimental responsive images are enabled

- [#12926](https://github.com/withastro/astro/pull/12926) [`8e64bb7`](https://github.com/withastro/astro/commit/8e64bb727f78f24b26fd1c0b1289ab1ccd611114) Thanks [@oliverlynch](https://github.com/oliverlynch)! - Improves remote image cache efficiency by separating image data and metadata into a binary and sidecar JSON file.

- [#12920](https://github.com/withastro/astro/pull/12920) [`8b9d530`](https://github.com/withastro/astro/commit/8b9d53037879cd7ca7bee4d20b4e6f08e984a7df) Thanks [@bluwy](https://github.com/bluwy)! - Processes markdown with empty body as remark and rehype plugins may add additional content or frontmatter

- [#12918](https://github.com/withastro/astro/pull/12918) [`fd12a26`](https://github.com/withastro/astro/commit/fd12a26ac6012c6b8a26f5a178e1bb46092a1806) Thanks [@lameuler](https://github.com/lameuler)! - Fixes a bug where the logged output path does not match the actual output path when using `build.format: 'preserve'`

- [#12676](https://github.com/withastro/astro/pull/12676) [`2ffc0fc`](https://github.com/withastro/astro/commit/2ffc0fcab78b658a6ee73a8f8b291802093dce5e) Thanks [@koyopro](https://github.com/koyopro)! - Allows configuring Astro modules TypeScript compilation with the `vite.esbuild` config

- [#12938](https://github.com/withastro/astro/pull/12938) [`dbb04f3`](https://github.com/withastro/astro/commit/dbb04f3c04ce868b5c985c848a2c40a3761a6dad) Thanks [@ascorbic](https://github.com/ascorbic)! - Fixes a bug where content collections would sometimes appear empty when first running astro dev

- [#12937](https://github.com/withastro/astro/pull/12937) [`30edb6d`](https://github.com/withastro/astro/commit/30edb6d9d0aaf28bea1fec73879f63fe134507d0) Thanks [@ematipico](https://github.com/ematipico)! - Fixes a bug where users could use `Astro.request.headers` during a rewrite inside prerendered routes. This an invalid behaviour, and now Astro will show a warning if this happens.

- [#12937](https://github.com/withastro/astro/pull/12937) [`30edb6d`](https://github.com/withastro/astro/commit/30edb6d9d0aaf28bea1fec73879f63fe134507d0) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where the use of `Astro.rewrite` would trigger the invalid use of `Astro.request.headers`

## 5.1.3

### Patch Changes

- [#12877](https://github.com/withastro/astro/pull/12877) [`73a0788`](https://github.com/withastro/astro/commit/73a078835eb92a05c3f681ee025c93d6db85b907) Thanks [@bluwy](https://github.com/bluwy)! - Fixes sourcemap warning generated by the `astro:server-islands` Vite plugin

- [#12906](https://github.com/withastro/astro/pull/12906) [`2d89492`](https://github.com/withastro/astro/commit/2d89492d73142ed5c7cea9448d841a9892e66598) Thanks [@ascorbic](https://github.com/ascorbic)! - Fixes a bug that caused pages that return an empty array from getStaticPath to match every path

- [`011fa0f`](https://github.com/withastro/astro/commit/011fa0f00ce457cb6b582d36b6b5b17aa89f0a70) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes a case where `astro:content` types would be erased when restarting the dev server

- [#12907](https://github.com/withastro/astro/pull/12907) [`dbf1275`](https://github.com/withastro/astro/commit/dbf1275987d4d9724eab471f1600fba9a50aefb8) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes a regression around the server islands route, which was not passed to the adapters `astro:build:done` hook

- [#12818](https://github.com/withastro/astro/pull/12818) [`579bd93`](https://github.com/withastro/astro/commit/579bd93794b787485479aa3b16554409a0504ed2) Thanks [@ascorbic](https://github.com/ascorbic)! - Fixes race condition where dev server would attempt to load collections before the content had loaded

- [#12883](https://github.com/withastro/astro/pull/12883) [`fbac92f`](https://github.com/withastro/astro/commit/fbac92f8bdbb5ee1312726b2a535a81271b3f7d6) Thanks [@kaytwo](https://github.com/kaytwo)! - Fixes a bug where responses can be returned before session data is saved

- [#12815](https://github.com/withastro/astro/pull/12815) [`3acc654`](https://github.com/withastro/astro/commit/3acc65444c27d87b6f2d61bdfa7df0e0db4e2686) Thanks [@ericswpark](https://github.com/ericswpark)! - Some non-index files that were incorrectly being treated as index files are now excluded

- [#12884](https://github.com/withastro/astro/pull/12884) [`d7e97a7`](https://github.com/withastro/astro/commit/d7e97a775dda7a851bfc10b06161f9a1d3631ed3) Thanks [@ascorbic](https://github.com/ascorbic)! - Adds `render()` to stub content types

- [#12883](https://github.com/withastro/astro/pull/12883) [`fbac92f`](https://github.com/withastro/astro/commit/fbac92f8bdbb5ee1312726b2a535a81271b3f7d6) Thanks [@kaytwo](https://github.com/kaytwo)! - Fixes a bug where session data could be corrupted if it is changed after calling .set()

- [#12827](https://github.com/withastro/astro/pull/12827) [`7b5dc6f`](https://github.com/withastro/astro/commit/7b5dc6f0f1fbb825f52cd587aa1f7d21d731b3de) Thanks [@sinskiy](https://github.com/sinskiy)! - Fixes an issue when crawlers try to index Server Islands thinking that Server Islands are pages

## 5.1.2

### Patch Changes
Expand Down
1 change: 0 additions & 1 deletion packages/astro/components/Image.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type { UnresolvedImageTransform } from '../dist/assets/types';
import { applyResponsiveAttributes } from '../dist/assets/utils/imageAttributes.js';
import { AstroError, AstroErrorData } from '../dist/core/errors/index.js';
import type { HTMLAttributes } from '../types';
import './image.css';
// The TypeScript diagnostic for JSX props uses the last member of the union to suggest props, so it would be better for
// LocalImageProps to be last. Unfortunately, when we do this the error messages that remote images get are complete nonsense
Expand Down
3 changes: 1 addition & 2 deletions packages/astro/components/Picture.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ import type {
UnresolvedImageTransform,
} from '../dist/types/public/index.js';
import type { HTMLAttributes } from '../types';
import './image.css';
type Props = (LocalImageProps | RemoteImageProps) & {
export type Props = (LocalImageProps | RemoteImageProps) & {
formats?: ImageOutputFormat[];
fallbackFormat?: ImageOutputFormat;
pictureAttributes?: HTMLAttributes<'picture'>;
Expand Down
13 changes: 13 additions & 0 deletions packages/astro/components/ResponsiveImage.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
import type { LocalImageProps, RemoteImageProps } from 'astro:assets';
import Image from './Image.astro';
type Props = LocalImageProps | RemoteImageProps;
const { class: className, ...props } = Astro.props;
import './image.css';
---

{/* Applying class outside of the spread prevents it from applying unnecessary astro-* classes */}
<Image {...props} class={className} />
11 changes: 11 additions & 0 deletions packages/astro/components/ResponsivePicture.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
import { default as Picture, type Props as PictureProps } from './Picture.astro';
type Props = PictureProps;
const { class: className, ...props } = Astro.props;
---

{/* Applying class outside of the spread prevents it from applying unnecessary astro-* classes */}

<Picture {...props} class={className} />
6 changes: 5 additions & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "astro",
"version": "5.1.2",
"version": "5.1.4",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
Expand Down Expand Up @@ -225,5 +225,9 @@
},
"publishConfig": {
"provenance": true
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/astrodotbuild"
}
}
Loading

0 comments on commit 4952d07

Please sign in to comment.