0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00
Commit graph

8948 commits

Author SHA1 Message Date
Florian Lefebvre
8309c61f0d
feat(next): astro:routes:resolved (#12329)
Co-authored-by: Luiz Ferraz <luiz@lferraz.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-11-21 12:30:49 +01:00
Matt Kane
3f02d5f12b
feat: support new location for content config (#12475)
* feat: support new location for content config

* Test fixes

* Handle missing dir

* Handle missing content dir

* chore: changes from review

* Revert legacy fixtures

* Clarify changeset
2024-11-21 10:45:02 +00:00
Matt Kane
18a04c008a
chore: better images changeset pt 2 (#12484) 2024-11-20 13:51:45 +00:00
Matt Kane
3f8b0725da
chore: better images changeset (#12483) 2024-11-20 13:12:39 +00:00
Matt Kane
e1a5e65ad7
chore: clarify wording of responsive image props (#12482) 2024-11-20 13:12:17 +00:00
Michael Stramel
c48916cc4e
feat(astro): add Built-in SVG component support (#12067)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-11-19 16:51:37 +00:00
Sarah Rainsberger
e246dc5232
Update markdown.shiki configuration docs (#12447) 2024-11-15 12:45:46 -04:00
Matt Kane
af867f3910
feat: experimental responsive images (#12377)
* chore: changeset

* feat: add experimental responsive images config option (#12378)

* feat: add experimental responsive images config option

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update config types

* Move config into `images`

* Move jsdocs

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* feat: add responsive image component (#12381)

* feat: add experimental responsive images config option

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update config types

* Move config into `images`

* Move jsdocs

* wip: responsive image component

* Improve srcset logic

* Improve fixture

* Lock

* Update styling

* Fix style prop handling

* Update test (there's an extra style for images now)

* Safely access the src props

* Remove unused export

* Handle priority images

* Consolidate styles

* Update tests

* Comment

* Refactor srcset

* Avoid dupes of original image

* Calculate missing dimensions

* Bugfixes

* Add tests

* Fix test

* Correct order

* Lint

* Fix fspath

* Update test

* Fix test

* Conditional component per flag

* Fix class concatenation

* Remove logger

* Rename helper

* Add comments

* Format

* Fix markdoc tests

* Add test for style tag

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* feat: add crop support to image services (#12414)

* wip: add crop support to image services

* Add tests

* Strip crop attributes

* Don't upscale

* Format

* Get build working properly

* Changes from review

* Fix jsdoc

* feat: add responsive support to picture component (#12423)

* feat: add responsive support to picture component

* Add picture tests

* Fix test

* Implement own define vars

* Share logic

* Prevent extra astro-* class

* Use dataset scoping

* Revert unit test

* Revert "Fix test"

This reverts commit f9ec6e2938.

* Changes from review

* docs: add docs for responsive images (#12429)

* docs: add responsive images flag docs

* docs: adds jsdoc for image components

* chore: updates from review

* Fix jsdoc

* Changes from review

* Add breakpoints option

* typo

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-11-15 13:29:52 +00:00
Matt Kane
c8f877cad2
fix: skip legacy typegen by default (#12438) 2024-11-15 13:28:40 +00:00
bluwy
671f50c7d3 Merge branch 'main' into next 2024-11-15 19:37:28 +08:00
Houston (Bot)
5509117415
[ci] release (#12427)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-15 19:27:27 +08:00
Martin Trapp
453ec6b12f
prevents access to the history state if not set (#12436) 2024-11-15 16:09:05 +08:00
Emanuele Stoppa
e64ec5f9df
chore: breakdown of benchmarks (#12433) 2024-11-14 16:26:50 +00:00
Jacob Jenkins
9fc2ab8cc8
Update to svelte 5 (#12364)
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-11-14 23:31:51 +08:00
Emanuele Stoppa
4364bff273
fix(actions): internal symbol check (#12424) 2024-11-14 12:41:16 +00:00
Arpan Patel
bdc0890061 [ci] format 2024-11-14 08:34:43 +00:00
Arpan Patel
0462219612
Fix script injection during build (#12392)
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-11-14 08:33:57 +00:00
Houston (Bot)
b745e382f1
[ci] release (beta) (#12405)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-13 14:32:01 +00:00
Emanuele Stoppa
3c72cdbc61 Merge branch 'main' into next 2024-11-13 14:25:36 +00:00
Houston (Bot)
3b3bc9b8cd
[ci] release (#12422)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-13 14:21:47 +00:00
Emanuele Stoppa
acac0af534
fix(routing): middleware in dev (#12420) 2024-11-13 13:34:35 +00:00
Houston (Bot)
e723e9e8ea
[ci] release (#12403)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-12 19:00:58 -05:00
Emanuele Stoppa
bdb75a87f2
fix(routing): emit error for forbidden rewrite (#12339)
Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Reuben Tier <otterlord.dev@gmail.com>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-11-11 15:03:27 +00:00
Sarah Rainsberger
471e7127a3 [ci] format 2024-11-11 13:50:33 +00:00
Sarah Rainsberger
95d52a0236
update markdown config docs (#12382)
Co-authored-by: ArmandPhilippot <59021693+ArmandPhilippot@users.noreply.github.com>
Co-authored-by: ematipico <602478+ematipico@users.noreply.github.com>
Co-authored-by: jsparkdev <39112954+jsparkdev@users.noreply.github.com>
Co-authored-by: bluwy <34116392+bluwy@users.noreply.github.com>
2024-11-11 09:49:46 -04:00
Ben Holmes
d10f91815e
Actions middleware (#12373)
* add manual middleware config option with getMiddlewareContext()

* refactor requestInfo to action object

* set action error response status from render context

* update automatic middleware to plain POST handler

* fix missing Locals type

* test: add separate POST and cookie forwarding tests

* remove actions.middleware flag

* add docs on actionResultAlreadySet

* test: use Astro.rewrite instead of middleware next(). TODO: fix next()

* fix type errors from rebase

* test: remove middleware handler

* test: use cookie forwarding for 'lots of fields'

* refactor: _isPrerendered -> ctx.isPrerendered

* expose getOriginPathname as middleware utility

* add support for handling RPC action results from middleware

* test: RPC security middleware

* refactor POST route handler to use getMiddlewareContext()

* remove unused actionRedirect flag

* changeset

* test: add expectedd rewrite failure for Ema to debug

* fix e2e test

* nit: form -> from

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>

* rename getMiddlewareContext -> getActionContext

* rename form-action -> form

* move /_actions/ route pattern to const

* move type defs to user-accessible ActionMiddlewareContext type

* export action middleware context type

* strip omitted fields for Action API Context

* add satisfies to type for good measure

* move getOriginPathname to shared ctx.originPathname

* remove `next()` rewrite because it isn't supported

* fix empty forms raising a 415

* fix missing async on cookie example

* nit: ctx -> context

* fix json parse error when content length is 0

* refactor body parsing to function

* edit: migration -> updating your HTML form actions

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* update changeset to match docs v5 guide

* add absolute urls to changeset links

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-11-08 17:03:57 -05:00
Ben Holmes
9cca108439
Fix incorrect status code in dev server for action errors (#12401)
* remove default status that swallows response.status

* refactor status compute to be more readable

* changeset
2024-11-08 14:06:19 -05:00
Emanuele Stoppa
823e73b164
fix(actions): better runtime check for invalid usages (#12402) 2024-11-08 15:55:53 +00:00
Florian Lefebvre
f5f71094ec
fix: error overlay message escape (#12305)
Co-authored-by: Princesseuh <3019731+Princesseuh@users.noreply.github.com>
2024-11-08 16:07:40 +01:00
Houston (Bot)
d63d87dcae
[ci] release (beta) (#12370)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-06 23:47:57 +08:00
bluwy
b21a075002 Add svelte changeset 2024-11-06 23:34:10 +08:00
bluwy
7db86cf2b7 Merge branch 'main' into next 2024-11-06 23:17:39 +08:00
Houston (Bot)
e10b03e88c
[ci] release (#12369)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-06 22:55:41 +08:00
Bjorn Lu
c280655655
Update to Vite 6.0.0-beta.6 (#12323) 2024-11-06 22:51:55 +08:00
Bjorn Lu
4a35c505e4 [ci] format 2024-11-06 14:16:10 +00:00
Bjorn Lu
6fd3d5960f
Add support for Svelte 5 @render syntax (#12390)
Co-authored-by: Jonas Robertsson <jonas.robertsson@icloud.com>
2024-11-06 22:09:22 +08:00
renovate[bot]
b7e46910fb
fix(deps): update all non-major dependencies (#12366)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-11-06 21:47:42 +08:00
Erika
94f4fe8180
Adds missing changeset for new basics template (#12379) 2024-11-06 21:32:27 +08:00
Sujal Gurung
bf2723e831
add checked to htmlBooleanAttributes (#12311)
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-11-06 13:32:05 +00:00
Arpan Patel
c4726d7ba8
fix: show file name with invalid frontmatter errors for MDX (#12355)
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Princesseuh <3019731+Princesseuh@users.noreply.github.com>
2024-11-06 21:22:38 +08:00
Emanuele Stoppa
4c9a42c2da [ci] format 2024-11-06 12:34:13 +00:00
Emanuele Stoppa
ed5a9f1b75
chore: codspeed benchmark (#12347) 2024-11-06 12:33:14 +00:00
Luiz Ferraz
222f71894c
Fix astro add generated import identifier (#12363) 2024-11-06 14:16:34 +08:00
Erika
9263e96593
create-astro updates (#12083)
Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Reuben Tier <otterlord.dev@gmail.com>
2024-11-04 16:15:11 +01:00
Bjorn Lu
493fe43cd3
Improve tinyexec errors (#12368) 2024-11-04 22:49:33 +08:00
Houston (Bot)
ec3113d25a
[ci] release (#12345)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-04 15:20:48 +01:00
Paul Welsh
7680349873
fix: honor getViteConfig inlineAstroConfig.logLevel setting (#12358)
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-11-04 10:01:09 +00:00
Hippo
35795a1a54
Fix watchfile multiple dev server restart (#12353) 2024-11-04 16:19:54 +08:00
Florian Lefebvre
5751488165
fix: revert #12227 (#12351) 2024-11-01 16:53:15 +01:00
Vladislav Mamon
c480b8f2c4 [ci] format 2024-11-01 10:50:42 +00:00