Commit graph

1837 commits

Author SHA1 Message Date
Matthew Phillips
97a97196fc
Move @netlify/functions to be a dep (#6090)
* Move @netlify/functions to be a de

* Adding a changeset
2023-02-01 14:33:37 -05:00
Shiina
6a03649f00
Fix incorrent encoded when path has other language characters (#6088)
* fix: Incorrent encoded when path has Chinese

* chore: exec changeset
2023-02-01 13:53:09 -05:00
Houston (Bot)
f05eb9f8ba
[ci] release (#6048)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-02-01 08:58:35 -05:00
Elliott Marquez
2567aa48bb
[Lit] Forwards compatiblity for streaming Declarative Shadow DOM (#6055)
* Forwards compatiblity for streaming DSD

* add shadowrootmode

* update tests

* add changeset
2023-02-01 08:44:56 -05:00
Ben Holmes
2fb72c887f
[Content collections] Apply MDX components on render (#6064)
* fix: apply MDX components during render()

* test: MDX components export in SSG and SSR

* chore: changeset
2023-02-01 08:33:18 -05:00
Daniel
f91615f5c0
fix: Failed to execute 'encode' on 'TextEncoder': parameter 1 is not of type 'String' in Edge Runtime SSR (#6070)
* minor fixes for errors related to vercel SSR in core

* yielding empty string instead of nothing, to not exit the iterator

---------

Co-authored-by: AirBorne04 <>
2023-02-01 08:26:45 -05:00
Elliott Marquez
0db2204153
[Lit] Fix hydration not having the same reactive values as server (#6080)
* Fix lit hydration not having the same reactive values

* add changeset

* add clientEntrypoint to package exports

* update tests

* add changeset

* only add defer-hydration when strictly necessary

* remove second changest

* fix test typos
2023-02-01 08:18:37 -05:00
Ben Holmes
2ab32b59ef
[MDX] Syntax highlighting after user plugins (#6050)
* fix: load MDX syntax highlighting after user plugins

* chore: changeset
2023-01-31 17:46:59 -05:00
Chris Swithinbank
c6cf847bd0
Revert MDX README changes (#6062) 2023-01-31 15:41:22 +01:00
Mayank
9793f19ecd
error overlay: show cause if available (#6052)
* show `cause` in error overlay

* add extra check for string

* add changeset
2023-01-31 10:12:42 +01:00
Alexey Shmalko
b3e65991f7
fix(image): allow usage of image from any directory (#5932)
Currently, @astrojs/image allows *importing* images from srcDir
only. Importing images from outside srcDir fails miserably *in dev
mode* and produces incorrect src.

This happens because `path.relative(fileURLToPath(config.srcDir), id)`
resolves to "../something" and when joined with '/@astroimage' cancels
it out (`join('/@astroimage', '../../something')` => `'/something'`).

Rework /@astroimage URL scheme to be similar to "/@fs/" scheme—always
export absolute path to the target file.
2023-01-30 15:29:41 -05:00
Renato Lacerda
ca91976edb
Fix GetPictureResult interface (#5894) 2023-01-30 15:29:03 -05:00
Houston (Bot)
a2cbc75ac4
[ci] release (#6041)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-30 15:28:32 -05:00
Nate Moore
41e97158ba
Handle invalid argument errors (#6045)
* fix: add error handling for invalid arguments

* chore: add changeset

* Update packages/astro/src/core/errors/errors-data.ts

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

---------

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
2023-01-30 14:11:54 -06:00
Matthew Phillips
df32011652
Fix Cloudflare directory mode regression (#6046)
* Fix Cloudflare directory mode regression

* Adding a changeset
2023-01-30 14:50:44 -05:00
Houston (Bot)
d9787a6ff6
[ci] release (#5995)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-30 12:38:31 -05:00
Nate Moore
e779c62424
fix(#5922): improve top-level return error (#6036)
Co-authored-by: Nate Moore <nate@astro.build>
2023-01-30 11:37:13 -06:00
Matthew Phillips
071e1dee7e
Simplified head injection (#6034)
* Simplified head injection

* Make renderHead also yield an instruction

* Add changeset

* Add mdx test
2023-01-30 11:55:10 -05:00
Ben Holmes
b4432cd6b6
[Content collections] Load MDX hoisted scripts in dev (#6035)
* chore: script, rename delayed -> propagated

* fix: consistent propagatedAssets flag

* feat: inject those scripts in dev!

* test: scripts included in dev and build

* chore: add TODO for prod build fix

* chore: changeset
2023-01-30 11:22:17 -05:00
Happydev
98a4a914bc
Remove outdated MDX import types (#6024) 2023-01-30 16:48:40 +08:00
Caleb Jasik
9c298aa5ae
@astrojs/image: Allow passing undefined to transform options (#6008)
* Allow passing `undefined` to transform options

This fixes #6001, allowing undefined passed as a variable in addition to not passing the property at all

* Create strange-olives-rest.md

* Improve error message for missing `widths` prop

* Add changeset
2023-01-27 18:05:00 +01:00
Tony Sullivan
b994f6f35e
Makes the AstroCookies type importable directly from "astro" (#6006)
* re-exports the AstroCookie type from the main 'astro' types

* chore: add changeset
2023-01-27 11:00:24 -06:00
Juan Miguel Guerrero
1c230f1037
feat(@astrojs/netlify): Add on-demand builders Netlify functions (#5874)
* Add on-demand builders option

* chore: add changeset

* docs: add documentation in configuration section

* Update packages/integrations/netlify/README.md

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

* Update packages/integrations/netlify/README.md

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

* Update packages/integrations/netlify/README.md

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

* Update .changeset/twenty-pans-agree.md

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-01-27 10:20:34 -05:00
Roy Eden
254eb21c83
fix: autoprefixer on dev mode for tailwind plugin (#6002)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-01-27 23:14:19 +08:00
Anders Kaseorg
12c68343c0
fix: Don’t require getCollection() filter to be a type guard (#5998)
Commit dabce6b8c6 (#5970) broke the use
of a plain boolean filter.  Add an overload similar to TypeScript’s
Array#filter overload:

https://github.com/microsoft/TypeScript/blob/v4.9.4/lib/lib.es5.d.ts#L1442-L1453

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2023-01-26 21:03:09 -05:00
Chris Banford
5c64324c0a
Add a check for existing .git directory (and skip if one is found). (#5953)
* Add a check for existing .git directory (and skip if one is found).

* Changeset attempt :-)

* Update .changeset/try-button-rumor.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-01-26 15:34:49 -05:00
银河渡舟
322e059d0d
fix: undefined remarkPluginFrontmatter after calling render method (#5927)
* Update vite-plugin-content-assets.ts

* Add changeset for #5927

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Co-authored-by: Anders Kaseorg <andersk@mit.edu>
2023-01-26 13:47:09 -06:00
Subha Chanda
1c7eef308e
Updated according to new configuration (#5478)
* Updated according to new configuration

Astro imports the `defineConfig` function from `astro/config`. The `integrations` key needs to be passed into the `defineConfig` function, but it is not shown in the README. Updated the README according to the CLI example.

* update alpine

* update image

* update lit

* update mdx

* update preact

* update prefetch

* update react

* update sitemap

* update solid

* update svelte

* update tailwind

* update turbolinks

* update vue

* chore: add changeset

* update image

* update svelte readme

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-01-26 13:03:00 -06:00
Houston (Bot)
607f0ac31a
[ci] release (#5984)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-26 13:53:32 -05:00
HiDeoo
7abb1e9056
Fix MDX heading IDs generation when using a frontmatter reference (#5978)
* Fix MDX heading IDs generation when using a frontmatter reference

* Hoist safelyGetAstroData() call and add statement null check
2023-01-26 12:52:50 -05:00
Matthew Phillips
9855db676e
Support for prerendering in the Cloudflare integration (#5993)
* Cloudflare prerender branch

* Add prerendered routes to Cloudflare routes.json

* Adding changeset

* Prevent process proxy from running during prerender phase
2023-01-26 12:43:39 -05:00
HiDeoo
60b32d5856
Fix Astro.url.protocol when using the @astrojs/node SSR adapter with HTTPS (#5992) 2023-01-26 12:39:57 -05:00
Angus
088f5194c5
Re-enable streaming on Cloudflare Pages (#5914)
* Support streaming on Cloudflare Pages

* Create tidy-ties-repeat.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-01-26 07:44:09 -06:00
wulinsheng123
aedf23f858
fix: component is not able to use a custom theme anymore (#5952)
* Astro <Code> component is not able to use a custom theme anymore

* Astro <Code> component is not able to use a custom theme anymore

* Astro <Code> component is not able to use a custom theme anymore

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-01-25 17:21:15 -06:00
Yaroslav Lapin
883e0cc299
change @astrojs/solid to @astrojs/solid-js (#5971)
* change @astrojs/solid to @astrojs/solid-js

@astrojs/solid package doesn't exist

* Create serious-turtles-explode.md

* Update .changeset/serious-turtles-explode.md

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

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2023-01-25 17:21:03 -06:00
HiDeoo
9d4bfc76e8
Support passing children as props to a React component (#5886) 2023-01-25 16:31:57 -06:00
Ben Holmes
dabce6b8c6
[Content collections] Support type guards on getCollection() filter (#5970)
* fix: respect type guards from collection filter

* chore: changeset
2023-01-25 16:21:27 -06:00
Nate Moore
b53e0717b7
Handle unmatched 404 when using prerender in dev mode (#5983)
* fix(#5975): unmatched static paths should 404 during dev

* chore: add changeset

Co-authored-by: Nate Moore <nate@astro.build>
2023-01-25 13:57:32 -06:00
Houston (Bot)
4842d6acb0
[ci] release (#5963)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-25 10:19:27 +08:00
Bjorn Lu
02549b8ced
Upgrade semver dependency (#5972) 2023-01-25 10:13:47 +08:00
Matthew Phillips
f4c71e5eb9
Protect against shimmed process usage in Vercel Edge (#5969)
* Protect against shimmed process usage in Vercel Edge

* Adding a changeset
2023-01-24 21:11:09 -05:00
Happydev
46b6e14265
Fix Content Collections not loading config file when there are spaces in the folder tree (#5962)
* fix

* add test

* use `fileURLToPath` instead

* chore: changeset

* remove useless config file

* revert back to using `decodeURIComponent`

* test: better test

* re-revert back to using `fileURLToPath`
2023-01-24 20:00:17 +00:00
Houston (Bot)
398a516f03
[ci] release (#5959)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-24 11:12:02 -06:00
Nate Moore
d0d7f61182
fix(create-astro): typescript prompt handling (#5958)
* fix(create-astro): typescript prompt handling

* fallback

* fix(create-astro): additional case

Co-authored-by: Nate Moore <nate@astro.build>
2023-01-24 11:01:26 -06:00
Houston (Bot)
73ca0ef383
[ci] release (#5948)
* [ci] release

* Update changelogs (#5955)

* [ci] release

* Wrap astro 2.0 beta logs in `<details>`

* Add link to docs upgrade guide

* First pass cleaning up 2.0 release notes

* mdx changes from Sarah

* combine 5584 and 5842 in deno, image, netlify

* markdown/remark incl (5684 & 5769) to match mdx

* Tweak markdown/remark formatting

* Format astro-prism

* Format astro-rss

* Format create-astro

* Format cloudflare

* Format lit

* Format partytown

* Format node

* Format preact

* Format react

* Format solid

* Format svelte

* Format tailwind

* Format vercel

* Format vue

* Format telemetry

* Format webapi

* Format scripts

* Reinstate h3s for headings

Co-authored-by: Ben Holmes <hey@bholmes.dev>

* Reformat mdx

* astro & markdown/remark: Combine #5679 & #5684 changelogs

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Ben Holmes <hey@bholmes.dev>

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Ben Holmes <hey@bholmes.dev>
2023-01-24 11:38:06 -05:00
Matthew Phillips
58dfdc5a36
Bump lit changesets to minor (#5954) 2023-01-24 10:55:56 -05:00
Matthew Phillips
8c03c76923
Exit pre mode (#5947) 2023-01-23 16:30:21 -05:00
Houston (Bot)
a75177f843
[ci] release (beta) (#5911)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-23 16:11:39 -05:00
Matthew Phillips
c61ec4202a
Go back to pre-mode (#5946) 2023-01-23 16:08:46 -05:00
Matthew Phillips
453b373dc5
Exit pre-mode for 2.0 release (#5942) 2023-01-23 15:07:51 -05:00