Commit graph

1275 commits

Author SHA1 Message Date
Ben Holmes
7820096e1b
fix: correctly add react-dom alias to Vercel edge (#4421)
* fix: correctly add react-dom alias to vercel edge

* chore: changeset
2022-08-22 11:46:02 -04:00
Bjorn Lu
39088e11db
Bump Vite to 3.0.9 (#4415) 2022-08-22 10:58:50 -04:00
Matthew Phillips
5e82f6c245
Fix race condition with directive definitions (#4375) 2022-08-22 10:39:16 -04:00
Bjorn Lu
77b068086d
Preserve all error stack lines (#4364) 2022-08-18 14:36:31 +08:00
Chris Swithinbank
beed20be4a
Provide correct MIME type for dynamic endpoint routes in dev (#4356) 2022-08-17 20:07:14 +02:00
Bjorn Lu
500332a426
Refactor static build config merge (#4344) 2022-08-17 23:24:14 +08:00
Joseph Lozano
aa5118e854
Fallback to undefined rather than false when resolving CLI flags (#4362) 2022-08-17 15:47:38 +08:00
Fred K. Bot
1de82f0f78
[ci] release (#4333)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-16 10:14:44 -04:00
Patrick Smith
45fdbc4650
Don’t use Buffer.byteLength() as Deno can’t use it (#4324)
* Don’t use Buffer.byteLength() as Deno can’t use it

* Add changeset

* Add tests for Markdown & MDX with Deno

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-08-16 10:08:40 -04:00
Ben Holmes
166b3b8a54
Fix: TS lint on MDXLayoutProps (#4347)
* fix: extends interface -> type

* chore: changeset
2022-08-16 09:45:10 -04:00
Tony Sullivan
0274b8d47b
SSR doesn't need to block multiple routes that match the same URL (#4329)
* fix: SSR doesn't need to block multiple routes that match the same URL

* chore: add changeset
2022-08-15 13:57:10 -04:00
Matthew Phillips
b55f76c1ca
Fix double injecting of head content in md pages (#4334)
* Fix double injecting of head content

* Refactor

* Changeset

* Break into a separate util fn

* fix oops

* remove unused code
2022-08-15 13:10:28 -04:00
Ben Holmes
f1a52c18af
[MDX] Switch from Shiki Twoslash -> Astro Markdown highlighter (#4292)
* freat: twoslash -> Astro shiki parser

* test: update shiki style check

* feat: always apply rehypeRaw

* deps: move remark-shiki-twoslash to dev

* test: add shiki-twoslash test

* docs: update readme with twoslash example

* chore: changeset

* nit: remove "describe('disabled')"
2022-08-15 10:43:12 -04:00
Fred K. Bot
16edf0c773
[ci] release (#4296)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-13 10:09:17 -07:00
Fred K. Schott
1d3a0a16f3
Revert "Ensure hydration scripts inside of slots render ASAP (#4288)" (#4302)
* Revert "Ensure hydration scripts inside of slots render ASAP (#4288)"

This reverts commit c218100684.

* Create khaki-dots-press.md
2022-08-13 10:00:12 -07:00
Fred K. Schott
73f367c77b
add protection if astro preview is run with server output (#4284)
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-08-13 00:09:58 -07:00
Fred K. Bot
b1bd52e9ea
[ci] release (#4290)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-12 17:40:47 -05:00
Ben Holmes
f7afdb889f
[MDX] Fix remaining inconsistencies with Markdown (#4268)
* feat: add "file" and "url" to layout props

* feat: add rawContent and compiledContent errs

* fix: add "file" and "url" to frontmatter

* fix: add separate MDX instance type

* types: add MarkdownLayoutProps and MDXLayoutProps

* refactor: simplify MDXLayoutProps

* test: pass file and url to layout

* test: glob components with .default and Content

* feat: add <Content /> to MDX

* feat: declare MDX type module

* fix: [MD] move file and url to layout props only

* chore: changeset

* chore: bump MDX to "minor" with more details

* refactor: remove "file" + "url" top-level props (save for minor)

* revert: MDInstance type def updates (save for minor)

* fix: MDXInstance "default" + "content" types

* fix: bad test layout

* chore: remove getHeaders fro *.mdx
2022-08-12 18:17:26 -04:00
Nate Moore
24d2f7a6e6
Fix namespaced component usage in MDX (#4272)
* fix(#4209): handle namespaced JSX and MDX

* chore: add changeset

* chore: update lockfile

* fix: throw error when componentExport is unresolved

* chore: bump compiler

* chore: bump compiler

* chore: revert example changes

Co-authored-by: Nate Moore <nate@astro.build>
2022-08-12 17:01:05 -05:00
Ben Holmes
3ca9051749
[astro add] Set output: 'server' when adding adapter (#4289)
* fix: add `output: 'server'` when setting adapter

* chore: changeset
2022-08-12 13:16:19 -04:00
Matthew Phillips
8f845ca950
Prevents automatic trailingSlash behavior with getStaticPaths (#4265)
* Prevents automatic trailingSlash behavior with getStaticPaths

* Testing

* weird change
2022-08-12 12:19:32 -04:00
Matthew Phillips
c218100684
Ensure hydration scripts inside of slots render ASAP (#4288)
* Ensure hydration scripts inside of slots render ASAP

* Changeset

* fix type errors

* Update packages/astro/src/runtime/server/render/page.ts

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-08-12 12:18:41 -04:00
Nate Moore
c0992e1fef
fix(#4194): remove Astro runtime from browser (#4282)
Co-authored-by: Nate Moore <nate@astro.build>
2022-08-12 10:48:53 -05:00
Fred K. Bot
bb3d7d4f39
[ci] release (#4249)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-11 16:50:59 -07:00
Bjorn Lu
5b1facfe29
Clarify preact/compat integration docs (#4267)
* Clarify preact/compat integration

* Create long-lobsters-ring.md

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-08-11 16:34:07 -07:00
Nate Moore
7127b1bb35
Fix astro add with third-party integrations (#4270)
* fix: nicer third-party integration names

* chore: add changeset

* fix: better handling for package names

* update changelog

Co-authored-by: Nate Moore <nate@astro.build>
2022-08-11 16:31:28 -07:00
Erika
0022f46b57
Fix build output for endpoints route (#4273)
* Fix build output for endpoints route

* Add changeset
2022-08-11 16:28:06 -07:00
Matthew Phillips
d3d09a2c9f
Add 404 routing logic to Netlify redirects file (#4274)
* Add 404 routing logic to Netlify redirects file

* changeset
2022-08-11 16:26:32 -07:00
Fred K. Schott
42fd6936cd
fix astro image bad imports (#4279) 2022-08-11 16:24:17 -07:00
Ben Holmes
4116128082
[MDX] Pass injected frontmatter to layouts (#4255)
* fix: move layout generation to remark plugin

* test: frontmatter injection in layout

* chore: changeset

* fix: remove content fallback
2022-08-11 12:36:34 -05:00
Maik Jablonski
ceb0eef944
Use passive listeners in prefetch (#4207)
* Use passive listeners in prefetch

Without passive=true, Lighthouse complains about not using passive listeners to improve scrolling performance.

* Create cold-shoes-drum.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-08-11 11:04:10 -05:00
Nate Moore
1f0dd31d92
fix(#4246): fix Prism indentation and class (#4251)
Co-authored-by: Nate Moore <nate@astro.build>
2022-08-11 10:59:48 -05:00
Jakob Helgesson
869d009359
Mdx/plugin unshift (#4248)
* Add builtin rehype plugin to beginning

* Add Changeset

* Do the same to rehypeRaw for consistency
2022-08-10 17:10:06 -04:00
Fred K. Bot
1ee08baf91
[ci] release (#4228)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-10 16:54:12 -04:00
Bjorn Lu
a9baa45af3
Simulate Vite resolve id to url (#4239)
* Simulate Vite resolve id to url

* Add changeset
2022-08-10 16:53:52 -04:00
Matthew Phillips
714a8399e2
Return 404 status code for 404.astro in SSR (#4247)
* Return 404 status code for 404.astro in SSR

* Adding a changeset
2022-08-10 16:22:31 -04:00
Ben Holmes
9d5ab55086
[MDX] Astro.props.content -> frontmatter (#4237)
* docs: MDX Astro.props.content -> frontmatter

* chore: changeset
2022-08-10 15:43:35 -04:00
Matthew Phillips
561a34d912
Include astro components for HMR invalidation (#4240)
* Include astro components for HMR invalidation

* Changeset

* remove extra vite server passing
2022-08-10 15:26:58 -04:00
Obinna Ekwuno
bfbd32588f
[Docs]: Update Cloudflare README (#4232)
* update cloudflare readme

* Create modern-papayas-rhyme.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-08-10 14:11:19 -05:00
Bjorn Lu
f8e3853394
Fix preact compat support for libraries (#4213)
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-08-10 22:22:10 +08:00
Bjorn Lu
c38e7f1890
Remove dev server during build (#4234) 2022-08-10 22:06:02 +08:00
Mayank
e918b3883e
feat: Support -y in astro add (#4225) 2022-08-09 21:29:51 -07:00
Fred K. Bot
74528a1973
[ci] release (#4224)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-09 17:31:06 -07:00
Fred K. Schott
3a7f2385ea Revert "[ci] release (#4223)"
This reverts commit d4ad409875.
2022-08-09 17:28:02 -07:00
Alexandre Desroches
92aa6a75ea
Updated @astrojs/image README.md missing formats prop as subtitle (#4221)
* Update README.md

Added missing subtitle for `formats` prop of the <Picture> component

* Create fast-drinks-visit.md

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-08-09 16:29:07 -07:00
Masataka Yakura
fe3b423982
Markdown component: fix package name in readme.md (#4208)
* Markdown component: fix package name in readme.md

readme says it's `@astrojs/markdown`, but package name is actually `@astrojs/markdown-component`.

* Create dry-deers-vanish.md

* Update dry-deers-vanish.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-08-09 16:28:48 -07:00
Fred K. Bot
d4ad409875
[ci] release (#4223)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-09 19:25:15 -04:00
Ben Holmes
b5ef1c2113
[MD] Add rawContent and compiledContent to MD layout props (#4222)
* fix: add subs for astro.source and astro.html

* fix: define "source" property

* test: raw and compiled content from layout

* chore: changeset

Co-authored-by: bholmesdev <bholmesdev@gmail.com>
2022-08-09 19:18:34 -04:00
Fred K. Bot
4d29163d11
[ci] release (#4197)
* [ci] release

* Update CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-08-08 18:10:55 -05:00
Ben Holmes
4c2ca5352d
[MDX] Remove frontmatterOptions (#4204)
* feat: remove frontmatterOptions config

* test: remove custom frontmatter suite

* deps: remove remark-mdx-frontmatter

* docs: remove `frontmatterOptions` config

* chore: changeset
2022-08-08 17:33:35 -05:00