* Don’t use Buffer.byteLength() as Deno can’t use it
* Add changeset
* Add tests for Markdown & MDX with Deno
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
* add new blog template
* update placeholder images
* use svg favicon
* Update examples/blog/src/pages/blog/using-mdx.mdx
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* fred pass
* more fred pass
Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* feat: add generator property and component
* chore: remove `Generator` component
* chore: update generator description
* chore: include generator in examples
* chore: update lockfile
* chore: format
* fix: do not reference core from server runtime
* chore: remove component test
Co-authored-by: Nate Moore <nate@astro.build>
* Upgrade @astrojs/prism to a real package, fix component import not working
* Remove `@astrojs/prism` as a dependency of `astro`
* Update lock file
* Refactor to multiple files
* Oops, can't have astro imports run inside node
* Follow Nate's suggestion on being minors instead of patchs
* Update lockfile
* 4078 breaking test
* Use Vite for loading the config
* Try it
* Fallback to loading with Vite only when needed
* Remove console.error
* Remove extra console.log
* Add a changeset
* Use middlewareMode
* Prevent hydration scripts from being rendered in the wrong order
* Remove comment
* Update jsx
* Remove promise for stop
* Try skipping lit tests
* Stringify these chunks too
* Unskip lit
* 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>
* 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
* 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>
* 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
* 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
* 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>
* 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
* 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
* 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>
* 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>
* 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
* 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
* 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>
* 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>
* 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>
* 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
* 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>
* 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>
* 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
* 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>
* 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
* 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
* 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>