Commit graph

2417 commits

Author SHA1 Message Date
Houston (Bot)
8226002c0a
[ci] release (#7941)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-03 16:47:20 -05:00
Nate Moore
89cd4b877e
Handle error state for version (#7939)
* fix(create-astro): handle error state for version

* fix: handle missing version
2023-08-03 16:03:04 -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
4b6deda360
Export createTransitionScope from the runtime (#7936) 2023-08-03 14:41:08 -04:00
Nate Moore
6035bb35f2
Fix duplicate slash handling (#7935)
* fix(#7806): collapse duplicate slashes

* refactor: handle request.url with duplicate slashes

* chore: improve duplicate slash test

* fix: only collapse duplicate slashes once

* chore: appease TS
2023-08-03 13:13:39 -05: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
Bjorn Lu
1f0ee494a5
Fix failed server restart calling integration hooks twice (#7917)
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2023-08-03 22:26:24 +08: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
Martin Trapp
c264be3497
Fix scroll position in view transition (#7882) (#7911) 2023-08-02 13:07:30 -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
DixCouleur
4dd6c7900c
Fix "res.writeHead is not a function" in Express/node middleware (#7708)
* fix: res.writeHead is not a function

* fix: handler params type added

* fix: handler function params error

* Update packages/integrations/node/src/nodeMiddleware.ts

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-08-01 17:10:29 -05:00
Tony Dang
e1e958a758
Fix: Content Collections - Ignore .json files nested in non-underscored subdirectories within underscored directories (#7909)
* test: add test file so tests fail before fix

* fix: ignore files nested in underscore directories

* chore: add changeset

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-08-01 16:08:11 -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
Sam Hulick
5c5da8d2fb
feat: add logging for when hydrate's JSON parse fails (#7887)
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2023-08-01 16:33:38 +01: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
Bjorn Lu
0b8375fe82
Fix streaming Astro components (#7895) 2023-08-01 21:30:47 +08:00
Bjorn Lu
ebf7ebbf7a
Refactor and improve Astro config loading flow (#7879) 2023-08-01 17:11:26 +08:00
André Alves
9e22038472
Fix incorrect build path logging for 404.astro pages (#7885)
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-08-01 08:53:47 +01:00
Emanuele Stoppa
89d015db6c
fix: scan getStaticPaths only in .astro files (#7876) 2023-07-31 17:24:13 +01:00
Yan Thomas
1859960d04
Update old link from @astrojs/netlify README (#7862)
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2023-07-31 13:50:53 +01: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
Matthew Phillips
861f10eafd
Fix redirect in SSR (Node and dynamic) (#7856) 2023-07-28 12:00:26 -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
Matthew Phillips
49a4b28202
Scroll position restoration (#7800)
* Scroll position restoration

* Adding a changeset

* Throttle state persistence

* very important change
2023-07-28 09:07:00 -04:00
Bjorn Lu
e50f646758
Fix head propagation for MDX components (#7838) 2023-07-28 18:00:53 +08:00
Emanuele Stoppa
2275c7d56b
fix: dev server should redirect when a page doesn't exist (#7841) 2023-07-28 09:20:00 +01: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
Matthew Phillips
7dbcbc86b3
Track added links/styles/scripts to prevent duplicates (#7843)
* temporary change

* Track rendered styles and links to prevent duplicates

* Adding a changeset

* Fix names
2023-07-27 14:42:22 -04:00
Matthew Phillips
5161cf919c
Add astro:beforeload event (#7823)
* Add astro:beforeload event

* Adding a changeset

* Update .changeset/chilled-elephants-develop.md

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

---------

Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
2023-07-27 08:57:37 -04:00
Matthew Phillips
267487e63e
Prevent navigation on hash change (#7824) 2023-07-27 08:42:04 -04:00
Erika
b063a2d8ae
fix(assets): Fix endpoint not being injected when an integration would enable experimental.assets (#7829) 2023-07-27 11:37:27 +02:00
Erika
d5f526b339
test: add test in the Node adapter for astro:assets (#7734) 2023-07-26 23:58:47 +02:00
Erika
31c4031ba7
fix: squoosh not working on Windows in certain situations (#7826) 2023-07-26 21:38:37 +02:00
Matthew Phillips
42a21b5da6
Prevent building .html files in hybrid mode (#7805)
* Prevent building .html files in hybrid mode

* Adding a changeset
2023-07-26 07:58:57 -04: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
Bjorn Lu
0f677c009d
Refactor Astro rendering to write results directly (#7782) 2023-07-25 23:44:25 +08:00
Matthew Phillips
188eeddd47
Execute scripts on page navigation (view transitions) (#7786)
* Execute scripts on page navigation (view transitions)

* Update .changeset/sharp-seas-smile.md

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-07-25 08:35:47 -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
Kevin Whinnery
0a1b33349f
Update esbuild target for Deno (#7687)
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2023-07-24 22:58:05 +08: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
Bjorn Lu
3567afac44
Fix rendering TextEncoder encoding error regression (#7777) 2023-07-24 16:22:05 +08:00
Birk Skyum
0c9959704f
Bump vite to 4.4.6 (#7746) 2023-07-24 16:21:17 +08:00
Erika
da7f1128bf
Fix missing referrerpolicy attribute on script tags (#7766)
* fix(astro-jsx): Add missing `referrerpolicy` attribute for script tags

* chore: changeset
2023-07-23 15:00:41 +02:00
Erika
1792737dae
Misc improvements for astro:assets (#7759) 2023-07-21 23:59:14 +02: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
Matthew Phillips
274e675328
Prevent FOUC with production links in ViewTransitions (#7756)
* Prevent FOUC with production links in ViewTransitions

* Adding changeset

* Move up so it works with fallback too
2023-07-21 16:26:42 -04:00
Matthew Phillips
c2d6cfd0c2
Prevent animations with prefers-reduced-motion (#7757)
* Prevent animations with prefers-reduced-motion

* Also disable animations in the fallback

* Change select to target elements
2023-07-21 16:10:48 -04:00