0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
Commit graph

3584 commits

Author SHA1 Message Date
Houston (Bot)
e2cdd3c96b
[ci] release (#10985)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-09 22:40:23 +08:00
Federico Ballarini
4d163811e1
feat(package.json): removed wrong react types (#10986) 2024-05-09 21:34:41 +08:00
Emanuele Stoppa
05db5f7818
fix: incorrect type for experimental option (#10987) 2024-05-09 14:32:04 +01:00
Bjorn Lu
6b640b3bcb
Support scope styles for picture element in Picture component (#10975) 2024-05-09 21:04:19 +08:00
Houston (Bot)
770b9f06c3
[ci] release (#10944)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-09 11:06:49 +01:00
Bryce Russell
59571e8812
Fix error when accessing clientAddress on prerendered routes (#10977) 2024-05-09 16:16:29 +08:00
Florian Lefebvre
7179930ac8
feat(solid): add support for devtools (#10937)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-05-08 16:48:17 +02:00
Emanuele Stoppa
f0acd30a12
feat(vercel): skew protection (#10761)
* feat(vercel): skew protection

* feat(vercel): skew protection
2024-05-08 15:05:03 +01:00
Matthew Phillips
a1343184da
Convert saved non-UTC dates to UTC (#10967)
* Convert saved non-UTC dates to UTC

* Simplify the check

* Simplify check and add link
2024-05-08 08:27:55 -04:00
Ben Holmes
c0c509b6bf
Actions experimental release (#10858)
* feat: port astro-actions poc

* feat: basic blog example

* feat: basic validationError class

* feat: standard error types and safe() wrapper

* refactor: move enhanceProps to astro:actions

* fix: throw internal server errors

* chore: refine enhance: true error message

* fix: remove FormData fallback from route

* refactor: clarify what enhance: true allows

* feat: progressively enhanced comments

* chore: changeset

* refactor: enhance -> acceptFormData

* wip: migrate actions to core

* feat: working actions demo from astro core!

* chore: changeset

* chore: delete old changeset

* fix: Function type lint

* refactor: expose defineAction from `astro:actions`

* fix: add null check to experimental

* fix: export `types/actions.d.ts`

* feat: more robust form data parsing

* feat: support formData from rpc call

* feat: remove acceptFormData flag requirement

* feat: add actions.d.ts type reference on startup

* refactor: actionNameProps -> getNameProps

* fix: actions type import

* chore: expose zod from `astro:actions`

* fix: zod export path

* feat: add explicit `accept` property

* Use zod package instead of relative path outside of src

* feat: clean up error throwing and handling flow

* fix: make `accept` optional

* docs: beef up actions experimental docs

* fix: defineAction type narrowing on `accept`

* fix: bad `getNameProps()` arg type

* refactor: move to single `error` object + `isInputError()` util

* fix: move res.json() parse to avoid double parse

* feat: support async zod schemas

* feat: serialize and expose zod properties on input error

* feat: test input error in comment example

* fix: remove ZodError import

* fix: add actions-module to files export

* fix: use workspace for test pkg versions

* refactor: default export -> server export

* fix: type inference for json vs. form

* refactor: accept form -> defineFormAction

* refactor: better callSafely signature

* feat: block action calls from the server with RFC link

* feat: move getActionResult to global

* refactor: getNameProps -> getActionProps

* refactor: body.toString()

* edit: capitAl

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

* edit: highlight `actions`

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

* edit: add actions file name

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

* edit: not you can. You DO

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

* edit: declare with feeling

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

* edit: clarify what the `handler` does

* edit: schema -> input

* edit: add FormData mdn reference

* edit: add defineFormAction() explainer

* refactor: inline getDotAstroTypeRefs

* edit: yeah yeah maybe

* fix: existsSync test mock

* refactor: use callSafely in middleware

* test: upgradeFormData()

* chore: stray console log

* refactor: extract helper functions

* fix: include status in error response

* fix: return `undefined` when there's no action result

* fix: content-type

* test: e2e like button action

* test: comment e2e

* fix: existsSync mock for other sync test

* test: action dev server raw fetch

* test: build preview

* chore: fix lock

* fix: add dotAstroDir to existsSync

* chore: slim down e2e fixture

* chore: remove unneeded disabled test

* refactor: better api context error

* fix: return `false` for envDts

* refactor: defineFormAction -> defineAction with accept

* fix: check FormData on getActionProps

* edit: uppercase

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

* fix: add switch default for 500

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

* fix: add `toLowerCase()` on content-type check

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

* chore: use VIRTUAL_MODULE_ID for plugin

* fix: remove incorrect ts-ignore

* chore: remove unneeded POST method check

* refactor: route callSafely

* refactor: error switch case to map

* chore: add link to trpc error code table

* fix: add readable error on failed json.stringify

* refactor: add param -> callerParam with comment

* feat: always return safe from getActionResult()

* refactor: move actions module to templates/

* refactor: remove unneeded existsSync on dotAstro

* fix: hasContentType util for toLowerCase()

* chore: comment on 415 code

* refactor: upgradeFormData -> formDataToObj

* fix: avoid leaking stack in production

* refactor: defineProperty with write false

* fix: revert package.json back to spaces

* edit: use config docs for changeset

* refactor: stringifiedActionsPath -> stringifiedActionsImport

* fix: avoid double-handling for route

* fix: support zero arg actions

* refactor: move actionHandler to helper fn

* fix: restore mdast deps

* docs: add `output` to config

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: bholmesdev <bholmesdev@gmail.com>
2024-05-08 07:53:17 -04:00
Goulven CLEC'H
698c2d9bb5
fix(page-data): add key to allPages (#10625)
* fix(page-data): add key to allPages

* add fryuni's test

* replaced object.entries(allpages)

* tmp: change pagesByComponents by pagesByKeys

* fix pagesByKeys.get() in plugin-ssr & plugin-manifest

* remove logs

* remove useless generators

* another useless generator

* use null byte in key

* tmp function in pipeline.ts

* refactor getVirtualModulePageName

* refactor getPageKeyFromVirtualModulePageName

* clean & comments

* better key and fix build

* utils: add makePageDataKey

* fix(pipeline): retrieveRoutesToGenerate for ssr

* internals: getPageData function

* tmp(ssr-split-manifest): fix test ?

* fix?: ssr clean static output

* internals: getPageDatasWithPublicKey

* internals: getPageDatasByHoistedScriptId & getPagesDatasByComponent

* remove broken & useless virtualModuleNameFromResolvedId

* chore: changeset

* fix: sanitize slashes in filepaths

* Revert "fix: sanitize slashes in filepaths"

This reverts commit 5c3a75fac8.

* fix?: remove route from virtual module name

* fix: concat & array.from

* update changeset

* clean unnecessary change

* remove unnecessary pageInfo

* add return types to utils functions

* revert a comment deletion

* fix cleanStaticOutput

* changes from ematipico review

* moving a todo outside jsdoc (cc @ematipico )

* Update .changeset/great-turtles-greet.md

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

* Update .changeset/great-turtles-greet.md

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

* chore: fix merge conflicts

* fix: incorrect function

* remove logs

* revert: codepoint change

---------

Co-authored-by: Princesseuh <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-05-08 11:33:19 +01:00
Chris Swithinbank
61f47a6842
Support passing inline Astro config to getViteConfig() (#10963)
* Support passing inline Astro config to `getViteConfig()`

* Add changeset
2024-05-08 11:19:54 +01:00
Emanuele Stoppa
47877a7540
feat: rewriting (experimental) (#10867)
* feat: implement reroute in dev (#10818)

* chore: implement reroute in dev

* chore: revert naming change

* chore: conditionally create the new request

* chore: handle error

* remove only

* remove only

* chore: add tests and remove logs

* chore: fix regression

* chore: fix regression route matching

* chore: remove unwanted test

* feat: reroute in SSG (#10843)

* feat: rerouting in ssg

* linting

* feat: reroute for SSR (#10845)

* feat: implement reroute in dev (#10818)

* chore: implement reroute in dev

* chore: revert naming change

* chore: conditionally create the new request

* chore: handle error

* remove only

* remove only

* chore: add tests and remove logs

* chore: fix regression

* chore: fix regression route matching

* chore: remove unwanted test

* feat: reroute in SSG (#10843)

* feat: rerouting in ssg

* linting

* feat: rerouting in ssg

* linting

* feat: reroute for SSR

* fix rebase

* fix merge issue

* feat: rerouting in the middleware (#10853)

* feat: implement reroute in dev (#10818)

* chore: implement reroute in dev

* chore: revert naming change

* chore: conditionally create the new request

* chore: handle error

* remove only

* remove only

* chore: add tests and remove logs

* chore: fix regression

* chore: fix regression route matching

* chore: remove unwanted test

* feat: reroute in SSG (#10843)

* feat: rerouting in ssg

* linting

* feat: rerouting in ssg

* linting

* feat: reroute for SSR

* fix rebase

* fix merge issue

* feat: implement the `next(payload)` feature for rerouting

* chore: revert code

* chore: fix code

* Apply suggestions from code review

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

---------

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

* feat: rerouting

* chore: rename to `rewrite`

* chore: better error message

* chore: update the chageset

* Apply suggestions from code review

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

* chore: update docs based on feedback

* lock file

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by:  Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Ben Holmes <hey@bholmes.dev>

* feedback

* rename

* add tests for 404

* revert change

* fix regression

* Update .changeset/pink-ligers-share.md

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

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Ben Holmes <hey@bholmes.dev>
2024-05-08 10:26:31 +01:00
Erika
7bbd66459d
feat: Add new component to toolbar library (#10906)
* feat: progress

* chore: changeset
2024-05-08 10:26:00 +01:00
Bjorn Lu
ddd8e49d1a
MDX integration v3 (#10935)
* fix(mdx): convert remark-images-to-component plugin to a rehype plugin (#10697)

* Remove fs read for MDX transform (#10866)

* Tag MDX component for faster checks when rendering (#10864)

* Use unified plugin only for MDX transform (#10869)

* Only traverse children and handle mdxJsxTextElement when optimizing (#10885)

* Rename to `optimize.ignoreComponentNames` in MDX (#10884)

* Allow remark/rehype plugins added after mdx to work (#10877)

* Improve MDX optimize with sibling nodes (#10887)

* Improve types in rehype-optimize-static.ts

* Rename `ignoreComponentNames` to `ignoreElementNames`

I think this better reflects what it's actually doing

* Simplify plain MDX nodes in optimize option (#10934)

* Format code

* Minimize diff changes

* Update .changeset/slimy-cobras-end.md

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

---------

Co-authored-by: Armand Philippot <59021693+ArmandPhilippot@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-05-08 10:25:27 +01:00
Bjorn Lu
685fc22bc6
Improve content collection styles and scripts build perf (#10959)
* Improve content collection styles and scripts build perf

* Update test

It was actually a bug. There was an empty module script injected.

* Skip test

* Fix test not matching non-ccc behaviour

* Workaround bug to make test pass

* Update .changeset/grumpy-pillows-develop.md

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-05-08 10:24:47 +01:00
Matthew Phillips
d47baa466a
Support React 19 (#10942)
* Support React 19

* Fix lint

* Update .changeset/short-phones-breathe.md

* fix: update types peer dep

---------

Co-authored-by: bholmesdev <hey@bholmes.dev>
2024-05-07 13:13:03 -04:00
Chris Swithinbank
e63e96bf32
Import metric table from astro:db (#10947) 2024-05-06 22:02:54 +02:00
Florian Lefebvre
2978287f92
fix(astro): handle AstroUserError during sync and exports types (#10955)
Co-authored-by: Luiz Ferraz <luiz@lferraz.com>
2024-05-06 17:35:17 +02:00
Matthew Phillips
4d905ccef6
Preserve content modules properly in cache (#10889)
* Wait until after build to preserve content modules

* Properly build hoisted scripts

* Add changeset

* Fix tests hitting each other

* Global state, the shame

* Move the file copying over to earlier in the process
2024-05-06 11:27:07 -04:00
Florian Lefebvre
082abb82d5
feat(vue): add support for devtools (#10929)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-05-06 16:02:06 +02:00
Florian Lefebvre
fd508a0fbb
feat(preact): add support for devtools (#10938)
* feat(preact): add support for devtools

* Update little-dryers-stare.md
2024-05-03 15:21:37 -04:00
Jakob Hellermann
3412535be4
fix: don't include port twice from x-forwarded-host and x-forwarded-port headers (#10917)
* fix: don't include port twice from x-forwarded-host and x-forwarded-port headers

* add changeset

* add test for port both in forwarded host and forwarded port

* don't include port if undefined

* Update .changeset/forty-wolves-turn.md

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

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-05-03 15:01:25 -04:00
Houston (Bot)
2dcbcdb857
[ci] release (#10943)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-03 17:55:43 +02:00
Chris Swithinbank
a37d76a42a
Add web-vitals integration (#10883) 2024-05-03 17:40:53 +02:00
Ben Holmes
44bafa989a
[db] Fix duplicate calls to recreate tables on startup (#10919)
* fix: move recreateTables() to integration hooks

* feat: recreate and seed at load, not in virtual runtime

* feat: eager build db on startup and seed file change

* fix: respect database_file in dbUrl

* chore: remove duplicate recreateTables call

* chore: remove now self-explanatory comments

* fix: remove invalidateModule call for eager loading

* feat: respect seed package paths

* fix: remove duplicate recreateTables() call

* refactor: move recreateTables() to vite-plugin-db

* refactor: move queries.ts from runtime/ to core/

* fix: update test import to core/queries

* refactor: move executeSeedFile to vite-plugin-db

* refactor: extract seeding and recreating to helper fns

* chore: changeset

* chore: revert connectToStudio refactor

* wip: log db url

* fix(test): normalize astro_database_file flag for windows

* Revert "wip: log db url"

This reverts commit 558e2de67a09a611377929b625127c649b8504d6.

* Revert "Revert "wip: log db url""

This reverts commit ffd004e00dff485b7bc5ddde0278dde6ff058b9e.

* fix: correctly resolve relative paths with unit test

* chore: remove unused dbDirPath

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

* chore: remove unused import

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

* chore: remove unused type

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

* fix: remove bad import

* [db] Load seed files with vite dev server (#10941)

* feat: load seed files with full vite dev server

* chore: remove unused export

---------

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2024-05-03 11:08:50 -04:00
Houston (Bot)
9a231a4dd7
[ci] release (#10890)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-02 19:59:20 +08:00
Erika
007d17fee0
Fixes toggleState (#10933) 2024-05-02 10:31:19 +02:00
ktym4a
4ce5ced44d
change: NotificationPayload type (#10931)
* change: NotificationPayload type

* Create silent-zoos-work.md

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-05-02 08:58:40 +02:00
Bjorn Lu
5248ed1fb3
Delete unused changeset (#10927) 2024-05-01 23:06:00 +08:00
Erika
a0c77fc716
chore: changeset (#10925) 2024-05-01 08:03:55 -04:00
Matthew Phillips
ca605f4dd8
Provide a better error for when the app token is missing in CI (#10918) 2024-04-30 16:22:26 -04:00
Gabriele Angrisani
fd7a9ed337
fix a deprecated method in react integration using SSR: renderToStaticNodeStream (#10893)
* deprecated method renderToStaticNodeStream

* Create twelve-bulldogs-raise.md

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-04-30 08:01:21 -04:00
Martin Trapp
36bb3b6025
fix(astro): newer navigation aborts existing one (#10900)
* Detection and cancelation of previous navigations and view transitions

* typos and wording

* typos and wording

* add test for animation cancelation

* second round

* final touches

* final final touches

* Clear the most recent navigation after view transition finished
2024-04-30 11:46:23 +02:00
Bjorn Lu
a86dc9d269
Skip crawling into CSS requests when crawling module graph (#10911) 2024-04-30 17:06:01 +08:00
Chris Swithinbank
cf58d1ed56
Improve asDrizzleTable() types (#10882) 2024-04-26 16:07:55 +02:00
Houston (Bot)
9876163406
[ci] release (#10865)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-25 11:28:32 +02:00
Erika
7b4f284020
feat(toolbar): Toolbar API improvements (#10665)
* feat(toolbar): Add a `astro:toolbar` module

* fix: use entrypoint

* feat: add new shape for defining toolbar apps

* fix: types

* feat(toolbar): Add helpers features (#10667)

* feat(toolbar): Add helpers features

* fix: consistent payloads and naming

* chore: changeset

* nit: rename eventTarget to app

* feat: add server-side helpers

* test: update test to use new APIs

* fix: types

* nit: erikaaaaa

* feat: add new event

* Update .changeset/khaki-pianos-burn.md

* test: use data to create text

* Apply suggestions from code review

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

* nit: use diff

* nit: documentation effort

* test: fix

---------

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

* nit: small changes to helpers

* nit: update changeset

* fix: move to astro/toolbar for building purposes

* feat(toolbar): Add a toolbar example (#10793)

* feat: add a toolbar starter

* test: skip examples that are not Astro projects

* nit: small changes

* feat: setup for build step

* fix: add to devdep

* docs: add commands to README

* fix: reorder classes to make more sense

* fix: add improvements from recipe

* Apply suggestions from code review

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-04-24 17:56:12 +02:00
Erika
6fc4c0e420
feat: add a new message telling the user that a new version of Astro is available (#10734)
* feat: add a new message telling the user that a new version of Astro is available

* chore: changeset

* fix: use gt

* fix: apply feednack

* fix: apply feedback

* nit: use private namespace

* fix: oops

* nit: apply feedback

* fix: build

* fix: don't check for updates in CI

* docs: update changeset
2024-04-24 17:55:49 +02:00
Ben Holmes
43ead8fbd5
Enable allowJs for strictest.json (#10762)
* feat: enable `allowJs` for `strictest.json`

* chore: changeset

* edit: enables

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-04-24 11:33:49 -04:00
Peter Dräxler
8b59d5d078
Update sharp to 0.33 to fix issue with Alpine Linux (#10684)
* Update sharp to 0.33 to fix issue with Alpine Linux 

It was impossible for me to use the Astro image service in an Alpine Linux docker container. Even though I would install sharp `0.33.3` in my app, pnpm would download version `0.32.6`, which doesn't work in Alpine Linux container. 

Currently, I have to override the downloaded version in my package.json. For more details see:
- https://github.com/lovell/sharp/issues/4054
- https://discord.com/channels/830184174198718474/1224861729792458803/1224861729792458803

This PR updates the version of the `sharp` dependency to `^0.33` and thus makes Astro compatible with Alpine Linux.

* update lock file

* add changelog

* Update packages/astro/package.json

* Update pnpm-lock.yaml

* ci: update check-merge.yml action (#10690)

* test(@astrojs/node) listen for server setup errors in test-utils (#10692)

* Add disableremoteplayback attribute to VideoHTMLAttributes interface (#10693)

* Add disableremoteplayback attribute to VideoHTMLAttributes interface

* Move disableremoteplayback from VideoHTMLAttributes to MediaHTMLAttributes

* Create olive-camels-greet.md

* Update packages/astro/astro-jsx.d.ts

---------

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

* test(@astrojs/node) wait for server listening in trailing-slash tests (#10694)

* test(@astrojs/node) wait for server listening in trailing-slash tests

* fix missing waitServerListen

* fix import statement

---------

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

* chore: add `test:citgm` command that would run tests without caching and `build:ci:no-cache` to skip caching for build as well (#10696)

* chore: add test:citgm command that would run tests without caching

* adding build ci with no cache

* chore: fix build:ci:no-cache test:citgm (#10698)

* Improve dev toolbar notification contrast on hover (#10657)

* fix(#10399, PLT-1786): improve notification contrast on hover

* chore: add changeset

* fix test:citgm --force flag not passed correctly (#10706)

* Skip prerender chunk in static output (#10695)

* Remove unused config in Vue JSX integration (#10687)

* Refactor MDX transformJSX handling (#10688)

* Fix vue-jsx change (#10716)

* Fix script inline with directRenderScript (#10686)

* Provide better messaging when renaming a table (#10600)

* Provide better messaging when renaming a table

* Update based on review

* [ci] format

* [ci] update lockfile (#10718)

Co-authored-by: matthewp <matthewp@users.noreply.github.com>

* Increase log severity when a page's `getStaticPaths` fails (#10707)

* [ci] release (#10680)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: use just pnpm to run the build and tests in citgm (#10727)

* 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>

* fix: regression for astro attributes escaping (#10728)

* Fix db seeding when srcDir is root (#10720)

* ci: add ref when checking out the repository (#10733)

* fix(dev): break implicit rerouting loop (#10737)

* fix(dev): infinite implicit rerouting

* test adapter

* changeset

* [ci] format

* [ci] release (#10729)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: Fixed errorOverlay theme toggle bug. (#10661)

* fix: save `localStorage.astroErrorOverlayTheme` when detected dark mode

* add  changeset

* Fix theme toggle in ErrorOverlay

* update  changeset

* [ci] format

* 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>

* 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>

* [ci] format

* 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>

* 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>

* [ci] format

* 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>

* 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>

* [ci] format

* fix some i18n config docs (#10746)

* fix some i18n config docs

* Move manual option to last position

---------

Co-authored-by: = <otterlord.dev@gmail.com>

* [ci] format

* fix(rendering): remove render instructions from slot expressions (#10747)

* [ci] format

* Update a11y-no-noninteractive-tabindex rule for dev tool bar (#10750)

* fix: a11y-no-noninteractive-tabindex

* add changeset

* Update utils.ts: Optimize and simplify code (#10749)

Update utils.ts: Optimize and simplify code

* 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

* 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>

* [ci] release (#10739)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 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>

* [docs] config reference link fix (#10758)

* Limit imports in flight for `getCollection` (#10708)

* [ci] format

* Add useful links to `@astrojs/db` package.json (#10764)

Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>

* Performance improvement in createAstro function (#10765)

* Fix typo in error message for IncorrectStrategyForI18n (#10768)

* 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

* [ci] format

* [ci] release (#10757)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 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>

* [ci] format

* Remove MDX processor on buildEnd (#10770)

* lint: upgrade eslint to version 9 (#10730)

* [ci] format

* fix: picture fallback check (#10783)

* Fix @types/cookie dependency (#10776)

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

* Make viewTransition.finished wait for animations triggered by viewTransition.ready (#10787)

* [ci] format

* fix(assets): Forward headers from the original request to the internal request to the image (#10775)

* [ci] format

* astro/cli/install-package.ts: whichPm may return null if ran in an empty directory (#10782)

* [ci] update lockfile (#10791)

Co-authored-by: matthewp <matthewp@users.noreply.github.com>

* Improve sitemap generate performance (#10795)

* Disable streaming for SSG (#10796)

* fix: use assetsDir in creating vite config (#10732)

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

* fix: MDX cannot find relative image path without leading ./ (#10754)

Co-authored-by: Oliver Speir <115520730+OliverSpeir@users.noreply.github.com>

* [ci] release (#10777)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 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>

* chore: use Biome to format JS files (#10788)

* chore: configuration

* chore: update main commands

* chore: revert formatting package.json

* chore: rebase

* [ci] format

* 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

* [ci] format

* test: fix regression upon import sorting (#10802)

* fix(sitemap): Trailing slashes on root url (#10772)

* add tests that reveal issue

* fix trailing slash root page issue

* add changeset

* [ci] format

* 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>

* add/cli: update list of integrations (#10811)

* 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>

* [ci] format

* [ci] release (#10798)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fixed the path to checkout existing blog posts on the home page of the blog starter template (#10814)

Currently the 4th point on home page says: "Check out the included blog posts in src/pages/blog/". It the path here should be "src/content/blog/".

* Update packages/astro/package.json

* Update pnpm-lock.yaml

* update sharp version in examples/starlog and update pnpm-lock.yaml

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Raz Luvaton <16746759+rluvaton@users.noreply.github.com>
Co-authored-by: apetta <akshaypetta@gmail.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Matthew Phillips <matthewp@users.noreply.github.com>
Co-authored-by: Houston (Bot) <108291165+astrobot-houston@users.noreply.github.com>
Co-authored-by: horo <143025439+horo-fox@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
Co-authored-by: Arsh <lilnasy@users.noreply.github.com>
Co-authored-by: liruifengv <liruifeng1024@gmail.com>
Co-authored-by: liruifengv <ematipico@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Farzad <frzd.shafiee@gmail.com>
Co-authored-by: Ming-jun Lu <40516784+mingjunlu@users.noreply.github.com>
Co-authored-by: 604qgc <130194823+604qgc@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
Co-authored-by: = <otterlord.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <TheOtterlord@users.noreply.github.com>
Co-authored-by: Oliver Speir <115520730+OliverSpeir@users.noreply.github.com>
Co-authored-by: aswind7 <854413241@qq.com>
Co-authored-by: horo <bluwy@users.noreply.github.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>
Co-authored-by: Leander Gilles <leander.gilles@pm.me>
Co-authored-by: Erika <Princesseuh@users.noreply.github.com>
Co-authored-by: Jason <m.jason.liu@outlook.com>
Co-authored-by: Juraj Kapsz <github@jurajkapsz.sk>
Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
Co-authored-by: Meghan Denny <hello@nektro.net>
Co-authored-by: Rishi Raj Jain <rishi18304@iiitd.ac.in>
Co-authored-by: Nick Dubelman <ndubelman@gmail.com>
Co-authored-by: Ben Holmes <hey@bholmes.dev>
Co-authored-by: Robin Gisler <63500142+gislerro@users.noreply.github.com>
Co-authored-by: Avinash Reddy <avinashreddy3108+github@gmail.com>
Co-authored-by: Damanjeet Singh <49544630+DamanjeetSingh1@users.noreply.github.com>
2024-04-24 10:20:07 -04:00
Ming-jun Lu
b673bc8505
Fix an issue where astro build writes type declaration files to outDir (#10861)
* Fix an issue where `astro build` also writes type declaration files to `outDir`

* Add changeset
2024-04-24 19:01:51 +08:00
Houston (Bot)
a94046588c
[ci] release (#10842)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-23 19:30:37 -04:00
Lam
f6bddd3a15
fix: allow redoc to render on react components (#10855)
* fix: removed redoc from noExternal for react

* Add changeset

---------

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2024-04-23 17:29:38 -04:00
Robert van Hoesel
30cf82ac3e
Prevents inputs from changing ViewTransitions' form method or action (#10856)
* Prevents inputs from changing ViewTransitions' form method or action. Fixes #10849

* Consistency 🧘‍♂️
2024-04-23 16:52:55 -04:00
Rishi Raj Jain
204b7820e6
fix: markdown cannot find relative image path without leading ./ (#10801) 2024-04-23 21:24:46 +08: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