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

3539 commits

Author SHA1 Message Date
bholmesdev
8ffa7a33df chore: changeset 2024-04-23 19:37:03 -04:00
Matthew Phillips
3294f7a343
Prevent getCollection from breaking in vitest (#10846)
* Prevent getCollection from breaking in vitest

* Linting

* Another way

* Make backwards compat

* Oops

* runHookConfigSetup creates a new settings
2024-04-23 07:58:57 -04:00
Ben Holmes
8e6eb624ae
db: add login flow for web containers (#10816)
* feat: add login flow for web containers

* chore: changeset

* chore: remove unused web()

* feat: detect github codespaces

* fix: add success msg for manual flow

* refactor: use URL constructor for login URL

Co-authored-by:  Matthew Phillips <matthew@skypack.dev>

* fix: add .href for url string

---------

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2024-04-22 11:37:11 -04:00
renovate[bot]
8d5f3e8656
chore(deps): update all non-major dependencies (#10833)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-04-22 22:52:30 +08:00
Martin Trapp
a2df344bff
revert handling of JavaScript animations during view transitions (#10841) 2024-04-22 12:18:37 +02:00
Houston (Bot)
7fda037b27
[ci] release (#10798)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-18 11:35:39 -04:00
Matthew Phillips
6313277137
Invalidate CC cache manifest when lockfile or config changes (#10763)
* Invalidate CC cache manifest when lockfile or config changes

* Close the handle and increment manifest version

* debug info

* Provide a reason for cache busting

* Handle compile metadata missing

* Try it this way

* Copy over cached assets as well

* Only restore chunks when cache is valid

* Better handle invalid caches

* Explain when there is no content manifest

* Add tests

* debugging

* Remove debugging

* Update packages/astro/src/core/build/plugins/plugin-content.ts

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

* Update packages/astro/src/core/build/plugins/plugin-content.ts

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

* Review comments

* Add chunks path constant

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-04-18 11:23:05 -04:00
Avinash Reddy
77822a822b
add/cli: update list of integrations (#10811) 2024-04-18 17:03:36 +08:00
Arsh
35e43ecdaa
optimization(runtime): create smaller objects for each Astro global (#10773)
* optimization(runtime): create smaller objects for each Astro global

* add changeset

* Make slots lazy

---------

Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-04-18 08:40:13 +01:00
Robin Gisler
0e22462d15
fix(sitemap): Trailing slashes on root url (#10772)
* add tests that reveal issue

* fix trailing slash root page issue

* add changeset
2024-04-18 08:09:25 +01:00
Martin Trapp
dc74afca9f
Fixes an issue with persisted non-text input fields that have the focus during view transition navigation. (#10799)
* Fixes an issue with persisted non-text input fields that have the focus during view transition navigation.

* better check
2024-04-17 10:56:31 +01:00
Nick Dubelman
d4c91cb109
db: export 'alias' from drizzle-orm/sqlite-core (#10789)
* db: export 'alias' from drizzle-orm/sqlite-core

* chore: changeset

* fix: changeset target

---------

Co-authored-by: Ben Holmes <hey@bholmes.dev>
2024-04-16 17:28:20 -04:00
Houston (Bot)
668d97319c
[ci] release (#10777)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-16 17:07:50 +01:00
Rishi Raj Jain
3e7a12c853
fix: MDX cannot find relative image path without leading ./ (#10754)
Co-authored-by: Oliver Speir <115520730+OliverSpeir@users.noreply.github.com>
2024-04-16 22:13:52 +08:00
Rishi Raj Jain
a92e263beb
fix: use assetsDir in creating vite config (#10732)
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-04-16 21:23:50 +08:00
Bjorn Lu
90669472df
Disable streaming for SSG (#10796) 2024-04-16 21:21:19 +08:00
Bjorn Lu
1ce22881c6
Improve sitemap generate performance (#10795) 2024-04-16 19:48:49 +08:00
Meghan Denny
b0589d0553
astro/cli/install-package.ts: whichPm may return null if ran in an empty directory (#10782) 2024-04-15 17:12:07 +08:00
Erika
0684312145
fix(assets): Forward headers from the original request to the internal request to the image (#10775) 2024-04-15 17:06:30 +08:00
Martin Trapp
699f4559a2
Make viewTransition.finished wait for animations triggered by viewTransition.ready (#10787) 2024-04-15 16:58:40 +08:00
Farzad
1607face67
Fix @types/cookie dependency (#10776)
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-04-15 16:54:42 +08:00
Juraj Kapsz
4dbd545304
fix: picture fallback check (#10783) 2024-04-15 16:52:39 +08:00
Bjorn Lu
88ee63a3ba
Remove MDX processor on buildEnd (#10770) 2024-04-15 15:56:53 +08:00
Erika
308b5d8c12
fix(add): Fixes astro add modifying baseUrl by accident (#10774)
* fix(add): Fixes `astro add` modifying `baseUrl` by accident

* chore: changeset

* test: add test

* fix: tsconfig not being a json maybe is a mistake, I don't know!

* test: fix

* Update packages/astro/test/fixtures/tsconfig-handling/baseUrl/tsconfig.json

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-04-12 13:56:54 -04:00
Houston (Bot)
3ff6b403db
[ci] release (#10757)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-12 11:31:46 -04:00
Erika
c75ededdb4
fix(vercel): Fix srcset generation not working on Vercel (#10756)
* fix(vercel): Fix `srcset` generation not working on Vercel

* chore: changeset

* fix: remove densities and widths from the HTML attributes

* nit: better changeset

* nit: add formats
2024-04-12 16:07:27 +02:00
Chris Swithinbank
d1080ea81d
Add useful links to @astrojs/db package.json (#10764)
Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>
2024-04-11 23:18:57 +02:00
horo
742866c566
Limit imports in flight for getCollection (#10708) 2024-04-11 22:40:14 +08:00
Emanuele Stoppa
c6d59b6fb7
fix(i18n): fallback SSR (#10755)
* fix(i18n): fallback SSR

* Update .changeset/old-pugs-jog.md

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

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-04-11 14:51:10 +01:00
Houston (Bot)
66bc1041d4
[ci] release (#10739)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-11 13:24:47 +02:00
Erika
908645d9dd
fix: rewrite Node.js changeset (#10753)
* fix: rewrite Node.js changeset

* Update .changeset/empty-rules-type.md

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-04-11 13:21:20 +02:00
Arsh
d51951ce62
fix(cli): call path.replace only if it is a function (#10745)
* fix(cli): call `path.replace` only if it is a function

* add changeset
2024-04-11 10:26:46 +01:00
Oliver Speir
7e825604dd
Update a11y-no-noninteractive-tabindex rule for dev tool bar (#10750)
* fix: a11y-no-noninteractive-tabindex

* add changeset
2024-04-11 09:03:56 +01:00
Arsh
994337c99f
fix(rendering): remove render instructions from slot expressions (#10747) 2024-04-11 08:07:21 +05:30
604qgc
ccafa8d230
Adds dataLanguage property to the replacement <pre> element. (#10538)
* Update highlight.ts

* Create cold-snakes-train.md

* Update Code.astro

Solution for use-case described in withastro/roadmap#276 (https://github.com/withastro/roadmap/discussions/276)

* roll-back initial fix

* new fix

* update changeset

* Update packages/markdown/remark/src/rehype-prism.ts

* Update .changeset/cold-snakes-train.md

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

* Update .changeset/cold-snakes-train.md

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

* Update .changeset/cold-snakes-train.md

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

* Update .changeset/cold-snakes-train.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-04-10 12:55:31 -04:00
Ming-jun Lu
39988ef8e2
feat(toolbar): allow the user to change the placement (#10591)
* feat(toolbar): add `placement` to settings

* feat(toolbar): update `settings.placement` with `<select>`

* feat(toolbar): adjust position based on `settings.placement`

* test(toolbar): add a test case for `settings.placement`

* refactor(toolbar): extract select element from settings app

* feat(toolbar): allow select element to have colors

* test(toolbar): fix failed test case

* refactor(toolbar): add `placement` property to window element

* refactor(toolbar): notify apps when placement changes

* test(toolbar): fix failed test case

* refactor(toolbar): extract `synchronizePlacementOnUpdate` function

* chore: add changeset

* chore: update changeset

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-04-10 16:40:38 +02:00
Emanuele Stoppa
440681e7b7
feat(i18n): manual routing (#10193)
* feat(i18n): manual routing

* one more function

* different typing

* tests

* fix merge

* throw error for missing middleware

* rename function

* fix conflicts

* lock file update

* fix options, error thrown and added tests

* rebase

* add tests

* docs

* lock file black magic

* increase timeout?

* fix regression

* merge conflict

* add changeset

* chore: apply suggestions

* apply suggestion

* Update .changeset/little-hornets-give.md

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

* chore: address feedback

* fix regression of last commit

* update name

* add comments

* fix regression

* remove unused code

* Apply suggestions from code review

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

* chore: update reference

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

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

* chore: improve types

* fix regression in tests

* apply Sarah's suggestion

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-04-10 15:38:17 +01:00
Farzad
9e14a78cb0
Accept common cookie attributes when deleting a cookie (#10671)
* Accept common cookie attributes when deleting a cookie

* Fix AstroCookieSetOptions IDE annotations

* Use AstroCookieSetOptions to construct AstroCookieDeleteOptions

* Update .changeset/shaggy-cats-film.md

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

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-04-10 10:18:54 -04:00
Emanuele Stoppa
683d51a5ee
feat: upgrade the minimum Node.js maintainance LTS version (#10689)
* feat: upgrade the minimum Node.js maintainance LTS version

* chore: update minimum npm version

* chore: revert npm change

* chore: address Erika's feedback

* chore: apply further suggestions

* Update .changeset/empty-rules-type.md

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-04-10 14:53:55 +01:00
Emanuele Stoppa
2e53b5fff6
feat: add origin check for CSRF protection (#10678)
* feat: add origin check for CSRF protection

* add tests

* chore: documentation

* changeset and grammar

* chore: add casing check

* split function

* better naming

* make the whole object experimental

* remove unused type

* update changeset

* manually apply Sarah's suggestions

* Apply suggestions from code review

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-04-10 14:53:32 +01:00
liruifengv
e2cd7f4291
fix: Fixed errorOverlay theme toggle bug. (#10661)
* fix: save `localStorage.astroErrorOverlayTheme` when detected dark mode

* add  changeset

* Fix theme toggle in ErrorOverlay

* update  changeset
2024-04-10 11:58:19 +01:00
Houston (Bot)
0fec72b35c
[ci] release (#10729)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-09 21:00:07 -04:00
Arsh
8a30f257b1
fix(dev): break implicit rerouting loop (#10737)
* fix(dev): infinite implicit rerouting

* test adapter

* changeset
2024-04-10 06:25:33 +05:30
Matthew Phillips
2d2ff58bb9
Fix db seeding when srcDir is root (#10720) 2024-04-09 09:11:32 -04:00
Emanuele Stoppa
f508c4b7d5
fix: regression for astro attributes escaping (#10728) 2024-04-09 12:37:06 +01:00
Emanuele Stoppa
b21b3ba307
fix(devtool): do not trigger interaction check for div and span (#10719)
* fix(devtool): do not trigger interaction check for `div` and `span`

* add test

* add tests

* Rephrase changeset

* remove log

* add reference link

* Update .changeset/swift-coats-teach.md

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

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-04-09 12:36:48 +01:00
Houston (Bot)
f4f383d04e
[ci] release (#10680)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-09 14:42:19 +08:00
horo
5e044a5eaf
Increase log severity when a page's getStaticPaths fails (#10707) 2024-04-09 11:19:26 +08:00
Matthew Phillips
28e7535e5c
Provide better messaging when renaming a table (#10600)
* Provide better messaging when renaming a table

* Update based on review
2024-04-08 09:21:41 -04:00
Bjorn Lu
fa0f593890
Fix script inline with directRenderScript (#10686) 2024-04-08 18:53:50 +08:00