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

8413 commits

Author SHA1 Message Date
Josh Goldberg ✨
d94247528d [ci] format 2024-07-24 15:43:59 +00:00
Josh Goldberg ✨
87c179a5f3
chore: bump @typescript-eslint/no-unused-vars to error internally (#11173)
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
2024-07-24 23:43:07 +08:00
renovate[bot]
536209aa74
fix(deps): update all non-major dependencies (#11522)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-07-23 11:43:14 +08: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
df89cfd3e3 [ci] format 2024-07-19 11:45:56 +00: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
Sarah Rainsberger
ee21ac761f
fix typo in CHANGELOG (#11495) 2024-07-18 20:28:51 +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
a637169668 [ci] format 2024-07-18 15:04:30 +00: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
1a26c6dfe5 [ci] format 2024-07-18 13:45:29 +00: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
e7bfbf877e [ci] format 2024-07-18 06:22:30 +00: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
Matthew Phillips
e67dcde65e [ci] format 2024-07-17 18:56:58 +00:00
Matthew Phillips
ac8dd73afa
Fix smoke tests (#11484) 2024-07-17 14:56:08 -04:00
RipeApple
5b94a34113 [ci] format 2024-07-17 17:40:05 +00:00
RipeApple
6f9b527105
Add Shiki's defaultColor option to <Code /> (#11391) 2024-07-17 13:39:12 -04:00
Matthew Phillips
b46a78e1c9 [ci] format 2024-07-17 17:38:27 +00: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
17d2eedaaf [ci] format 2024-07-17 16:01:58 +00: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
1df7c8489e [ci] format 2024-07-17 15:59:44 +00: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
683417f334 [ci] format 2024-07-17 15:39:31 +00:00
Florian Lefebvre
e9334d05ca
feat(astro): clean sync (#11415) 2024-07-17 17:38:32 +02:00
Matteo Manfredi
c34fc99fe9 [ci] format 2024-07-17 15:28:08 +00: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
48d926c27e [ci] format 2024-07-17 14:56:40 +00: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
Simon He
f4870e59ec [ci] format 2024-07-17 13:04:41 +00:00
Simon He
6e459f03c6
refactor(astro): code refactor (#11343) 2024-07-17 21:03:45 +08: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
20fc99b6ab [ci] format 2024-07-17 12:24:18 +00: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