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

4221 commits

Author SHA1 Message Date
Matt Kane
a54e520d3c
fix: throw a useful error if rendering undefined entry (#12113)
* fix: throw a useful error if rendering undefined entry

* Update .changeset/wise-pumas-fry.md

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

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-10-03 19:55:55 +01:00
Florian Lefebvre
f9dd9428c6
fix(vue): useId() collisions (#12112) 2024-10-03 20:52:11 +02:00
Houston (Bot)
34d79527a4
[ci] release (#12098)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-03 14:50:19 +01:00
Emanuele Stoppa
ea225585fd
fix(routing): incorrect assumption when loading the middleware (#12109) 2024-10-03 14:38:23 +01:00
lam eu ler
918953bd09
use shorthash for data url image to prevent ENAMETOOLONG (#12108)
* use shorthash for filename of data url images

* add changeset

* add fixture to test processing of data url images

* run format

* update changeset

* fix test

* Update .changeset/dull-worms-own.md

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-10-03 10:54:01 +01:00
Matt Kane
d3a74da196
fix: handle immutable response object (#12106)
* fix: handle immutable response object

* changeset
2024-10-03 09:21:11 +01:00
Sondre Aasemoen
fbe1bc51d8
feat(sitemap): add xslURL to enable styling (#11485)
* feat(sitemap): add xslURL to enable styling

* Add test

* Update .changeset/proud-horses-cry.md

---------

Co-authored-by: bluwy <bjornlu.dev@gmail.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-10-03 09:01:42 +01:00
Matt Kane
42037f33e6
fix: pass custom statusText in Response (#12105)
* fix: pass custom statusText in Response

* Add changeset
2024-10-02 17:08:36 +01:00
Emanuele Stoppa
8f064fa5b9 fix changeset 2024-10-02 12:23:46 +01:00
Emanuele Stoppa
7febf1f6b5
feat(routing): decode pathname early, don't decode params (#12079)
* feat(routing): decode pathname early

* linting

* Update packages/astro/src/core/fs/index.ts

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>

* address feedback

* Update .changeset/wet-foxes-walk.md

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>

* fix changeset

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-10-02 12:06:42 +01:00
Mark Jaquith
d49a537f2a
Use IE conditional comment placeholders for server island start markers (#12090)
These placeholders are much less likely to be removed by HTML minifiers,
because they have traditionally been used to change the behavior of
site.
2024-10-01 15:58:14 -04:00
Matt Kane
a195629418 Merge branch 'main' into next 2024-10-01 16:06:44 +01:00
Matt Kane
11d447f66b
fix: defer check for schema references to content layer collections (#12097)
* fix: defer check for schema references

* More comments
2024-10-01 16:05:45 +01:00
Houston (Bot)
ece03449e3
[ci] release (beta) (#12072)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-01 15:46:45 +02:00
Florian Lefebvre
2eb62d07b5 Merge branch 'main' into next 2024-10-01 15:39:00 +02:00
Houston (Bot)
f06feee7c4
[ci] release (#12074)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-01 15:26:50 +02:00
Reuben Tier
76c5fbd6f3
Fix non-stable versions for astro add (#12095) 2024-10-01 14:18:30 +08:00
bluwy
e748c480a7 Merge branch 'main' into next 2024-10-01 11:21:48 +08:00
Erika
12dae50c77
chore: changeset (#12084) 2024-09-30 19:21:06 +02:00
Florian Lefebvre
8679954bf6
feat(next): remove CCC (#12081)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-09-30 16:04:11 +02:00
Rohan Godha
21b5e806c5
feat: custom file formats in file content loader (#12047)
* add custom file format support

* add tests

* lint/format

* changeset

* nits

* finish tests

* add nested json test

* requested changes

* update changeset with @sarah11918 suggestions

* typos/formatting

* add map<id, data> yaml test

* fix tests and rebase
2024-09-29 19:41:15 +01:00
Florian Lefebvre
0a1036eef6
feat(next): codegenDir and update .astro paths (#11963)
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-09-26 17:13:17 +02:00
Bjorn Lu
a19530e377
Parse frontmatter ourselves (#12075) 2024-09-26 14:59:39 +01:00
Martin Trapp
d7779dfae7
View Transitions: Fixes Astro's fade animation to prevent flicker during morph transitions (#12046) 2024-09-26 14:14:00 +01:00
Bjorn Lu
acf264d8c0
Replace ora with yocto-spinner (#12073) 2024-09-25 16:17:02 +01:00
Bjorn Lu
1720c5b1d2
Fix injected endpoint prerender detection (#12043) 2024-09-25 15:14:04 +01:00
Emanuele Stoppa
9693ad4ffa
fix: check origin in static build (#12070)
* fix: check origin in static build

* address comment
2024-09-25 14:38:32 +01:00
Erika
61d248e581
feat: makes it so astro add does not set output server by default (#12071)
* feat: makes it so astro add does not set output server by default

* chore: changeset
2024-09-25 14:59:34 +02:00
Houston (Bot)
7968eabcfc
[ci] release (beta) (#12017)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-24 11:10:24 +02:00
Princesseuh
7fa6f782cd
Merge branch 'main' into next 2024-09-24 09:42:32 +01:00
Erika
cb5d3ae6ee
Release a beta for Svelte and Vue (#12060)
* chore: changeset

* nit: better changeset

* chore: major
2024-09-24 10:12:51 +02:00
Houston (Bot)
7814a6cad1
[ci] release (#12037)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-23 19:26:46 +02:00
Emanuele Stoppa
243ecb6d61
fix(container): apply polyfill (#12042) 2024-09-20 18:09:37 +01:00
Matt Kane
26ea5e814a
fix: restore behavior of absolute images in v4 branch (#12038)
* fix: allow images with absolute path

* Add mroe tests

* changeset
2024-09-20 12:19:47 +01:00
Matt Kane
325a57c543
fix: correctly parse inline loader values (#12035) 2024-09-20 10:32:52 +01:00
Emanuele Stoppa
5b3ddfadcb
fix(routing): call middleware when rendering 404.astro (#12034) 2024-09-20 10:12:05 +01:00
Erika
ddc3a08e8f
fix: handle trailing slash on the image endpoint (#12022)
* feat: add trailing slash to import.meta.env for URLs building

* feat: add jsdoc

* feat: add trailing slash to config option directly

* chore: changeset
2024-09-19 17:14:08 +02:00
Matt Kane
10a756ad87
fix: treat images with initial slash as local, and resolve with vite (#12030)
* fix: allow images with absolute path

* Add mroe tests

* changeset
2024-09-19 14:33:27 +01:00
Houston (Bot)
b4563f8542
[ci] release (#12021)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-19 14:13:53 +01:00
Emanuele Stoppa
8c0cae6d1b
fix(routing): compute APIContext.params when rewriting using next (#12031)
* fix(routing): compute `APIContext.params` when rewriting using `next`

* fix(routing): compute `APIContext.params` when rewriting using `next`
2024-09-19 13:57:47 +01:00
Bjorn Lu
d3bd673392
Check route collision after getStaticPaths (#12028) 2024-09-19 20:43:01 +08:00
Bjorn Lu
40e7a1b05d
Lazily initialize the md and mdx processor (#12026) 2024-09-19 20:40:49 +08:00
François Violette
dd3b753aba
Add selected to the list of boolean attributes (#12027) 2024-09-19 19:51:26 +08:00
Uwe Jäger
9be3e1bba7
Remove dependency on path-to-regexp (#12001)
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-09-19 11:11:48 +02:00
Matt Kane
b0827022af Merge branch 'main' into next 2024-09-18 16:43:14 +01:00
Matt Kane
53cb41e30e
fix: correctly handle head propagation in content layer deferred rendering (#12014)
* chore: run MDX tests against content layer

* Handle head propagation in deferred rendering

* Add changeset

* Update test
2024-09-18 15:15:51 +01:00
Houston (Bot)
8214114a90
[ci] release (#12002)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-18 00:21:35 +02:00
Matthew Phillips
dcd115892a
Make @astrojs/tailwind compat with Astro 5 (#12018) 2024-09-18 00:19:22 +02:00
Matthew Phillips
837ee3a4aa
Encode action result in cookie (#12016)
* Encode action result in cookie

* Add a changeset
2024-09-17 15:13:49 -04:00
Artem Zhirov
0b59fe74d5
Fix: prevent island re-rendering when using transition:persist (#11854) (#11915)
https://github.com/withastro/astro/issues/11854
2024-09-17 16:23:48 +02:00
Johannes Spohr
a582cb6124
Fix Svelte view transition state persistence (#12006)
Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
2024-09-17 16:11:32 +02:00
Johannes Spohr
082f450944
Fix SolidJS view transition state persistence (#11998)
* Fix SolidJS view transition state persistence

* Add changeset

---------

Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
2024-09-17 15:21:41 +02:00
Johannes Spohr
b75bfc8cc4
Fix vue resetting state when using view transition persistence (#11946)
* Fix vue resetting state when using view transition persistence

* Avoid calling internal apis when forcing vue component update
2024-09-17 14:54:49 +02:00
Houston (Bot)
6860beb995
[ci] release (beta) (#12012)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-17 12:23:49 +02:00
Princesseuh
0eb1463db7
fix: make db a minor 2024-09-17 12:21:41 +02:00
Princesseuh
9481f8f9b3
fix: only bump packages that needs it 2024-09-17 12:13:10 +02:00
Princesseuh
efcc4bb28b
fix: attempt to version at beta 1 2024-09-17 11:55:01 +02:00
Erika
560833843c
feat: update to beta (#12008)
* feat: update to beta

* chore: changeset

* Apply suggestions from code review

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-09-17 11:40:10 +02:00
Houston (Bot)
948ad8eecf
[ci] release (alpha) (#12010)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-16 17:15:36 -04:00
Armand Philippot
cfdaab257c
docs: update security.checkOrigin JSDoc comment (#12011) 2024-09-16 16:27:22 -04:00
Matthew Phillips
f10a3b7fe6
Fix vitest in Astro 5 (#12009)
* Fix vitest in Astro 5

* Add a changeset
2024-09-16 15:16:58 -04:00
Armand Philippot
a2f8c5d85f
docs: fix Content Layer RFC Link (#12000) 2024-09-15 16:53:30 -03:00
Houston (Bot)
6e1602c7b1
[ci] release (alpha) (#11988)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-13 16:35:01 -04:00
Matthew Phillips
4724b14431 Merge branch 'main' into next 2024-09-13 16:08:58 -04:00
Houston (Bot)
27d19f612f
[ci] release (#11986)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-13 15:56:33 -04:00
Matthew Phillips
ffba5d716e
Fix getStaticPaths regression (#11993)
* Revert "Remove dependency on path-to-regexp (#11983)"

This reverts commit 633eeaa9d8.

* Add test for regression

* Add a changeset

* Pin path-to-regexp
2024-09-13 15:39:51 -04:00
Florian Lefebvre
bf90a5343f
feat(next): TODOs (#11987)
* feat(next): TODOs

* fix: remove todos

* Updates tests to not assign locals

* Changesets

* Update .changeset/cool-mangos-shop.md

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

* Update .changeset/blue-sloths-stare.md

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

* Update .changeset/blue-sloths-stare.md

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

* Update .changeset/blue-sloths-stare.md

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-09-13 14:12:33 -04:00
Matthew Phillips
d7a396ca3e
Remove experimental.serverIslands flag (#11991)
* Remove experimental.serverIslands flag

* update link to the guide

* Add changeset

* Update packages/astro/src/core/errors/errors-data.ts

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

* Update packages/astro/src/core/errors/errors-data.ts

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-09-13 12:49:37 -04:00
Matthew Phillips
a604a0ca9e
Rename the ViewTransitions component to ClientRouter (#11980)
* Rename the ViewTransitions component to ClientRouter

* oops, move

* Move it
2024-09-13 10:53:52 -04:00
Florian Lefebvre
3e70853b76
feat(next): underscore redirects (#11989) 2024-09-13 16:41:40 +02:00
Erika
d84e444fd3
feat: add default exclude to tsconfigs (#11982)
* feat: add default exclude to tsconfigs

* feat: add include
2024-09-13 16:24:00 +02:00
Houston (Bot)
f15922d177
[ci] release (alpha) (#11962)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-13 15:27:42 +02:00
Erika
f7f2338c2b
refactor: rework supportedAstroFeatures (#11806)
* refactor: rework supportAstroFeatures

* fix: build

* fix: tests

* chore: changeset
2024-09-13 13:58:57 +02:00
Reuben Tier
06eff60cab
Add copy support for Wayland via wl-copy (#11964)
* Add wl-copy support

* Add changeset

* set to patch

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-09-13 13:45:30 +02:00
Houston (Bot)
490eed1cd9
[ci] release (#11940)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-13 13:04:37 +02:00
Uwe Jäger
633eeaa9d8
Remove dependency on path-to-regexp (#11983)
Fixes #11956
Closes #11985
Closes 11965
2024-09-13 12:49:44 +02:00
Emanuele Stoppa
ee38b3a946
refactor(next): send IntegrationRouteData to integrations (#11864)
Co-authored-by: Luiz Ferraz <luiz@lferraz.com>
Co-authored-by: Alexander Niebuhr <alexander@nbhr.io>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-09-13 11:44:55 +02:00
Matthew Phillips
d8132626b0
Unflag Server Islands (#11955)
* Unflag Server Islands

* update example

* Add changeset

* Only append serverIslands route if there is one

* Update .changeset/strange-sheep-film.md

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

* check buildoutput instead

* Update packages/astro/src/core/errors/errors-data.ts

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>

* remove flag

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-09-12 11:34:11 -04:00
Bjorn Lu
c9ae7b1b89
Handle MDX optimize for root hast node (#11975) 2024-09-12 18:47:55 +08:00
Matt Kane
60211defbf
Export the RenderResult type (#11974) 2024-09-12 10:45:11 +01:00
Nikola Hristov
86ad1fd223
Fixes typo. (#11968)
* Fix typo

* Create nine-chairs-decide.md

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-09-11 17:44:30 +02:00
Florian Lefebvre
74722cb81c
feat(next): reference astro/client from astro/config (#11925) 2024-09-11 14:40:15 +02:00
Erika
518433e433
feat(assets): Allow customising the route of the image endpoint (#11908)
* feat(assets): Allow customizing the route of the image endpoint

* Update packages/astro/src/core/config/schema.ts

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>

* feat: use undefined instead of default

* fix: strip param correctly on custom endpoint route

* chore: changeset

* nit: unused import

* fix: other unused import

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-09-11 01:04:16 +02:00
Princesseuh
40760a8ace
Merge branch 'main' into next 2024-09-10 15:01:44 +02:00
Houston (Bot)
a1176a1d93
[ci] release (alpha) (#11954)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-10 08:29:08 -04:00
Matt Kane
4410130df7
fix: add refresh context to schema for loader args (#11960)
* fix: add refresh context to schema for loader args

* fix negative match test
2024-09-10 13:18:18 +01:00
Erika
b6a5f39846
feat: changesets for the hybrid removal (#11941)
* feat: changesets for the hybrid removal

* Update .changeset/afraid-apricots-buy.md

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

* Apply suggestions from code review

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-09-10 11:14:03 +02:00
Matt Kane
50a0146e9a
feat: allow arrays of patterns for glob loader (#11952)
* feat: support pattern arrays with glob

* feat: allow arrays of patterns for content layer

* Apply suggestions from code review

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-09-09 17:32:46 +01:00
Houston (Bot)
26dc381f71
[ci] release (alpha) (#11926)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-09 11:09:25 -04:00
Florian Lefebvre
0a269b63e5 fix: changelog 2024-09-09 16:43:51 +02:00
Bjorn Lu
46ea29f91d
Fix build.client and build.server resolve behaviour (#11916)
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-09-09 22:35:34 +08:00
Sarah Rainsberger
fa4671ca28
[error docs] Update error messages that reference src/content/ (#11943) 2024-09-07 16:14:22 -03:00
Ben Holmes
7b09c62b56
Actions: add discriminated union support (#11939)
* feat: discriminated union for form validators

* chore: changeset
2024-09-06 16:41:51 -04:00
Houston (Bot)
0d50d7545e
[ci] release (#11936)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-06 12:47:30 -04:00
Matthew Phillips
bd1d4aaf82
Allow passing into the crypto key via ASTRO_KEY (#11879)
* Allow passing into the crypto key via ASTRO_KEY

* Add a changeset

* Add test

* Use the node package

* omg

* Create a new create-key command

* linting

* lint again

* Update the changeset
2024-09-06 12:41:39 -04:00
Florian Lefebvre
e55c668b25
chore: changeset minor (#11938) 2024-09-06 15:23:17 +02:00
Florian Lefebvre
7d70ba3178
feat(create-astro): ts-check comment (#11924) 2024-09-06 14:23:02 +02:00
Florian Lefebvre
5b4e3abbb1
feat(next): envField jsdoc (#11927)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-09-06 14:21:27 +02:00
Lukas Bachlechner
4a44e82bbd
fix: explicitly check for null props in serializeSignals (#11930)
* fix: explicitly check for null props in `serializeSignals`

* chore: add changeset
2024-09-06 13:26:51 +02:00
Erika
c58193a691
fix(add): Use proper export names when adding adapters (#11935)
* fix(add): Use proper export names when adding adapters

* chore: changeset
2024-09-06 11:38:15 +02:00
Florian Lefebvre
a8a3d2cde8
feat(next): ctx.isPrerendered (#11875) 2024-09-05 16:58:23 +02:00
Houston (Bot)
65bfefb96b
[ci] release (#11909)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-05 03:42:00 +02:00
Gabriel Pereira Woitechen
ca54e3f819
perf(astro/assets): avoid downloading original image when using cache (#11904) 2024-09-04 15:32:03 +02:00
Houston (Bot)
70865b3cdc
[ci] release (alpha) (#11910)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-04 12:44:20 +01:00
Matt Kane
c3dce8363b
Unflag content layer (#11911)
* Unflag content layer

* Lint

* More detailed changeset

* Update .changeset/heavy-seahorses-poke.md

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-09-04 09:40:46 +01:00
Matt Kane
b5d827ba68
Export LoaderContext types (#11914)
* Export data store types

* Format

* Change name again!
2024-09-04 08:16:09 +01:00
Florian Lefebvre
38047119ff
feat(next): better tsconfig (#11859)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-09-03 17:49:09 +02:00
Matthew Phillips
7ff7134b80
Provide an error message when Actions throws in setup (#11886)
* Provide an error message when Actions throws in setup

* Update .changeset/many-turtles-tie.md

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

---------

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2024-09-03 09:45:57 -04:00
Matt Kane
5a39da87d3 Merge branch 'main' into next 2024-09-03 14:31:29 +01:00
Matt Kane
d63bc50d99
fix: keep data store outside of node_modules during dev (#11902)
* fix: don't keep data store in node_modules during dev

* Lint

* Fix test

* Wait for data store

* Use helper for data store file

* Fix data store file helper

* Lint

* Handle case where Vite already knows about save
2024-09-03 14:25:45 +01:00
Luiz Ferraz
cc820c5d5e
Fix mixed DB token env vars (#11894)
* Fix mixed DB token env vars

* Test env combinations

* Fix linter issues

* Fix linter issues

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-09-03 14:53:29 +02:00
Houston (Bot)
da473ec0aa
[ci] release (alpha) (#11903)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-03 12:52:02 +01:00
Matt Kane
334948ced2
feat: allow integrations to refresh content layer data (#11878)
* Allow integrations to refresh content layer data

This reverts commit 90a862fc94.

* Add test

* Add changeset

* Add wait in test

* Dispose of queue

* Skip if no content layer collections

* Use spaces in markdown

* fix: don't keep data store in node_modules during dev

* Lint

* Fix test

* Apply suggestions from code review

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

* Re-order tests

* Wait for data store

* Lint

* Handle case where Vite already knows about save

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-09-03 12:44:57 +01:00
Matt Kane
a1d78b75aa Merge branch 'main' into next 2024-09-02 17:40:53 +01:00
Bjorn Lu
3ab3b4efbc
Clean up Astro metadata in vfile.data (#11861)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-09-02 21:43:34 +08:00
Bjorn Lu
2bdde80cd3
Set external: true when loading astro config (#11819)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-09-02 21:22:54 +08:00
Bjorn Lu
560ef15ad2
Refactor createShikiHighlighter (#11825)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-09-02 21:08:25 +08:00
Houston (Bot)
60d8e30008
[ci] release (#11883)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-02 13:19:39 +02:00
Chris Swithinbank
80b4a181a0
Fix user-facing type for i18n.routing.fallbackType (#11900) 2024-09-02 13:01:38 +02:00
Matt Kane
e45070459f
fix: separate image extraction from schema parsing in content layer (#11884)
* fix: separate image extraction from schema parsing in content layer

* rm unused imports
2024-09-01 10:05:43 +01:00
Houston (Bot)
534d3edff8
[ci] release (alpha) (#11853)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-30 16:12:25 -04:00
Armand Philippot
8e5257adda
docs(i18n): fix typo in fallbackType JSDoc comment (#11870) 2024-08-30 09:45:31 +01:00
Houston (Bot)
21747e9eae
[ci] release (#11871)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-29 23:28:48 +08:00
Bjorn Lu
9327d56755
Use default import in astro add (#11872) 2024-08-29 23:05:16 +08:00
Matt Kane
e311cc02f3 Merge branch 'main' into next 2024-08-29 15:35:37 +01:00
Matt Kane
d1bd1a11f7
Moves content layer sync to a queue and support selective sync (#11767)
* wip: allow integrations to refresh contel layer

* Use queue for sync jobs

* Remove integration-specific code

* Fix type

* changeset
2024-08-29 15:22:40 +01:00
Princesseuh
027b8398f7
Merge branch 'main' into next 2024-08-29 15:22:24 +02:00
Houston (Bot)
17f71278f4
[ci] release (#11857)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-29 13:50:49 +02:00
Erika
9da5b3dab2
fix: syntax error in changelog (#11869) 2024-08-29 13:48:51 +02:00
Ben Holmes
5b4070efef
Actions stable release (#11843)
* feat: baseline experimental actions

* feat(test): remove experimental config

* feat: remove getActionProps()

* feat: make actions file non-break

* feat: detect actions usage

* chore: changeset

* feat: improve actions usage check

* refactor: remove define action symbol now that we check server exp

* fix: remove old import

* chore: move actionsIntegration to top import

* fix: warn only when actions are used

* fix: srcDir check

* refactor: split out action plugins to simplify integration

* feat: new integration and plugins

* chore: update error hints

* fix(test): pass default src dir

* feat: add ActionNotFoundError

* fix: handle json parse errors in deserializer

* chore: unused import

* 500 -> 404

* New `astro:schema` module (#11810)

* feat: expose zod from astro:schema

* chore: changeset

* chore: update release strategy in changeset

* fix: move deprecated notice to type def

* fix: update config doc reference

* chore: remove z from astro:actions

* edit: changeset with minor release note remove

* wip: increase button click timeouts

* Revert "wip: increase button click timeouts"

This reverts commit a870bc2dc4bdfd77b8b4fc54b62d8bde01d20c14.

* chore: remove content collections disclaimer

* fix: undo biome change

* agh tabs

* agh newlines

* fix: bad docs merge

* wip: add back timeout extension

* fix(test): astro schema import

* refactor: move static output error to config done

* refactor: usesActions -> isActionsFilePresent

* fix: check whether startup and current value disagree

* chore: unused import

* edit: sell actions a little more

* changeset nit

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-08-29 11:13:49 +01:00
Matt Kane
8bab233937
fix: resolve content layer images without filePath set (#11858) 2024-08-28 21:02:08 +01:00
Matt Kane
0e35afe44f
fix: pass config instead of settings to content layer loaders (#11862)
* fix: pass config instead of settings to content layer loaders

* lint

* changes to changeset from review
2024-08-28 17:05:56 +01:00
Princesseuh
68601a9549
Merge branch 'main' into next 2024-08-28 17:25:13 +02:00
Bjorn Lu
440a4be0a6
Use tinyexec (#11845) 2024-08-28 22:52:49 +08:00
Bjorn Lu
6272e6cec0
Use magicast for astro add (#11772) 2024-08-28 22:52:32 +08:00
Bjorn Lu
93932432e7
Make directRenderScript the default (#11791)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-08-28 22:50:50 +08:00
Emanuele Stoppa
cb356a5db6
feat(i18n): expand fallback system (#11677)
* feat(i18n): expand fallback system

* rebase

* apply feedback

* better changeset

* update tests too

* apply feedback

* Update .changeset/blue-pens-divide.md

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>

* update docs

* nitpick

* Apply suggestions from code review

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

* Update .changeset/blue-pens-divide.md

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

* Apply suggestions from code review

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

* Update .changeset/blue-pens-divide.md

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

* fix regression

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-08-28 12:16:43 +01:00
Emanuele Stoppa
1c54e63327
feat: add sync variant (#11729)
* feat: add `sync` variant

* fix build

* Update .changeset/afraid-apricots-develop.md

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

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-08-28 12:16:06 +01:00
Luiz Ferraz
d6611e8bb0
Add support for LibSQL remote (#11385)
* Add support for remote LibSQL

* Add support for local memory DB

* Add some tests

* Add push support

* Fix switch cascading

* Update .changeset/healthy-boxes-poke.md

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

* Update packages/db/src/runtime/db-client.ts

[skip ci]

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

* Use independent env vars for LibSQL and Studio backends

* Expand comment regarding missing table

* Apply suggestions from code review

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-08-28 12:15:33 +01:00
Martin Trapp
62b0d20b97
Extends virtual module astro:transitions/client to export swapFunctions (#11708)
* extend virtual module astro:transitions/client to exports swapFunctions

* use virtual module in e2e tests

* Update .changeset/new-monkeys-sit.md

* Update .changeset/new-monkeys-sit.md

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

* Update new-monkeys-sit.md

* Update swap-functions.ts

restoreFocus() bindings are now returned by saveFocus() and do not make sense anymore as a member of the swapFunctions object

* take over suggestion

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

* Update .changeset/new-monkeys-sit.md

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

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-08-28 12:09:49 +01:00
Phil
cce0894534
feat: support setting timeout for client:idle (#11743)
* feat: support setting timeout for `client:idle`

* tst: add client:idle timeout e2e test

* Update .changeset/clever-emus-roll.md

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

* Update .changeset/clever-emus-roll.md

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

* nit: we wait for times, not values!

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-08-28 12:09:19 +01:00
Houston (Bot)
5af8b4f1cb
[ci] release (#11835)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-28 12:51:43 +02:00
Phil
5f2536b51d
fix: handle preact signals in array correctly (#11834)
* fix: handle preact signals in array correctly

* feat: serialize signals in object
2024-08-28 11:41:35 +01:00
Kevin
4e5cc5aadd
Add base to paginate (#11253)
* add base to `paginate()`

* update tests

* remove condicional cache

* add missing base param

* add missing leading slash in tests

* remove default

* fix: add missing trailing slash in pagination root test

* Add feedback from code review

* add changeset

* rebase and run format code

* Update .changeset/twenty-cobras-push.md

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

* add code diff

* fix rebase

* Apply suggestions from code review

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

* chore: merge next

* update changeset

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-08-28 10:31:32 +01:00
Bjorn Lu
88ef1d0e77
Fix MDX layout style ordering (#11818) 2024-08-28 10:52:13 +08:00
Matthew Phillips
a83e362ee4
Prevent usage of astro:content in the client (#11827)
* Prevent usage of astro:content in the client

* Fix build errors

* Update .changeset/neat-dots-hear.md

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

* Throw an AstroError

* Just throw

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-08-27 16:35:44 -04:00
HiDeoo
ed7bbd990f
fix(markdoc): use astro components defined with extends (#11846) 2024-08-27 16:49:04 +01:00
Matthew Phillips
7315050fc1
Deprecate Astro.glob (#11826)
This deprecated Astro.glob, see the changeset for details.
2024-08-27 10:51:15 -04:00
Emanuele Stoppa
05139ef8b4
feat(next): add Astro.routePattern (#11698)
* feat: add `Astro.route`

* change logic and add test

* rebase

* rebase

* rename to `Astro.routePattern`

* chore: added more tests

* update test

* add leading slash
2024-08-27 15:45:16 +01:00
Matt Kane
45b599c4d4
fix: ensure vite is not imported by runtime utils (#11847) 2024-08-27 13:12:50 +01:00
Eduardo Cereto Carvalho
2bb72c6396
docs: Content Layer API Example small fix (#11814)
* Update astro.ts

small fix to example

* Create odd-otters-look.md

---------

Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-08-27 11:17:30 +01:00
Ben Holmes
20d47aa85a
Actions: give better guidance when a Response is returned by an Action (#11828)
* feat: add error for invalid handler data

* refactor: remove redirect from ctx object

* chore: changeset

* chore: fix redirect codes

* fix: move redirect out of actionApiContext constructor

* refactor(test): reuse redirects const

* wip: bump timeouts

* wip: more bumps
2024-08-26 17:53:51 -04:00
Yuta Osawa
f1df1b3b46
Prevent Partytown integration from inserting a 'null' string into the body (#11829) 2024-08-26 21:36:35 +08:00
Stephan de Vries
1ffaae04cf
Fix typo in MissingImageDimension error message (#11842)
* Fix typo in `MissingImageDimension` error message

* Update .changeset/perfect-socks-dress.md

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-08-26 14:28:16 +01:00
voidfill
497324c4e8
fix(astro): Prevent prefetching of same urls with different hashes (#11713)
* fix(astro): prevent prefetching of the same urls with different hashes

* add changeset

* Update packages/astro/src/prefetch/index.ts

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>

* Update .changeset/nasty-ladybugs-whisper.md

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-08-26 12:28:27 +01:00
Bjorn Lu
6fcaab84de
Make vite-plugin-fileurl a pre plugin (#11822) 2024-08-25 20:23:07 +08:00
Houston (Bot)
5966accdc1
[ci] release (alpha) (#11787)
* [ci] release (alpha)

* Update packages/astro/CHANGELOG.md

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

* links to existing experimental docs instead of ones that don't exist yet!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-08-23 12:46:18 -05:00
Emanuele Stoppa
7c0ccfc269
feat: change default value of checkOrigin (#11788)
* feat: change default value of `checkOrigin`

* feedback

* feedback

* change `checkOrigin`
2024-08-23 16:07:20 +01:00
Matthew Phillips
e9e2139bf7
Remove legacy route prioritization (#11798)
* Remove legacy route prioritization

* oops

* Add a changeset

* Remove bad merge stuff
2024-08-23 08:58:43 -05:00
Houston (Bot)
cf65476b27
[ci] release (#11817)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-22 16:56:59 -04:00
Ben Holmes
3f7630afd6
Actions: fix bad action result for actions with empty return value (#11813)
* fix: correctly handle empty action response

* fix(test): add logout button test

* chore: changeset
2024-08-22 07:02:48 -04:00
Ben Holmes
62e97a20f7
Actions: Allow effect chaining on form input validators (#11809)
* feat: support effects on form validators

* feat: support object passthrough on form input

* feat: support infinitely nested effects with simplified types

* feat(test): ensure arbitrary schemas work with form data

* chore: changeset

* fix: support zod pipe()
2024-08-22 05:51:24 -04:00
Ben Holmes
260c4be050
Actions: expose ActionAPIContext (#11812)
* feat: expose ActionAPIContext

* feat: expose ActionAPIContext
2024-08-22 05:51:06 -04:00
Houston (Bot)
22ceb48302
[ci] release (#11796)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-21 17:08:38 -04:00
Chris Swithinbank
9f943c1344
Fix file loader for JSON object files (#11801)
* Add `filePath` to `file()` loader entries when JSON file is an object

* Add changeset
2024-08-21 12:17:52 +01:00
Florian Lefebvre
ea71b90c9c
feat(next): make astro:env stable (#11679)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-08-21 08:38:00 +02:00
Ben Holmes
3691a626fb
[Actions] Fix middleware warning static mode (#11794)
* fix: remove static usage warning with isPrendered flag

* fix(test): cookie is empty for prerendered routes in dev

* chore: add test route

* chore: changeset
2024-08-20 14:41:44 -04:00
Matthew Phillips
4cd6c43e22
Use GET and preload links on Server Islands (#11732)
* Use GET and preload links on Server Islands

Use origin/next

Remove since

* Add test to verify large islands work

* Update based on feedback

* Merge conflict fixed

* Update test
2024-08-20 13:53:04 -04:00
Houston (Bot)
7e2f142a5a
[ci] release (#11739)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-20 16:35:33 +02:00
Sarah Rainsberger
41c3fcb618
[docs] update link to astro:env RFC (#11790)
* [docs] revert link to astro:env RFC

* Create fair-trees-crash.md

* typo fix
2024-08-20 16:10:17 +02:00
Erika
9a2aaa01ea
fix(assets): Remove TLA by making compiledContent async (#11782)
* fix(assets): Remove TLA by making compiledContent async

* fix: actually use the functions I just added lol

* chore: changeset
2024-08-20 15:52:08 +02:00
Erika
cfa6a47ac7
feat: remove the squoosh image service (#11770)
* feat: remove the squoosh image service

* fix: build

* chore: changeset
2024-08-20 15:12:48 +02:00
Princesseuh
787fed8504
Merge branch 'main' into next 2024-08-20 14:29:50 +02:00
Erika
c6622adaeb
Deprecate the Squoosh image service (#11780) 2024-08-20 14:28:52 +02:00
Bjorn Lu
6617491c3b
Cleanup unused JSX code (#11741)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-08-20 17:39:51 +08:00
Emanuele Stoppa
86a33915ff
fix: adapter features messaging (#11773)
* fix: adapter features messaging

* Apply suggestions from code review

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

* Update .changeset/long-months-burn.md

Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
2024-08-20 07:45:59 +01:00
Matthew Phillips
fc81b01bcd
Prevent race condition in Vercel adapter on Node 18 (#11783) 2024-08-19 15:45:02 -04:00
Houston (Bot)
f239242d90
[ci] release (alpha) (#11627)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-19 14:37:39 -04:00
Florian Lefebvre
c6400ab99c
fix: injectTypes path (#11774) 2024-08-19 20:04:51 +02:00
Bjorn Lu
b67742961a
Disable server.ws vite config for loading config files (#11744) 2024-08-19 22:52:42 +08:00
Matthew Phillips
8a5351737d
Remove functionPerRoute option (#11714)
* Remove functionPerRoute option

* Remove more code

* Remove unused test util

* Linting

* Update tests to reflect new structure

* Add a changeset

* Update plugin

* Remove unused import
2024-08-19 10:31:55 -04:00
Florian Lefebvre
49650a4555
fix: astro:env sync error in content config (#11771) 2024-08-19 16:01:31 +02:00
Princesseuh
7ffcae1906
Merge branch 'main' into next 2024-08-19 11:49:19 +02:00
Princesseuh
d37390ea13
Merge branch 'main' into next 2024-08-19 11:48:40 +02:00
Bjorn Lu
d12dcbff60
Fix create-astro initial git commit (#11766) 2024-08-19 16:30:45 +08:00
Bjorn Lu
89bab1e707
Reduce prerender dynamic value warning false positives (#11745) 2024-08-16 23:03:27 +08:00
Matthew Phillips
5ea02b12fd
Deprecate the functionPerRoute option (#11728)
* Deprecate the functionPerRoute option

* Update .changeset/weak-dancers-beam.md

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-08-16 08:41:10 -04:00
Erika
d74617cbd3
Refactor/types (#11715)
* refactor: types

* feat: refactor types

* chore: organize imports

* fix: remaining references

* docs: types

* refactor: small changes

* chore: changeset
2024-08-16 14:07:10 +02:00
Princesseuh
40b95a164d
Merge branch 'main' into next 2024-08-16 12:00:44 +02:00
Florian Lefebvre
2df49a6fb4
feat: simplifies sync paths (#11730) 2024-08-16 09:27:21 +02:00
Bjorn Lu
423614ebb6
Fix MDX stack trace location with frontmatter (#11717) 2024-08-16 12:09:20 +08:00
Houston (Bot)
0109690c3b
[ci] release (#11734)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-16 00:34:37 +08:00
Bjorn Lu
7c6349beca
Fix astro upgrade changeset (#11735) 2024-08-16 00:32:53 +08:00
Bjorn Lu
391324df96
Revert parseArgs change (#11733) 2024-08-16 00:27:08 +08:00
Houston (Bot)
91d36fa36b
[ci] release (#11719)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-15 16:06:43 +01:00
Florian Lefebvre
3c2f93b66c
fix: content types sync in dev (#11727)
Co-authored-by: Princesseuh <3019731+Princesseuh@users.noreply.github.com>
2024-08-15 16:52:15 +02:00
Matt Kane
6c1560fb0d
fix: separate data store into mutable and immutable versions (#11725)
* fix: separate data store into mutable and immutable versions

* Add jsdoc
2024-08-15 15:26:00 +01:00
Matthew Phillips
35af73aace
Prevent errant HTML from crashing server islands (#11692) 2024-08-15 08:04:02 -04:00
Houston (Bot)
40a1b3002c
[ci] release (#11699)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-15 10:48:37 +01:00
Florian Lefebvre
f4057c18c9
fix: content types sync in dev (#11716)
* fix: content types sync in dev

* fix: test
2024-08-15 11:08:18 +02:00
Matthew Phillips
791d809cbc
Server Islands - Handle base + trailingSlash ignore (#11712)
* Server Islands - Handle base + trailingSlash ignore

* Add a changeset
2024-08-15 09:34:25 +01:00
Matthew Phillips
3d8ae767fd
Prevent externalized adapters from breaking build (#11709)
* Prevent externalized adapters from breaking build

* Add a changeset

* Implement in both types of build plugins

* linting :(
2024-08-14 13:30:31 -04:00
Princesseuh
e853526c39
Merge branch 'main' into next 2024-08-14 12:52:42 +02:00
Matt Kane
a79a8b0230
Content Layer (#11360)
* Empty commit

* Changeset

* feat: add Content Layer loader (#11334)

* wip

* wip

* wip

* Update demo

* Add meta

* wip

* Add file loader

* Add schema validation

* Remove log

* Changeset

* Format

* Lockfile

* Fix type

* Handle loading for data store JSON

* Use rollup util to import JSON

* Fix types

* Format

* Add tests

* Changes from review

* fix: sync content layer in dev (#11365)

* wip

* wip

* wip

* Update demo

* Add meta

* wip

* Add file loader

* Add schema validation

* Remove log

* Changeset

* Format

* Lockfile

* Fix type

* Handle loading for data store JSON

* Use rollup util to import JSON

* Fix types

* Format

* Add tests

* Changes from review

* Sync content layer in dev

* feat: add typegen for loaders (#11358)

* fix: watch for content layer changes (#11371)

* fix: watch for content layer changes

* Add test

* feat: adds simple loader (#11386)

* wip

* Add simple loader

* Fix type guard

* Tighten loader schema

* Add loader function to type

* Reinstall vitest

* feat: add glob loader (#11398)

* feat: add glob loader

* Enable watching and fix paths

* Store the full entry object, not just data

* Add generateId support

* Fix test

* Rename loaders to sync

* Refacctor imports

* Use getEntry

* Format

* Fix import

* Remove type from output

* Windows path

* Add test for absolute path

* Update lockfile

* Debugging windows

* Allow file URL for base dir

* Reset time limit

* feat: add markdown rendering to content layer (#11440)

* feat: add glob loader

* Enable watching and fix paths

* Store the full entry object, not just data

* Add generateId support

* Fix test

* Rename loaders to sync

* Refacctor imports

* Use getEntry

* Format

* Fix import

* Remove type from output

* Windows path

* Add test for absolute path

* Update lockfile

* Debugging windows

* Allow file URL for base dir

* Reset time limit

* wip: add markdown rendering to content layer

* use cached entries

* CLean up types

* Instrument more of the build

* Add digest helper

* Add comments

* Make image extraction work

* feat: image support for content layer (#11469)

* wip

* wip

* Add image to benchmark

* Stub assets if missing

* Resolve assets in data

* Ignore virtual module

* Format

* rm log

* Handle images when using cached data

* Fix CCC

* Add a comment

* Changes from review

* Format

* Use relative paths for asset files

* Pass all md props to getImage

* Ensure dotastro dir exists

* Fix tests

* Changes from review

* Don't use temp array in getcollection

* Add error handling

* Format

* Handle paths that are already relative

* Dedupe sync runs

* Fix syncing in dev

* Changes from review

* Windows paths ftw

* feat(content-layer): support references in content layer (#11494)

* Support references in content layer

* Fix utf8 rendering

* Warn for invalid entries

* Fix test

* lol windows paths

* Remove assertion

* chore: fix content layer types (#11527)

* Add experimental_content type

* Fix import

* Make data store methods generic

* fix loader types

* Lockfile

* Clean content layer with `--force` (#11541)

* Clearn content layer with `--force`

* Add tests

* Document --force flag

* Fixes to content layer render types (#11558)

* Lockfile

* feat: use devalue to serialize content layer data (#11562)

* feat: use devalue to serialize content layer data

* Fix import

* Use devalue stringify

* Unused import

* Propagate error messages correctly

* Support --force flag in sync and dev (#11581)

* Support --force flag in sync and dev

* Fix test

* Separate render function and merge content layer types (#11579)

* Separate render function and merge content layer types

* Changes from review

* fix: clear content layer cache if config has changed (#11591)

* fix: clear content layer cache if config has changed

* Add test

* Watch config

* Change from review

* fix: skip glob files in content dir (#11622)

* fix: skip glob files in content dir

* Changes from review

* Log pattern

* Refactor content layer into shared instance (#11625)

* Refactor content layer into shared instance

* Clean up when testing

* Handle cleanup

* fix: support filters in content layer getCollection (#11631)

* Throw when using deprecated getEntryByX functions with content layer (#11637)

* Updates to content layer types and jsdocs (#11643)

* Add hot key to reload content layer (#11626)

* Add hot key to reload content layer

* Fix filename

* Remove cli message

* Update example

* Change key to "s"

* feat: handle simple mdx rendering (#11633)

* feat: handle simple mdx rendering

* cleanup

* feedback

* fix regression

* remove log

* flip condition

* update tests

* log collections to understand the error

* let's try this alternative

* try parallel test to understand the issue

* chore: use a new fixture to fix tests

* rebase and docs

* fix regressions

* remove old code

* address feedback

* rename param

* log error

* rebase

* chore: try a different cache dir to solve the error test

* fix invalidation of the module when there's no store available

* address suggestion

* run formatter

* update lock file

* Lint

* Add experimental content layer flag (#11652)

* Add experimental content layer flag

* Syntax and format

* Aside

* Format

* Reset content config between runs

* Update fixture

* Update terminology

* Lint

* wut

* Normalize render function return value (#11663)

* Add markdoc support to content layer (#11664)

* Add markdoc support to content layer

* Switch test to cheerio

* Update benchmarks

* update lock file

* Update content layer flag docs (#11682)

* Update content layer flag docs

* Apply suggestions from code review

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

* More markdoc

* Typo

* Apply suggestions from code review

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

* Update

---------

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

* Add changeset for content layer experimental release (#11644)

* Add changeset for content layer experimental release

* Update changeset

* Update .changeset/smooth-chicken-wash.md

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

---------

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

* feat: injectTypes (#11551)

* feat: make inline config 1st arg

* fix: run config done in sync

* feat: start working on injectTypes

* feat: write files

* feat: adapt core features

* feat: migrate db to injectTypes

* feat: special db handling

* feat: update settings instead of workarounds

* fix: create dotAstroDir

* feat: refactor sync tests

* fix: path

* fix: paths

* chore: add comments

* feat: overwrite content file if exists

* chore: remove unused db env related code

* feat: use dotAstroDir for settings

* chore: simplify astro env sync

* feat: use dotAstroDir for preferences

* feat: handle db in integration api

* chore: reorganize

* feat: format

* feat: add test

* Discard changes to examples/basics/astro.config.mjs

* Discard changes to examples/basics/package.json

* Discard changes to pnpm-lock.yaml

* chore: remove test files

* feat: update examples dts

* fix: dts

* chore: changesets

* fix: indentation

* Apply suggestions from code review

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

* Apply suggestions from code review

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

* chore: format

* Update packages/astro/src/integrations/hooks.ts

* Update .changeset/mean-horses-kiss.md

* feat: remove formatting

* feat: handle fs errors

* feat: remove astro:db special path handling

* feat: add fs error

* Update packages/astro/src/content/types-generator.ts

* Update .changeset/mean-horses-kiss.md

* Update errors-data.ts

* Update .changeset/mean-horses-kiss.md

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

* Update .changeset/mean-horses-kiss.md

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

---------

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>

* Add file generation and flag for content intellisense (#11639)

* feat: add type to infer input type of collection

* refactor:

* feat: generate json schema for content too

* feat: generate a manifest of all the collections

* refactor: unnecessary type

* fix: only add content collections to manifest

* chore: changeset

* fix: generate file URLs

* fix: flag it properly

* fix: save in lower case

* docs: add jsdoc to experimental option

* nit: move function out

* fix: match vscode flag name

* Update packages/astro/src/@types/astro.ts

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

* Update packages/astro/src/@types/astro.ts

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

* Update serious-pumas-run.md

* test: add tests

* Add content layer support

* Apply suggestions from code review

* fix: test

* Update .changeset/serious-pumas-run.md

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

* Apply suggestions from code review

* Remove check for json

---------

Co-authored-by: Matt Kane <m@mk.gg>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* nit: use same filesystem error as injectTypes

* fix: code component was missing support for meta string (#11605)

* fix: code component was missing support for meta string

Fixed #11604

* Create odd-buttons-pay.md

* <Code>: add reference link for meta prop

* Apply suggestions from code review

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

* Update .changeset/odd-buttons-pay.md

* Update .changeset/odd-buttons-pay.md

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

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>

* Deprecates exporting prerender with dynamic values (#11657)

* wip

* done i think

* Add changeset

* Use hook instead

* Reorder hooks [skip ci]

* Update .changeset/eleven-pens-glow.md

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

* Fix run

* Fix link

* Add link

Co-authored-by: Sarah Rainsberger <sarah11918@users.noreply.github.com>

* More accurate migration [skip ci]

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Sarah Rainsberger <sarah11918@users.noreply.github.com>

* Use node parseArgs instead of yargs-parser and arg (#11645)

* wip

* done

* Add changeset

* Format

* Update

* Fix houston

* Fix test

* Fix test

* [ci] format

* resolve conflict

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Julien Cayzac <jcayzac@users.noreply.github.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah11918@users.noreply.github.com>
Co-authored-by: Bjorn Lu <ematipico@users.noreply.github.com>
2024-08-14 11:49:19 +01:00
Bjorn Lu
849e4c6c23
Use node parseArgs instead of yargs-parser and arg (#11645)
* wip

* done

* Add changeset

* Format

* Update

* Fix houston

* Fix test

* Fix test
2024-08-14 11:05:50 +01:00
Bjorn Lu
a23c69d0d0
Deprecates exporting prerender with dynamic values (#11657)
* wip

* done i think

* Add changeset

* Use hook instead

* Reorder hooks [skip ci]

* Update .changeset/eleven-pens-glow.md

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

* Fix run

* Fix link

* Add link

Co-authored-by: Sarah Rainsberger <sarah11918@users.noreply.github.com>

* More accurate migration [skip ci]

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Sarah Rainsberger <sarah11918@users.noreply.github.com>
2024-08-14 11:05:19 +01:00
Julien Cayzac
d3d99fba26
fix: code component was missing support for meta string (#11605)
* fix: code component was missing support for meta string

Fixed #11604

* Create odd-buttons-pay.md

* <Code>: add reference link for meta prop

* Apply suggestions from code review

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

* Update .changeset/odd-buttons-pay.md

* Update .changeset/odd-buttons-pay.md

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

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-08-14 11:04:36 +01:00
Houston (Bot)
6bb001476c
[ci] release (#11686)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-14 09:14:23 +01:00
Emanuele Stoppa
c7bda4cd67
fix(actions): save error stack trace in memory (#11689) 2024-08-13 10:47:12 -04:00
Bjorn Lu
e90f5593d2
Fix attribute rendering for boolean values (take 2) (#11660)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Armand Philippot <59021693+ArmandPhilippot@users.noreply.github.com>
2024-08-13 22:33:13 +08:00
Matthew Phillips
932bd2eb07
Encrypt server islands props (#11535)
* Encrypt server islands props

* Comment on the hex algo

* Use @oslojs/encoding

* Rename functions

* Add base to test

* Remove old tests no longer valid

* Run test locally

* Make sure adapters run before manifest

* Add a changeset

* Adjust test adapter

* don't assume adapter is at root

* Add a changeset

* Updates on review comments

* Update oslo

* Add better description of Node adapter change
2024-08-13 08:58:47 -04:00
Princesseuh
5a3c1d1339
chore: update tag 2024-08-13 12:21:26 +02:00
Billy Le
dc0a297e2a
Set action input default values from zod if FormData key is not present (#11655)
* fix: remove duplicate while loop. use correct boolean values on validation

* chore: rephrase changeset
2024-08-13 11:21:12 +01:00
Emanuele Stoppa
34da907f3b
fix: make semicolon optional when detecting prerender option (#11678)
* fix: make semicolon optional when detecting `prerender` option

* trim to remove possible carriage return

* Apply suggestions from code review

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-08-13 11:20:12 +01:00
Princesseuh
7dc0680d60
Merge branch 'main' into next 2024-08-10 01:40:54 +02:00
Houston (Bot)
8118120e91
[ci] release (#11654)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-09 17:49:10 -04:00
Ben Holmes
f31d4665c1
Actions: auto-redirect action response to avoid "confirm form resubmission" dialog (#11603)
* feat: redirect with result to avoid resubmission dialog

* fix: use standard POST for react forms

* fix(test): handle redirect responses

* refactor: actionresultbehavior -> disableredirect

* refactor: next() -> throw internal error

* fix(test): bad referer link

* refactor: followRedirect -> followExpectedRedirect

* refactor: remove encryption TODO

* feat: changeset

* chore: whitespace

* feat: laravel note

* refactor: clean up cookie -> action payload

* refactor: actionsinternal -> actionpayload

* refactor: use _astroAction const

* refactor: actionRedirect string as const

* refactor: simplify error check

* chore: remove stray console log

* refactor: only delete cookies on error

* fix: check cookie after handling POST requests

* chore: remove unused tgz

* Revert "fix: check cookie after handling POST requests"

This reverts commit 607f90f07b.

* Revert "refactor: only delete cookies on error"

This reverts commit 52aab84b6b.
2024-08-09 17:17:06 -04:00
Bjorn Lu
83a2a64841
Update to new shiki token names (#11661)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-08-09 21:52:21 +08:00
Bjorn Lu
7adb350a37
Prevent throwing in react and solid component checks (#11624) 2024-08-09 20:01:25 +08:00
Ben Holmes
13b912a870
Actions: fix missing orThrow type when input is omitted (#11658)
* fix: orThrow missing when input is omitted

* chore: changeset
2024-08-08 11:53:33 -04:00
Florian Lefebvre
32be5494f6
chore: improve astro:env docs (#11653)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-08-08 14:34:55 +02:00
Houston (Bot)
6b99523c3f
[ci] release (#11602)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-08 07:52:00 -04:00
Ben Holmes
589d35158d
Actions: remove "action used with get" error (#11648)
* fix: remove "action used with get" error

* chore: remove unused import

* fix(test): does not throw on GET

* chore: changeset
2024-08-08 07:43:25 -04:00
Matthew Lee
9aaf58c133
Consistent file hashes (#11628)
* Fix css plugin having inconsistent builds in different environments

Astro's css plugin generates chunk ids that include a hash of all of
the chunk's parent ids.  These ids are currently the absolute file paths
of the parent files.  The generated chunk ids are then inserted into
those pages as import statements.

Because these import statements include a hash based on these absolute
file paths, this causes rollup to generate different hashes for those
pages when a build is run in different environments.  The exact same
project will produce identical assets with different filenames when
built on different machines, or when built from different directories
on the same machine, etc.

To fix this, I've stripped out the working directory of these file paths
before they are added to the hash.  This means that the hash will still
change if the files referencing it chacnge (which I believe is the
intended behavior), but will be stable if the entire project is built
in different environments.

* add changeset

* fixup! use settings.config.root and vite's normalizePath

I've chosen to update the function signature of shortHashedName
to match createSlugger's, so it now accepts the settings object
and returns the actual hashing function.  This way, createSlugger's
function signature doesn't need to update to needlessly accept
an additional argument.

* fixup! remove unused import

* Update .changeset/young-pillows-shave.md

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>

* fixup! use fileURLtoPath

---------

Co-authored-by: Matt Lee <mdlee.md@gmail.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-08-07 15:55:27 +01:00
Ben Holmes
2716f52aae
Actions: fix 500 on empty object for Vercel serverless (#11634)
* fix: only set content-type when body is defined

* feat(test): content-type is omitted

* chore: changeset
2024-08-06 11:54:42 -04:00
Bjorn Lu
bbd8bfda92
Update changeset base branch (#11632) 2024-08-06 12:51:25 +02:00
Princesseuh
a7dba90e30
chore: enter pre mode 2024-08-06 11:32:54 +02:00
Emanuele Stoppa
b6fbdaa94a
fix(cli): hardcoded supported Node.js version (#10742)
* fix(cli): hardcoded supported Node.js version

* Create chatty-teachers-sit.md

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-08-06 11:23:22 +02:00
Ben Holmes
81d7150e02
Actions: Add devalue for serializing complex values (#11593)
* wip: move getActionResult setup to render

* feat: serialize action data for edge

* refactor: serializeActionResult util

* feat: introduce devalue for body parsing

* refactor: orthrow -> main

* feat(test): Date and Set

* refactor: move getAction to separate file for bundling

* docs: changeset

* Revert "refactor: move getAction to separate file for bundling"

This reverts commit ef2b40991f90ff64c063cb4364eb2affcb2328c3.

* Revert "Revert "refactor: move getAction to separate file for bundling""

This reverts commit 40deaeda1dd350b27fa3da994a7c37005ae7a187.

* fix: actions import from client

* feat: add support for URL objects

* refactor: new isActionError utility

* refactor: reuse isInputError in fromJson

* fix: use INTERNAL_SERVER_ERROR for unknown errors
2024-08-05 08:22:38 -04:00
Abu Bakr
196092ae69
fix: audit incorrectly flagging images as above the fold (#10891) (#11617)
* fix: audit incorrectly flagging images as above the fold (#10891)

Previously used lement.offsetTop to find the y position of the image, which does not work when the element parent has a position: relative property.
Instead, this uses lement.getBoundingClientRect().y top get real y position of the image.
There's one issue though, which is that getBoundingClientRect returns the position relative to the user's viewport, not the absolute position.
So, add window.scrollY to the value to cancel that effect out, and you have the element's absolute position.

https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect
https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY

* chore: add changeset
2024-08-05 13:29:20 +02:00
Armand Philippot
09ec2cadce
fix(astro:content): add deprecated to getEntryBySlug & getDataEntryById (#11600)
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2024-08-02 16:31:32 +02:00
Houston (Bot)
2abbc281b3
[ci] release (#11590)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-02 09:18:47 -04:00
Ben Holmes
a65ffe314b
Actions: Remove async local storage dependency (#11584)
* refactor: move from Async local storage to .bind()

* feat: Astro.callAction for server calls

* feat(e2e): update server call

* feat(types): test callAction types

* fix: callAction context on rewrite

* feat: called from server error

* chore: remove store.ts file

* chore: remove getApiContext client stub

* chore: changeset

* fix: src -> dist import

* refactor: move content collection errors together

* fix: move rfc link to hint
2024-08-01 08:24:22 -04:00
Houston (Bot)
4474887937
[ci] release (#11578)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-01 11:55:37 +02:00
Emanuele Stoppa
45ad326932
feat: stabilise the rewrite APIs (#11542)
* feat: stabilise the rewrite APIs

* chore: rewrite changeset

* oops

* Apply suggestions from code review

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

* chore: fix linting

* fix: update exemple

* code formatting

* edit changeset code examples

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-07-31 12:51:13 +02:00
Emanuele Stoppa
a62345fd18
feat: log slow pages in red (#11507)
* fix: log slow pages in red

* apply feedback

* chore: update based on feedback

* Update .changeset/spotty-rice-shake.md

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

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-07-31 12:37:08 +02:00
Alexander Niebuhr
e5e2d3ed30
chore: unflag contentCollectionJsonSchema (#11379)
* chore: unflag contentCollectionJsonSchema

* chore: improve json schema generation

* remove config option

* Update tasty-spoons-double.md

* Update tasty-spoons-double.md

* Update .changeset/tasty-spoons-double.md

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

* Update .changeset/tasty-spoons-double.md

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

* Update .changeset/tasty-spoons-double.md

* revert whitespace changes

* revert whitespace changes

* revert whitespace changes

* revert whitespace changes

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-07-31 12:17:38 +02:00
Houston (Bot)
49db00444e
[ci] release (#11524)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-30 11:54:54 -04:00
Ben Holmes
1c3265a8c9
Actions: Make .safe() the default return value (#11571)
* feat: new orThrow types

* fix: parens on return type

* feat: switch implementation to orThrow()

* feat(e2e): update PostComment

* fix: remove callSafely from middleware

* fix: toString() for actions

* fix(e2e): more orThrow updates

* feat: remove progressive enhancement from orThrow

* fix: remove _astroActionSafe handler from react

* feat(e2e): update test to use safe calling

* chore: console log

* chore: unused import

* fix: add rewriting: true to test fixture

* fix: correctly throw for server-only actions

* chore: changeset

* fix: update type tests

* fix(test): remove .safe() chain

* docs: use "patch" with BREAKING CHANGE notice

* docs: clarify react integration in changeset
2024-07-30 11:42:52 -04:00
Ben Holmes
84189b6511
Actions: New fallback behavior with action={actions.name} (#11570)
* feat: support _astroAction query param

* feat(test): _astroAction query param

* fix: handle _actions requests from legacy fallback

* feat(e2e): new actions pattern on blog test

* feat: update React 19 adapter to use query params

* fix: remove legacy getApiContext()

* feat: ActionQueryStringInvalidError

* fix: update error description

* feat: ActionQueryStringInvalidError

* chore: comment on _actions skip

* feat: .queryString property

* chore: comment on throw new Error

* chore: better guess for "why" on query string

* chore: remove console log

* chore: changeset

* chore: changeset
2024-07-30 11:04:10 -04:00
Bryan Wood
1953dbbd41
actions: check result.data is not undefined instead of truthy (#11559)
* actions: check result.data is not undefined instead of truthy

* add changeset

* Update .changeset/tasty-rockets-jog.md

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-07-30 10:32:36 -04:00
Erika
e3f29d416a
fix: highlight line with error in the error overlay (#11574)
* fix: highlight line with error in the error overlay

* chore: changeset

* Update packages/astro/e2e/errors.test.js

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-07-30 15:26:51 +02:00
Erika
0dcef3ab17
fix: check before writing to errors (#11566)
* fix: check before writing to errors

* fix: try using try catches

* test: add

* chore: changeset

* nit: test name
2024-07-29 17:44:59 +02:00
Matt Kane
d27cf6df7b
fix(create-astro): log fetch errors (#11567) 2024-07-29 13:49:01 +01:00
Matthew Phillips
504c383e20
Fix server islands with trailingSlash: always (#11529)
* Fix server islands with trailingSlash: always

* Fix test missing trailingslash

* Prepend base to the server island URL

* Add tests for base
2024-07-26 13:54:10 -04:00
Armand Philippot
904f1e535a
fix(types): change page.size to 10 in JSDoc comment (#11561) 2024-07-26 21:16:26 +08:00
Emanuele Stoppa
02c85b5412
fix: cache collections using file name too (#11553)
* fix: cache collections using file name too

* oops
2024-07-25 18:14:08 +01:00
Reuben Tier
602c5bf05d
Fix astro add for prerelease packages (#11548)
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Bjorn Lu <34116392+bluwy@users.noreply.github.com>
2024-07-25 12:04:46 +02:00
Armand Philippot
7f26de906e
fix(types): update Astro.redirect JSDoc comment (#11546)
* fix(types): update Astro.redirect JSDoc comment

* add changeset
2024-07-24 19:54:21 +01:00
Emanuele Stoppa
80681318c6
fix(actions): resolve actions when there aren't user actions (#11525)
* fix(actions): pass path as input

* revert code

* chore: apply suggestions
2024-07-22 13:15:34 +01:00