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
Bjorn Lu
dfbca06dda
Exclude hoisted scripts and styles from raw imports ( #11509 )
2024-07-22 16:10:48 +08:00
Houston (Bot)
a6c4e67544
[ci] release ( #11504 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-19 10:06:49 -04:00
Malte Ubl
ca335e1dc0
Fix an XSS in Server Islands. ( #11508 )
...
* Fix an XSS in Server Islands.
Discussed with @FredKSchott that this is OK to disclose since Server Islands are still experimental.
It's generally not safe to use `JSON.stringify` to interpolate potentially attacker controlled data into `<script>` tags as JSON doesn't escape `<>"'` and so one can use it to break out of the script tag and e.g. make a new one with controlled content.
See https://pragmaticwebsecurity.com/articles/spasecurity/json-stringify-xss
* Format
* Create smart-snakes-promise.md
* Switch to manual encoding
---------
Co-authored-by: Matt Kane <m@mk.gg>
2024-07-19 15:02:14 +01:00
Sarah Rainsberger
026e8baf33
[docs] fix typos in config reference ( #11506 )
...
* [docs] fix typos in config reference
* Create empty-onions-buy.md
2024-07-19 12:57:23 +01:00
Emanuele Stoppa
8ff7658001
fix: better logging for rewrites ( #11505 )
...
* fix: better logging for rewrites
* fix: better logging for rewrites
* apply feedback
2024-07-19 12:45:10 +01:00
Martin Trapp
4db78ae046
Adds missing export ( #11501 )
2024-07-19 07:57:30 +01:00
Houston (Bot)
745ce44dd3
[ci] release ( #11492 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-18 23:30:35 +02:00
Erika
4e142d38cb
fix: inferRemoteSize not being exported in the type ( #11500 )
2024-07-18 23:16:36 +02:00
Abdulrahman Alfawal
53ccd206f9
Hide the dev toolbar on print ( #11496 )
...
* Hide the dev toolbar on print
* Run checkset
* Add a test case
2024-07-18 23:14:57 +02:00
Emanuele Stoppa
9c0c8492d9
feat(container): client hydration ( #11486 )
...
* fix: prevent client hydration when rendering via Container API
* revert change that is not needed
* skip client directives via option
* reword changeset
* Fix types of react server.d.ts
* add new API
---------
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2024-07-18 16:28:52 +01:00
Houston (Bot)
aa05be3313
[ci] release ( #11481 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-18 16:05:23 +01:00
Matthew Phillips
fe3afebd65
Fix Server Islands in Vercel ( #11491 )
...
* Fix Server Islands in Vercel
* Add a changeset
* Get server islands pattern from the segments
* Move getPattern so it can be used at runtime
* Fix build
2024-07-18 16:03:39 +01:00
Emanuele Stoppa
061f1f4d0c
fix: make root serializable ( #11489 )
...
* fix: use config root to build default routes
* fix: make root serializable
* fix regression
* Use stringified URLs
* Fix unit tests
---------
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2024-07-18 14:44:40 +01:00
Bjorn Lu
6ad02b5902
Fix Svelte 5 slots change ( #11490 )
...
* Fix Svelte 5 slots change
* Use alternative
* Fix Svelte 5 slots
2024-07-18 14:32:39 +01:00
Erika
7c9ed71bf1
feat: noSync flag for astro check ( #11482 )
2024-07-18 11:45:25 +02:00
Florian Lefebvre
ca969d538a
fix: incorrect astro:env runtime error ( #11479 )
...
* fix: incorrect astro:env runtime error
* fix: import
* feat: type check template
2024-07-18 07:21:38 +01:00
Erika
34f9c25740
fix: pin boxen to avoid JSON import ( #11483 )
2024-07-17 20:57:58 +02:00
RipeApple
6f9b527105
Add Shiki's defaultColor
option to <Code />
( #11391 )
2024-07-17 13:39:12 -04:00
Matthew Phillips
d495df5361
Server islands ( #11305 )
...
* Spike
* Server Islands
* Remove extra stuff
* Fix build, a little
* Fix build
* astro metadata can be undefined
* Add server:defer type
* Add support for the build to Server Islands (#11372 )
* Add support for the build to Server Islands
* Use command instead
* editor tips
* Add comment about defaultRoutes
* Use renderChunk instead of generateBundle
* Server islands tests (#11405 )
* Add support for the build to Server Islands
* Use command instead
* editor tips
* Add comment about defaultRoutes
* Use renderChunk instead of generateBundle
* Adds tests for server islands
* linting
* Pass slots to server islands (#11431 )
* Require the experimental flag to use server islands (#11432 )
* Require the experimental flag to use server islands
* Add flag to tests/examples
* Protect SSR against SI not being enabled
* Update the docs in the API ref
* Upgrade to compiler 2.9.0
* 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 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 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 packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Fix lockfile
* Add a changeset
* Update .changeset/five-rocks-vanish.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/five-rocks-vanish.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/five-rocks-vanish.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/five-rocks-vanish.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update lockfile
* Update .changeset/five-rocks-vanish.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-07-17 13:37:36 -04:00
Emanuele Stoppa
7e9c4a134c
fix: avoid response rewrite inside the dev server ( #11477 )
...
* fix: avoid response rewrite inside the dev server
* breakdown logic of reroute and rewrite
2024-07-17 17:01:07 +01:00
Luiz Ferraz
2e70741362
feat: Refactor integration hooks type ( #11304 )
...
* feat: Refactor integration hooks type
* Revert formatting changes
* More detailed changelog
* Add changeset for Astro DB
* Apply suggestions from code review
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
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-07-17 11:58:57 -04:00
Florian Lefebvre
e9334d05ca
feat(astro): clean sync ( #11415 )
2024-07-17 17:38:32 +02:00
Matteo Manfredi
36e30a3309
Expose inferRemoteSize
function ( #11098 )
...
* feat: expose and rename `inferSize`
* feat: separate `ISize` type
* feat: reformat function to use `ImageMetadata`
* nit(assets): re-use image-metadata code for remote images
* chore: changeset
* chore: changeset
* feat(assets): Export from `astro:assets`
* fix: proper errors
* fix: dont export from astro/assets
* fix: ests
* Update .changeset/large-geese-play.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* fix: ests
* Update .changeset/large-geese-play.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-17 11:27:04 -04:00
Bjorn Lu
3161b6789c
Support import astro components with vite queries ( #11478 )
2024-07-17 22:57:10 +08:00
Takeo Sawada
a75145871b
feat: add first and last to the Page interface ( #11176 )
...
* feat: add first and last to the Page interface
* Update .changeset/twenty-maps-glow.md
* Update .changeset/twenty-maps-glow.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-07-17 10:55:53 -04:00
Marco Campos
49b5145158
Feature: add support for shiki defaultColors
option ( #11341 )
...
* feat: add shiki option for default color
* feat: propagate shiki option for default color to astro config
* feat: add tests for default color
* chore: add change set
* fix: add complete type to shiki default color config
* fix: remove unneeded heavy shiki theme from fixture
* fix: add literals to schema validation
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
* Update .changeset/cold-crabs-arrive.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* feat: improve changeset
* grammar tweak
---------
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-07-17 10:55:04 -04:00
Houston (Bot)
e30cf49ee4
[ci] release ( #11442 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-17 14:47:16 +02:00
Fugi
0e6684983b
Fix action form parsing for .nullish ( #11452 )
2024-07-17 20:23:30 +08:00
Peter Schilling
eb303e1ad5
feat(markdoc): Support markdown-it's typographer option ( #11450 )
...
* Support markdoc-it's typographer option in markdoc
* Update .changeset/forty-scissors-jog.md [skip ci]
* Update .changeset/forty-scissors-jog.md [skip ci]
* Fix typo in changeset
---------
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-07-17 14:14:35 +02:00
Florian Lefebvre
645e128537
feat: better astro:env errors ( #11455 )
2024-07-17 12:36:00 +02:00
Ryan Christian
2cdb685ce7
refactor(preact): Drop preact-ssr-prepass
in favor of renderToStringAsync
( #11464 )
2024-07-17 15:51:20 +08:00
Bjorn Lu
b498461e27
Fix prerendering with unused dynamic chunks ( #11387 )
2024-07-17 15:48:28 +08:00
Chris Swithinbank
cb4e6d09de
Only add framework component formats to Vite’s optimizeDeps
( #11472 )
...
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-07-17 15:35:02 +08:00
Ricky Chon
17e048de0e
fix(astro): do not open new tab when saving config files ( #11456 )
2024-07-16 18:50:51 +02:00
Ming-jun Lu
bc2e74de38
fix(audit): remove false positive warnings on elements with tabpanel
role ( #11459 )
...
* fix(audit): add `tabpanel` to `aria_non_interactive_roles`
* fix(audit): allow `tabIndex` on elements with `tabpanel` role
See: d32a27fb64/docs/rules/no-noninteractive-tabindex.md (rule-options)
* chore: add changeset
2024-07-12 13:46:15 +02:00
Ben Holmes
619f07db70
Actions: expose utility types ( #11438 )
...
* feat: expose ACTION_ERROR_CODES util
* feat: expose ActionHandler util type
* chore: changeset
2024-07-10 08:02:10 -04:00
Ben
6ccb30e610
feat: astro:env allow schema keys to include numbers ( #11437 )
...
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-07-10 13:32:56 +02:00
Ben Holmes
ea4bc04e94
feat: ActionReturnType
( #11443 )
...
* feat: ActionReturnType util
* feat(test): ActionReturnType
* chore: changeset
2024-07-10 07:05:13 -04:00
Ben Holmes
7dca68ff2e
Fix: Actions accept
type completions ( #11436 )
...
* fix: `accept` type completions
* chore: changeset
* Edit: fix -> fixes astro:actions
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
* feat(test): accept types
---------
Co-authored-by: bholmesdev <bholmesdev@gmail.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-07-09 16:35:28 -04:00
Ben Holmes
08baf56f32
Actions: expand isInputError
to accept unknown
( #11439 )
...
* feat: allow type `unknown` on `isInputError`
* chore: move ErrorInferenceObject to internal utils
* chore: changeset
* deps: expect-type
* feat: first types test
* chore: add types test to general test command
* refactor: use describe and it for organization
2024-07-09 15:54:49 -04:00
Florian Lefebvre
0a4b31ffeb
feat: astro:env validateSecrets ( #11337 )
...
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-07-09 19:46:37 +02:00
Houston (Bot)
75d118bf7f
[ci] release ( #11409 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-03 18:03:29 -04:00
Matthew Phillips
b9e906f8e7
Revert "Fix attribute rendering for boolean values ( #11369 )" ( #11408 )
...
* Revert "Fix attribute rendering for boolean values (#11369 )"
This reverts commit e6de11f4a9
.
* Add a changeset
2024-07-03 17:44:51 -04:00
Houston (Bot)
571e184d5a
[ci] release ( #11351 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-03 10:10:40 -04:00
Emanuele Stoppa
a55ee0268e
fix(rewrite): correctly update the status code during a rewrite ( #11352 )
...
* fix(rewrite): correctly update the status code during a rewrite
* rebase
* remove `.only`
* remove log
2024-07-01 14:55:33 +01:00
Emanuele Stoppa
93993b77cf
fix(i18n): update strategy when defining manually astro i18n middleware ( #11362 )
2024-07-01 14:42:07 +01:00
Ming-jun Lu
3a223b4811
fix(overlay): adjust the color of punctuations ( #11388 )
...
* fix(overlay): adjust the color of punctuations
* chore: add changeset
2024-07-01 10:15:35 +01:00
Bjorn Lu
e6de11f4a9
Fix attribute rendering for boolean values ( #11369 )
2024-07-01 15:27:34 +08:00
Emanuele Stoppa
98d9ce41f2
fix: check experimental flag when using the rewrite function ( #11349 )
...
* fix: check experimental flag when using the rewrite function
* apply feedback
2024-06-26 15:08:36 +01:00
Houston (Bot)
d7ae91c83c
[ci] release ( #11346 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-26 21:09:08 +08:00
Bjorn Lu
33bdc54729
Fix getPackage resolve path ( #11347 )
2024-06-26 20:57:33 +08:00
Emanuele Stoppa
0df81422a8
fix(container): breakdown files to avoid importing vite
( #11327 )
...
* fix(container): breakdown files to avoid importing `vite`
* chore: update imports inside tests
* restore code
* format
2024-06-26 13:16:07 +01:00
Houston (Bot)
d9e6190a0d
[ci] release ( #11336 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-26 11:29:13 +02:00
Bjorn Lu
f1b78a4960
Remove resolve package and refactor db & studio exports ( #11331 )
2024-06-26 11:19:16 +02:00
Zakher Masri
9752a0b275
[ui] fix margin around devtool tooltip icon in rtl
( #11338 )
2024-06-26 13:52:51 +08:00
Matthew Phillips
8fdbf0e45b
Remove non-fatal errors from telemetry ( #11339 )
2024-06-25 12:34:20 -04:00
Florian Lefebvre
41121fbe00
fix(astro): astro sync and astro:env ( #11326 )
2024-06-25 14:51:55 +02:00
Emanuele Stoppa
4c4741b42d
Revert "bug: removes type override from defineAction" ( #11335 )
...
* Revert "bug: removes type override from defineAction (#11292 )"
This reverts commit 7f8f347995
.
* changeset
2024-06-25 12:31:13 +01:00
Houston (Bot)
ce310f8292
[ci] release ( #11297 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-24 12:49:52 -04:00
Emanuele Stoppa
44c61ddfd8
fix(routing): return correct status code for 500.astro
and 404.astro
( #11308 )
...
* fix(routing): return correct status code for `500.astro` and `404.astro`
* changeset
* fix regression
* use `route` instead
2024-06-24 13:21:27 +01:00
Matt Kane
41064cee78
chore: Extract fs helpers into shared internal-helpers package ( #11323 )
2024-06-24 10:12:14 +01:00
Bjorn Lu
b6afe6a782
Handle encoded image paths in markdown ( #11310 )
2024-06-21 17:13:21 +01:00
Martin Trapp
0622567326
Fall back to page reload when redirected to a cross origin URL ( #11302 )
...
* fall back to page reload when redirected to a cross origin URL
* Make redirect work with dynamically assigned ports
* undo
2024-06-21 06:58:18 +02:00
Emanuele Stoppa
8ce66f2ef7
fix(rss): correct types for RSSFeedItem
( #11299 )
2024-06-20 22:14:49 +01:00
Florian Lefebvre
7f956f0795
feat(underscore-redirects): add support for force ( #11271 )
...
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-06-20 16:18:39 +02:00
Florian Lefebvre
5848d97867
fix: astro:env getSecret ( #11296 )
2024-06-20 15:54:54 +02:00
Houston (Bot)
58a321193e
[ci] release ( #11276 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-20 11:58:37 +01:00
Matt Kane
fd3645fe83
fix: allow cookies to be set in rewritten responses ( #11280 )
...
* fix: allow cookies to be set in rewritten responses
* Merge cookies
* Add support for endpoints and more tests
2024-06-20 11:08:17 +01:00
Jacob Jenkins
7f8f347995
bug: removes type override from defineAction ( #11292 )
...
* bug: removes type override
* add changeset
* Update .changeset/quiet-doors-eat.md
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
---------
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-06-20 08:34:11 +01:00
Luiz Ferraz
5a9c9a60e7
fix(astro): type generation for empty collections ( #11264 )
...
* fix(astro): type generation for empty collections
* Update .changeset/light-bugs-shake.md
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
---------
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-06-19 16:52:34 +01:00
Braden Wiggins
4b46bd9bdc
feat: add ShikiTransformer
support to the <Code />
component ( #11197 )
...
* feat: add `transformers` prop to `<Code />` component
* chore: changeset
* Update .changeset/fluffy-carrots-search.md
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
* chore: add example
* fix: changelog example typo
Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>
* fix: change backdrop-filter to filter
Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>
* Update .changeset/fluffy-carrots-search.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-06-19 11:23:35 -04:00
Florian Lefebvre
9042be0491
feat: 500.astro improvements ( #11134 )
...
* feat: better error handling
* feat: allow passing props to render context render
* feat: work on tests
* Update 500.astro
* feat: test preview custom 500
* feat: test for custom 500 failing
* feat: add changeset
* Update rich-dolls-compete.md
* Delete packages/astro/e2e/custom-500.test.js
* Apply suggestions from code review
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* fix: merge
* Update packages/astro/test/custom-500.test.js
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/astro/src/core/app/index.ts
* feat: update
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2024-06-19 10:00:16 -04:00
Emanuele Stoppa
ea987d7da5
fix(rewrite): allow to rewrite 404 and take base
into consideration ( #11272 )
...
* fix(rewrite): allow to rewrite 404
* add changesets
* rebase
* apply suggestion
* Update .changeset/honest-shirts-trade.md
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
---------
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-06-19 14:25:27 +01:00
Matt Kane
f4b029b082
fix: support HTTP/2 in astro dev
( #11284 )
...
* wip
* chore: add tests
* Add changeset
* Add comments
2024-06-19 12:42:50 +01:00
Matt Kane
cb4d07819f
fix(astro): don't run middlewarein dev for prerendered 404 ( #11273 )
2024-06-18 16:04:59 +01:00
Matt Kane
9a08d74bc0
fix(astro): prevent ESM imports being passed directly to getImage ( #11279 )
...
* fix(astro): prevent ESM imports being passed directly to getImage
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-06-18 14:48:50 +01:00
Yufan Sheng
bab700d690
fix(astro): duplicated brackets are generated in data collections. ( #11275 )
...
* fix(astro): duplicated brackets are generated in data collections.
This PR fixed #11274
* Create duplicated-brackets-generation.md
2024-06-17 12:46:57 -04:00
Houston (Bot)
83c565b36c
[ci] release ( #11233 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-17 15:39:57 +02:00
wackbyte
7d59750661
chore: logging cleanup ( #11263 )
2024-06-17 15:05:48 +08:00
Bjorn Lu
e22be22e57
Refactor prerendering chunk handling ( #11245 )
2024-06-17 14:23:10 +08:00
Matthew Phillips
f5f8ed275b
Fix backwards compat with Astro <= 4.9 ( #11261 )
2024-06-14 16:29:53 -04:00
Łukasz Stankiewicz
9b030239cb
Import Database type from correct file ( #11262 )
...
* Import Database type from correct file
* Add changeset
2024-06-14 16:29:21 -04:00
Szymon Chmal
ba2b14cc28
fix(astro): prerendering issue when path contains underscore ( #11243 )
...
* fix(astro): prerendering issue when path contains underscore
* chore: add missing files
* Update .changeset/honest-ravens-double.md
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
---------
Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-06-14 16:21:11 -04:00
Matt Kane
d996db6f0b
fix: throw error if rewrite is attempted after body is used ( #11258 )
...
* fix: throw error if rewrite is attempted after body is used
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-06-14 13:57:17 +01:00
Mark Gaze
de60c69aa0
Fix a performance issue with JSON schema generation ( #11249 )
2024-06-14 11:38:20 +01:00
liruifengv
5484114401
fix typo in changeset ( #11255 )
...
* fix typo in changeset
* update typo import
2024-06-14 16:19:16 +08:00
Emanuele Stoppa
fd9da98b19
feat: refine container APIs for renderers ( #11251 )
2024-06-14 06:52:17 +01:00
Emanuele Stoppa
4385bf7a4d
feat(@astrojs/react): export renderer for easy loading ( #11234 )
...
* wip
* feat(@astrojs/react): export `renderer` for easy loading
* restore change
* chore: address feedback
* revert changes
* revert changes to react integration
* update changeset
2024-06-13 14:05:06 +01:00
Emanuele Stoppa
d07d2f7ac9
fix: better DX for 500.astro in local development ( #11244 )
...
* wip
* catch error in route.ts
* catch error in route.ts
* chore: tidy up error cases
* log the original error
* rebase
* chore: reduce the scope of the 500 handling
* we should not have a default 500
* remove props
* remove unsure function, not needed
* Update packages/astro/src/core/routing/astro-designed-error-pages.ts
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
* Update packages/astro/src/core/constants.ts
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
* changeset
* relax the assertion
* Update packages/astro/src/vite-plugin-astro-server/route.ts
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
* relax the assertion
---------
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-06-13 10:41:01 +01:00
Matt Kane
39bc3a5e81
fix(astro): handle symlinked content collection directories ( #11236 )
...
* fix(astro): handle symlinked content collection directories
* CHeck content dir exists and is a dir
* Handle symlinks when generating chunk names
* wip windows log
* Use posix paths
* Fix normalisation
* :old-man-yells-at-windows-paths:
* Update .changeset/fifty-clouds-clean.md
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Changes from review
* Add logging
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-06-12 13:45:47 +01:00
Matt Kane
2851b0aa2e
fix(astro): ignore query params when matching .astro extension ( #11240 )
...
* fix: ignore query params when matching .astro extension
* Changeset
* Add test
2024-06-12 12:44:44 +01:00
Emanuele Stoppa
e4fc2a0baf
fix: provide a plugin to resolve the virtual module ( #11242 )
2024-06-12 11:28:26 +01:00
Florian Lefebvre
94ac7efd70
feat(astro): address astro env rfc feedback ( #11213 )
...
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-06-11 20:17:16 +02:00
Matthew Phillips
24ce8983e1
In Vercel Edge, include cookies set by Astro.cookies.set ( #11227 )
2024-06-11 09:32:17 -04:00
Houston (Bot)
dd0145d28b
[ci] release ( #11225 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-11 13:15:27 +01:00
Emanuele Stoppa
7d9aac376c
fix(rewrite): purge old data when rewriting ( #11207 )
...
* fix(rewrite): purge old data when rewriting
* remove logs
* Update .changeset/fuzzy-eggs-kneel.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-06-11 12:58:59 +01:00
Emanuele Stoppa
58d7dbb5e0
fix: regression for getViteConfig ( #11231 )
...
* fix: regression for getViteConfig
* address feedback
2024-06-11 12:05:07 +01:00
Matt Kane
1e293a1b81
fix(astro): always return cloned content collection ( #11228 )
...
* fix: always return cloned content collection
* Update .changeset/early-melons-thank.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-06-10 20:57:07 +01:00
Matthew Phillips
66fc0283d3
Close iterator after rendering is complete and no more chunks remain ( #11210 )
...
* Close iterator after rendering is complete and no more chunks remain
* Wait for the first whole render before resolving
2024-06-10 13:38:25 -04:00
Oliver Speir
29463dff52
Export type Database from db/runtime ( #11216 )
...
* import and export in index.ts
* remove import and export from virtual.ts
* add changset
* Update .changeset/warm-pets-tap.md
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-06-10 16:53:38 +01:00
Florian Lefebvre
2bdca27ff4
feat: add support for astro:env to node and vercel ( #11199 )
2024-06-10 16:43:48 +02:00
Florian Lefebvre
0a6ab6f562
feat(astro): improved validators ( #11195 )
2024-06-10 13:40:56 +02:00
Frank
7327c6acb1
Fix leading slash creating incorrect conflict resolution between pages generated from static routes and rest parameters ( #10607 )
...
* test: added test-case failing like https://github.com/withastro/astro/issues/9103
* fix: replace leading `//` with `/` for generated static paths
* fix: use stringifyParams()-function, removed JSON.stringify on string
* test: align "/test/ing/"-title to other titles
* ci: added changeset
* test: updated test-name to more closely reflect the issue being tested
* test: added test-case for dynamic route-param with leading slash
* Update .changeset/tender-apples-lie.md
---------
Co-authored-by: Frank <62514408+frank371ba@users.noreply.github.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-06-10 11:19:17 +01:00
Szymon Chmal
416c4ac66d
fix(@astrojs/partytown): prevent crashes when View Transitions are enabled ( #11083 )
...
* fix: recover IFrame of Partytown on View Transition
* chore: add changeset entry
---------
Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
2024-06-10 11:16:59 +01:00
Emanuele Stoppa
75a8fe7e72
fix(i18n): improve error message ( #11189 )
...
* fix(i18n): improve error message
* 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-06-10 11:15:06 +01:00
Matthew Phillips
97724da93e
Let middleware handle the original request URL ( #11211 )
...
* Let middleware handle the original request URL
* Add a changeset
2024-06-10 10:58:44 +01:00
Houston (Bot)
2da877bfe9
[ci] release ( #11201 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-08 11:28:34 +02:00
Florian Lefebvre
734b98fecf
feat(astro): update astro env setup ( #11206 )
...
* feat(astro): update astro env setup
* Update silly-beds-hammer.md
2024-06-07 13:38:11 +01:00
Nin3
8c4539145f
fix(astro:) config reference typo ( #11205 )
...
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-06-07 12:52:59 +02:00
Dawid Kobierski
d0248bc083
fix(node): add missing error logging ( #11202 )
2024-06-07 10:26:16 +01:00
Florian Lefebvre
8b9a499d37
fix(astro): getSecret in dev and build ( #11198 )
...
Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
2024-06-06 22:19:44 +02:00
Houston (Bot)
48d53094cd
[ci] release ( #11186 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-06 11:02:22 -04:00
Emanuele Stoppa
97fbe938a9
fix: merge userConfig inside getViteConfig
( #11194 )
2024-06-06 14:22:57 +01:00
Matthew Phillips
6e29a172f1
Make Astro.url in format: 'preserve' match dev ( #11191 )
...
* Make Astro.url in format: 'preserve' match dev
* Create sweet-trainers-eat.md
---------
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-06-06 14:03:36 +01:00
liruifengv
58b10a0731
Fix throw AstroUserError
in mdx ( #11192 )
...
* fix: throw original AstroUserError in mdx
* add changeset
* Update brave-pots-listen.md
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-06-06 12:33:49 +01:00
Emanuele Stoppa
35ef53c089
fix: bubble up errors in rewrites ( #11136 )
...
* fix: bubble up errors in rewrites
* docs
* remove commented code
* changesets
* fix string interpolation
2024-06-05 13:09:51 +01:00
Emanuele Stoppa
40b0b4d1e4
fix(rewrite): copy body from the request ( #11182 )
...
* fix(rewrite): copy body from the request
* wip
* chore: copy body without using it
* chore: remove new file
2024-06-05 13:07:27 +01:00
Florian Lefebvre
2668ef9841
feat(astro): experimental astro:env ( #10974 )
...
* feat(env): add schema, types and envField (#10805 )
* feat(env): add validators (#10827 )
* feat(env): add vite plugin (#10829 )
* feat(env): client/public variables (#10848 )
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* feat(env): server/public variables (#10881 )
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* feat(env): server/secret variables (#10954 )
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* fix: import
* fix: test
* feat: work on jsdoc
* feat: more jsdoc
* chore: remove todo
* feat: fix test error and write changeset
* feat: update config reference
* feat: apply recommendations from review
* feat: rework getEnv/setGetEnv
* chore: move tests
* fix: rename
* fix: dev mode
* chore: improve error
* feat: add overrideProcessEnv helper
* fix: make eslint happy
* Update .changeset/poor-berries-occur.md
Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
* Update .changeset/poor-berries-occur.md
Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
* Update .changeset/poor-berries-occur.md
Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
* Update .changeset/poor-berries-occur.md
Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
* feat: fix build and address reviews
* fix: container api
* fix: tests
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/astro/src/@types/astro.ts
* chore: update changeset
* feat: address reviews
* feat: address Ema's reviews
* Update .changeset/poor-berries-occur.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-06-05 11:40:17 +01:00
Emanuele Stoppa
803dd8061d
feat(container): provide a virtual module to load renderers ( #11144 )
...
* feat(container): provide a virtual module to load renderers
* address feedback
* chore: restore some default to allow to have PHP prototype working
* Thread through renderers and manifest
* Pass manifest too
* update changeset
* add diff
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* fix diff
* rebase and update lock
---------
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-06-05 11:39:42 +01:00
Houston (Bot)
587e75f47e
[ci] release ( #11158 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-05 09:45:03 +02:00
Theo Ephraim
1734c49f51
fix: better isPromise check for proxy objects ( #11178 )
2024-06-05 11:17:49 +08:00
Leo Li
3cfa2ac7e5
Update install-package.ts ( #11183 )
...
pnpx was removed in pnpm v7 and replaced by pnpm exec and pnpm dlx.
pnpm dlx works the same as yarn dlx.
2024-06-04 10:54:05 -04:00
Matthew Phillips
ba20c718a4
Retain client scripts in content cache ( #11170 )
...
* Retain client scripts in content cache
* Add test
2024-06-04 10:52:48 -04:00
Erika
ff8004f6a7
fix: guard asset global usage ( #11171 )
...
* fix: guard global usage
* chore: changeset
2024-05-31 09:35:35 -04:00
Scott Nath
cf9b2ff796
🐛 removed deprecated items from lit integration ( #11164 )
...
* 🐛 removed deprecated items from lit integration
* 🚀 update minified
* 🐛 need `Document`
2024-05-29 16:00:31 -04:00
Emanuele Stoppa
19df89f87c
fix(runtime): check head+content component before throwing an error ( #11141 )
...
* fix(runtime): check head+content component before throwing an error
* add test
2024-05-29 07:29:26 -04:00
Eric Mika
2d93902f4c
fix(assets): ensure valid mime types in picture component ( #11147 )
...
* test: Add test for Picture MIME types
* fix(assets): Fix MIME type generation in Picture component
* chore: changeset
* fix: Trust mrmime to handle an undefined lookup argument
* fix: Use image.src as fallback argument to mrmime
---------
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-05-27 14:55:12 -04:00
Houston (Bot)
cdf89a16c8
[ci] release ( #11140 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-27 06:58:19 -04:00
Emanuele Stoppa
98e0372cfd
feat: pass props to container ( #11138 )
2024-05-24 14:41:56 +01:00
Erika
aaf0635cc0
fix(upgrade): use preferred-pm instead of which-pm-runs ( #11139 )
2024-05-24 14:58:51 +02:00
Houston (Bot)
4c7949d1ae
[ci] release ( #11132 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-23 12:05:22 -04:00
Matthew Phillips
4bb926908d
Prevent errors from adapters when i18n domains is not used ( #11129 )
2024-05-23 11:38:07 -04:00
Houston (Bot)
50775925f9
[ci] release ( #11116 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-23 11:06:20 +01:00
Chris Swithinbank
9a0e94b2e6
Let web vitals route handle all requests under that path ( #11120 )
2024-05-23 10:45:03 +02:00
Ben Holmes
9566fa0860
Actions: Allow actions to be called on the server ( #11088 )
...
* wip: consume async local storage from `defineAction()`
* fix: move async local storage to middleware. It works!
* refactor: remove content-type check on JSON. Not needed
* chore: remove test
* feat: support server action calls
* refactor: parse path keys within getAction
* feat(test): server-side action call
* chore: changeset
* fix: reapply context on detected rewrite
* feat(test): action from server with rewrite
* chore: stray import change
* feat(docs): add endpoints to changeset
* chore: minor -> patch
* fix: move rewrite check to start of middleware
* fix: bad getApiContext() import
---------
Co-authored-by: bholmesdev <bholmesdev@gmail.com>
2024-05-22 12:46:49 -04:00
Ben Holmes
8ca7c731de
Actions: React 19 progressive enhancement support ( #11071 )
...
* deps: react 19
* feat: react progressive enhancement with useActionState
* refactor: revert old action state implementation
* feat(test): react 19 action with useFormStatus
* fix: remove unused context arg
* fix: wrote actions to wrong test fixture!
* deps: revert react 19 beta to 18 for actions-blog fixture
* chore: remove unused overrides
* chore: remove unused actions export
* chore: spaces vs tabs ugh
* chore: fix conflicting fixture names
* chore: changeset
* chore: bump changeset to minor
* Actions: support React 19 `useActionState()` with progressive enhancement (#11074 )
* feat(ex): Like with useActionState
* feat: useActionState progressive enhancement!
* feat: getActionState utility
* chore: revert actions-blog fixture experimentation
* fix: add back actions.ts export
* feat(test): Like with use action state test
* fix: stub form state client-side to avoid hydration error
* fix: bad .safe chaining
* fix: update actionState for client call
* fix: correctly resume form state client side
* refactor: unify and document reactServerActionResult
* feat(test): useActionState assertions
* feat(docs): explain my mess
* refactor: add experimental_ prefix
* refactor: move all react internals to integration
* chore: remove unused getIslandProps
* chore: remove unused imports
* chore: undo format changes
* refactor: get actionResult from middleware directly
* refactor: remove bad result type
* fix: like button disabled timeout
* chore: changeset
* refactor: remove request cloning
* Update .changeset/gentle-windows-enjoy.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* changeset grammar tense
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-05-22 13:24:55 +01:00
Jan-Niklas W
b92de22d28
feat(vue): add support vue devtools options ( #11055 )
...
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Jan-Niklas Wortmann <jan-niklas.wortmann@jetbrains.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-05-22 14:14:36 +02:00
Ben Holmes
29a8650375
Actions: restore api context param ( #11112 )
...
* feat: expose APIContext from the second handler param
* refactor: use second param from test
* chore: changeset
* edit: minor -> patch
* edit: apiContext -> context
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
* refactor: apiContext -> context
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
* refactor: apiContext -> context
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
---------
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-05-22 08:06:58 -04:00
Emanuele Stoppa
12a1bccc81
feat: container APIs ( #11051 )
...
* feat: container APIs
* chore: handle runtime mode
* chore: render slots
* more prototyping
* Adding a changeset
* fix some weirdness around types
* feat: allow to inject the manifest
* feat: accept a manifest
* more APIs
* add `route` to the options
* chore
* fix component instance
* chore: document stuff
* remove commented code
* chore: add test for renderers and fixed its types
* fix: update name of the example
* fix regression inside tests
* use `experimental_`
* remove errors
* need to understand the types here
* remove some options that I don't deem necessary for this phase
* remove superfluous comments
* chore: remove useless `@ts-ignore` directive
* chore: address feedback
* fix regression and remove astro config
* chore: fix regression
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* ooops
* restore changes
---------
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-05-22 12:11:26 +01:00
Guofeng Lin
a6916e4402
feat: prefer using x-forwarded-for as clientAddress ( #11101 )
...
* feat: change node clientAddress use x-forwarded-for
when
```
adapter: node({
mode: 'standalone',
})
```
* feat: prefer using x-forwarded-for as clientAddress
* Update .changeset/healthy-planets-dream.md
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Update .changeset/healthy-planets-dream.md
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Apply suggestions from code review
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-05-22 12:10:56 +01:00
Emanuele Stoppa
2d4c8faa56
feat: make CSRF protection stable ( #11021 )
...
* feat: make CSRF protection stable
* revert change
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* 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>
* beef up changeset
* Update .changeset/chatty-experts-smell.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/chatty-experts-smell.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* move section
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-05-22 12:10:30 +01:00
Emanuele Stoppa
be68ab47e2
feat: make i18n domains stable ( #11022 )
...
* feat: make i18n domains stable
* update tst
* Update .changeset/five-crabs-rhyme.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* fix regression
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-05-22 12:06:26 +01:00
Houston (Bot)
9ddd6387a7
[ci] release ( #11086 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-22 09:40:11 +02:00
Matthew Phillips
e14ce5726d
Fix inconsistent results from raw SQL ( #11091 )
...
* Fix inconsistent results from raw SQL
* Remove .only
* Fix
* Update packages/db/src/runtime/db-client.ts
Co-authored-by: Ben Holmes <hey@bholmes.dev>
---------
Co-authored-by: Ben Holmes <hey@bholmes.dev>
2024-05-21 17:12:39 -04:00
Darius
b78e83f448
prompt for workspace in db link ( #11032 )
...
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2024-05-21 21:13:56 +02:00
Ben Holmes
a5d79ddeb2
Actions: stop warning about headers
usage on prerendered routes ( #11111 )
...
* fix: handle GET requests and prerendered routes
* chore: changeset
2024-05-21 12:36:58 -04:00
Xetera
3cc3e2ccba
fix(renderer): omitting internal symbol from mdx props ( #10813 )
2024-05-21 17:48:19 +02:00
Szymon Chmal
af42e05520
fix(astro): positioning of inspection tooltip in RTL mode ( #11081 )
...
* fix: prevent overlay from going out of the view
* test: add test case for positioning
* chore: add changeset entry
---------
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-05-21 13:27:06 +02:00
Willie Möller
b5f95b2fb1
docs: updated comment from Accept-Header to Accept-Language ( #10875 )
...
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-05-21 13:21:18 +02:00
Adrian Lyjak
cefeadf0a4
Make status code check more strict for sitemap plugin ( #10779 )
...
Co-authored-by: Ben Holmes <hey@bholmes.dev>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-05-21 13:01:35 +02:00
Ducky Coding
bfe9c73536
fix type definition of IntrinsicAttributes's slot attribute ( #11092 )
2024-05-21 12:26:25 +02:00
Ben Holmes
f6b171ed50
fix: set status on error with progressive fallback ( #11054 )
...
* fix: set status on error with progressive fallback
* chore: changeset
* fix: obscure statusText in prod
* refactor: use error.name for statusText
---------
Co-authored-by: bholmesdev <bholmesdev@gmail.com>
2024-05-20 15:57:56 -04:00
Chris Swithinbank
0dbd8eeb77
Support deprecating Web Vitals table ( #11096 )
2024-05-20 16:51:02 +02:00
Chris Swithinbank
3c7a4fabea
Upgrade web-vitals
to v4 ( #11094 )
2024-05-18 16:33:14 +02:00
Matthew Phillips
f5c8fee76c
Prevent cache content from being left in dist folder ( #11073 )
2024-05-17 08:05:47 -04:00
Houston (Bot)
8a80221e4c
[ci] release ( #11085 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-17 12:01:27 +01:00
Bjorn Lu
9637014b14
Fix hoisted scripts propagation ( #11084 )
2024-05-17 18:11:32 +08:00
Houston (Bot)
4d32a8077b
[ci] release ( #11053 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-16 18:00:58 +01:00
Matthew Phillips
749a7ac967
Fix streaming in Node.js fast path ( #11058 )
...
* Fix streaming in Node.js fast path
* Create a new next if the iterator is not done
* Use a flag instead
* Update test
* Add new assertion
* Add explanation of the renderingComplete variable
* Remove flaky assertion
2024-05-16 12:36:28 -04:00
Erika
1fec4a6eb9
fix: use astro cli command instead of astro db's ( #11070 )
...
* fix: use astro cli command instead of astro db's
* chore: changeset
2024-05-16 18:10:59 +02:00
Erika
9332bb1c1f
feat: add an internal for now studio package ( #11037 )
...
* feat: add an internal for now studio package
* fix: remove test commands
* fix: use getenvs from studio package
* fix: packagejson
* chore: changeset
* fix: remove unused error
* fix: of course Bjorn was right all along
2024-05-16 18:10:08 +02:00
Emanuele Stoppa
240a70a29f
fix: improve logging for on-demand pages ( #11069 )
2024-05-16 16:13:32 +01:00
Emanuele Stoppa
1f988ed10f
fix(rewrite): match index with params ( #11065 )
...
* fix(rewrite): match index with params
* remove import
2024-05-16 14:52:39 +01:00
Emanuele Stoppa
16f12e426e
fix(i18n): allow to create 404.html and 500.html ( #11062 )
...
* fix(i18n): allow to create 404.html and 500.html
* Update packages/astro/src/i18n/index.ts
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
* Update .changeset/lazy-rockets-raise.md
* chore: use better matching
* fix linting
---------
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-05-16 14:43:30 +01:00
n4n5
3a0c02ae03
add error message for svg without dimensions ( #10924 )
...
* add svg
* throw clean error
* add error handling
* revert
* throw clean error
* add changeset
* make it a patch
* Update remoteProbe.ts
---------
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-05-16 12:52:35 +02:00
Elias
a8f0372ea7
Update generator.ts to allow %23 (#) in dynamic urls ( #10965 )
...
* Update generator.ts to allow %23 (#) in dynamic urls
* added changeset
* fix: Update generator.ts to santize url params as well
* fix: sanitizeParams function
* removed old fix
* fix: added test for decoded # and ?
* fix: formatting of file
* sperated sanitizing of generated paths and ssr dynamic paths
* refactor: using map instead
* Update .changeset/mean-geckos-sell.md
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* doc: added JSDoc for sanitizeParams function
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-05-16 09:26:27 +01:00
Florian Lefebvre
a05ca38c2c
fix: conflict between rewrite and actions middleware ( #11052 )
...
* fix: conflict between rewrite and actions middleware
* Update middleware.ts
* fix: short circuit middleware if locals already defined
* chore(test): remove atkinson font refs
* feat(test): progressive fallbacks
* chore: remove unneeded conditional
---------
Co-authored-by: bholmesdev <hey@bholmes.dev>
2024-05-15 12:49:45 -04:00
Houston (Bot)
5a48d53385
[ci] release ( #11025 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-15 10:42:55 -04:00
Ming-jun Lu
841df1f1b1
fix(rss): fix an issue where trailing slash is not removed even if trailingSlash
is set to false
( #11050 )
...
* refactor(createCanonicalURL): return string instead of URL object
* fix(rss): fix an issue where trailing slash is not removed even if `trailingSlash` is set to `false`
* test(rss): update test case related to trailing slash
* chore: add changeset
2024-05-15 15:33:50 +01:00
Bjorn Lu
5f353e39b2
Improve prefetch behaviour for browsers ( #10999 )
2024-05-15 21:11:05 +08:00
Ben Holmes
6cc3fb97ec
Actions: support empty args and empty response ( #11041 )
...
* feat: support empty args and empty response
* chore: changeset
* Update .changeset/many-guests-yell.md
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
---------
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-05-15 07:42:04 -04:00
Ben Holmes
d0d1710439
Actions: fix minor type issues in documented example ( #11043 )
...
* fix(docs): add type case for `e.target`, say "Preact" explicitly
* fix(docs): Preact -> React
* chore: changeset
* Update .changeset/dirty-planes-punch.md
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
---------
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-05-15 06:45:20 -04:00
HiDeoo
086694ac31
Fix getViteConfig()
type definition ( #11046 )
2024-05-15 09:04:47 +01:00
Ben Holmes
771d1f7654
actions: Throw error on missing server output ( #11028 )
...
* feat: throw error on missing server output
* chore: changeset
* refactor: use isServerLikeOutput
* feat: add errors-data on actions build output
* chore: add jsdoc
2024-05-14 13:29:27 -04:00
molsson
ad9227c7d1
fix(types): Add name attribute to AnchorHTMLAttributes ( #10981 )
...
* fix(types): Add name attribute to AnchorHTMLAttributes
* Create tiny-toys-exist.md
---------
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-05-14 10:52:38 +02:00
Alexander S
2e2d6b7442
fix(astro): refine assets prefix typing ( #11020 )
2024-05-14 16:40:52 +08:00
Argana Phangquestian
5f2dd4518e
fix: add missing attribute popovertargetaction ( #11034 )
...
* fix: add missing attribute popovertargetaction
* add: changeset
2024-05-14 10:38:17 +02:00
Ben Holmes
bd34452a34
Actions: include zod error in message for easier debugging ( #11029 )
...
* refactor: embed zod object in error msg
* chore: changeset
2024-05-13 15:28:48 -04:00
Bjorn Lu
8dfb1a23cc
Fix CSS handling for experimental.directRenderScript ( #11026 )
2024-05-13 14:48:55 -04:00
Ben Holmes
18e7f33ccd
Actions: fix custom error message on client ( #11030 )
...
* feat(test): error throwing on server
* feat: correctly parse custom errors for the client
* feat(test): custom errors on client
* chore: changeset
2024-05-13 14:40:37 -04:00
Ben Holmes
eb1d9a447b
Fix isDbError()
for remote errors ( #11027 )
...
* fix: use LibsqlError for remote db errors
* chore: remove unused drizzle.ts
* fix(test): return expected `error` object
* fix: error detail formatting
* feat(test): error messages with remote adapter
* feat(test): add code to test body
* chore: changeset
2024-05-13 12:20:43 -04:00
Shiina
4ea38e7333
Prevents unhandledrejection error when checking for latest Astro version ( #11013 )
...
* fix: prevent error appear when check latest version fail(#11012 )
* Resolve review problem
2024-05-13 10:07:17 -04:00
Houston (Bot)
18b78ec881
[ci] release ( #11019 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-13 07:29:41 -04:00