Commit graph

953 commits

Author SHA1 Message Date
Houston (Bot)
087270c61f
[ci] release (#8064)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-15 22:35:58 +08:00
hbgl
560e459246
Stream request body instead of buffering it in memory (#8084)
Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
2023-08-15 15:26:18 +01:00
Bjorn Lu
fa29e4a36f
Remove deepmerge-ts for simpler implementation (#8086) 2023-08-15 21:11:00 +08:00
Nate Moore
44cf30a252
chore: slim create-astro deps (#8077) 2023-08-14 14:23:14 -05:00
Houston (Bot)
f39a80c583
[ci] release (#8043)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-11 14:02:47 -04:00
Matthew Phillips
4a145c4c7d
Fix same-page transition with different query params (#8042) 2023-08-11 13:54:31 -04:00
Houston (Bot)
e1a886530f
[ci] release (#8023)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-11 11:22:23 -04:00
Alexander Niebuhr
ffcfcddb75
feat(@astrojs/cloudfalre): add cloudflare envs to Astro.locals (#7541)
* add support for advanced mode

* add support for directory mode

* use asset fallback as in cloudflare's docs

* update locals

* come up with new runtime in `Astro.locals`

* add overwrite protection

* minor cleanup

* changeset

* address review comments

* move overwrite protection to adapter

* fix types

* fix comment

* resolve review comments

* update changeset

* add test

* redo ts

* fix integration test port

* updated tests, add new port

* add TODO comment

* update changeset

* add JSDoc

* Update packages/integrations/cloudflare/src/runtime.ts

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-08-10 10:19:00 -05:00
Houston (Bot)
fc30b8539c
[ci] release (#8017)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-10 21:25:28 +08:00
Marco Schumacher
ea30a9d4f2
more efficient _routes.json for cloudflare integration (#7846)
* more efficient _routes.json for cloudflare integration

* added tests

* updated pnpm-lock.yaml

* added changeset

* cleaned up test

* fix: convert window path separators

* updated docs

* handle more cases

* Apply suggestions from code review

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

* incorporate feedback from code review

* used other pnpm version

* better fallback for empty include array

* adjust test case to changed fallback for empty include array

* updated docs

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2023-08-10 04:04:09 +01:00
Houston (Bot)
9cb32e2a5f
[ci] release (#8000)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-09 15:31:34 -05:00
Elian ☕️
4d160fa1e2
chore: remove MDX integration from Tailwind example (#7987)
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-08-07 16:23:39 -05:00
Houston (Bot)
2e36d96588
[ci] release (#7988)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-07 16:21:15 -05:00
Houston (Bot)
9509a66a7b
[ci] release (#7958)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-07 13:51:05 -05:00
Houston (Bot)
49b3cf423b
[ci] release (#7937)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-03 15:16:51 -04:00
Matthew Phillips
3a01ef7cc1 Use workspace version for Vercel test 2023-08-03 15:00:22 -04:00
Matthew Phillips
a765098ca3 Use workspace dependency in Netlify test 2023-08-03 14:55:22 -04:00
Houston (Bot)
39b044e09b
[ci] release (#7912)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-03 10:54:48 -04:00
Matthew Phillips
41afb84057
Persistent DOM in ViewTransitions (#7861)
* First pass at transition:persist

* Persistent islands

* Changeset

* Updated compiler

* Use official release

* Upgrade again

* Refactor to allow head content to persist untouched

* >=

* Specify the types for "astro:persist"

* Automatically persist links

* Use reference for array

* Upgrade to latest compiler version

* Explain the feature

* Update .changeset/empty-experts-unite.md

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

* Update .changeset/empty-experts-unite.md

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

* Update .changeset/empty-experts-unite.md

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

* Update .changeset/empty-experts-unite.md

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

---------

Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-08-02 14:42:01 -04:00
Bjorn Lu
00cb28f496
Improve sourcemap generation and performance (#7901) 2023-08-02 11:30:53 +08:00
ottomated
c00b6f0c49
Fix astro/app import (#7821)
* core -> core.js

* changeset

* test

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-08-01 18:34:22 -05:00
Hee
560d0dab1c
feat: add cache headers to assets in Vercel adapter (#7729)
* feat: cache assets in Vercel adapter

* Update tidy-tips-doubt.md

* chore: update lockfile

* Update packages/integrations/vercel/test/static-assets.test.js

* Update packages/integrations/vercel/test/static-assets.test.js

* Update packages/integrations/vercel/test/static-assets.test.js

* chore: update split test

---------

Co-authored-by: Kid <44045911+kidonng@users.noreply.github.com>
Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-08-01 18:06:50 -05:00
Houston (Bot)
1d9e34b136
[ci] release (#7877)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-01 23:38:24 +08:00
Nate Moore
298dbb89f2
Refactor 404 and 500 approach (#7754)
* fix(app): refactor 404 and 500 approach

* chore: refactor logic

* fix: always treat error as page

* test: migrate ssr-prerender-404 to node adapter

* feat: merge original response metadata with error response

* chore: update lockfile

* chore: trigger ci

* chore(lint): fix lint issue

* fix: ensure merged request has proper status

* fix(node): prerender test

* chore: update test label

* fix(node): improve 404 behavior in middleware mode

* fix(vercel): improve 404 behavior

* fix(netlify): improve 404 behavior

* chore: update test labels

* chore: force ci

* chore: fix lint

* fix: avoid infinite loops

* test: fix failing test in Node 18

* chore: remove volta
2023-08-01 09:52:16 -05:00
Houston (Bot)
d2b6dabfb3
[ci] release (#7854)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-28 12:34:00 -04:00
Houston (Bot)
98ca04f915
[ci] release (#7851)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-28 09:12:05 -04:00
Houston (Bot)
3b422272e6
[ci] release (#7813)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-27 15:33:13 -04:00
Matthew Phillips
59b5562326
Allow the Image component to get transitions (#7836)
* Images and view transitions

* Upgrade compiler

* Adding a changeset
2023-07-27 15:08:45 -04:00
Erika
d5f526b339
test: add test in the Node adapter for astro:assets (#7734) 2023-07-26 23:58:47 +02:00
Houston (Bot)
db8c04002f
[ci] release (#7784)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-25 15:15:41 -04:00
Alex Sherwin
7461e82c81
Add "allowHTML" option for Markdoc with HTML parsing/processing (#7597)
* 7576 - initial support for HTML inside Markdoc.

This uses htmlparser2 to perform a pure token transform/mutation
on the markdown-it tokens, replacing the original raw HTML string
tokens with a richer set of tokens per HTML node, and in the process
Markdoc tags are interleaved in the resulting token graph at the
appropriate locations

This removes the legacy config of the @astrojs/markdoc integration
entirely (suggested by @bholmesdev) and introduces a new type for
options to be specified in the astro config, initially, with just the new
"enableHTML" option

When "enableHTML" is *not* enabled (the default), the behavior
of the entire @astrojs/markdoc integration should remain functionally
equivalent to before this change

* 7576 - fixed issues with whitespace preservation

also:

* cleaned up " to ' for astro project preferred linting
* made the html rendering test fixture use a dynamic path

* 7576 - detailed nested HTML test coverage

* 7576 -  component + HTML interleaved tests

* 7576 -  fix lint problems from previous changes

* 7576 -  some commentary

* 7576 -  file naming, refactor html under imports, package.json exports definition for html

* 7576

* move out of extensions dir, remove export
* cdata handling changes

* 7576

* inline license from third party code
* cleanup test class copy of HTML output
* remove // third party indicators for imports (clarification: not third party code, just a indicator this group of imports is third party)

* 7576 - fixed test before/after for DRY'ness

* 7576 - no need to React-ify HTML attribute case

* 7576 - rename "enableHTML" option to "allowHTML"

* Added Markdoc allowHTML feature changeset

* 7576 - updated README with allowHTML info

* 7576 - fixed changeset typo

* 7576 - minor edits based on PR feedback for docs

* 7576 - minor edits based on PR feedback for docs
2023-07-24 19:34:06 -04:00
Houston (Bot)
e80896a67c
[ci] release (#7763)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-24 17:09:11 +08:00
Birk Skyum
0c9959704f
Bump vite to 4.4.6 (#7746) 2023-07-24 16:21:17 +08:00
Houston (Bot)
16a41528e4
[ci] release (#7737)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-21 16:37:17 -04:00
Erika
471324b0a3
test: add setup for Vercel / Netlify tests (#7716)
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
2023-07-21 21:24:36 +02:00
Houston (Bot)
92382ea1d4
[ci] release (#7714)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-20 12:09:38 -04:00
ottomated
3a6e42e190
Determine hoisted scripts via AST analysis (#7707)
* initial hacky

* plural importNames and exportNames

* extract into function

* Add test

* fix issue with another component importing our tracked component

* fix dynamic imports

* changeset

* add mdx to checklist

* mdx exports Content

* remove unused var

* Update packages/astro/test/hoisted-imports.test.js

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

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

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

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

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

* Update real-drinks-melt.md

* Update .changeset/real-drinks-melt.md

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

* Update .changeset/real-drinks-melt.md

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

* Update .changeset/real-drinks-melt.md

* Update .changeset/real-drinks-melt.md

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

---------

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-07-20 12:03:40 -04:00
Bjorn Lu
d8bae784b4
Fix organize-imports-cli with satisfies operator (#7727) 2023-07-20 20:47:36 +08:00
Matthew Phillips
6a12fcecb0
Initial View Transition Support (#7511)
* Basic support

* Add the fade transition

* Move CSS into a separate file

* Add transition name

* View Transitions changeset

* Replace the boolean transition with 'morph'

* Update to use `transition:animate`

* Use head propagation

* Move CSS into a separate file

* Add builtin animations and namespaced module

* Misquote

* Remove unused code

* Add automatic prefetching to the View Transitions router

* Use a data attribute for back nav animations

* Use [data-astro-transition]

* Add view transitions to examples

* Wait on the HTML response before calling startViewTransition

* Updated stuff

* Update the compiler

* Fix

* Fallback support

* Properly do fallback

* Simplify the selectors

* Put viewTransitions support behind a flag

* Upgrade the compiler

* Remove unused import

* Add tests

* Use an explicit import instead of types

* Fix case where the click comes from within nested content

* Fix linting

* Add a test for the back button

* Prevent glitch in fallback

* Do not combine selectors

* Fallback to MPA nav if there is an issue fetching

* Fallback swap if there are no animations

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

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

* Update packages/astro/components/ViewTransitions.astro

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

* Update packages/astro/components/ViewTransitions.astro

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

* Update the changeset

* PR review changes

* Update more based on review comments.

* Update the updateDOM default

* Pass in transitions options to the compiler

* Update broken tests

* Update .changeset/silly-garlics-live.md

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

* Update .changeset/silly-garlics-live.md

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

* Update .changeset/silly-garlics-live.md

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

* Update .changeset/silly-garlics-live.md

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

* h2 -> h4

* Upgrade to stable compiler

* Remove exp redirects from sitemap

* Remove usage from examples

* Remove example updates

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2023-07-19 15:18:41 -04:00
Houston (Bot)
de65ad25ea
[ci] release (#7699)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-19 09:32:32 +02:00
Nate Moore
d401866f93
Fix 404 handling in dev server (#7693)
* fix(#7301): load 404 page in dev server when returning 404 status code

* chore: add changeset

* fix(404): expose exact pathname/URL when rendering 404

* test: add custom-404-server test
2023-07-18 12:09:18 -05:00
Houston (Bot)
d80e5fcf8e
[ci] release (#7681)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-18 16:14:39 +08:00
Emanuele Stoppa
4c93bd8154
feat(@astrojs/netlify): edge middleware support (#7632)
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
2023-07-17 15:53:10 +01:00
Houston (Bot)
dc7ab8af65
[ci] release (#7658)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-14 16:16:31 -05:00
Houston (Bot)
1f2d52bd7b
[ci] release (#7645)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-14 10:44:25 -04:00
Houston (Bot)
db4095d3f5
[ci] release (#7624)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-13 21:43:11 +08:00
Emanuele Stoppa
f21357b69d
feat(@astrojs/netlify): add build.split support (#7615)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2023-07-13 09:21:33 +01:00
Josh Goldberg ✨
df49bbe7f1
feat: bumped typescript-eslint to v6 stable 🥳 (#7626) 2023-07-12 15:11:46 +08:00
Emanuele Stoppa
2ddf342626
fix(@astrojs/vercel): improve file detection (#7621) 2023-07-12 08:06:08 +01:00
Houston (Bot)
f0666b92c3
[ci] release (#7594)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-11 22:27:04 +08:00