Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from withastro:main #2

Open
wants to merge 1,227 commits into
base: main
Choose a base branch
from
Open

Conversation

pull[bot]
Copy link

@pull pull bot commented May 3, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label May 3, 2024
astrobot-houston and others added 29 commits October 31, 2024 17:07
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Reuben Tier <otterlord.dev@gmail.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Princesseuh <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
Co-authored-by: Jonas Robertsson <jonas.robertsson@icloud.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Princesseuh <3019731+Princesseuh@users.noreply.github.com>
* remove default status that swallows response.status

* refactor status compute to be more readable

* changeset
* add manual middleware config option with getMiddlewareContext()

* refactor requestInfo to action object

* set action error response status from render context

* update automatic middleware to plain POST handler

* fix missing Locals type

* test: add separate POST and cookie forwarding tests

* remove actions.middleware flag

* add docs on actionResultAlreadySet

* test: use Astro.rewrite instead of middleware next(). TODO: fix next()

* fix type errors from rebase

* test: remove middleware handler

* test: use cookie forwarding for 'lots of fields'

* refactor: _isPrerendered -> ctx.isPrerendered

* expose getOriginPathname as middleware utility

* add support for handling RPC action results from middleware

* test: RPC security middleware

* refactor POST route handler to use getMiddlewareContext()

* remove unused actionRedirect flag

* changeset

* test: add expectedd rewrite failure for Ema to debug

* fix e2e test

* nit: form -> from

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

* rename getMiddlewareContext -> getActionContext

* rename form-action -> form

* move /_actions/ route pattern to const

* move type defs to user-accessible ActionMiddlewareContext type

* export action middleware context type

* strip omitted fields for Action API Context

* add satisfies to type for good measure

* move getOriginPathname to shared ctx.originPathname

* remove `next()` rewrite because it isn't supported

* fix empty forms raising a 415

* fix missing async on cookie example

* nit: ctx -> context

* fix json parse error when content length is 0

* refactor body parsing to function

* edit: migration -> updating your HTML form actions

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

* update changeset to match docs v5 guide

* add absolute urls to changeset links

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
astrobot-houston and others added 30 commits December 16, 2024 14:51
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add types for Vite inline/no-inline import queries

* Add changeset

* Remove plain `?no-inline` type

* Update changeset
…ld:setup hook when target is "client" (#12763)

Co-authored-by: Alberto Matías <alberto.matias@bestsecret.com>
- Replace `ie` with `e.g.`, as we're dealing with examples
- Use brackets to match the styles of previous lines
)

* feat(assets): Store etag to refresh cached images without a full download

* Seperate loading and revalidating functions

* Add changeset

* Updates based on requested changes

* Wording changes, use stale cache on failure to revalidate

* Add If-Modified-Since as cache revalidation method

* Update .changeset/red-poems-pay.md

Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>

---------

Co-authored-by: Matt Kane <m@mk.gg>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
* wip: experimental sessions

* feat: adds session options (#12450)

* feat: add session config

* chore: add session config docs

* Fix

* Expand doc

* Handle schema

* Remove example

* Format

* Lock

* Fix schema

* Update packages/astro/src/types/public/config.ts

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

* Update packages/astro/src/types/public/config.ts

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

* Add link to Sessions RFC in config.ts

* Move session into experimental

---------

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

* Lock

* feat: prototype session support (#12471)

* feat: add session object

* Add tests and fix logic

* Fixes

* Allow string as cookie option

* wip: implement sessions (#12478)

* feat: implement sessions

* Add middleware

* Action middleware test

* Support URLs

* Remove comment

* Changes from review

* Update test

* Ensure test file is run

* ci: changeset base

* ci: exit from changeset pre mode

* Lockfile

* Update base

* fix: use virtual import for storage drivers (#12520)

* fix: use virtual import for storage drivers

* Don't try to resolve anythign in build

* Fix test

* Polyfill node:url

* Handle custom drivers directly

* No need for path

* Update packages/astro/src/core/session.ts

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

---------

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

* Fix jsdoc

* fix: set default storage path

* Update changeset config for now

* Revert config workaround

* Lock

* Remove unneeded ts-expect-error directive

* fix: [sessions] import storage driver in manifest (#12654)

* wip

* wip

* Export manifest in middleware

* Changeset conf

* Pass session to edge middleware

* Support initial session data

* Persist edge session on redirect

* Remove middleware-related changes

* Refactor

* Remove vite plugin

* Format

* Simplify import

* Handle missing config

* Handle async resolution

* Lockfile

* feat(sessions): implement ttl and flash (#12693)

* feat(sessions): implement ttl and flash

* chore: add unit tests

* Make set arg an object

* Add more tests

* Add test fixtures

* Add comment

* Remove session.flash for now (#12745)

* Changeset

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
)

* fix: clear the content layer cache when the Astro config changes

* Use deterministic-object-hash

* Switch back to safe-stringify

* Whitespace
* feat(actions): getActionPath()

* feat: take trailing slash into account

* fix

* fix

* Update wise-boxes-develop.md

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>

* Update .changeset/wise-boxes-develop.md

Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>

---------

Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.