* 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>
* 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>
* 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
* 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
* 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
* 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
* 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.
* 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
* 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
* 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>
* 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
* 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>
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.
* 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
* 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
* 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
* 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
* 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>