Commit graph

2695 commits

Author SHA1 Message Date
Bjorn Lu
74759cf787
Allow 200 response for endpoints in build (#5258) 2022-11-01 00:58:54 +08:00
Fred K. Bot
5016166acf
[ci] release (#5239)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-31 10:21:09 -04:00
Matthew Phillips
7d678c9ed0
Upgrade compiler to latest (#5243)
* Upgrade compiler to latest

* Adding a changeset

* Update tests for IIFE wrapping

* Update .changeset/chilly-zoos-exist.md

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

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-10-28 16:13:31 -04:00
Sarah Rainsberger
06d016a741
[docs] update image integration README (#5231)
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2022-10-28 16:17:56 -03:00
natemoo-re
daa062cc3d [ci] format 2022-10-28 19:07:40 +00:00
Nate Moore
d9be7e36b8
fix(create-astro): improve error messages when create-astro fails (#5240)
Co-authored-by: Nate Moore <nate@astro.build>
2022-10-28 14:05:46 -05:00
matthewp
ff4f45b8eb [ci] format 2022-10-28 18:50:00 +00:00
Matthew Phillips
070da6a792
Throw error when trying to use the vercel static adapter in server mode (#5241) 2022-10-28 14:48:20 -04:00
natemoo-re
e35bc26186 [ci] format 2022-10-28 17:26:22 +00:00
Nate Moore
641b6d7d58
feat(create-astro): add --fancy flag (#5226)
Co-authored-by: Nate Moore <nate@astro.build>
2022-10-28 12:24:14 -05:00
Sebastiaan
b6a478f376
Fix/node custom elements (#5235)
* adapter-node fix CustomElementRegistry

* Add changeset

* Add fallback CustomElementRegistry
2022-10-28 12:34:30 -04:00
Fred K. Bot
5be3fdec27
[ci] release (#5215)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-28 12:14:55 -04:00
Happydev
26ff429058
fix not omitted extension in url metadata for newly added markdown files in development (#5238)
* test: add tests

* test: add test case

* test: update test

* fix: add new extensions to regex used to removed

* chore: add changeset

* test: update test
2022-10-28 11:58:34 -04:00
Bjorn Lu
c98c5aa0ae
Improve Solid libraries config handling (#5208) 2022-10-28 23:30:54 +08:00
Bjorn Lu
7f8987085c
Support rendering @motionone/solid components (#5233) 2022-10-28 10:42:37 -04:00
matthewp
c6b149bc0a [ci] format 2022-10-28 14:21:57 +00:00
Matthew Phillips
69a532ab60
Export Cloudflare runtime types (#5230)
* Export Cloudflare runtime types

* Adding a changeset
2022-10-28 10:20:20 -04:00
Bjorn Lu
a609a8937f
Upgrade Vite to 3.2 (#5212) 2022-10-28 22:03:07 +08:00
Happydev
0b12414315
remove unnecessary ReactDOM.renderToString operation (#5218)
* remove useless `ReactDOM.renderToString` operation

* chore: add changeset
2022-10-27 21:05:18 -05:00
Princesseuh
25a6360a60 [ci] format 2022-10-27 18:47:50 +00:00
Erika
7fc5d55952
Fix errors that are not instanceof Error crashing the dev server (#5216)
* Fix errors that are not instanceof Error crashing the dev server

* Update lockfile

* Fix import paths
2022-10-27 15:44:48 -03:00
Erika
8c83359e38
Fix types.d.ts not being included in the npm package (#5217) 2022-10-27 15:43:20 -03:00
Princesseuh
018cc7d51f [ci] format 2022-10-27 17:40:25 +00:00
Erika
d64d5b9b52
Refactor error handling (#5206)
* Refactor error handling

* Fix import path in test

* Revert "Fix import path in test"

This reverts commit 5ca34f3c09.

* Fix import path in test

* Fix AggregateErrors actually not being.. an aggregration of errors

* Fix missing info in Vite enhanced error

* Conserve original error name if we have one

* Workaround compiler issue

* GitHub action please

* Update E2E test

* Wrap ssrFixStacktrace in try/catch

* Refactor Vite/Node methods out of the general index.ts

* Fix missing import

* Add changeset
2022-10-27 14:37:53 -03:00
Dan Jutan
3c1af36f5e
reupload video with fixed audio (#5174) 2022-10-27 11:36:44 -04:00
Chris Swithinbank
10cb1405c5
Add missing language to code block (#5210) 2022-10-27 16:51:51 +02:00
Fred K. Bot
50841bb7fd
[ci] release (#5199)
* [ci] release

* Update packages/integrations/cloudflare/CHANGELOG.md

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

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-10-27 09:41:03 -04:00
bluwy
b48320d722 [ci] format 2022-10-27 09:19:16 +00:00
BeanWei
c203a5cc2f
Fix node standalone for windows system (#5207) 2022-10-27 17:17:38 +08:00
Dan Jutan
6e417a9636
Fix broken fragment link (#5200) 2022-10-27 15:58:54 +08:00
Bjorn Lu
3d99fdd1e7
Improve Astro libraries config handling (#5203) 2022-10-27 14:54:41 +08:00
Michael Rienstra
22ca6a6056
docs: extendDefaultPlugins cross-linking (minor) (#5204) 2022-10-26 21:32:49 +02:00
Jutanium
fc5cb2a51d [ci] format 2022-10-26 18:37:12 +00:00
Dan Jutan
81310b1dde
Error message: clarify "adapter does not have previewEntrypoint" (#5182)
* clarify preview error message

* Update packages/astro/src/core/preview/index.ts

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

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2022-10-26 14:35:34 -04:00
Sarah Rainsberger
707cac9fdf
[docs] Cloudflare integration README edits (#5205)
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-10-26 15:23:47 -03:00
natemoo-re
814327f409 [ci] format 2022-10-26 15:16:54 +00:00
Nate Moore
0bf0758fb8
Add astro/types for common prop patterns (#5147)
* wip: add type-utils

* feat: update type-utils

* feat: RequireDefaultSlot => WithChildren

* chore: add changeset

* chore: move types to ./types

* chore: update changeset

* Update dirty-cycles-lick.md

Co-authored-by: Nate Moore <nate@astro.build>
2022-10-26 10:14:08 -05:00
Nate Moore
0408376281
[Create Astro] Improved prompts, template handling, Houston (#5088)
* feat(create-astro): add houston, improve prompts

* refactor(create-astro): move to giget

* chore: add changeset

* chore: update lockfile

* test(create-astro): update tests to match new output

* chore: prefer named functions

* fix: update template prompt

* fix: update typescript message

* chore: add explicit --skip-houston flag

* test(create-astro): skip flaky typescript test

Co-authored-by: Nate Moore <nate@astro.build>
2022-10-26 10:13:56 -05:00
Nate Moore
ddf2f8390e
Add support for --base CLI argument (#4917)
* feat(cli): add support for `--base` CLI argument

* chore: update CLI --help

* Update wise-swans-live.md

* Update wise-swans-live.md

Co-authored-by: Nate Moore <nate@astro.build>
2022-10-26 10:13:43 -05:00
matthewp
bde715700c [ci] format 2022-10-26 14:20:41 +00:00
Happydev
4a8a346ca9
feat: add support for other markdown file extensions (#5164)
* fix: add `.markdown ` file extension support

adds `.markdown` file extension support for markdown files

* test: add test case

* chore: adds changeset

* test: move test and fixture to relevant locations

* test: update test

* feat: add multiple markdown file extension support

* feat: add module declaration for different markdown file extensions

* refactor: markdown module declarations

for ease of TS refactoring

* fix: add .js extension to module imports

* test: update test

* chore: update changeset

* chore: update changeset

* test: add new test cases

* test: update tests

* fix: correct typo
2022-10-26 10:18:49 -04:00
Daniel
d151d9f3f2
enable access to cloudflare runtime (#5103)
* enable access to cloudflare runtime

* added get runtime api
added context to the runtime in "advanced" mode

* added typings and adjusted some return vars

* added default types

* added usage description to changeset and readme

Co-authored-by: AirBorne04 <unknown>
Co-authored-by: AirBorne04 <>
2022-10-26 09:46:25 -04:00
Fred K. Bot
4efbfdd78d
[ci] release (#5135)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-26 08:43:23 -04:00
Christian Fuss
e86723d931
[MDX] Improved docs for custom components (#5190)
* [MDX] Fixed minor formatting issues in README
- whitespace at line end
- blank lines around lists and code fences
- casing of internal references

* Detailed use of custom component with imported MDX

Incorporated all review comments from Sarah and Ben manually,
because the old branch would not pass the mergeability check.
2022-10-25 16:54:47 -04:00
tony-sull
2d0b20d741 [ci] format 2022-10-25 20:00:05 +00:00
Tony Sullivan
8728ee0b94
Updates astro add to ignore optional peer dependencies (#5192)
* checking peerDependenciesMeta before including peer deps

* chore: add changeset
2022-10-25 19:57:56 +00:00
Isaac McFadyen
a3d8615937
Added information about Pages flags (#5188) 2022-10-25 10:27:39 -04:00
Tony Sullivan
b77200f423
removes default content-visibility styles from image components (#5180) 2022-10-24 18:30:02 +00:00
Ben Holmes
308e565ad3
[MDX] Support recmaPlugins config (#5146)
* feat: support recma plugins

* chore: add `test:match` to MDX

* chore: changeset

* docs: add recmaPlugins to README
2022-10-24 14:27:37 -04:00
Georgey
61f7e16491
Update README.md (#5179)
Hey there, so recently I was playing around the mdx, and wanted my users to navigate to a specific section in my article using the `id` tags. This was not happening when I was making custom components. When I pass the Astro props like above, the id was automatically getting passed for headings.
2022-10-24 14:22:34 -04:00
Juan Martín Seery
abf41da774
fix(vercel): Include all files inside dist/ instead of only entry.mjs (#5175) 2022-10-24 11:24:52 -03:00
bluwy
7e3a5e5c85 [ci] format 2022-10-21 06:10:37 +00:00
Bjorn Lu
1c477dd8d9
Use new compiler resolvePath option (#5133) 2022-10-21 14:08:07 +08:00
Emmanuel Chucks
ed2dfdae5b
fix: updates <Picture /> to pass HTML attributes down to the <img /> element (#5038)
* fix: also pass attrs to underlying img

`class` for direct img styling, `width` & `height` to prevent layout shift, etc need to be passed to the underlying img tag to work.

* remove redundant attr from picture tag

* revert to previous commit

- seemed to break some tests
- can't deal with fixing that right now, maybe later

* only passing attributes to the img

* adding a note to the README

* chore: add changeset

Co-authored-by: Tony Sullivan <tony.f.sullivan@outlook.com>
2022-10-20 19:42:36 +00:00
Fred K. Bot
863391f10e
[ci] release (#5117)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-19 15:29:21 -04:00
matthewp
d0c0a3b984 [ci] format 2022-10-19 19:23:39 +00:00
Jelenkee
5a674f976d
Prefetch styles only once (#5125)
* test1

* fixed test

* removed console.log

* changeset

* pnpm-lock

* fixed test again

* fta

* fta2

* fix: wait for fetch

* -fixed test template

* empty

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: My Name <my.name@my-company.com>
2022-10-19 15:20:45 -04:00
Juan Martín Seery
fad25aef2f
fix(vercel): fixed regression #5120 (#5127) 2022-10-19 14:24:26 -04:00
Nate Moore
850cc19fda
chore(vue): automatically add vuetify to ssr.noExternal (#5126)
Co-authored-by: Nate Moore <nate@astro.build>
2022-10-19 12:32:06 -05:00
Bjorn Lu
430e0346c9
Use fs.promises.rm to remove node deprecation warning (#5119) 2022-10-19 10:03:56 -04:00
matthewp
ff2c34553b [ci] format 2022-10-19 14:03:14 +00:00
Matthew Phillips
9745009ae0
Fixes index page with build.format=file (#5123)
* Fixes index page with build.format=file

* Adding a changeset
2022-10-19 10:00:52 -04:00
matthewp
e78bb2f866 [ci] format 2022-10-18 20:11:38 +00:00
Matthew Phillips
500acb3c11
Throw when using Response.redirect from SSG site (#5116)
* Throw when using Response.redirect from SSG site

* Adding a changeset
2022-10-18 16:09:38 -04:00
Fred K. Bot
4c1ffef3e4
[ci] release (#5078)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-18 14:26:00 -04:00
matthewp
8cf692766b [ci] format 2022-10-18 15:49:01 +00:00
Matthew Phillips
5c0c6e1ac6
Mark @astrojs/node to be noExternal (#5114)
* Mark @astrojs/node to be noExternal

* Adding a changeset
2022-10-18 11:47:18 -04:00
matthewp
1f57c0ca64 [ci] format 2022-10-18 13:54:56 +00:00
Daniel
5923dd77c1
adding cookies to api route response [simple result] (#5060)
* adding cookies to the an api route response, also when returning a simple result

* in dev server, convert a simple endpoint result into a response object

Co-authored-by: AirBorne04 <unknown>
Co-authored-by: AirBorne04 <>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-10-18 09:52:49 -04:00
Princesseuh
04ce7f4e5c [ci] format 2022-10-18 13:26:12 +00:00
Josh Kramer
f684e9d361
Implicit element types (#5098)
* Separate arbitrary intrinsic element definition

* Create changeset
2022-10-18 10:23:48 -03:00
Rishi Raj Jain
df4d84610a
Fix port env in standalone mode (#5111) 2022-10-18 15:31:21 +08:00
Bjorn Lu
ef0c543163
Support spread parameters for server endpoints (#5106) 2022-10-18 13:16:24 +08:00
Bjorn Lu
0edfdd3259
Ensure CLI flags override function-style server config (#5110) 2022-10-18 13:10:16 +08:00
Erika
ce01225a70
Fix types not working properly when using moduleResolution: 'node16' (#5108)
* Fix imports failling under `moduleResolution: node16`

* Add changeset

* Revert comment about Vite 4
2022-10-17 11:29:39 -03:00
JuanM04
dd354f83e8 [ci] format 2022-10-14 20:21:16 +00:00
Juan Martín Seery
cd25abae59
feat(vercel): includeFiles and excludeFiles (#5085)
* refactor + include/excludeFiles

* Changeset

* Updated README.md

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

* Missing .js

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-10-14 17:19:35 -03:00
Juan Martín Seery
f8198d2502
feat(vercel): Edge improvements (#5086)
* Added error on "output" == "static"

* Minify output

* Changeset
2022-10-14 17:17:13 -03:00
Erika
ddfbef5acb
Fix astro add adding lines from extended configurations (#5095) 2022-10-14 15:16:41 -03:00
Bjorn Lu
0173c2b2df
Suppress warnings for solidjs dependency crawling (#5089) 2022-10-14 17:51:42 +08:00
Juan Martín Seery
49a8d18b49
fix: pnpm install command on astro add (#5087) 2022-10-14 15:08:51 +08:00
matthewp
f49d80d637 [ci] format 2022-10-13 21:42:13 +00:00
Matthew Phillips
90b715d5c8
Fixes JSX usage of slots with dashes in their name (#5080)
* Fixes JSX usage of slots with dashes in their name

* Adding a changeset
2022-10-13 17:40:17 -04:00
Matthew Phillips
5fb7c9383a
Compat with Astro < 1.5 (#5082)
* Compat with Astro < 1.5

* Adding a changeset
2022-10-13 16:10:48 -04:00
Benjamin Geets
984bc7d0de
doc(node): fix import (#5079) 2022-10-13 15:30:31 -04:00
matthewp
d361a3ec35 [ci] format 2022-10-13 19:20:09 +00:00
Matthew Phillips
df453e420f
Refactor rendering for testing (#5071)
* Refactor rendering for testing

* Correctly pass the mod for endpoints
2022-10-13 15:18:28 -04:00
natemoo-re
4866ff882a [ci] format 2022-10-13 19:17:42 +00:00
Nate Moore
d25f54cb93
[Vue] add support for appEntrypoint (#5075)
* feat(vue): add support for appEntrypoint

* chore: add changeset

* test(vue): add tests for app entrypoint

* docs(vue): update README to include app entrypoint

* fix(vue): prefer resolvedVirtualModuleId

Co-authored-by: Nate Moore <nate@astro.build>
2022-10-13 14:15:57 -05:00
Erika
6f9a88b31b
Fix aliases from jsconfig.json not being picked up anymore (#5076)
* Fix aliases from jsconfig.json not being picked up anymore

* Add changeset
2022-10-13 15:39:32 -03:00
Fred K. Bot
81d57f2638
[ci] release (#5046)
* [ci] release

* Update packages/integrations/node/CHANGELOG.md

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

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-10-13 12:29:24 -04:00
Bjorn Lu
3918787cb9
Support relative protocol image URL (#5072)
* Support relative protocol image URL

* Fix test

* Actually fix test
2022-10-13 11:59:38 -04:00
Bjorn Lu
93f72f90bc
Fix image external config in build (#5073) 2022-10-13 11:16:08 -04:00
Bjorn Lu
ac6e2af73c
Fix failing SSR test (#5067) 2022-10-13 10:47:37 -04:00
matthewp
575bf9205e [ci] format 2022-10-12 21:27:56 +00:00
Matthew Phillips
e55af8a232
Node.js standalone mode + support for astro preview (#5056)
* wip

* Deprecate buildConfig and move to config.build

* Implement the standalone server

* Stay backwards compat

* Add changesets

* correctly merge URLs

* Get config earlier

* update node tests

* Return the preview server

* update remaining tests

* swap usage and config ordering

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

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

* Update .changeset/metal-pumas-walk.md

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

* Update .changeset/metal-pumas-walk.md

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

* Update .changeset/stupid-points-refuse.md

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

* Update .changeset/stupid-points-refuse.md

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

* Link to build.server config

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-10-12 17:25:51 -04:00
matthewp
2b7fb848bb [ci] format 2022-10-12 21:06:52 +00:00
Bjorn Lu
ebd364e392
Add new fields to API route context (#4986)
* Add new fields to API route context

* Add props and redirect

* Pass custom redirect status code

* Correctly pass props in api routes

* Add better docs

* Add test

* Fix build

* Add constants file

* Add links to jsdoc

* Workaround lint issue

* Thanks Chris

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

* Missed one doc change

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

* Add more detail to the changesets

* Strict redirect status type

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-10-12 17:03:49 -04:00
Princesseuh
07d16ff43c [ci] format 2022-10-12 18:13:53 +00:00
Erika
0ea6187f95
Added support for updating tsconfig.json when using astro add (#4959)
* Added support for updating tsconfig.json when using astro add

* Refactor

* Remove unneeded change

* Fix build failling due to type difference

* Extend changeset description
2022-10-12 15:11:25 -03:00