Commit graph

1935 commits

Author SHA1 Message Date
tony-sull
75f202a124 [ci] format 2022-07-13 19:33:49 +00: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
matthewp
14ed29c645 [ci] format 2022-07-11 20:15:17 +00: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
matthewp
0fd645e32f [ci] format 2022-07-11 12:13:57 +00: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
bholmesdev
abb874b6c2 [ci] format 2022-07-08 23:06:06 +00: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-sull
d2f68345f9 [ci] format 2022-07-08 21:40:22 +00: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
bholmesdev
ec392589f6 [ci] format 2022-07-08 20:57:10 +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-sull
9300af9bc2 [ci] format 2022-07-08 20:20:57 +00: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
Nate Moore
70b0246d4c
fix(#3843): move @babel/types to dependencies (#3863)
* fix(#3843): move @babel/types to dependencies

* chore: update lockfile

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-08 14:49:06 -05:00
Isaac McFadyen
37401cc3e6
Fixed broken Markdown link (#3868) 2022-07-08 14:47:16 -05:00
Nate Moore
bd11c01fa8
chore: bump Vite minimum version (#3861)
Co-authored-by: Nate Moore <nate@astro.build>
2022-07-08 11:11:02 -05:00
matthewp
f7bcd0d6f6 [ci] format 2022-07-08 15:40:00 +00: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
Chris Williams
f84a1552ec
Fix manual import (#3857) 2022-07-08 10:01:23 -05:00
bholmesdev
272d24ba3a [ci] format 2022-07-07 22:21:10 +00: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
natemoo-re
0a156feca0 [ci] format 2022-07-07 21:08:44 +00:00
Joaquín Sánchez
c6ba6ec4d9
fix: lint failing on astro and some integrations (#3794)
* fix: lint failing on astro and some integrations

* chore: fix telemetry lint

* chore: fix turbo cache (thx nate)

* chore: fix runtime server
2022-07-07 16:06:44 -05:00
Fred K. Schott
515e876598 update solid peer dependencies 2022-07-07 12:11:27 -07:00
Fred K. Schott
2b7b626629
update lockfile (#3828) 2022-07-07 12:06:56 -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
FredKSchott
c191098b97 [ci] format 2022-07-07 18:14:25 +00: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
matthewp
9f54fa3cd9 [ci] format 2022-07-07 17:51:24 +00: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
bholmesdev
67f91fe2fd [ci] format 2022-07-07 00:49:59 +00: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
bholmesdev
b2f53c37c5 [ci] format 2022-07-06 20:59:56 +00: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
matthewp
b1c4600fd4 [ci] format 2022-07-06 12:11:57 +00: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
Tony Sullivan
b9d26f39e2
manually correcting import ordering to unblock CI (#3798) 2022-07-01 20:24:45 +00: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-sull
88dad63322 [ci] format 2022-07-01 20:06:01 +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
e8593e7ead
Adds an @astrojs/image integration for optimizing images (#3694)
* initial commit

* WIP: starting to define interfaces for images and transformers

* WIP: basic sharp service to test out the API setup

* adding a few tests for sharp.toImageSrc

* Adding tests for sharp.parseImageSrc

* hooking up basic SSR support

* updating image services to return width/height

* simplifying config setup for v1

* hooking up basic SSR + SSG support (dev & build)

* refactor: a bit of code cleanup and commenting

* WIP: migrating local files to ESM + vite plugin

* WIP: starting to hook up user-provided loaderEntryPoints

* chore: update lock file

* chore: update merged lockfile

* refactor: code cleanup and type docs

* pulling over the README template for first-party integrations

* moving metadata out to the loader

* updating the test for the refactored import

* revert: remove unrelated webapi formatting

* revert: remove unrelated change

* fixing up the existing sharp tests

* fix: vite plugin wasn't dynamically loading the image service properly

* refactor: minor API renaming, removing last hard-coded use of sharp loader

* don't manipulate src for hosted image services

* Adding support for automatically calculating dimensions by aspect ratio, if needed

* a few bug fixes + renaming the aspect ratio search param to "ar"

* Adding ETag support, removing need for loaders to parse file metadata

* using the battle tested `etag` package

* Adding support for dynamically calculating partial sizes

* refactor: moving to the packages/integrations dir, Astro Labs TBD later

* refactor: renaming parse/serialize functions

* Adding tests for SSG image optimizations

* refactor: clean up outdated names related to ImageProps

* nit: reusing cached SSG filename

* chore: update pnpm lock file

* handling file URLs when resolving local image imports

* updating image file resolution to use file URLs

* increasing test timeout for image build tests

* fixing eslint error in sharp test

* adding slash for windows compat in src URLs

* chore: update lockfile after merge

* Adding README content

* adding a readme call to action for configuration options

* review: A few of the quick updates from the PR review

* hack: adds a one-off check to allow query params for the _image route

* Adds support for src={import("...")}, and named component exports

* adding SSR tests

* nit: adding a bit more comments

* limiting the query params in SSG dev to the images integration
2022-07-01 15:47:48 +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-sull
a2b385303c [ci] format 2022-07-01 02:32:07 +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
natemoo-re
af23bdd515 [ci] format 2022-06-30 18:11:12 +00: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
tony-sull
75ffab7009 [ci] format 2022-06-30 14:18:38 +00: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
40fa87c274 [ci] format 2022-06-30 12:12:27 +00: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
FredKSchott
a99a54d344 [ci] format 2022-06-29 21:56:28 +00:00
Fred K. Schott
4bc6c7ceaa
manual lockfile update (#3751)
* lockfile update

* update lockfile gen script

* Update index.ts
2022-06-29 14:54:40 -07:00
Fred K. Schott
dd176ca58d
add error event to telemetry (#3750) 2022-06-29 14:54:33 -07:00
tony-sull
2f7d918912 [ci] format 2022-06-29 20:58:19 +00:00
Tony Sullivan
51d5dc4789
Updates an error handler to expect updated @astrojs/lit behavior (#3766)
* fix: don't throw an error when the lit renderer doesn't provide a clientEntrypoint

* updating the framework-lit example to match new behavior

* fix: updating the playground example to latest lit syntax
2022-06-29 20:56:51 +00:00
delucis
e667477103 [ci] format 2022-06-29 15:48:55 +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
Erika
40be96d7c8
Improve types for getStaticPaths, fixes dead links (#3755) 2022-06-29 09:43:52 -05:00
Sarah Rainsberger
aaf0cd8bfc
Added: reminder to also update docs if create-astro flow or wording is changed (#3760) 2022-06-29 11:10:20 -03: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
Nate Moore
8829cc7ab6
Disable problematic create-astro test (#3746)
* chore(test): disable problematic create-astro test

* chore: fix skip

Co-authored-by: Nate Moore <nate@astro.build>
2022-06-28 10:24:54 -05: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
natemoo-re
27d8c351bb [ci] format 2022-06-28 13:40:53 +00:00
Nate Moore
53bf0be280
chore(lint): fix lint issues (#3743)
Co-authored-by: Nate Moore <nate@astro.build>
2022-06-28 08:39:10 -05:00
Fred K. Bot
768c8ed21d
[ci] update lockfile (#3740)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-06-28 08:33:13 -05: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
bholmesdev
efd6548d49 [ci] format 2022-06-27 21:22:26 +00: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
FredKSchott
701799c6d6 [ci] format 2022-06-27 21:17:40 +00: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
Sarah Rainsberger
0bcc969cd4
removed experimental warning from astro add command (#3727) 2022-06-27 13:44:32 -05:00
tony-sull
cb3fcdde6a [ci] format 2022-06-27 18:28:16 +00:00
Tony Sullivan
79fe09fa30
Adds a prefetch integration for near-instant page navigations (#3725)
* Adds a basic @astrojs/prefetch integration

* adding tests for custom selectors

* missed in last commit

* Adding a few docs, removing the option for `selectors` to be an element array

* adding an option for the concurrency limit

* fixing test for updated integration options

* Update packages/labs/prefetch/src/client.ts

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

* nit: removing the NodeJS.Timer type to allow typescript to infer the return

* updating docs for default selector with ~=

* Skip prefetching on 2G connections, or when data saver is enabled

* refactor: moving to packages/integrations, Astro Labs TBD down the road

* README typo fix

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-06-27 18:26:21 +00:00
FredKSchott
7d0c3f9ecb [ci] format 2022-06-27 18:12:43 +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
matthewp
ab3aa3099b [ci] format 2022-06-27 14:38:25 +00: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
Matthew Phillips
c8dda94125 Revert "Inline define:var styles rendered after the head"
This reverts commit 65e2b71b80.
2022-06-27 09:08:40 -04:00
unknown
65e2b71b80 Inline define:var styles rendered after the head 2022-06-27 09:07:48 -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
matthewp
f3e01f6c26 [ci] format 2022-06-24 21:00:16 +00: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
natemoo-re
5e716e8cd5 [ci] format 2022-06-24 20:13:12 +00:00
Nate Moore
908c2638cb
Add *private* built-in JSX renderer (#3697)
* feat: add private `addPageExtensions` hook

* feat: experimental JSX support

* chore: remove experimental.jsx option from config

* chore: remove automatic astro JSX runtime detection

* fix: throw warning when client:* directive is used but no client entrypoint is found

* feat: add slot support to renderer

* chore: remove client entrypoint from jsx renderer

* test: add barebones JSX test

* test: add frameworks-in-jsx test

* feat: improve error message when no matching import is found

* feat: support slots

* fix: do not strip `astro-slot` when using JSX renderer

* fix: handle null values in isVNode

* fix: do not transform slots for elements

Co-authored-by: Nate Moore <nate@astro.build>
2022-06-24 15:11:17 -05: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
matthewp
69c955b2bf [ci] format 2022-06-24 19:37:09 +00: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
dperolio
fd0a24c424
fix run-on sentence (#3699) 2022-06-23 20:24:43 -05:00
matthewp
3dc22a2443 [ci] format 2022-06-23 19:39:58 +00: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
tony-sull
e990b9f42d [ci] format 2022-06-23 17:30:21 +00:00
Tony Sullivan
c7cb5df450
centralizing test setup with a universal resetAllFiles hook (#3693) 2022-06-23 17:28:54 +00:00
bholmesdev
589b840f5a [ci] format 2022-06-23 15:33:20 +00: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
natemoo-re
059d00bd5d [ci] format 2022-06-23 15:12:46 +00: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
matthewp
16cdfeef81 [ci] format 2022-06-23 13:05:55 +00: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
bholmesdev
9133a42831 [ci] format 2022-06-22 23:55:00 +00: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
natemoo-re
a3654a7537 [ci] format 2022-06-22 21:15:21 +00:00