Commit graph

1221 commits

Author SHA1 Message Date
Mihkel Eidast
e82ff13f18
fix: add export keyword to file stub (#3944) 2022-07-19 10:55:59 -05:00
Erika
54865612ea
Add missing media attribute on MetaHTMLAttributes (#3974)
* Add missing media attribute on MetaHTMLAttributes

* Fixed media not being optional, oops

* Add changeset
2022-07-19 11:41:29 -04:00
Tony Sullivan
e6e2160614
Adds back create-astro support for GitHub repos (#3971)
* adding create-astro support for GitHub repos

* chore: add changeset

* nit: adding a comment to document what the fix is doing
2022-07-19 14:24:19 +00:00
Rafid Muhymin Wafi
ba11b33996 Removes trailing dash from generated slugs in markdown (#3044)
* fixed header slugs in markdown if ends with a dash

* added changeset

* removes trailing dash only if slug was created

* updated test

* updated change level from patch to minor
2022-07-18 22:21:56 -07:00
Matthew Phillips
04070c0c12
Migrate to Vite 3 ️ (#3570)
* Vite 3 test

* deps: bump to Vite beta.1

* refactor: move to use optimizeDeps.force option

* refactor: stub out new updateModuleInfo params

* nit: remove comment on deprecated Vite feature

* nit: remove comment on deprecated vite feature

* hail mary: destroy all ssr external / noexternal!

* fix: use new middlewareMode config settings

* fix: resolve npm package paths for rollup input

* wip: revert to unresolved. Issue reported!

* sad refactor: use legacy devDepsScanner for component HMR

* fix: add astro/components to noExternal for Code component

* refactor: use ALWAYS_NOEXTERNAL array

* refactor: add package.json to all test runners for noExternal error

* deps: bump to latest vite 3 beta

* wip: add package.json to smoke

* fix: remove accidental "force true" on create-vite

* refactor: write smoke package.json programmatically

* refactor: add fontsource to noExternal

* fix: only add to ssr.noExternal if present in project

* wip: what if we just... didn't have a memory test

* deps: bump to latest vite beta

* Revert "wip: what if we just... didn't have a memory test"

This reverts commit 173729dbdc685e52881fc3333487b8f744add55f.

* fix: add type check for plugin.name

* feat: remove legacy.devDepsScanner. Vite 3 strat is now Vite 2.x strat!

* fix: add ssr.noExternal to components ex

* wip: ignore with-mdx starter

* fix: add serviceEntryPoint to ssr.noExternal

* temp: reset NODE_ENV on prod builds

* fix: missing async tag

* VITE 3 IS STABLE BABY

* deps: bump svelte to vite 3

* deps: bump vue to vite 3

* fix: resolve plugins for proper sorting

* sad fix: regex "export default" out of CSS ssr

* chore: add TODO to understand sad fix

* Revert "fix: resolve plugins for proper sorting"

This reverts commit e67c194d3a8e11070487ed325947e7c59e8d69cd.

* Revert "sad fix: regex "export default" out of CSS ssr"

This reverts commit 721d40b62b61440dc9e488787901c915579659db.

* fix: sort plugins WITHOUT resolveConfig

* Revert "wip: ignore with-mdx starter"

This reverts commit 7d4f7338e6.

* chore: revert memory test changes

* chore: add nanostores/preact ot noexternal

* chore: changeset

* chore: changeset

* deps: use Vite ^3.0.0

* fix: add back third party astro pkg scanner

Co-authored-by: bholmesdev <hey@bholmes.dev>
2022-07-18 22:19:23 -07:00
Fred K. Bot
37534004f0
[ci] release (#3939)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-18 21:54:25 -07:00
Tony Sullivan
299b4afcab
Feat/image url hash (#3965)
* Including a hash of the full remote URL when building for SSG

* chore: add changeset
2022-07-18 21:48:22 -07:00
Charles Vandevoorde
5d0edfc3b9
add missing props in markdown layout (#3588)
The `url` props was missing but should there according to [this
document](https://docs.astro.build/en/guides/markdown-content/#markdown-layouts).

The `file` props was not initially there but is quite useful when you
need to resolve file which are relative to the markdown file itself.
2022-07-18 19:58:36 -03:00
Vlad Esafev
57e529e4c1
Throw the error when site option is missing (#3956)
* Throw the error when site option is missing

* Update index.ts

* Update index.ts

* Update rss.test.js

* Update index.ts

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-07-18 15:01:04 -07:00
Fred K. Schott
f5c9d8e829 Revert "Removes trailing dash from generated slugs in markdown (#3044)"
This reverts commit 8530cce14f.
2022-07-18 14:32:51 -07:00
Fred K. Schott
4555c8cb0b Revert "Revert "Removes trailing dash from generated slugs in markdown (#3044)""
This reverts commit 7160bbeede.
2022-07-18 14:32:29 -07:00
Fred K. Schott
7160bbeede Revert "Removes trailing dash from generated slugs in markdown (#3044)"
This reverts commit 8530cce14f.
2022-07-18 14:08:51 -07:00
Matthew Phillips
ceda294e13
Fixes hydration of Maps and Sets (#3960) 2022-07-18 16:43:09 -04:00
Matthew Phillips
5fde2fd8bc
Moves Debug component's styles to be inlined (#3963) 2022-07-18 16:42:57 -04:00
Tony Sullivan
2a7dd040e8
Improving support for third-party hosted image services (#3957)
* WIP: always use the built-in sharp service for local images in `dev`

* adding type definitions for the integration's use of globalThis

* simplifying the globalThis type checking

* chore: adding changeset

* removing temp hosted service used for testing
2022-07-18 19:43:40 +00:00
Erika
b37695c34c
Improve astro check (#3906)
* Improve astro check

* Fix lockfile

* Update to latest language-server version

* Add simple tests

* Fix lock file, again

* Fix `astro check` not working on Windows, speeds up tests

* Add changeest
2022-07-18 15:34:35 -04:00
Fred K. Schott
07fb544dab
remove ssr-utils file (#3924) 2022-07-18 12:12:45 -04:00
Erika
8eba6d9d97
Fix expected types for Element in our JSX definitions (#3958)
* Fix expected types for Element in our JSX definitions

* Add changeset
2022-07-18 11:45:50 -04:00
Matthew Phillips
3acb9ec264
Hoist Astro.globbed hoisted scripts in dev (#3930)
* Hoist Astro.globbed hoisted scripts in dev

* Adds a changeset

* Increase the timeout for the HMR test

* Fix e2e tests

* Refactor test
2022-07-18 11:33:13 -04:00
Matthew Phillips
92b48b1525
Sets import.meta.env.BASE_URL correctly in dev (#3955) 2022-07-18 11:32:56 -04:00
Rafid Muhymin Wafi
8530cce14f
Removes trailing dash from generated slugs in markdown (#3044)
* fixed header slugs in markdown if ends with a dash

* added changeset

* removes trailing dash only if slug was created

* updated test

* updated change level from patch to minor
2022-07-16 15:45:41 +06:00
Nate Moore
f5d4ebf0e2
Handle metadata for MDX files during build (#3915)
* fix: metadata handling for MDX files

* chore: add changeset

* chore: update mdx example

* fix: protect against infinite loops in jsx-runtime, properly hook console.error

* chore: remove unused import

* feat(mdx): support `client:only`

* fix: prefer Symbol.for

* fix(jsx): handle vnode check properly

* chore: appease ts

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-15 11:25:29 -04:00
Chris Swithinbank
31f9c0bf02
Roll back supported Node engines (#3937)
Fixes #3936
2022-07-15 08:15:04 -04:00
Fred K. Bot
f7fa39e682
[ci] release (#3925)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-14 15:36:23 -04:00
Matthew Phillips
d6dfef0caa
Add @babel/core dependencies to react/preact integrations (#3928)
* Add @babel/core dependencies

* Adds a changeset
2022-07-14 14:39:58 -04:00
Erika
7c5c4106d7
Use a .ts file to export built-in components so they're typed (#3927)
* Use a .ts file to export built-in components so they automatically have types

* Add changeset
2022-07-14 14:33:10 -04:00
Nate Moore
7094d6a45f
Handle false properly in class:list (#3922)
* fix(#3920): properly handle false in `class:list`

* fix: allow 0 in `class:list`

* fix: output empty `class:list` as `''` rather than `class=''`

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-14 12:01:17 -05:00
Fred K. Bot
78e765dc65
[ci] release (#3921)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-14 11:36:33 -05:00
Nate Moore
6a7a17f735
chore: update compiler (#3918)
Co-authored-by: Nate Moore <nate@astro.build>
2022-07-14 11:09:44 -05:00
Fred K. Schott
01a55467d5
add back missing ssr-utils.ts file (#3919) 2022-07-14 09:05:20 -07:00
Fred K. Bot
056d4d5fd2
[ci] release (#3903)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-13 17:16:24 -04:00
Randall
b487679853
Rollback Nodejs Dependancy (#3914)
* Rollback Nodejs Dependancy

Closes #3908

Signed-off-by: Randall T. Vasquez <ran.dall@icloud.com>

* Create ninety-apes-talk.md
2022-07-13 17:06:37 -04:00
Matthew Phillips
cd2dbfedb1
Provide a better error message for when RSS is missing link field (#3913)
* Provide a better error message for when RSS is missing `link` field

* Adds a changeset
2022-07-13 16:37:17 -04:00
Juan Martín Seery
ca45c0c270
fix: don't throw when Shiki doesn't recognize a language (#3911)
* Don't throw when Shiki doesn't recognise a language

* Changeset
2022-07-13 19:31:59 +00:00
Ben Holmes
d8af02a944
fix: add github-slugger to ALWAYS_EXTERNAL (#3902)
* fix: add github-slugger to ALWAYS_EXTERNAL

* chore: changeset
2022-07-12 14:28:14 -04:00
Fred K. Bot
ba67a924ca
[ci] release (#3900)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-12 12:18:13 -04:00
Fred K. Bot
4bf4736768
[ci] release (#3899)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-12 11:16:15 -04:00
Chris Swithinbank
4097f06226
Centralise community health files in .github repo (#3830)
* Centralise community health files in `.github` repo

* Clean up links

* Add changeset
2022-07-12 17:16:08 +02:00
Corbin Crutchley
402c4181dc
Fix md mode comment (#3880)
* fix: fix a bug where md mode markdown breaks on comments

* chore: add changeset
2022-07-12 11:15:53 -04:00
Fred K. Bot
c2b14d5253
[ci] release (#3894)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-12 09:08:15 -04:00
Corbin Crutchley
b4cb4a40df
fix: add TypeScript type and documentation for markdown "mode" config (#3883)
* fix: add TypeScript type and documentation for markdown "mode" config

* chore: add changeset
2022-07-12 09:07:51 -04:00
Yuji Sugiura
c4f6fdf372
Remove unused(and also vulnerable) libs from @astro/telemetry (#3898)
* Remove unused(and also vulnerable) libs from @astro/telemetry

* Add changeset
2022-07-12 09:07:21 -04:00
Nate Moore
93e1020b1e
Fix: reintroduce smoke tests across example projects (#3669)
* chore: update smoke tests

* chore: bump smoke tests to node@16

* chore: remove gitmodules

* chore(ci): prefer node@14

* wip: remove path from smoke clone step

* feat: run build:examples from test:smoke

* fix: remove no-frozen-lockfile

* fix: checkout monorepo last for pnpm setup

* wip: replace @astrojs/markdown/remark import from md

* fix: remove type defs from generated file

* fix: function order

* chore: remove ssr-utils export

* wip: remove windows from smoke test

* fix: instantiate slugger in snippet

* fix: exclude with-mdx from smoke (for now)

* fix: add quotes on filter flag for safety

* chore: changeset

* wip: try reintroducing windows smoke

* sad chore: remove client: directive from with-mdx

* Revert "wip: try reintroducing windows smoke"

This reverts commit 9529b1a45c.

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: bholmesdev <hey@bholmes.dev>
2022-07-11 22:51:17 -04:00
Matthew Phillips
5f4ecbad1b
Allow defining Astro components in Vite plugins (#3889)
* Allow defining Astro components in Vite plugins

* Adds a changeset

* Move non-main compilation into load

* Use the cachedCompilation in the markdown plugin

* Fix HMR test

* Simplify getNormalizedID

* Use a windows-friendly virtual module id for the test
2022-07-11 16:13:21 -04:00
Chris Swithinbank
bf5d1cc1e7
More integration README fixes (#3885)
* Integration README fixes

* More tweaks (mostly code backticks for filenames)

* Update changeset

* Few more tweaks

* Make sure code blocks all have a code language

* Use URLs of new docs pages for package homepage

* One more stray `<br>` 👢

* Standardise to `sh` instead of `shell`
2022-07-11 21:10:34 +02:00
Fred K. Bot
1554a37622
[ci] release (#3887)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-11 13:38:42 -05:00
Nate Moore
7c49096e86
Update compiler (#3892)
* chore: update @astrojs/compiler

* chore: add changeset

* chore: update test

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-11 13:34:29 -05:00
Matthew Phillips
9cf7e40641
Properly await on children before hydrating in Safari (#3891) 2022-07-11 14:10:23 -04:00
Nate Moore
1cc5b78905
fix(#3071): update supported node versions (#3871)
Co-authored-by: Nate Moore <nate@astro.build>
2022-07-11 11:32:53 -05:00
Tom Lienard
cb6a973839
fix: portfolio example JSX error (#3886)
* fix: portfolio example JSX error

* chore: add changeset

* chore: update description
2022-07-11 11:10:05 -05:00
Matthew Phillips
21869a614a
Move client types into Astro (#3851)
* Move client types into Astro

* Adds a changeset

* Fix path to local client

* Reference vite/client in our HMR types

* Add back in the expect-error

* Update types comment
2022-07-11 08:12:18 -04:00
Fred K. Bot
16fdc01322
[ci] release (#3877)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-09 19:03:22 +00:00
Tony Sullivan
f961412862
Updating the <Picture /> component to default to async image decoding (#3876)
* defaulting pictures to use decoding=async

* chore: add changeset
2022-07-09 18:44:31 +00:00
Fred K. Bot
1785e568a0
[ci] release (#3850)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-08 20:54:39 -04:00
Ben Holmes
957fb50541
chore: changeset (#3873) 2022-07-08 19:04:27 -04:00
Erika
f9ed77bb0d
Add editor integrations to language integrations (#3864) 2022-07-08 17:47:01 -04:00
Tony Sullivan
89d76753a0
Adds a new <Picture> component to the image integration (#3866)
* moving all normalization logic out of the Image component

* refactor: only require loaders to provide the image src

* Adding a `<Picture />` component

* fixing types.ts imports

* refactor: moving getImage to it's own file

* updating component types to use astroHTML.JSX

* Revert "updating component types to use astroHTML.JSX"

This reverts commit 6e5f578da8.

* going back to letting loaders add extra HTML attributes

* Always use lazy loading and async decoding

* Cleaning up the Picture component

* Adding test coverage for <Picture>

* updating the README

* using JSX types for the Image and Picture elements

* chore: adding changeset

* Update packages/integrations/image/src/get-image.ts

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

* allow users to override loading and async on the <img>

* renaming config to constants, exporting getPicture()

* found the right syntax to import astro-jsx

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-07-08 21:37:55 +00:00
Ben Holmes
b012ee55b1
[astro add] Support adapters and third party packages (#3854)
* feat: support adapters and third part integrations by keywords

* refactor: add keywords to all official integrations

* docs: add adapter ex to astro add help

* nit: clarify astro add usage

* nit: highlight link

* fix: use process.exit(1) on error

* chore: changeset

* nit: bold integration name

* fix: log install instructions for adapters instead

* nit: change to logAdapterConfigInstructions

* Revert "fix: log install instructions for adapters instead"

This reverts commit 1a459f152b.

* feat: add hardcoded adapter export map

* refactor: inline adapter config log
2022-07-08 16:55:33 -04:00
Tony Sullivan
0aaef1c48b
fix: Always add @astrojs/image to vite.ssr.noExternal (#3869)
* fix: always add @astrojs/image to vite.ssr.noExternal

* chore: add changeset
2022-07-08 20:19:27 +00:00
Chris Swithinbank
1f9e4857ff
Integration README fixes (#3865)
* Remove stray XML tag in sitemap integration README

* Fix link errors

* Add changeset
2022-07-08 21:56:24 +02:00
Matthew Phillips
c2c4e5c238
Better response.arrayBuffer() handling in Node (#3860)
* Better response.arrayBuffer() handling in Node

* Adds a changeset
2022-07-08 11:38:06 -04:00
Ben Holmes
08fa0772ab
Docs: add adapter heading for configuration docs (#3842)
* Docs: add adapter heading for configuration docs

* docs: add adapter example, rework doc links

* chore: changeset
2022-07-07 18:19:39 -04:00
Fred K. Schott
515e876598 update solid peer dependencies 2022-07-07 12:11:27 -07:00
Erika
b84bd7db63
Improve JSX definitions (#3801) 2022-07-07 14:44:15 -04:00
Nate Moore
5afb807688
Fix slot attribute inside expressions (#3837)
* fix: use slots inside expressions

* test: add test for conditional named slots

* test: fix incorrect test fixture

* chore: update `@astrojs/compiler`

* chore: add test coverage for `switch`

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-07 13:23:51 -05:00
Fred K. Schott
eedb32c797
detect package manager and improve types (#3847) 2022-07-07 11:12:31 -07:00
Fred K. Schott
4fb08502a9
small create-astro wording changes (#3831) 2022-07-07 11:05:59 -07:00
Matthew Phillips
502f063131
Allow importing Image component from @astrojs/image (#3848)
* Allow importing Image component from @astrojs/image

* Adds a changeset

* Export the Image type
2022-07-07 13:49:46 -04:00
Fred K. Bot
568960f175
[ci] release (#3818)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-06 21:00:18 -04:00
Ben Holmes
820a26dde5
Fix: Infer content type with charset in dev and prod (#3841)
* fix: add text/plain;charset;utf-8 header in dev

* test: ensure content type for body shorthand

* chore: changeset

* feat: infer content type by pathname

* feat: add charset to prod build handler

* test: update for charset in prod build test
2022-07-06 20:48:14 -04:00
Ben Holmes
cd3f6348c4
Fix client:visible directive in safari (#3839)
* fix: client visible on safari

* chore: changeset

* refactor: wait for children with mutation observer

* fix: remove unecessary settimeout

* refactor: remove unecessary awaits
2022-07-06 16:58:28 -04:00
Matthew Phillips
c2165c34a7
Ensure that maybeRenderHead runs last (#3821)
* Ensure that maybeRenderHead runs last

* Adds a changeset

* Make work with MDX
2022-07-06 08:10:19 -04:00
Fred K. Schott
e4b2dca1f3
fix piped telemetry error output (#3822) 2022-07-05 14:46:57 -05:00
Randall
2f56664f85
Fix example on README.md on @astrojs/node (#3817)
* Fix example on `README.md`

The example was suggesting `import deno from '@astrojs/node';` which doesn't work. It needs to be `import node from '@astrojs/node';`.

* Create itchy-bottles-rhyme.md

Co-authored-by: Peter Singh <afuzzybear@outlook.com>
2022-07-04 22:51:30 +01:00
Fred K. Bot
822befc59b
[ci] release (#3813)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-04 15:22:09 +00:00
Tony Sullivan
5ccccace0c
Updates how the new Image component is exported to support older versions of Astro (#3812)
* don't use typescript for the components named export file

* Adding a readme example for images in markdown

* chore: add changeset
2022-07-04 14:52:32 +00:00
Fred K. Bot
08d068496d
[ci] release (#3800)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-01 15:56:49 -05:00
Nate Moore
5fe52737cb
Update MDX example to address failure (#3799)
* fix: do not use symbol in JSX runtime

* chore: update MDX example

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-01 15:51:28 -05:00
Fred K. Bot
5953a6ca0d
[ci] release (#3797)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-01 20:13:33 +00:00
Tony Sullivan
d143d24c72
Updates the images integration to automatically mark optimizeDeps for sharp (#3795)
* including src in npm publish

* bugfix: always round dimensions before passing to sharp.resize

* automatically add optimizeDeps vite config

* chore: changeset
2022-07-01 19:56:43 +00:00
Fred K. Bot
94143fcdba
[ci] release (#3789)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-01 17:43:26 +00:00
Tony Sullivan
f4943e0fbc
Chore/image changeset (#3788)
* chore: missed the changeset commit on the images PR

* revert unrelated .d.ts file

* lint fix
2022-07-01 15:54:45 +00:00
Fred K. Bot
0f73ece26b
[ci] release (#3783)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-01 03:09:17 +00:00
Tony Sullivan
976e1f175a
Adding an option to disable HTTP streaming (#3777)
* Adding a flag to disable HTTP streaming

* refactor: adding support for SSG builds

* handling string responses in the server runtime, adding tests

* removing streaming CLI flag

* removing import.meta.env.STREAMING

* include Content-Length header when streaming is disabled

* Verifying content-length header in dev

* fix: default streaming to enabled in the base App server

* TEMP: disabling the production test to investigate the test-adapter

* re-enabling the test with an adapter option to disable streaming for the test

* fix: use the existing TextEncoder to get the body's byte length

* moving config to build.streaming, ignoring it in `dev`

* fixing dev test to expect response streaming

* chore: add changsets

* removing the new config option all together 🎉

* remove temp debug log

* Updating astro changeset now that streaming isn't a config option
2022-07-01 02:29:59 +00:00
Fred K. Bot
d07ad8a782
[ci] release (#3774)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-30 11:39:44 -07:00
Fred K. Schott
192c4bcfd6
await error reporter (#3779) 2022-06-30 11:17:32 -07:00
Nate Moore
032ad1c047
MDX support (#3706)
* feat: first pass at MDX support

* fix: move built-in JSX renderer to come first

* chore: remove jsx example

* chore: update lockfile

* chore: cleanup example

* fix: missing deps

* refactor: move component render logic to `renderPage`

* chore: update HMR script

* chore: update MDX example

* refactor: prefer unshit

* refactor: remove TODO comment

* fix: remove duplicate identifier

* refactor: cleanup mdx entrypoint

* fix: better html handling

* fix: add tsconfig to mdx package

* chore: update lockfile

* fix: do not sort plugins unless mdx is enabled

* chore: update compiler

* fix(hmr): maybe render head for non-Astro pages

* fix: set initial pageExtensions

* refactor: cleanup addPageExtension

* refactor: remove addPageExtensions from types

* refactor: expose HookParameters type

* fix: only default to astro for MDX

* test: pick up jsx support in test fixtures

* refactor: simplify mdx entrypoint

* test: add basic MDX tests

* test(e2e): add mdx + framework tests

* chore: update lockfile

* test(e2e): fix preact mdx e2e test

* fix(mdx): disable .md support

* test(e2e): fix vue-component test missing mdx

* test(e2e): fix solid component needing import

* fix: allow `client:only="solid"` as an alias to `solid-js`

* chore: move to with-mdx example

* chore: update MDX readme

* chore: update example readme

* chore: bump astro version

* chore: update lockfile

* Update mod.d.ts

* feat: support `export const components` in MDX pages

* chore: update mdx example

* fix: update jsx-runtime with better slot support

* refactor: remove object style support

* chore: cleanup package exports

* chore: add todo comment

* refactor: improve isPage function, move to utils

* refactor: dry up manual HMR updates

* chore: add dev tests for MDX

* chore: prefer set to array

* chore: add changesets

* fix(hmr): flip public/private route

Co-authored-by: Nate Moore <nate@astro.build>
2022-06-30 13:09:09 -05:00
hippotastic
91635f05df
Fix integration name (prefetch instead of lit) (#3778) 2022-06-30 12:53:01 -05:00
Dan Jutan
8045c8ade1
Integration Docs Next Steps (#3677)
* sitemap readme skeleton + first sections

* Revert "sitemap readme skeleton + first sections"

This reverts commit cc55b312b6.

* sitemap readme skeleton + first sections

* remove canonicalURL option from sitemap

* add customPages option to readme

* sitemap examples

* partytown

* deno run command

* reference deno example

* node readme

* netlify & vercel readmes

* note that telemetry is installed

* telemetry is *enabled*, not installed

* Update packages/integrations/vercel/README.md

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

* Update packages/integrations/vercel/README.md

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

* readme -> README

* Update packages/integrations/deno/readme.md

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

* Update packages/integrations/deno/readme.md

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

* qualify they

* Update packages/integrations/sitemap/README.md

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

* Uppercase README names

* Update packages/integrations/partytown/README.md

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

* imports -> import typo

* update changeset

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2022-06-30 12:02:39 -04:00
Fred K. Schott
913591d137
refactor to provide better cli error handling (#3768) 2022-06-30 14:16:39 +00:00
Fred K. Bot
8cbe92b74b
[ci] release (#3772)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-30 08:08:09 -05:00
hippotastic
b934ab5d86
Fix "Invalid hook call" warning (#3769)
* Fix "Invalid hook call" warning

* Fix eslint warnings

* Apply code review suggestions
2022-06-30 14:10:56 +02:00
Fred K. Bot
38f2fd7723
[ci] release (#3759)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-29 17:11:48 -05:00
Fred K. Schott
dd176ca58d
add error event to telemetry (#3750) 2022-06-29 14:54:33 -07:00
Tony Sullivan
1eab496e9d
adding missing changeset for #3766 (#3767) 2022-06-29 21:25:54 +00:00
Chris Swithinbank
e3fdc9b403
Add preact/compat support to @astrojs/preact (#3712)
* Add preact/compat renderer (likely broken)

Based on the current Preact renderer and the old preact/compat implementation: f892aeb52f/packages/renderers/renderer-preact/compat/index.js

* Make sure name is consistent

* Switch to single integration with compat option

* fix: add module-resolver to alias react => preact/compat

* fix: preact/compat mode

* chore: remove client-compat entrypoint

* chore: add e2e test for preact/compat

* Try to fix frozen lock file error

* Add changeset

* Update README to new structure & document `compat`

* Fix changeset wording

* Fix README typo

* Tweak wording

Co-authored-by: Kevin Zuniga Cuellar <46791833+kevinzunigacuellar@users.noreply.github.com>

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Kevin Zuniga Cuellar <46791833+kevinzunigacuellar@users.noreply.github.com>
2022-06-29 17:42:47 +02:00
Tony Sullivan
54cd6b8dd1
Fixes a bug in how injectRoute parses route patterns on Windows (#3763)
* always remove a leading slash in the `injectRoute` pattern

* chore: add changeset
2022-06-29 09:46:23 -05:00
Ben Holmes
660abd3dee
Chore: remove memory test from CI (#3758)
* chore: remove memory test

* chore: remove memory test from ci

* chore: changeset

* Revert "chore: remove memory test"

This reverts commit 31b97c9df9.

* chore: update changeset to say "CI only"

Co-authored-by: bholmesdev <bholmesdev@gmail.com>
2022-06-28 15:47:21 -04:00
Fred K. Bot
789dc1fabc
[ci] release (#3757)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-28 11:02:59 -07:00
Fred K. Bot
b0c1ed1513
[ci] release (#3754)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-28 10:49:15 -07:00
Ben Holmes
507cd5c868
Chore: remove complex install step test (#3756)
* chore: remove complex install step test

* chore: changeset
2022-06-28 13:46:54 -04:00
Fred K. Schott
cabd9dcc80
anonymize non-git project id (#3753) 2022-06-28 10:29:24 -07:00
Fred K. Bot
be3c99316a
[ci] release (#3749)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-28 19:00:40 +02:00
Chris Swithinbank
012f093eeb
Add changeset to release create-astro (#3748) 2022-06-28 18:41:47 +02:00
Fred K. Bot
a59a27eb0c
[ci] release (#3733)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-28 15:11:59 +00:00
Ben Holmes
fb9ef4019b
Fix: prevent sourcemap warnings in monorepo "dev" mode (#3744)
* fix: avoid esbuild sourcemaps in astro-scripts dev

* chore: changeset
2022-06-28 10:20:21 -04:00
Victor
6360f474fb
Fix Tailwind integration Typescript warning (#3732)
* Make options optional

* chore: add changeset

Co-authored-by: Tony Sullivan <tony.f.sullivan@outlook.com>
2022-06-28 07:49:08 -05:00
Ben Holmes
4acd245d8f
Refactor: remove Deno shim to esbuild "banner" (#3734)
* refactor: remove Deno shim to esbuild "banner"

* refactor: move shim to const

* refactor: add shim to netlify edge

* chore: changeset
2022-06-27 17:20:28 -04:00
Fred K. Schott
ebd7e7ad81
update telemetry to support more anonymized project id (#3713)
* update telemetry to support more anonymized project id

* Create strange-laws-kick.md

* respond to nate feedback
2022-06-27 14:16:07 -07:00
Fred K. Schott
4d6d8644e6
SImplify "astro add" by removing confusing multi-select (#3715)
* wip

* update create-astro for new astro add

* update copy

* update git prompt

* Update packages/astro/src/core/logger/node.ts

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

* Update packages/create-astro/test/install-step.test.js

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

* update git prompt

* update test

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2022-06-27 14:15:51 -07:00
Tony Sullivan
bd4dac0e1a
Add missing changeset for @astrojs/prefetch (#3736) 2022-06-27 21:13:18 +00:00
Oleksii Tymoshenko
52f75369ef
feat: better behavior for 'undefined' return values from 'serialize… (#3723)
* feat: better behavior with 'undefined' return values after 'serialize' func

* build: changeset added
2022-06-27 13:02:00 -05:00
github-actions[bot]
0ae1365533
[ci] release (#3726)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-27 10:40:35 -04:00
Matthew Phillips
86635e035b
Inline define:var styles rendered after the head (#3724)
* Inline define:var styles rendered after the head

* Adds a changeset

* Remove tests that don't work with streaming
2022-06-27 10:36:41 -04:00
github-actions[bot]
701a3bd698
[ci] release (#3707)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-24 17:02:11 -04:00
Matthew Phillips
b5e3403fa1
Simplified Response#text() implementation (#3705)
* Simplified Response#text() implementation

* Adds a changeset

* Fix tsignore
2022-06-24 16:58:14 -04:00
Matthew Phillips
b11e3b38eb
Ensure import.meta.env.SSR is true in SSR mode (#3702)
* Ensure import.meta.env.SSR is true in SSR mode

* Define in the env plugin instead
2022-06-24 16:14:00 -04:00
github-actions[bot]
67b5aa4ca4
[ci] release (#3701)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-24 16:05:02 -04:00
Matthew Phillips
47c81effa6
Make Astro.redirect use a 302 status code (#3700)
* Make Astro.redirect use a 302 status code

* Adds a changeset

* Add a package.json
2022-06-24 15:55:06 -04:00
Matthew Phillips
3daaf510ea
Streaming (#3696)
* Start of streaming

* New lockfile

* Base should be Uint8Arrays

* Remove the ability to throw from a component

* Add a warning when returning a Response from a non-page component

* Adds a changeset
2022-06-24 15:35:21 -04:00
Richard Cooke
0d667d0e57
fix: @astrojs/clooudflare 404 handling (#3695) 2022-06-24 14:30:47 -05:00
github-actions[bot]
6a6047483b
[ci] release (#3692)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-24 12:55:36 -05:00
Matthew Phillips
fa7ed3f3a9
Remove post-rendering head injection (#3679)
* Remove post-rendering head injection

* Adds a changeset

* Use a layout component for vue
2022-06-23 15:37:55 -04:00
d-suke
446f8c4f13
Added test for dir parameter in astro:build:done. (#3649)
* Added test for dir in astro:build:done

* Added changeset

* Change pathname for Windows

* Change changeset generated file summary

* Eliminate testing of branches by os

* Eliminate OS dependence

* Change changeset generated file summary

* Using fileURLToPath

* Cross-platform fixes.

* Use posix for everything.

* Pass an empty string for relative from

* Use path.join for the correct value

* Update packages/astro/test/static-build-dir.test.js

* Update packages/astro/test/static-build-dir.test.js

* Update packages/astro/test/static-build-dir.test.js

* Remove trailing slash

* add toString

* fix syntax error

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-06-23 14:04:10 -05:00
Ben Holmes
3f8ee70e2b
Fix: document sitemap + SSR use case (#3689)
* fix: offer suggestion for SSR sitemap users

* docs: add customPages to README

* chore: changeset
2022-06-23 11:31:54 -04:00
Nate Moore
7373d61cdc
Enable named slots in renderers (#3652)
* feat: pass all slots to renderers

* refactor: pass `slots` as top-level props

* test: add named slot test for frameworks

* fix: nested hydration, slots that are not initially rendered

* test: add nested-recursive e2e test

* fix: render unmatched custom element children

* chore: update lockfile

* fix: unrendered slots for client:only

* fix(lit): ensure lit integration uses new slots API

* chore: add changeset

* chore: add changesets

* fix: lit slots

* feat: convert dash-case or snake_case slots to camelCase for JSX

* feat: remove tmpl special logic

* test: add slot components-in-markdown test

* refactor: prefer Object.entries.map() to for/of loop

Co-authored-by: Nate Moore <nate@astro.build>
2022-06-23 10:10:54 -05:00
github-actions[bot]
19cd962d0b
[ci] release (#3684)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-23 09:14:17 -04:00
Matthew Phillips
b36ecb717e
Include partytown scripts in SSR manifest (#3686)
* Include partytown scripts in SSR manifst

* Adds a changeset
2022-06-23 09:03:43 -04:00
Ben Holmes
3d554fdbfb
Fix: pass Astro config postcss to Svelte preprocess (#3685)
* fix: pass Astro config postcss to Svelte preprocess

* test: preset env for nested styles

* chore: changeset
2022-06-22 19:52:32 -04:00
Fred K. Schott
921d9a27e2
simplify a complex peer semver used by astro add (#3633)
* fix peer semver used by astro add

* Create pink-shirts-mix.md

* update with regex over `' '` split

Co-authored-by: Ben Holmes <hey@bholmes.dev>
2022-06-22 16:13:32 -05:00
Matthew Phillips
9a813268db
Allow TypeScript in hoisted scripts (#3665)
* Allow TypeScript in hoisted scripts

* Pass skipSelf

* Fix linting
2022-06-22 12:47:52 -04:00
Matthew Phillips
85c33751c2
Allow specifying entryFileNames for client JS (#3676)
* Allow specifying entryFileNames for client JS

* Adds a changeset
2022-06-22 12:32:17 -04:00
github-actions[bot]
8ad146a5d7
[ci] release (#3683)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-22 12:19:43 -04:00
Matthew Phillips
aeab890971
Inline small hoisted scripts (#3658)
* Inline small hoisted scripts

This makes it so that small hoisted scripts get inlined into the page rather than be fetched externally.

* Ensure we don't inline when there are imports

* Fix ts

* Update tests with new url structure

* Adds a changeset
2022-06-22 12:02:42 -04:00
Ben Holmes
df02fad13e
Add @nanostores/preact to ALWAYS_NOEXTERNAL (#3667)
* chore: add nanostores/preact to ALWAYS_NOEXTERNAL

* chore: update comment to reference pR

* chore: changeset
2022-06-22 11:38:59 -04:00
Matthew Phillips
898845402c
Include all client build artifacts in SSRManifest (#3678)
* Include all client build artifacts in SSRManifest

* Adds a changeset
2022-06-22 11:35:54 -04:00
github-actions[bot]
119283775a
[ci] release (#3666)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-22 10:05:21 -04:00
unknown
7f5770be4d Remove @examples/docs from a changeset 2022-06-22 09:41:30 -04:00
hippotastic
ba5ad7855c
Fix react dependencies to improve test reliability (#3673)
* Fix local react tests by unifying versions

* Add missing dependencies to react tests

* Add changeset

* Fix lockfile

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-06-22 09:11:48 -04:00
hippotastic
ef6282d5d9
Fix import.meta.env also without trailing dot (#3675)
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-06-22 08:58:20 -04:00
Matthew Phillips
46d1ea941b
Revert "add Astro Deno Example (#3645)" (#3674)
This reverts commit e88b23ea52.
2022-06-22 08:30:22 -04:00
Elian ☕️
e88b23ea52
add Astro Deno Example (#3645)
* add Astro Deno Example

* add changeset

* update pnpm lock

Co-authored-by: Dan Jutan <danjutan@gmail.com>
2022-06-21 13:07:07 -04:00
github-actions[bot]
b4db008e53
[ci] release (#3664)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-21 12:47:04 -04:00
Matthew Phillips
c20b93c484
Resolve .jsx -> .tsx in hydrated components (#3663) 2022-06-21 12:35:11 -04:00
github-actions[bot]
e13ce4d751
[ci] release (#3662)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-21 11:50:06 -04:00
Matthew Phillips
2ff11df438
Add .js to imports in the sitemap package (#3661)
* Add .js to imports in the sitemap package

* Adds a smoke test

* Adds a changeset
2022-06-21 11:29:18 -04:00
Yuji Sugiura
7d4699b8f9
Check null for props serialization (#3657)
* Check null for props serialization

* Add changeset
2022-06-21 10:26:27 -05:00
github-actions[bot]
e67171252c
[ci] release (#3615)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-06-21 09:43:19 -04:00
Matthew Phillips
f5afaf2498
Support re-exporting astro components containing client components (#3625)
* Support re-exporting astro components containing client components

* Include metadata for markdown too

* Fix ssr, probably

* Inject post-build

* Remove tagName custom element test

* Allows using the constructor for lit elements

* Fix hoisted script scanning

* Pass through plugin context

* Get edge functions working in the edge tests

* Fix types for the edge function integration

* Upgrade the compiler

* Upgrade compiler version

* Better release notes for lit

* Update .changeset/unlucky-hairs-camp.md

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

* Properly test that the draft was not rendered

* Prevent from rendering draft posts

* Add a changeset about the build perf improvement.

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-06-21 08:32:05 -04:00
Nate Moore
d9f6dcf6ea
fix: properly catch falsy components (#3650)
Co-authored-by: Nate Moore <nate@astro.build>
2022-06-20 14:14:54 -05:00