Commit graph

528 commits

Author SHA1 Message Date
Fred K. Bot
d790eabd98
[ci] release (#3972)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-26 09:58:38 -04:00
Fred K. Bot
c7e117ce32
[ci] update lockfile (#4054)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-07-26 09:02:53 -04:00
Fred K. Bot
adf8cde10f
[ci] update lockfile (#4040)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-07-26 00:50:43 -04:00
Fred K. Schott
9ab66c4ba9
add support for injected page-ssr scripts (#4050) 2022-07-26 00:26:47 -04:00
Tony Sullivan
e60d6d9c1d
Removes fileURLToPath dependency from @astrojs/image SSR production endpoint (#4048)
* removing fileURLToPath dependency from SSR production endpoint

* chore: add changeset
2022-07-25 21:14:03 +00:00
Fred K. Bot
cd4be4822c
[ci] update lockfile (#4036)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-07-25 00:18:32 -04:00
Nate Moore
8859655f15
Update astro version to 1.0.0-rc.0 (#4030)
* chore: update `astro` to `1.0.0-rc.0`

* chore: update `astro` version in examples

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-24 22:32:28 -04:00
Nate Moore
1215e731b8
Preserve authored CSS specificity (#4024)
* feat: preserve authored CSS specificity

* chore: update tests to use :where()

* test: fix HTML and CSS test

* test: fix imported markdown CSS test

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-23 13:11:12 -05:00
Fred K. Bot
7db1cc20e9
[ci] update lockfile (#4026)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-07-23 12:42:21 -05:00
Tony Sullivan
ef9345767b
WIP: [image] Fixing SSR support and improving error validation (#4013)
* fix: SSR builds were hitting an undefined error and skipping the step for copying original assets

* chore: update lockfile

* chore: adding better error validation to getImage and getPicture

* refactor: cleaning up index.ts

* refactor: moving SSG build generation logic out of the integration

* splitting build to ssg & ssr helpers, re-enabling SSR image build tests

* sharp should automatically rotate based on EXIF

* cleaning up how static images are tracked for SSG builds

* undo unrelated mod.d.ts change

* chore: add changeset
2022-07-22 23:01:56 +00:00
Ben Holmes
00fab4ce13
Feat: new legacy.astroFlavoredMarkdown flag (#4016)
* refactor: add legacy.jsxInMarkdown flag to config

* refactor: jsxInMarkdown -> astroFlavoredMarkdown

* refactor: remove `markdown.mode`

* feat: wire up legacy.astroFlavoredMarkdown

* test: add legacy to astro-markdown fixture

* test: remark autolinking

* test: remark components

* test: remark expressions

* test: remark strictness

* chore: remove "mode" from md component

* chore: remove "mode: md" from tests

* Fixing legacy MD tests, adding named slots tests for MDX pages

* chore: update lock file

* WIP: debugging named slots in MDX

* fix: handle named slots in MDX properly

* chore: re-enabling slots tests for MDX pages

* fixing test validation for svelte & vue

* removing unused Tailwind test

* legacy flag for Markdown component tests

* adding is:raw to Markdown component test

* adding is:raw to all Markdown component test fixtures

* can't use is:raw when nesting markdown components

* another nested test can't use is:raw

* one more <Markdown> test fix

* fixing another JSX markdown component test

* chore: add changeset

* e2e tests were missing the legacy flag

* removing the broken tailwind E2E markdown page

Co-authored-by: Tony Sullivan <tony.f.sullivan@outlook.com>
Co-authored-by: Nate Moore <nate@astro.build>
2022-07-22 22:45:16 +00:00
Okiki Ojo
0cc6ede362
SSR 404 and 500 routes in adapters (#4018)
* fix(WIP): SSR 404 and 500 routes

* Implement the feature

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-07-22 16:30:17 -04:00
Matthew Phillips
4ca6a0933d
Fixes Node adapter receiving a request body (#4023)
* Fixes Node adapter receiving a request body

* Updated lockfile
2022-07-22 15:22:31 -04:00
Fred K. Bot
a626600a9e
[ci] update lockfile (#4019)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-07-22 13:14:42 -05:00
Nate Moore
7250e4e86d
Add .html support (#3867)
* feat: add html package

* feat: support assets in HTML

* feat(html): upgrade html integration

* feat(html): add `@astrojs/html` integration

* feat(html): add html support to astro core

* test(html): update html tests with package.json files

* chore: add changeset

* fix: remove import cycle

* chore: fix types

* refactor: remove @astrojs/html, add to core

* chore: update types for `*.html`

* fix: move *.html to astro/env

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-22 10:32:36 -05:00
Nate Moore
fbef6a7f72
New handling for define:vars scripts and styles (#3976)
* feat: new handling for `define:vars` scripts and styles

* fix: handle new script hoisting pattern

* refactor: compiler handles sourcemaps

* chore: update to handle is:inline define:vars

* chore: bump compiler to latest

* chore: update define:vars tests

* fix: output of `define:vars` is not object style

* fix: appease ts

* chore: remove unused file

* chore: revert unecessary refactors

* chore: prefer sync `defineScriptVars`

* chore: add changeset

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Okiki Ojo <okikio.dev@gmail.com>
2022-07-22 10:14:25 -05:00
Ben Holmes
399d7e2698
Fix: use set:html when markdown mode is md (#4008)
* refactor: add legacy.jsxInMarkdown flag to config

* fix: use `set:html` when `markdown.mode` is 'md'

* Revert "refactor: add legacy.jsxInMarkdown flag to config"

This reverts commit 5572e8d9b3.

* fix: move `remarkUnwrap, remarkEscape` to MDX only

* fix: only apply scary HTML passthroughs on MDX

* fix: move all JSX-specific rehype plugins under `isMDX`

* fix: "allowDangerousHtml" for md (required for Shiki)

* fix: apply `set:html` for non-layouts too

* test: JSX expressions, components, syntax highlighting

* chore: changeset

* fix: ignore "setup" and "components" in plain MD mode

* refactor: create new fixture to avoid weird caching error

* fix: dup package name

* chore: update lock

* fix: apply rehypeCollectHeaders to md
2022-07-21 18:01:26 -04:00
Ben Holmes
3b8a744524
[MDX] Add Prism and Shiki support (#4002)
* deps: add rehype-prism, shiki, rehype-pretty-code

* wip: apply rehype plugins depending on config

* wip: cherry-pick jsx-runtime fix?

* deps: rehype-pretty-code -> shiki-twoslash, add rehype-raw

* wip: add jsx-runtime fix

* feat: get shiki working!

* deps: add @astrojs/prism, prismjs, unist-util-visit

* feat: add prism support

* example: add small syntax highlight demo to with-mdx

* deps: remove rehype-prism

* chore: remove unused async

* chore: add .test.js to all mdx tests

* test: shiki, shikiConfig, prism

* fix: remove "is:raw" from prism output

* docs: add syntax highlighting section

* chore: add changeset

* nit: "Shiki config" -> Shiki config

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

* Revert "wip: add jsx-runtime fix"

This reverts commit 07f4528f44.

* docs: link to integration README from example

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-07-21 16:43:58 -04:00
Matthew Phillips
d503c5bf3d
Fixes using tsconfig to set aliases (#4010) 2022-07-21 13:45:20 -04:00
Allan Chain
21462feb4a
fix: better dev routing with base using middleware (#3942) 2022-07-21 12:37:26 -05:00
Matthew Phillips
01ba07d8fa
Make the Lit integration be compat with Vite 3.0.1 (#4009)
* Make the Lit integration be compat with Vite 3.0.1

* Changeset

* Pin Vite version

* Update lockfile
2022-07-21 12:25:57 -04:00
Ben Holmes
b2b367c969
[MDX] Support YAML frontmatter (#3995)
* chore: remove old comment

* deps: add remark-frontmatter

* deps: add remark-mdx-frontmatter

* fix: handle null or undefined frontmatter key

* feat: configure frontmatter plugins with defaults

* test: frontmatter and custom frontmatter name

* docs: add frontmatterOptions config

* docs: add "variables" and "frontmatter" docs

* chore: excessible -> accessible

* chore: changeset

* chore: remove bad mdx comment
2022-07-20 21:34:21 -04:00
Matthew Phillips
bccd88f0eb
Move the Markdown component to its own package (#3986)
* Move the Markdown component to its own package

* Update the examples

* Updated lockfile

* Use is:raw

* Add a main field

* Update the formatting of the readme

* Rename to @astrojs/markdown-component
2022-07-20 16:45:05 -04:00
Ben Holmes
19433eb4a4
[MDX] Support remark and rehype plugins, with defaults (#3977)
* feaet: allow remark and rehype plugin config

* deps: add remark-gfm, remark-smartypants

* feat: add gfm and smartypants by default

* test: add GFM and remark plugin tests

* feat: preserve default plugins with "extends"

* docs: add remarkPlugins

* docs: add rehypePlugins

* chore: changeset

* fix: remove skip from mdx tests

* chore: dup hyperlink flavor text

* chore: authGen -> autoGen

* nit: markdown -> Markdown

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

* nit: markdown -> Markdown 1

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

* nit: markdown -> Markdown 2

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

* nit: markdown -> Markdown 3

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

* nit: markdown -> Markdown 4

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

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-07-20 14:14:23 -04:00
Ben Holmes
61fec63044
[MDX] Include url in glob result (#3981)
* deps: add es-module-lexer

* feat: inject url export on mdx files

* fix: apply url transform in prod

* test: page urls with overrides

* fix: revert test skips

* chore: changeset

* fix: add newline before export
2022-07-20 10:56:32 -04:00
Nate Moore
4412fe61f4
Improve error handling (#3859)
* feat: tag JSX exports with correct renderer

* feat(error): enhance generic errors with frame

* feat(error): surface errors from streaming response

* feat(error): use vite overlay to display errors

* chore: fix build issues

* feat: use custom logger to hide vite errors for known packages

* chore: move error-react-spectrum to e2e test

* chore: add todo comment

* test: fix error overlay handling

* refactor: extract overlay message to util

* test(e2e): update shared component tests

* fix: give error overlay more time

* refactor: move errors tests to e2e

* fix: appease ts

* test: move sass error to e2e tests

* fix: scope optimizeDeps to `src/pages/**/*`

* chore: update lockfile

* chore: update test script

* chore: log error overlay

* chore: log error tests

* chore: update playwright config

* test(e2e): update errors tests

* test(e2e): fix overlay util

* test(e2e): fix test utils

* test(e2e): try timeout

* test(e2e): give up on overlay tests

* fix: typo

* fix: typo

* refactor: collapse definition

* fix: let errors throw

* chore: revert scanner change

* chore: refactor err.plugin handling

* chore: add clarifying comments

* fix: make astro:renderer non enumerable

* chore: update comments

* refactor: replace astro:renderer string with Symbol

* chore: add comment about tagged components

* feat: improve error overlay when hint exists

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-19 16:47:31 -05: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
Matthew Phillips
5fde2fd8bc
Moves Debug component's styles to be inlined (#3963) 2022-07-18 16:42:57 -04: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. 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
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. 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
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
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
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
Ben Holmes
faf3f3a8d1
Update with-nanostores example to match docs walkthrough (#3840)
* feat: replace with-nanostores with new example

* docs: update README with docs call-out

* chore: small formatting inconsistencies

* nit: standardize to spaces :'(

* nit: standardize to tabs!

* refactor: use html "hidden" property

* nit: beta.66 for sanity
2022-07-11 15:42:10 -04: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
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
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
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
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
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
Fred K. Bot
ed8161f3d9
[ci] update lockfile (#3858)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-07-08 10:06:52 -05:00
Fred K. Schott
2b7b626629
update lockfile (#3828) 2022-07-07 12:06:56 -07: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
Nate Moore
0e01e0bb58
Upgrade to pnpm@7.4.1, remove patch-package (#3747)
* chore: upgrade to pnpm@7.4.0, remove `patch-package`

* chore: update contributing

* chore: pnpm@7.4.1

* chore: bump to pnpm@7.5.0

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-07 12:52:53 -05: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
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
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
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 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
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
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
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
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
4bc6c7ceaa
manual lockfile update (#3751)
* lockfile update

* update lockfile gen script

* Update index.ts
2022-06-29 14:54:40 -07: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
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
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
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
Fred K. Schott
9d78162fd9
Prettier update with caching speedup (#3710)
* update lockfile on fresh install

* update prettier
2022-06-27 11:24:22 -07: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
Fred K. Schott
c3d41d1f60
update lockfile on fresh install (#3709) 2022-06-25 10:24:59 -07: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
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
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
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
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
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
Tony Sullivan
b8c6dabfb7
Enables eslint on the full repo and adds a rule for no only() tests (#3659)
* enabling eslint on the all packages and tests

* enabling for all packages

* TEMP: adding an only() test to verify it fails CI

* using our eslint config and ignore in CI

* removing the temporary .only() test

* update lock file

* lint: fixing new test with a no-shadow warning

* chore: update lock file
2022-06-22 15:59:49 +00: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
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
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
Jeff Mendez
195f88bf0b
chore(example): fix @types install type (#3656) 2022-06-21 10:27:22 -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
8e3e4894c9
Add private addPageExtension hook (#3628)
* feat: add private `addPageExtensions` hook

* chore: remove renderer binding

Co-authored-by: Nate Moore <nate@astro.build>
2022-06-20 14:05:16 -05:00
Oleksii Tymoshenko
1031c06f9c
feat: improved sitemap (#3579)
* feat: extended sitemap functionality

* docs: del samples

* docs: readme

* feat: new sitemap

* feat: createLinkInHead removed

* docs: updated changeset text

* refactor: 'zod' function() instead of self made refine()

* Revert "refactor: 'zod' function() instead of self made refine()"

This reverts commit 036bac730d.

undo function()
2022-06-16 19:06:48 +00:00
github-actions[bot]
81104a9335
[ci] release (#3604)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-16 12:05:10 -04:00
Richard Cooke
7f42358141
feat: add SSR adaptor for cloudflare pages functions (#3600) 2022-06-16 10:12:25 -04:00
Matthew Phillips
fc52321a88
Consolidate hydration scripts into just one (#3571)
* Remove redundant hydration scripts

* Prebuild the island JS

* Fix build

* Updates to tests

* Update more references

* Custom element test now has two classic scripts

* Account for non-default exports

* Restructure hydration directives

* Move nested logic into the island component

* Remove try/catch
2022-06-15 08:50:05 -04:00
github-actions[bot]
31e3224319
[ci] release (#3596)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-14 15:46:51 -05:00
Nate Moore
5ab9d573f6
Collect project meta info (#3587)
* chore: add project meta

* Update index.ts
2022-06-14 15:30:39 -05:00
Matthew Phillips
330fef448e
Handle importing multiple CSS packages in same bundle (#3595)
* Handle importing multiple CSS packages in same bundle

* Changeset
2022-06-14 16:27:21 -04:00
github-actions[bot]
acc8afbdda
[ci] release (#3594)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-14 15:51:10 -04:00
github-actions[bot]
c54b024803
[ci] release (#3569)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-10 21:07:03 -05:00
Oleksii Tymoshenko
098031294f
unused dependency 'sitemap', 'filter' option should return boolean (#3563)
* refactor: @astrojs/sitemap does't use 'sitemap' pkg

* refactor: 'filter' option should return boolean instead of string

* fix: forgotten `pnpm install`

* chore: add changeset

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-06-10 13:16:08 -05:00
Matthew Phillips
614769a39b
Preoptimize renderers and hydration directives (#3568)
* Preoptimize renderers and hydration directives

* Adds a changeset

* Upgrade to Vite 2.9.12
2022-06-10 12:38:19 -04:00
github-actions[bot]
d02578fd4c
[ci] release (#3549)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-10 15:03:52 +00:00
hippotastic
c549f161ca
Allow AlpineJS syntax extensions in Markdown (#3554)
* Allow AlpineJS syntax extensions in Markdown

* Remove unwanted MDX ESM import/export support
2022-06-08 12:41:36 -05:00
github-actions[bot]
ec89def67d
[ci] release (#3534)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-07 12:45:50 -04:00
Matthew Phillips
f3ab822e32
Allow dynamic imports when using Netlify Edge Functions (#3535)
* Allow dynamic imports when using Netlify Edge Functions

* Update deno test script and changeset
2022-06-07 11:41:32 -04:00
Matthew Phillips
51c60de76c
Fix importing CSS packages in frontmatter (#3537)
* Fix importing CSS packages in frontmatter

* Formatting

* Only update if the source code contains the import

* Consolidate the two plugins

* we do need a pre and a post

* Adds a changeset
2022-06-06 18:26:15 -04:00
Nate Moore
a87ce4412c
Improve HMR handling for styles, persisted islands (#3492)
* feat: improve HMR handling for styles, persisted islands

* Also using data-persist to keep injected <style>'s during HMR

* Updating E2E tests to validate that .astro HMR doesn't blow away component styles

* chore: add changeset

* copy/paste error when cleaning up tests

* big change - using inline <style> blocks instead of <link>s in dev

* Updating tests that were expecting <link> stylesheets in dev

* updating all E2E tests to use workspace versions for astro deps

* TEMP: adding debug logging to see why the Ubuntu test only fails in CI

* fix: Svelte styles are automatically handled by Vite, we can skip them in dev

* fix: svelte is more interesting, we need Astro to inject styles only until hydration

* avoiding extra HMTL noise by only including the data-astro-injected URL for svelte components

* TEMP: ubuntu CI doesn't like the svelte HMR test...

* disabling the svelte component test on ubuntu for now

Co-authored-by: Tony Sullivan <tony.f.sullivan@outlook.com>
2022-06-06 18:39:48 +00:00
Fred K. Schott
5b06398b7b
format: automatically organize imports and removed unused (#3499)
* add import formatting

* chore: update lockfile

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-06-06 09:47:28 -07:00
Matthew Phillips
c22a07db13
Fix use of dynamic imports / Astro.glob with Deno Deploy (#3532)
* Fix use of dynamic imports / Astro.glob with Deno Deploy

* Adds a changeset

* Mark the markdown package as external
2022-06-06 12:02:13 -04:00
github-actions[bot]
9029c43549
[ci] release (#3512)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-06 09:40:09 -04:00
Fred K. Schott
25fa0f527d
[ci] update lockfile (#3515)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-06-03 13:00:47 -04:00
Nate Moore
2fedb97489
Patch Lit server shim to fix sass compatability (#3511)
* fix(#2623, #3508): patch lit server shim to allow sass compat

* chore: add changeset
2022-06-02 14:45:11 -05:00
github-actions[bot]
a74cf98002
[ci] release (#3509)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-02 15:31:44 -04:00
Fred K. Schott
88cd7525be
[ci] update lockfile (#3501)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-06-02 15:30:46 -04:00
github-actions[bot]
67ad33debf
[ci] release (#3488)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-02 13:42:18 -04:00
Matthew Phillips
d588bc4a9c
Update rollup to prevent empty slot bug (#3496)
* Update rollup to prevent empty slot bug

* Adds a changeset

* Updated lockfile

* provide import.meta.env.SITE when there are private envs
2022-06-01 12:21:32 -04:00
Fred K. Schott
cfb85ee10e
[ci] update lockfile (#3495)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-06-01 10:39:32 -05:00
github-actions[bot]
b2f955ec1b
[ci] release (#3485)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-31 13:40:19 -04:00
Fred K. Schott
c9d8b10a85
[ci] update lockfile (#3448)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-05-31 11:46:13 -05:00
Nate Moore
e9a77d8619
Improve nested and client:only hydration (#3455)
* wip: fix nested islands

* fix: improve hydration for dynamic content

* chore: fix bundle-size script for new files

* chore: allow-list client:* directive files

* fix(#3362): fix client:only behavior for React, Vue, Solid

* test: add client-only e2e test

* chore: update lockfile

* test: fix e2e tests

* test: add framework nesting e2e tests

* Update packages/astro/src/runtime/client/events.ts

Co-authored-by: Matthew Phillips <matthew@skypack.dev>

* chore: add changeset

* fix(preact): ignore hydrate roots

* chore: remove `ssr` check in integrations

* Revert "chore: remove `ssr` check in integrations"

This reverts commit ba27eaae55.

* chore: add changeset

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-05-31 11:29:36 -05:00
Ben Holmes
d145b8689c
Chore: remove rss helper from getStaticPaths (#3462)
* chore: remove rss() with helpful error message

* docs: add context on "getStaticPaths" removal

* chore: changeset

* deps: remove fast-xml-parser from core!

* chore: update lockfile
2022-05-31 12:08:09 -04:00
github-actions[bot]
16345032aa
[ci] release (#3479)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-30 13:06:41 -04:00
github-actions[bot]
42aa6daa96
[ci] release (#3463)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-27 18:09:20 -04:00
Fred K. Schott
ffe5cf0312
update typescript (#3456) 2022-05-27 14:53:04 -05:00
github-actions[bot]
e6d8670168
[ci] release (#3453)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-26 14:25:10 -04:00
Matthew Phillips
ac3c60d48d
Fix VITE_ASSET bug (#3439)
* Fix VITE_ASSET bug

* Updated test that depended on esbuild output

* Fix some more tests

* Fix css config and postcss tests

* Git client only working

* Fix static build test

* Update tailwind tests

* Fix build

* Fix css bundling tests

* Updated some more tests for windows

* Remove tests that are no longer relevant

* Cause it to break

* Fix bug and add explanation

* Adds a changeset

* Inline comments about what the hashing is doing

* Update packages/astro/src/vite-plugin-build-css/index.ts

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

* Update to the lockfile

* Minify css

* Update tailwind tests

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-05-26 14:00:36 -04:00
github-actions[bot]
8a49ad23bf
[ci] release (#3446)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-26 06:48:47 -04:00
github-actions[bot]
f200ddadbc
[ci] release (#3435)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-25 10:42:03 -05:00
Nate Moore
cfae9760b2
Improve Markdown + Components usage (#3410)
* feat: use internal MDX tooling for markdown + components

* fix: improve MD + component tests

* chore: add changeset

* fix: make tsc happy

* fix(#3319): add regression test for component children

* fix(markdown): support HTML comments in markdown

* fix(#2474): ensure namespaced components are properly handled in markdown pages

* fix(#3220): ensure html in markdown pages does not have extra surrounding space

* fix(#3264): ensure that remark files pass in file information

* fix(#3254): enable experimentalStaticExtraction for `.md` pages

* fix: revert parsing change

* fix: remove `markdown.mode` option
2022-05-24 17:02:11 -05:00
Nate Moore
296fff2cff
fix: properly handle scoped class injection with spread attributes (#3384)
* fix: properly handle scoped class injection when a spread attribute is present

* chore: update lockfile

* chore: revert lockfile

* chore: update compiler

* test: add spread scope test

* test: fix spread scoped test
2022-05-24 11:58:21 -05:00
Fred K. Schott
ccaea99765
[ci] update lockfile (#3419)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-05-24 11:43:37 -05:00
github-actions[bot]
8eec97fdd1
[ci] release (#3409)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-23 13:26:07 -04:00
Tony Sullivan
ff56f083bc
Adding E2E tests for client hydration and HMR (#3374)
* adding Tailwind E2E tests with Playwright

* package.json updates

* adding e2e tests to CI workflow

* using e2e for dev tests, mocha for build tests

* refactor: sharing test-utils helpers

* chore: update lockfile

* Adding contributing docs

* Revert "refactor: sharing test-utils helpers"

This reverts commit 48496f43bc99eab30747baf6e83041ba4932e786.

* refactor: simpler solution to resolving e2e test fixtures

* chore: updating lockfile

* refactor: cleaning up how URLs are resolved in e2e tests

* install playwright deps in CI

* ensure playwright deps are installed during CI

* adding a basic HMR test for tailwind styles

* using @e2e for playwright test packages

* adding react hydration and HMR tests

* adding hydration and HMR tests  for preact

* adding svelte hydration and HMR tests

* adding solid-js hydration and HMR tests

* adding solid hydration and HMR tests

* adding vue hydration and HMR tests

* adding client:media tests

* fixing Lit hydration and HMR tests

* fixing up the Vue e2e tests

* fixing up svelte tests

* chore: test cleanup

* chore: cleaning up test element IDs

* chore: updating lock file

* chore: update lockfile after merge

* TEMP: disabling React e2e tests

* Revert "TEMP: disabling React e2e tests"

This reverts commit ed1bad9cbc.

* updating to use the new editFiles helper

* chore: updating lock file

* updating lock file

* updating lockfile

* TEMP: watching for console logs

* TEMP: testing typescript tests

* updating test:e2e scripts for config file

* seems like it didn't find the config file?

* use a fresh dev server for each test

* removing Lit tests for now

* Revert "removing Lit tests for now"

This reverts commit 4970a8093e.

* updating test config for CI

* WIP: disabling HMR tests to track down why they're unreliable

* TEMP: logging to debug HMR test

* afterEach isn't a global in Playwright

* fix: the test's file reset helper was using a URL not filepath

* one last try, why is the HMR test hanging at cleanup?

* resetting files after tailwind HMR test

* create the onNextChange watcher before editFile is called

* moving the file changed sync into editFile()

* code refactor + Astro Component HMR test

* chore: lint fixes

* adding a test suite for the framework-multiple example app
2022-05-23 16:56:45 +00:00
Ben Holmes
4de53eccef
Fix: support FormData object on fetch body (#3417)
* refactor: make node-fetch external in rollup build

* deps: make node-fetch standard dep

* refactor: switch to node-fetch pkg ref in fetch.ts

* chore: changeset

* chore: bump webapi to minor change
2022-05-20 17:26:41 -04:00
Tony Sullivan
6373508458
Enforcing routing priority during production builds (#3407)
* WIP: have a few test failures to track down

* WIP: still a few failures to fix

* WIP: fixes the issue of dynamic routes stepping on static routes

* Resolve route priority before building routes for `getStaticPaths()`

* chore: adding comments explaining why this filter is needed

* chore: adding changeset

* got too fancy with the test suite, these routes weren't valid

* simplifying the test cases

* TEMP: is this test breaking my CI run?

* Revert "TEMP: is this test breaking my CI run?"

This reverts commit 291af2a1b6f075ebfc74002886e43110731b3e1b.

* slots-preact didn't list @astrojs/preact as a dep

* reverting copy/paste error
2022-05-20 19:58:59 +00:00
Matthew Phillips
60d7164015
Upgrade the compiler (#3416) 2022-05-20 15:08:50 -04:00
Ben Holmes
fb5572bebd
Fix: components in imported markdown (#3398)
* test: add with-components to astro-markdown fixture

* fix: markdown pathname with /@fs prefix

* feat: add loadMetadata helper for md

* feat: fix components in Astro.glob results!

* fix: md import path

* Revert "feat: add loadMetadata helper for md"

This reverts commit 76cf96f4be3d0e19589f84025c0131352d0b6cc8.

* fix: add back $$loadMetadata helper

* feat: add second comp framework to md test

* chore: core/render/dev lint

* chore: changeset

* fix: short circuit if mod doesn't have metadata

* fix: skip mod graph preloading in dev

* refactor: make md metadata check recursive

* refactor: extract metadata helper to util

* fix: remove unecessary mod graph query

* fix: move md import flag to util for deno bundling issue

* fix: remove 'dev' mode from test utils build

* feat: add global hashset for seen metadata

* refactor: flip Promise.all to for await for perf!

* Revert bc I was wrong! "refactor: flip Promise.all to for await for perf!"

This reverts commit da8a6873f5.
2022-05-20 15:03:21 -04:00
Fred K. Schott
195f3f7eb7
[ci] update lockfile (#3414)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-05-20 12:02:10 -05:00
github-actions[bot]
4dfd341928
[ci] release (#3405)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-19 13:35:19 -04:00
Matthew Phillips
a35c89d2ac Fix react spectrum test lockfile issue 2022-05-19 13:27:08 -04:00
Matthew Phillips
4007aebc6a
Provide a good error message when loading react spectrum (#3406)
* Provide a good error message when loading react spectrum

* Adds a changeset
2022-05-19 13:12:04 -04:00
Fred K. Schott
a7480452b1
[ci] update lockfile (#3404)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-05-19 10:22:27 -05:00
github-actions[bot]
b330c5b72e
[ci] release (#3400)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-18 21:36:32 +00:00
Fred K. Schott
ef32b7c39c
[ci] update lockfile (#3395)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-05-18 10:15:42 -05:00
Tony Sullivan
d8e5dfb977
Matching custom 404 pages using the manifest's route patterns (#3390)
* matching custom 404 pages using the manifest's route patterns

* windows: still need to use the relative paths for 404 matching
2022-05-17 21:27:06 +00:00
github-actions[bot]
f54072bd3f
[ci] release (#3378)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-17 11:50:18 -04:00
Fred K. Schott
d102cab126
[ci] update lockfile (#3386)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-05-17 11:44:50 -04:00
Matthew Phillips
4d00473dbd
Error recovery test and more (#3388)
* Add test to verify errors are recovered from

* Fix nested style components not be added in dev on initial load

* Adds a changeset
2022-05-17 11:43:49 -04:00
Matthew Phillips
0259d7658b
Fix for loading markdown pages with spaces in the name (#3379)
* Fix for loading markdown pages with spaces in the name

* Adds a changeset
2022-05-16 14:44:15 -04:00
Fred K. Schott
9dd16bace5
[ci] update lockfile (#3363)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-05-16 13:33:16 -05:00
Daniel Vivar
fe61e469b2
test(@astrojs/lit): adding tests (#3375)
* test(@astrojs/lit): adding tests

* changeset
2022-05-16 12:16:30 -04:00
Matthew Phillips
b1230152ff
Support alias use with hydration scripts (#3376)
* Support alias use with hydration scripts

* Adds a changeset

* Updated lockfile
2022-05-16 11:37:51 -04:00
Tony Sullivan
2b622b5e0f
Adding E2E testing with Playwright (#3349)
* adding Tailwind E2E tests with Playwright

* package.json updates

* adding e2e tests to CI workflow

* using e2e for dev tests, mocha for build tests

* refactor: sharing test-utils helpers

* chore: update lockfile

* Adding contributing docs

* Revert "refactor: sharing test-utils helpers"

This reverts commit 48496f43bc99eab30747baf6e83041ba4932e786.

* refactor: simpler solution to resolving e2e test fixtures

* chore: updating lockfile

* refactor: cleaning up how URLs are resolved in e2e tests

* install playwright deps in CI

* trying pnpm playwright install to fix version mismatch
2022-05-15 21:47:28 +00:00
github-actions[bot]
cedb9a2105
[ci] release (#3334)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-12 14:48:58 -06:00
Fred K. Schott
7cd4b1bc12
[ci] update lockfile (#3287)
* [ci] update lockfile

* chore: fix lockfile

* fix: pin turbo

Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
Co-authored-by: Nate Moore <nate@skypack.dev>
2022-05-12 11:42:34 -05:00
Tony Sullivan
b463ddb3ce
Resolve components by module ID during compilation (#3300)
* WIP: adding test coverage

* test fixes

* moving the shared lib up a directory to reproduce the bug

* fix: transform with the module ID instead of parsing the filepath

* adding the shared lib to the workspaces list

* fix: client-only assets now get the full URL from vite

* why is this needed for windows?

* WIP: using /@fs to handle windows filepaths

* fix: remove /@fs from hoisted script imports

* nit: removing unused imports

* fix: strip off the path root when mapping client:only styles

* had to reverse the `/@fs` handling to work on windows and unix

* chore: adding comments to explain the fix

* chore: adding changeset
2022-05-12 10:04:01 -06:00
Juan Martín Seery
114bf63e11
refactor(vercel): Build Output API v3 (#3216)
* Removed ignores

* Migration to v3

* More changes

* Remove legacy redirects

* Fail when there is no ENABLE_VC_BUILD

* Fix edge

* Updated readme

* Changeset

* Added static mode

* Updated documentation

* Updated shim

* Made edge work!

* Updated changeset

* Ensure empty dir

* Fixed redirects for dynamic paths

* Removed extra declaration

* Splited imports

* Updated readme

* Fixed some urls

* Deprecated shim!

* [test]: Vercel NFT

* Beautify

* Edge bundle to node 14.19

Vercel runs 14.19.1 (I've checked it manually)

* Re-added shim (#3304)

* Added `node:` prefix

* Use the same bundling as Deno for Edge

* Remove esbuild

* Fixed shim

* Moved nft

* Updated changeset

* Added note about Edge

* fix typo

* Added support for Node 16 (vercel/vercel#7772)
2022-05-11 15:10:38 -06:00
Ben Holmes
1a5335ed9a
[create-astro] Finalize developer experience... with gradients 🚀 (#3313)
* wip: port gradient helpers from sandbox ideas

* feat: wire up rocket gradient 🚀

* feat: wire up rocket gradient on install step

* refactor: update "next steps" wording

* deps: add chalk (for rendering gradient)

* chore: changeset

* chore: clean up sstray template string
2022-05-11 10:38:42 -06:00
Jonas Luebbers
abc5b219bb
Remove try/catch from solid component check (#3282)
* Remove try/catch from solid component check

* Move try/catch to renderComponent

* Add solid to integrations-playground example
2022-05-11 10:23:34 -06:00
Fred K. Schott
ce6d798282
Fix peer deps issue in svelte and vue plugins (#3333)
* fix peer deps issue

* add changeset

* rebuild lockfile
2022-05-11 09:23:32 -06:00
Tony Sullivan
e22f7364ce
Fixes custom 404 pages in astro dev (#3331)
* Fixing pathname matching for custom 404 pages

* fixes custom 404 routes in dev

* refactor: removing node path dependency

* refactor: using core's path utils
2022-05-10 21:05:30 +00:00
github-actions[bot]
4639a048d7
[ci] release (#3308)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-06 09:28:57 -04:00
github-actions[bot]
9b98633cc8
[ci] release (#3302)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-05 16:27:40 -04:00
Matthew Phillips
3d901ca59d
Revert "refactor: remove serialize-javascript (#3278)" (#3304)
* Revert "refactor: remove serialize-javascript (#3278)"

This reverts commit 13c1f5ff6b.

* Adds a changeset
2022-05-05 15:56:29 -04:00
github-actions[bot]
d0a4064d80
[ci] release (#3293)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-05 09:56:45 -04:00
github-actions[bot]
9b6a2e2d87
[ci] release (#3288)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-04 08:59:10 -04:00
github-actions[bot]
58862fbf76
[ci] release (#3284)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-03 17:14:26 -07:00
Fred K. Schott
1032e450cc Revert "[ci] release (#3279)"
This reverts commit 9fb2c4744c.
2022-05-03 17:04:44 -07:00
github-actions[bot]
9fb2c4744c
[ci] release (#3279)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-03 18:33:18 -04:00
Ben Holmes
fbfb6190ab
Feat: @astrojs/rss package! (#3271)
* feat: introduce @astrojs/rss package!

* feat: add config "site" to env variable

* docs: add @astrojs/rss readme

* chore: changeset

* fix: testing script

* deps: add mocha, chai, chai-promises

* tests: add rss test!

* feat: add canonicalUrl arg

* chore: remove console.log

* fix: remove null check on env (breaks build)

* docs: stray `

* chore: update error message to doc link

* chore: remove getStylesheet

* docs: update stylesheet reference
2022-05-03 18:26:13 -04:00
Juan Martín Seery
e2a037be94
refactor: internalize shorthash (#3281)
* Shorthash has been internalized

* Remove shorthash

* Optimized shorthash

* Changeset

* Added license
2022-05-03 19:25:35 -03:00
Juan Martín Seery
13c1f5ff6b
refactor: remove serialize-javascript (#3278)
* Replaced serialize-javascript with devalue

* Changeset
2022-05-03 17:55:12 -03:00
github-actions[bot]
1de48ce4eb
[ci] release (#3277)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-03 15:50:21 -04:00
Matthew Phillips
3854acdb7d Add typescript to match peerDep 2022-05-03 15:42:19 -04:00
Juan Martín Seery
dd9ffc317f
chore: pnpm v7 (#3259) 2022-05-03 10:31:16 -03:00
github-actions[bot]
8b17d3ebcf
[ci] release (#3243)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-05-03 09:16:57 -04:00
Matthew Phillips
f76038ac7d
Telemetry (#3256)
* feat: add @astrojs/telemetry

* feat: add telemetry events, add queueing system

* feat(telemetry): record CLI events

* chore: add note

* feat: support generic TELEMETRY_DISABLED env var

* Fix test script

* shim telemetry in tests

* Shim telemetry in other commands

* Stub telemetry in the memory leak test

* Disable telemetry in smoke tests

* Adds a changeset

* Run the formatter

* few updates

* Include config keys

* Add shallow viteKeys array:
:

* Add vite keys and tests

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-05-03 09:07:28 -04:00
Juan Martín Seery
de123b28b3
refactor(markdown): removed rehype-slug in favor of our own implementation (#3234)
* Moved types arround

* Removed `rehype-slug` in favor of our own implementation

* Changeset

* Removed rehype-slug from examples

* Remove rehype-slug from tests

* Updated reference

* rehypeCollectHeaders is a function again

* Reverted rehype-slug removes

* Re-added rehype-slug to reference
2022-04-29 21:07:09 -03:00
github-actions[bot]
9984f8ea24
[ci] release (#3242)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-29 22:30:12 +00:00
Fred K. Schott
465b3a7970
Update example tsconfig (#3107) 2022-04-28 11:42:55 -04:00
Ben Holmes
b7cd695884
Feat: [create astro] replace component selector with "astro add" (#3223)
* feat: remove component framework selector

* feat: update templates to use "basics"

* feat: add "astro add" cli step

* tests: astro add step

* fix: reset env for pnpm tests

* fix: update install step test

* chore: remove "frameworks" step from tests

* deps: remove node-fetch from create-astro

* chore: changeset

* fix: use "preferLocal" for astro add command

* refactor: remove POSTPROCESS_FILES

* feat: add --yes flag to simplify astro add

* feat: bring back minimal option as "completely empty"
2022-04-27 20:58:18 -04:00
github-actions[bot]
7937852395
[ci] release (#3215)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-27 16:23:53 -04:00
Ben Holmes
8f2f4de5dc
Feat: new just the basics template (#3206)
* feat: new just-the-basics example

* chore: update package name

* chore: update lockfile

* refactor: simplify meta tags

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

* refactor: use `system-ui` for base font

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

* Update examples/just-the-basics/src/components/Layout.astro

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

* refactor: just-the-basics -> basics (now 10% more basic!)

* refactor: add type checking to layout prop

* nit: change "astro-text" to "text-gradient"

* refactor: simplify CSS grid

* feat: make transition easing 10% fancier

* change to text gradient because people gooootta have opinions huh

* nit: rename CSS class to "instructions"

* refactor: use ul > li for containers

* chore: update lockfile

* feat: style tweaks

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Nate Moore <nate@skypack.dev>
2022-04-26 20:37:58 -04:00
Nate Moore
15d9408678
Update @proload/core (#3211)
* chore: bump proload

* chore: update @proload/core
2022-04-26 17:26:01 -05:00
Nate Moore
9028450663 Revert "fix: replace serialize-javascript & random-bytes with custom internal modules"
This reverts commit f0d22b9332.
2022-04-26 18:12:17 -04:00
Okiki
f0d22b9332 fix: replace serialize-javascript & random-bytes with custom internal modules
serialize-javascript relies on random-bytes and random-bytes relies on nodes crypto module, unfortunately the crypto module isn't available on the browser, so it breaks the repl. When one tries to upgrade the repl to the latest version of Astro, the browser complains about the missing crypto module. The changes shouldn't affect the behaviour of Astro in any meaning full way.
2022-04-26 21:52:35 +00:00
github-actions[bot]
8d8433ee50
[ci] release (#3182)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-26 16:49:09 -04:00
Juan Martín Seery
18762d6a0a
Fix lockfile (#3210) 2022-04-26 14:48:42 -05:00
Ben Holmes
7a61977db1
Feat: support astro add without npm installing (#3183)
* deps: update to latest proload

* feat: avoid parsing config on resolveConfigUrl

* chore: changeset

* fix: bump proload

* fix: bump proload

* fix: bump proload

* fix: bump proload

* fix: bump proload

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-04-26 14:35:44 -04:00
Ben Holmes
38e5e9e982
Feat: create astro add install step (#3190)
* feat: add instlal step with pkg manager detection

* feat: add package emoji for style points

* feat: update next steps to match pkg manager

* refactor: extract some create-astro test utils

* refactor: extract promp msgs to utils

* chore: add install step tests

* chore: changeset

* fix: remove directory test skip

* fix: unset env variables after install step test

* deps: add execa to create-astro

* refactor: use execa for install step

* chore: remove old comment

* fix: rework install step test for node 14?

* chore: remove "politely stolen" footnote

* temp: show stdout dialog

* feat: remove debugging logs, add dryrun flag for testing

* chore: more stray logs

* fix: remove rmdir
2022-04-26 11:24:24 -04:00
Juan Martín Seery
1a86e77c37
fix(markdown): file.url fixes (#3198)
* fix(markdown): file.url fixes

* Added tests

* Changed the default of `base` from `./` to `/`

* Make the url work with subpath

* Changeset

* Forgot to change this comparison
2022-04-25 13:38:46 -03:00
Fred K. Schott
bd76716c88
[ci] update lockfile (#3162)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-04-22 10:04:01 -04:00
Matthew Phillips
19667c45f3
Netlify Edge: forward requests for static assets (#3170)
* Netlify Edge: forward requests for static assets

* Adds a changeset

* Don't run edge tests, yet
2022-04-22 10:03:25 -04:00
github-actions[bot]
84939b2ff2
[ci] release (#3172)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-21 15:37:18 -05:00
Ben Holmes
7c49194ca2
Feat: [create astro] add directory prompt (#3168)
* wip: add prompt for directory with validation

* feat: wire up dir response to cwd

* feat: improve error handling on non-empty dirs

* fix: update test helpers to execaSync

* chore: add .skipped to old tests for clarity

* deps: add mocha and chai to create-astro

* feat: add directory step test with fixture

* feat: update turbo to run create-astro tests again 🥳

* chore: changeset
2022-04-21 16:36:48 -04:00
Nate Moore
908fffb5ec
chore: upgrade compiler (#3171) 2022-04-21 15:26:14 -05:00
github-actions[bot]
bd66527e7d
[ci] release (#3169)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-21 14:08:37 -04:00
github-actions[bot]
0406bdc35b
[ci] release (#3165)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-21 12:19:52 -04:00
Matthew Phillips
ae9ac5cbdc
Fixes using React.lazy and Suspense (#3160)
* Revert "Revert "Fixes using React.lazy and Suspense""

This reverts commit e621c2f7d3.

* Adds a changeset

* Fix ts errors

* Remove netlify metadata folder
2022-04-21 12:10:06 -04:00
github-actions[bot]
3cdc5f1bfb
[ci] release (#3161)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-21 11:34:03 -04:00
Matthew Phillips
e621c2f7d3 Revert "Fixes using React.lazy and Suspense"
This reverts commit 700d4f9649.
2022-04-20 17:17:36 -04:00
unknown
700d4f9649 Fixes using React.lazy and Suspense 2022-04-20 17:17:11 -04:00
Fred K. Schott
00b8343844
[ci] update lockfile (#3153)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-04-20 09:42:31 -04:00
github-actions[bot]
fce98d5552
[ci] release (#3151)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-19 22:45:07 -07:00
Ben Holmes
9ba1f4f825
Fix: markdown JSX expression inconsistencies (#3152)
* fix: remove micromark-extension-mdx-expression to unbreak JSX expressions

* chore: changeset

* deps: update lockfile

* tests: jsx expressions in markdown
2022-04-19 16:37:11 -04:00
Ben Holmes
0247b54270
Refactor: remove all legacy build logic from codebase (#3141)
* refactor: remove legacy build flag

* refactor: remove legacy style maps

* chore: changeset

* refactor: nuke vite-plugin-build-html

* deps: remove parse5

* tests: restore user provided doctype support!

* deps: remove @web/parse5-utils

* deps: change srcset-parse to dev dep

* chore: remove unused utils

* refactor: remove unused style mapping

* unrelated fix: add .test to astro-markdown-css

* refactor: remove unused astro-style with test update

* chore: remove unused buildTime var
2022-04-19 13:52:15 -04:00
github-actions[bot]
9e00f6d546
[ci] release (#3149)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-19 13:30:27 -04:00
github-actions[bot]
95d0db5a44
[ci] release (#3120)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-19 11:30:34 -04:00
Matthew Phillips
4cf54c60aa
Netlify Edge function support (#3148)
* Netlify Edge function support

* Update readme with edge function information

* Adds a changeset

* Disable running edge function test in CI for now
2022-04-19 11:22:15 -04:00
Ben Holmes
44bacd2011
Fix: component styles within imported markdown files (#3116)
* fix: replace markdown path prefix with suffix flag

* fix: avoid non-encoded colons for flag

* fix: remove needless ?

* fix: dev server load order

* fix: production build crawl dynamic imports

* fix: remove  unused virtual_module_id const

* fix: remove unsafe "!" on getmodbyid

* fix: remove needless @id path check

* fix: add list of SSR-able file extensions

* docs: virtual_mod_id change

* fix: support id prefix on resolved ids

* fix: switch to ?mdImport flag to resolve glob imports

* tests: imported md styles for dev and build

* chore: changeset
2022-04-18 15:44:42 -04:00
Chris Swithinbank
9e35758ec3
Roll back to React 17 in docs template (#3129)
The docs example template includes Algolia’s Docsearch components to provide a search bar but this doesn’t support React 18 yet, so will error when dependencies are being installed.

See https://discord.com/channels/830184174198718474/965413318678425600
2022-04-18 10:09:57 -04:00
github-actions[bot]
c1336ae41c
[ci] release (#3114)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-14 15:28:42 -04:00
Matthew Phillips
1687009f31
Add client:only CSS to their pages (#3113)
* Add client:only CSS to their pages

* Adds a changeset

* Use viteID for windows
2022-04-14 12:19:03 -04:00
github-actions[bot]
254048dc82
[ci] release (#3103)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-14 15:10:29 +00:00
Matthew Phillips
4ac0d5d4e7
Support the Markdown component in SSR (#3036)
* Support the Markdown component in SSR

* Adds a changeset

* Support runtime markdown in Node.js

* Remove option from test adapter
2022-04-14 09:51:53 -04:00
github-actions[bot]
b23f6b1596
[ci] release (#3101)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-13 08:55:32 -04:00
github-actions[bot]
21926278ba
[ci] release (#3090)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-12 20:15:14 -07:00
github-actions[bot]
0966a432a8
[ci] release (#3080)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-11 19:59:32 -07:00
Juan Martín Seery
b835e285de
feat: markdown config typechecking (#2970)
* Added schemas to markdown plugin

* Added new schemas to main package

* Changesets

* typeraw

* Explaination about the weird type hack

* Added markdown.mode to config

* Added comment

* Formatted

* Moved validation to `astro` and added RemarkPlugin ad RehypePlugin

* Removed the ability to have a custom markdown renderer internally

* Fixed plugin type

* Removed unused renderMarkdownWithFrontmatter

* Added missing dependency

* Dynamically import astro markdown

* Cache import
2022-04-11 16:01:12 -07:00
Fred K. Schott
e606dded87
use bundled alpinejs (#3065) 2022-04-11 15:56:42 -07:00
Fred K. Schott
771127ea29
remove unused renderers (#3063) 2022-04-11 11:19:41 -07:00
github-actions[bot]
791a524411
[ci] release (#3064)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-10 21:13:11 -07:00
github-actions[bot]
21c74e572c
[ci] release (#3061)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-10 20:15:02 -07:00
Fred K. Schott
2bb6a06ebb revert release 2022-04-10 20:11:34 -07:00
github-actions[bot]
46f02d9cf4
[ci] release (#3060)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-10 20:01:00 -07:00
Fred K. Schott
77c0be5b26
update lockfile (#3059) 2022-04-10 19:12:30 -07:00
Juan Martín Seery
1907255ca2
chore: webapi test now use chai (#3048) 2022-04-10 18:29:46 -07:00
Fred K. Schott
47f20a189f update test names containing spaces 2022-04-10 18:26:52 -07:00
Steve Lee
7b0fbd731e
Fix SSR static build public file copying. fixes #3016 (#3037)
* Fix SSR static build public file copying

* chore: update lockfile

* remove dirname and use URL constructor

* Cleanup test and actually test what it says it tests

Co-authored-by: Nate Moore <nate@skypack.dev>
2022-04-10 18:23:17 -07:00
Fred K. Schott
a9ecefb8ac
fix our weird beta release issues (#3031) 2022-04-10 18:17:39 -07:00
Juan Martín Seery
982f64f69a
chore: updated esbuild (#3028)
* chore: updated esbuild

* Changeset
2022-04-10 14:33:10 -07:00
github-actions[bot]
a5aea2ce56
[ci] release (beta) (#3023)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-07 15:22:47 -04:00
github-actions[bot]
1d0c1d8977
[ci] release (beta) (#3007)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-06 16:40:46 -05:00
github-actions[bot]
013150e2de
[ci] release (beta) (#3005)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-06 13:06:36 -04:00
github-actions[bot]
4e021f70e1
[ci] release (beta) (#2992)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-04-04 18:07:09 -07:00