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

7306 commits

Author SHA1 Message Date
Tak Tran
73d7440200
Fix dot files not being copied over on non-root builds (#9740) (#9741)
* Fix dot files not being copied over on non-root builds (#9740)

When running `astro build` outside of where the astro files are, dotfiles are not copied over because the `includeDotfiles` parameter is not passed in.

* update changeset

* Update changeset description

---------

Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
2024-01-22 12:07:59 +00:00
Florian Lefebvre
7356336d18
fix(rss): rssSchema definition to allow calling standard zod object methods (#9746)
* fix(rss): rssSchema definition to allow calling standard zod object methods

* fix: condition
2024-01-22 12:07:29 +00:00
Bjorn Lu
d0742bcfda [ci] format 2024-01-20 11:00:50 +00:00
Bjorn Lu
a505190933
Make @astrojs/markdown-remark browser-safe (#9738) 2024-01-20 18:59:40 +08:00
Bjorn Lu
53c69dcc82
Fix @astrojs/markdown-remark bundling for non-node runtimes (#9736) 2024-01-19 22:38:33 +08:00
Blede
8d2e5db096
fix getRelativeLocaleUrl when redirectToDefaultLocale is false (#9730)
* fix getRelativeLocaleUrl when redirectToDefaultLocale is false

* Added tests

* Fixed getLocaleRelativeUrlList
2024-01-19 14:02:23 +00:00
Bjorn Lu
ea6cbd06a2
Refactor style-only HMR cache and performance (#9712)
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-01-19 16:44:17 +08:00
Happydev
8ce40a417c
fix(compiler): Support dynamic slot names (#9605)
* chore: try new compiler version

* update mergeSlots function

* chore: update lock file

* add tests

* simplify `mergeSlots` code

* update compiler version

* update lock file

* fix failing test

We were expecting the source code to produce an error, but in
2.4.0 of the compiler, that generates valid code

* chore: changeset

* chore: update deps

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Nate Moore <nate@astro.build>
2024-01-18 13:56:49 -06:00
Martin Trapp
07f13e6650 [ci] format 2024-01-18 19:39:57 +00:00
Martin Trapp
9e01f9cc1e
makes the output of 'astro preferences list' more verbose (#9381)
* makes astro preference list more verbose

* adds changeset

* refactor: improve global flag language

* Update .changeset/selfish-donuts-approve.md

---------

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-01-18 13:38:46 -06:00
Houston (Bot)
138ae524ec
[ci] release (#9727)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-18 12:04:07 -06:00
Luiz Ferraz
8bc3b66d4d [ci] format 2024-01-18 18:01:46 +00:00
Luiz Ferraz
a4b696def3
Fix regression in the routing priority of index routes (#9726)
* fix: Fix regression in the routing priority of index routes

* chore: Add changeset

* Update .changeset/smart-rules-train.md

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

---------

Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-01-18 12:58:39 -05:00
Bjorn Lu
259c30e7fc
Fix eslint warnings (#9721)
* Fix eslint warnings

* Revert endpoint changes to be safe
2024-01-18 15:54:28 +00:00
Houston (Bot)
2292d0b580
[ci] release (#9709)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-18 10:30:19 +00:00
Bjorn Lu
7e1db8b4ce
Avoid vite 5.1 warning (#9719) 2024-01-18 16:38:49 +08:00
Sarah Rainsberger
0fa8557de4 [ci] format 2024-01-17 15:57:42 +00:00
Sarah Rainsberger
3ff704c0b6
[docs] fix syntax error, avoid a Markdown table (#9713) 2024-01-17 11:56:36 -04:00
André Alves
b325fada56
@astrojs/sitemap: Fixes generated URLs when using a base with a SSR adapter (#9704)
* Fix base path formatting for ssr adapters

* Update .changeset/curly-seals-count.md

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

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-01-17 13:33:23 +00:00
Luiz Ferraz
96bfc4be76 [ci] format 2024-01-17 13:29:35 +00:00
Luiz Ferraz
fd17f4a40b
Implement priority overrides for injected routes and redirects (#9439)
* Implement priority overrides for injected routes and redirects

* Fix ordering for route specificity

* Don't mix rules on tests

* Detailed collision detection

* Add changeset

* Remove TODO

* Add comments to clarify default values

* Update terminology

* Revert unrelated changes

* WIP

* Refactor

* Fix typo and typing

* chore: default to legacy

* chore: use experimental flag instead of option

* fix: do not throw an error on collisions

* chore: fix regression

* chore: use `continue` instead of `return`

* chore: fix tests but one

* chore: Update test

* chore: Change remaining new error to warning

* chore: Test collision warnings

* docs: Update docs of new config

* docs: Improve changesets

* chore: rename experimental flag

* chore: update changeset and docs

* Sarah editing pass

* nit: Align Markdown table

* defined definitions!

Co-authored-by: Luiz Ferraz <luiz@lferraz.com>

* added logging info to docs for experimental flag

* Yan final boss review

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

* chore: Update flag name in tests

* chore: Update flag name in tests

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
2024-01-17 13:28:18 +00:00
Emanuele Stoppa
efadef206f [ci] format 2024-01-17 13:26:47 +00:00
Emanuele Stoppa
f1a6126806
feat(i18n): disable redirect to default language (#9638)
* feat(i18n): disable redirect

* feat(i18n): add option to disable redirect to default language

* chore: add schema validation

* docs

* changeset

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

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

* chore: address feedback

* fix test

* Update .changeset/cyan-grapes-suffer.md

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

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

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

* Fix discord fetch code (#9663)

* Force re-execution of Partytown's head snippet on view transitions (#9666)

* Remove the header script before a view transition takes place to force a reload on the next page

* Add changeset

* Save another char

* [ci] format

* fix(assets): Implement all hooks in the passthrough image service (#9668)

* fix(assets): Implement all hooks in the passthrough image service

* chore: changeset

* refactor(toolbar): Rename every internal reference of overlay/plugins to toolbar/apps (#9647)

* refactor(toolbar): Rename every internal reference of overlay/plugins to toolbar/apps

* refactor: rename vite plugin

* fix: update import

* nit: add setting fallback

* Disable file watcher for internal one-off vite servers (#9665)

* Use node:test and node:assert/strict (#9649)

* [ci] format

* fix(i18n): emit an error when the index isn't found (#9678)

* fix(i18n): emit an error when the index isn't found

* changeset

* Update .changeset/proud-guests-bake.md

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

* rename

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

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>

* feat(i18n): add option to disable redirect to default language

* chore: rebase

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

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

* lock file update

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
Co-authored-by: Martin Trapp <martrapp@users.noreply.github.com>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Bjorn Lu <bluwy@users.noreply.github.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-01-17 13:25:44 +00:00
Oliver Speir
bc2edd4339 [ci] format 2024-01-17 13:14:53 +00:00
Oliver Speir
165cfc154b
Allow remark plugins to affect getImage call for .md files (#9566)
* pass hProperties to getImage for optimized imgs

* fix to allow multiple images to have hProps added

* update test to reflect new expected result

* add comment back in

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

* add srcset

* works on multiple images

* fix tests, fix images.ts type and remove console logs

* add warning back to images.ts again lol

* update changeset to be user oriented

* Update calm-socks-shake.md

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

* pass alt through getImage

* added fixture and test

* update lockfile

* fix lockfile again (had installed an extra package during testing and had sharp33 installed)

* update test to reflect passing alt through getImage

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-01-17 13:13:31 +00:00
Degreat
e9a72d9a91
Bump shikiji, use transformers API, expose transformers API (#9643)
* Bump shikiji, use transformers API, expose transformers API

* update astro config schema

* include shikiji-core

* Use default import

* address css-variables theme

* Remove shikiji markdoc

* Improve schema transformers handling

* Fix tests

* Update changeset

* bump shikiji version

* Update .changeset/six-scissors-worry.md

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

* Update wording

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

---------

Co-authored-by: bluwy <bjornlu.dev@gmail.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-01-17 13:13:05 +00:00
Ben Holmes
8521ff77fb
[Content collections] Remove "unsupported file type" warning (#9671)
* feat: remove "unsupported file type" warning for CC

* chore(test): remove unsupported file type unit

* chore: remove unused imports

* chore: changeset

* chore: changeset edits

* edit: add note on underscores to exclude content

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

* edit: front-load "removes the requirement"

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

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-01-17 13:12:37 +00:00
Ross Robino
a5f1682347
feat: add experimental client prerender (#9644)
* feat: add experimental client prerender

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

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

* docs: add more details about effects of the feature

* add changeset

* add tests

* edit jsdoc and changeset with suggestions

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

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

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

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

* Update .changeset/sixty-dogs-sneeze.md

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

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

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

* Update .changeset/sixty-dogs-sneeze.md

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

* Update .changeset/sixty-dogs-sneeze.md

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

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

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>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-01-17 13:11:58 +00:00
Emanuele Stoppa
9680cf2780 [ci] format 2024-01-17 13:11:46 +00:00
Emanuele Stoppa
d6edc75408
Adapter enhancements (#9661)
* quality of life updates for `App` (#9579)

* feat(app): writeResponse for node-based adapters

* add changeset

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* add examples for NodeApp static methods

* unexpose createOutgoingHttpHeaders from public api

* move headers test to core

* clientAddress test

* cookies test

* destructure renderOptions right at the start

---------

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

* Fallback node standalone to localhost (#9545)

* Fallback node standalone to localhost

* Update .changeset/tame-squids-film.md

* quality of life updates for the node adapter (#9582)

* descriptive names for files and functions

* update tests

* add changeset

* appease linter

* Apply suggestions from code review

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

* `server-entrypoint.js` -> `server.js`

* prevent crash on stream error (from PR 9533)

* Apply suggestions from code review

Co-authored-by: Luiz Ferraz <luiz@lferraz.com>

* `127.0.0.1` -> `localhost`

* add changeset for fryuni's fix

* Apply suggestions from code review

* Apply suggestions from code review

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

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Luiz Ferraz <luiz@lferraz.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>

* chore(vercel): delete request response conversion logic (#9583)

* refactor

* add changeset

* bump peer dependencies

* unexpose symbols (#9683)

* Update .changeset/tame-squids-film.md

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

---------

Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Luiz Ferraz <luiz@lferraz.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-01-17 13:10:43 +00:00
Oliver Speir
3a4d5ec800
Update a11y.ts (#9567)
* improve error message and allow for aria-label, aria-labelledby, img alt and svg title

* add checks for input

* Update packages/astro/src/runtime/client/dev-overlay/plugins/audit/a11y.ts

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

* Update .changeset/orange-trainers-learn.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-01-17 13:10:08 +00:00
Bjorn Lu
1539e04a8e
Simplify HMR for circular imports and CSS (#9706) 2024-01-17 11:27:21 +08:00
Houston (Bot)
6c64b149f8
[ci] release (#9669)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-16 11:45:09 +00:00
Erika
39050c6e1f
fix: image proxy not working correctly (#9659)
* fix: image proxy not working correctly

* fix: only take in valid images

* test: add tests

* Create slimy-mayflies-vanish.md

* nit: remove erika-ism
2024-01-15 12:17:41 -05:00
Bjorn Lu
1bf0ddd277
Add fallback compile for astro script and style load (#9664) 2024-01-15 23:26:42 +08:00
An Li
d38b2a4fe8
fix(ViewTransition): Disables View Transition form handling when the action property points to an external URL.(#9674) (#9693) 2024-01-15 08:28:40 +01:00
Arsh
c7dbb9d5c0 [ci] format 2024-01-12 20:35:23 +00:00
Arsh
35d54b3ddb
fix(transitions router): attempt to find the clicked element within an open shadow root (#9685)
* implementation

* add test

* add changeset
2024-01-13 02:04:25 +05:30
Nate Moore
ff3f9a538a
Update check-merge action (#9682) 2024-01-12 11:38:07 -06:00
Emanuele Stoppa
091097e60e
fix(i18n): emit an error when the index isn't found (#9678)
* fix(i18n): emit an error when the index isn't found

* changeset

* Update .changeset/proud-guests-bake.md

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

* rename

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

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>
2024-01-12 14:14:26 +00:00
Bjorn Lu
810f7b23c8 [ci] format 2024-01-12 07:54:11 +00:00
Bjorn Lu
71db79e62a
Use node:test and node:assert/strict (#9649) 2024-01-12 15:53:00 +08:00
Bjorn Lu
d02a3c48a3
Disable file watcher for internal one-off vite servers (#9665) 2024-01-12 11:19:08 +08:00
Erika
37e1018b0d
refactor(toolbar): Rename every internal reference of overlay/plugins to toolbar/apps (#9647)
* refactor(toolbar): Rename every internal reference of overlay/plugins to toolbar/apps

* refactor: rename vite plugin

* fix: update import

* nit: add setting fallback
2024-01-11 14:03:45 -05:00
Erika
74008cc238
fix(assets): Implement all hooks in the passthrough image service (#9668)
* fix(assets): Implement all hooks in the passthrough image service

* chore: changeset
2024-01-11 13:29:59 -05:00
Martin Trapp
87ede76b3b [ci] format 2024-01-11 18:28:28 +00:00
Martin Trapp
cdf8ce0627
Force re-execution of Partytown's head snippet on view transitions (#9666)
* Remove the header script before a view transition takes place to force a reload on the next page

* Add changeset

* Save another char
2024-01-11 19:26:49 +01:00
Bjorn Lu
8059a19ad3
Fix discord fetch code (#9663) 2024-01-11 13:35:12 +00:00
Houston (Bot)
7a275c1648
[ci] release (#9625)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-11 16:32:08 +08:00
Martin Trapp
a3b5695176
Don't try to load partytown scripts in the main thread during view transitions (#9658) 2024-01-11 13:12:45 +08:00