Commit graph

1244 commits

Author SHA1 Message Date
Nate Moore
77ffcc8f8b
fix(sitemap): ensure nested 404 and 500 pages are excluded (#7722) 2023-07-19 17:05:44 -05: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
Matthew Phillips
ec745d689a
Remove experimental flag for redirects config (#7686)
* Remove experimental flag for redirects config

* Remove experimental from tests

* Remove experimental CLI flag

* Add changeset

* Removing redirect test that is no longer relevant

* Remove experimental label"

* Update .changeset/dry-beers-grow.md

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

* Update .changeset/dry-beers-grow.md

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

* Remove old function

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-07-19 09:31:07 -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
Princesseuh
a8cbd7c71a [ci] format 2023-07-18 16:06:17 +00:00
Erika
4f6b5ae2ba
Fix/markdoc assets (#7706) 2023-07-18 18:03:46 +02:00
Chris Swithinbank
a77741d25e
Add changeset & docs for next @astrojs/netlify release (#7700)
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
2023-07-18 16:57:19 +01: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
Bjorn Lu
d9f4126645
Revert netlify edge middleware docs (#7698) 2023-07-18 16:07:11 +08:00
Princesseuh
1c85b39d38 [ci] format 2023-07-18 00:20:47 +00:00
Erika
f14e48098a
nit: use node: prefix everywhere (#7692)
* nit: use `node:` prefix everywhere

* nit: fs/promises too

* test: workaround issue in node builtin detection
2023-07-18 02:17:59 +02:00
natemoo-re
b0d3652c59 [ci] format 2023-07-17 20:32:14 +00:00
Nate Moore
dd931a7806
Sitemap should only include page routes (#7656)
* fix(#7080): sitemap should only add trailing slash to pages

* fix(sitemap): only include pages in sitemap

* chore: add test

* chore: remove unused import

* docs: update readme
2023-07-17 15:29:56 -05:00
ematipico
7832c4a850 [ci] format 2023-07-17 14:56:14 +00: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
matthewp
c84e8b8e3e [ci] format 2023-07-17 13:15:32 +00:00
Alexander Niebuhr
6ec040761e
fix(@astrojs/cloudflare): SSR split file renaming misses ts endpoints (#7568)
* fix bug, where ts files where not renamed correctly

* try to make rename logic more robust

* remove log

* update tests

* update changeset

* cleanup

* fix lint

* debug windows tests

* fix windows support

* fix cloudflare directory code

* use EventContext type

* improve for loop

* change changeset

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

* change changeset

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

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2023-07-17 09:12:41 -04:00
Bjorn Lu
1f0d0b5863
Fix vercel build error when passing includeFiles (#7677) 2023-07-17 20:57:27 +08:00
Bjorn Lu
1a6f833c40
Fix cloudflare runtime env var handling (#7679)
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2023-07-17 20:57:08 +08:00
Bjorn Lu
d69fe3a8d2
Handle flaky tests (#7651) 2023-07-17 20:30:02 +08: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
natemoo-re
ea910de61f [ci] format 2023-07-14 21:03:24 +00:00
Nate Moore
57a5eff5ce
fix(#7654): exclude @vercel/nft (#7659) 2023-07-14 16:01:06 -05:00
natemoo-re
4f9032be7c [ci] format 2023-07-14 19:32:59 +00:00
Nate Moore
c258492b72
Sitemap should only exclude 404 and 500 pages (#7655)
* fix(#7472): sitemap should only exclude 404 and 500 pages

* chore: refactor logic, add test
2023-07-14 14:30:33 -05:00
Matthew Phillips
795d598aeb
Revert "Clarify SSR limitations of sitemaps of dynamic routes (#7625)" (#7653)
This reverts commit 9352ac65f4.
2023-07-14 11:47:24 -04:00
matthewp
798442427d [ci] format 2023-07-14 14:58:18 +00:00
paulrudy
9352ac65f4
Clarify SSR limitations of sitemaps of dynamic routes (#7625)
While this README doesn't distinguish between SSR mode and static mode (and SSR mode was recently made available for the sitemaps integration), there is one important difference: Dynamic routes that are server-rendered can't be used to create sitemap entries.

This note makes that clear.
2023-07-14 10:56:03 -04: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
Erika
b3b640435b
nit: export props has been unnecessary.. forever (#7646) 2023-07-14 09:57:06 -04:00
Sarah Rainsberger
de5fbd3e4b
[docs] fix link in image integration README (#7649) 2023-07-14 08:05:24 -03: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
sarah11918
14d4ce9246 [ci] format 2023-07-13 11:19:28 +00:00
Sarah Rainsberger
9b2629d7d4
[docs] update image integration README (#7633)
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
2023-07-13 08:17:10 -03:00
ematipico
d780508a42 [ci] format 2023-07-13 08:24:04 +00: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
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
Yan Thomas
131c92279e
Update prefetch README filename styling (#7613) 2023-07-10 14:37:09 +01:00
Ben Holmes
8df6a423c5
Fix: Hyphens breaking Markdoc tags (#7599)
* fix: handle hyphens in tag names

* test: add hyphen in test suite

* chore: changeset
2023-07-07 16:50:06 -04:00
matthewp
6fd9f4a160 [ci] format 2023-07-07 20:04:18 +00:00
Kory Smith
9807e4dc22
Updates prefetch integration to add "only prefetch link on hover/mouseover/focus" option (#6585)
* modifies prefetch to add the option to only prefetch certain pages on hover

* adds new pages to the test website to showcase prefetch-intent functionality

* adds tests to verify prefetch-intent behavior

* adds changelog

* waits until networkidle to check if the prefetching worked instead of waiting on a specific url load

* allows intentSelector to be either a string or array of strings

* Revert "allows intentSelector to be either a string or array of strings"

This reverts commit b0268eb0d5.

* fixes the multiple selector logic and adds tests

* updates docs to include new prefetch-intent integration

* Update packages/integrations/prefetch/README.md

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

* Update packages/integrations/prefetch/README.md

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

* Update packages/integrations/prefetch/README.md

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

* Update .changeset/little-cars-exist.md

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

* Update packages/integrations/prefetch/README.md

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

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2023-07-07 16:01:23 -04:00
Ben Holmes
c135633bf6
Fix: Markdoc v0.4.0 docs (#7593)
* docs: add docs link to markdoc error

* docs: add named exports guide to README

* chore: changeset

* edit: no like so

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

* edit: exposed as named exports

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

---------

Co-authored-by: bholmesdev <bholmesdev@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2023-07-07 09:22:26 -04:00
zyoshoka
6f1c4ea388
Fix code snippet in markdoc README (#7592) 2023-07-07 07:22:47 -04:00
Tom Adler
3153d04dad
Runtime environment variables docs for node integration (#7378)
* Runtime environment variables docs for node integration

* Update packages/integrations/node/README.md

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

* final fixes

---------

Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>
2023-07-07 09:45:12 +01:00
Yusuf
6bf20b62ce
docs(cloudflare): fix code snippet in enabling preview (#7591) 2023-07-07 09:28:30 +01:00
Houston (Bot)
f224078a65
[ci] release (#7578)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-06 23:16:08 +08:00
Bjorn Lu
30d04db981
Refactor SSRResult and RenderContext (#7575) 2023-07-06 00:25:24 +08:00
ematipico
c490eb6e52 [ci] format 2023-07-05 15:48:32 +00:00
Emanuele Stoppa
9e5fafa2b2
feat: vercel edge middleware support (#7532)
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-07-05 16:45:58 +01:00
Houston (Bot)
f820bb3f0b
[ci] release (#7559)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-05 14:48:04 +08:00
THARAK HEGDE
4aecebae26
Fix MDX README typo (#7567) 2023-07-05 14:15:32 +08:00
Bjorn Lu
e7cea6f755
Fix incorrect format from organize-imports-cli (#7553) 2023-07-03 21:11:09 +08:00
bluwy
cf515254a5 [ci] format 2023-07-03 13:02:42 +00:00
Josh Goldberg ✨
2fea174303
feat: use typescript-eslint@v6's reworked configs (#7425) 2023-07-03 20:59:43 +08:00
Houston (Bot)
fc6826ff76
[ci] release (#7526)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-03 20:53:45 +08:00
bluwy
94a1529587 [ci] format 2023-07-03 08:12:47 +00:00
Wooseop Kim
e644b34659
fix: make Picture generate valid dev URLs (#7500) 2023-07-03 16:09:40 +08:00
Hippo
bc9ce779d3
Move code block titles into comments to match docs (#7543)
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
2023-07-01 16:34:49 +02:00
Paweł Mrowiec
4256409a94
Fix image metadata generation (#7510)
* Fix problem where image metadata generation throwed error when provided url started with /@astroimage

* Remove unnecessary changes
2023-06-30 09:38:23 -05:00
ematipico
5b1745bf31 [ci] format 2023-06-30 09:12:30 +00:00
Alexander Niebuhr
1a59185ddd
feature(astrojs/cloudflare): add support for splitted SSR bundles (#7464)
* initial commit

* try to fix windows

* output files directly into the correct folder

* allow for rest parameters

* use fixed hook

* improve tests

* apply doc's team suggestions for README

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

* try to fix prerendering

* apply doc's team suggestion for changeset

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

* bump to minor

* readme update

* resolve review comments

* optimize memory allocation

* resolve review comments

* add removed link, to make sure old docs keep same

* resolve comment

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2023-06-30 10:09:21 +01:00
matthewp
7ae6e89292 [ci] format 2023-06-29 20:21:41 +00:00
Matthew Phillips
154af8f5ea
Split support in the Vercel Serverless adapter (#7514)
* start of vercel split support

* Split Mode with the Vercel Adapter

* Write routes into the config.json

* Add a changeset

* Add docs

* Better changeset
2023-06-29 16:18:28 -04:00
Houston (Bot)
56f1b1229c
[ci] release (#7496)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-29 17:14:24 +08:00
Emanuele Stoppa
f4fea3b02b
fix: correctly handle prerender pages in split mode (#7509) 2023-06-28 13:06:16 +01:00
Ben Holmes
1a9b644e20
fix: ts-expect-error (#7505) 2023-06-27 16:25:27 -05:00
bholmesdev
647079da14 [ci] format 2023-06-27 19:08:29 +00:00
Ben Holmes
fb7af55114
feat: New Markdoc render API (#7468)
* feat: URL support for markdoc tags

* refactor: move to separate file

* feat: support URL for markdoc nodes

* feat: support `extends` with URL

* chore: changeset

* fix: bad AstroMarkdocConfig type

* fix: experimentalAssetsConfig missing

* fix: correctly merge runtime config

* chore: formatting

* deps: astro internal helpers

* feat: component() util, new astro bundling

* chore: remove now unused code

* todo: missing hint

* fix: import.meta.url type error

* wip: test nested collection calls

* feat: resolve paths from project root

* refactor: move getHeadings() to runtime module

* fix: broken collectHeadings

* test: update fixture configs

* chore: remove suggestions. Out of scope!

* fix: throw outside esbuild

* refactor: shuffle imports around

* Revert "wip: test nested collection calls"

This reverts commit 9354b3cf9222fd65b974b0cddf4e7a95ab3cd2b2.

* chore: revert back to mjs config

* chore: add jsdocs to stringified helpers

* fix: restore updated changeset

---------

Co-authored-by: bholmesdev <bholmesdev@gmail.com>
2023-06-27 15:05:17 -04:00
Ben Holmes
f6feff7a29
feat: restart server on markdoc config change (#7467)
* deps: vite-plugin-restart

* feat: restart on markdoc config change

* chore: changeset

* chore: roll our own restarter!

* deps: remove vite-plugin-restart

* refactor: use good enough option
2023-06-27 10:46:59 -04:00
Houston (Bot)
da56a005d9
[ci] release (#7449)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-27 08:42:46 -04:00
Chris Swithinbank
2eca765f91
Remove invalid code block language tag in sitemap README (#7487) 2023-06-27 00:02:20 +02:00
Erika
4e02a59e42
fix(errors): Deprecate error codes (#7347)
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2023-06-26 16:51:06 +08:00
bluwy
39a24f111d [ci] format 2023-06-26 03:40:32 +00:00
Waxer59
409734a9af
Typo fixed in node.mdx (#7465) 2023-06-26 11:34:56 +08:00
Bjorn Lu
8e3cb20b5c
Format markdown files (#7439)
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2023-06-26 11:34:13 +08:00
Willow (GHOST)
6e7f38dd79
Svelte Four (#7454) 2023-06-25 22:33:00 +08:00
Bjorn Lu
2b75399520
Remove slash package (#7440) 2023-06-23 16:48:05 +08:00
Bjorn Lu
32bde967f4
Fix vercel redirects with trailingSlash always (#7447) 2023-06-22 23:40:08 +08:00
Houston (Bot)
38b104049a
[ci] release (#7434)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-22 10:06:15 -04:00
Wooseop Kim
9739adc91f
fix: encode spaces when generating srcset (#7340) 2023-06-22 15:56:41 +08:00
Bjorn Lu
f275d058fc
Update safe dependencies (#7430) 2023-06-21 21:09:49 +08:00
Emanuele Stoppa
8e2923cc62
feat: expose locals to render api and from requests in dev mode (#7385)
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: wrapperup <wrapperup4@gmail.com>
2023-06-21 13:07:16 +01:00
Emanuele Stoppa
61d6e45cef
docs: add snippet for base option (#7384) 2023-06-21 13:06:43 +01:00
Houston (Bot)
1589eaabcd
[ci] release (#7428)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-20 10:32:26 -04:00
ematipico
82b1964432 [ci] format 2023-06-20 10:26:55 +00:00
Torbjørn Holtmon
94afaa3e50
fix: cloudflare waitUntil not working as inteded with getRuntime (#7419)
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2023-06-20 11:24:32 +01:00
Houston (Bot)
f87680f6df
[ci] release (#7390)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-19 11:36:45 -04:00
Bjorn Lu
556fd694a6
Rename tailwind integration options (#7391) 2023-06-15 23:40:42 +08:00
Arsh
d67ae84610
Node built-in modules support for Deno adapter (#7288)
* feature(deno adapter): allow built-in node modules

* Add changeset

* format
2023-06-15 10:20:35 -04:00
Tom
3f1cb6b1a0
@astrojs/tailwind: simplify, upgrade & fix support for ts config file (#6724)
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2023-06-14 17:55:37 +08:00
Houston (Bot)
06315a1fde
[ci] release (#7368)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-13 16:55:58 -04:00
matthewp
32b0f84a1c [ci] format 2023-06-13 20:37:42 +00:00
beynar
6d8aa4b61f
[Cloudflare integration] Expose cf metadata and Cloudflare caches API (#7386)
* Add cf and cache properties to runtime

* add changeset

* reorder import

* fix types and add tests

* fix package name

* test
2023-06-13 16:34:44 -04:00
Bjorn Lu
3e1fbc2c8f
Use stub image service for tests (#7376) 2023-06-13 22:47:24 +08:00
Matthew Phillips
0986a44ddd
Upgrade lit deps (#7373)
* Upgrade lit deps

* Add changeset

* Downgrade peer dep

* Upgrade lockfile

* add client dep
2023-06-12 15:52:13 -04:00
Houston (Bot)
4f7091206c
[ci] release (#7354)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-10 13:54:36 -04:00
bholmesdev
777e5d7587 [ci] format 2023-06-10 17:45:51 +00:00
Ben Holmes
a30f2f3de4
Fix Markdoc cloudflare errors (#7351)
* fix: move `node:` libs out of utils

* fix: node -> default

* chore: remove kleur from markdoc ex (why was this there??)

* chore: lock

* chore: changeset
2023-06-10 13:43:26 -04:00
Ben Holmes
491c2db424
Fix: better collection entry devalue error (#7341)
* feat: add clear error for devalue parse

* refactor: create error data entry

* deps: up devalue

* chore: changeset
2023-06-09 18:15:11 -04:00