Commit graph

3374 commits

Author SHA1 Message Date
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
natemoo-re
3cc6fb81da [ci] format 2022-07-01 20:53:13 +00: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
98afed34f1
increase node heap to 4096 during the Format Code workflow (#3796) 2022-07-01 20:04:36 +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
deab65d7b3
[ci] update lockfile (#3786)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-07-01 08:50:18 -07: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
Nate Moore
f9290b328a
CI: Prefer per-job cache rather than artifact I/O (#3781)
* chore(ci): prefer per-job cache rather than artifact io

* chore: update cache step

* chore: fix cache key

* chore(ci): build on windows as well

* chore(ci): enable remote cache

* chore: run build on all three platforms

* chore: prefer turbo to custom caching logic

* chore: build AFTER install

* chore: build on node 14

* chore: remove build, parallelize tasks

* chore: update cache

* chore: prime build caches

* chore: fix indentation

* chore(ci): only build on ubuntu

* chore(ci): changelog needs build

* chore(ci): ignore updates to md files

* chore(ci): add 20 min timeout for e2e tests

* chore(ci): enable FORCE_COLOR

* chore: run turbo with `--output-logs=new-only`

Co-authored-by: Nate Moore <nate@astro.build>
2022-06-30 16:26:37 -05: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
bf44b2ab88
Ci: improve times, reduce delay (#3780)
* improve CI times

* improve CI times
2022-06-30 11:21:41 -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
Fred K. Bot
d137169b7b
[ci] update lockfile (#3771)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-06-30 11:22:18 -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
Isaac McFadyen
3a13f7d428
Added Cloudflare adapter to README.md (#3773) 2022-06-30 08:07:39 -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 Sullivan
1eab496e9d
adding missing changeset for #3766 (#3767) 2022-06-29 21:25:54 +00: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
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