* Add new fields to API route context
* Add props and redirect
* Pass custom redirect status code
* Correctly pass props in api routes
* Add better docs
* Add test
* Fix build
* Add constants file
* Add links to jsdoc
* Workaround lint issue
* Thanks Chris
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Missed one doc change
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Add more detail to the changesets
* Strict redirect status type
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
* Added support for updating tsconfig.json when using astro add
* Refactor
* Remove unneeded change
* Fix build failling due to type difference
* Extend changeset description
* Run astro check on all examples in CI
* Output stderr
* Build Astro before running checks
* Making things faster + colors
* Fix errors inside examples
* Add congrats message
* Revert unentional change to tsconfigs
* Remove more unneeded changes
* adding an integration starter example
* chore: linter fixes
* removing components from the integration example
* removing the monorepo and demo project, adding links to docs and examples
* chore: update lock file
* typo fix
* Yield out potentional slot instructions when rendering dynamic tags
* Adding a changeset
* yield instead of return
* Handle the fact that renderComponent returns an iterable
* Only yield out html once
* fix(astro): tag jsx vnodes with renderer so errors are properly handled
* chore: fix missing package in test
Co-authored-by: Nate Moore <nate@astro.build>
* Fix CSS ordering between imported and Astro styles
* Fix linting errors
* Add changeset and upgrade compiler version
* Update test to reflect shared styles placed before page styles
* WIP: adding a service built on @squoosh/lib
* WIP: investigating memory leaks in Squoosh
* WIP: vendoring Squoosh to work with our build
* chore: a bit of cleanup and a small perf gain
* removing a few unused deps
* fix: removing temp .only() in sharp test
* hooking up the last build steps to copy over .wasm files
* removing the duplicated lib/*.wasm files
* defaulting to Sharp for the initial @next release
* make sure pnpm always runs the postbuild script
* removing a few node dependencies
* refactor: move the copy .wasm build step out of the SSR bundle
* linter fixes
* fixing lock file
* chore: add TEMP changeset
* fix built wasm location for SSG builds
* Revert "defaulting to Sharp for the initial @next release"
This reverts commit 1a8d4f7f60.
* removing sharp dependency
* Revert "fix built wasm location for SSG builds"
This reverts commit 446b80bb53.
* chore: update lockfile
* fixing up image tests for the wasm loader
* updating the README for squoosh
* parallel wasm builds
* refactor: a bit of house keeping
* perf: allow a thread for each output encoding format
* fix: dev broke with the shift to wasm workers
* adds a new `astro:build:generated` hook for SSG builds
* fix: typo + calling cleanup methods in wasm codecs
* adding @astrojs/webapi for the TransformStream polyfill
* Revert "adding @astrojs/webapi for the TransformStream polyfill"
This reverts commit 39e5b845a5.
* perf: using sharp for most of the CI tests
* chore: update lockfile
* removing hard-coded squoosh imports
* fix: adding sharp to rollup externals
* test: using dev for the squoosh tests
* fix: updating the build output dir for wasm filles in SSG builds
* updating the changeset with migration details
* Revert "adds a new `astro:build:generated` hook for SSG builds"
This reverts commit 59b5fec7be.
* nit: adding comments for the wasm file copy
* chore: fix eslint warning
* Add HTTP Proxy Support to `fetch` Polyfill
Use `global-agent` to support HTTP_PROXY, HTTPS_PROXY, and NO_PROXY
environment variables.
* Add Changeset For HTTP Proxy Support in `fetch`
* `create-astro`: always create `tsconfig.json`
Currently, we only make sure `tsconfig.json` exists when `strict` or `strictest` is selected. Both `default` & `optout` are intended to correspond to `base` -- and will do so for all [23 official templates](https://github.com/withastro/astro/tree/main/examples), but not necessarily for third-party templates.
The [example command for installing a third-party template](https://github.com/withastro/astro/blob/a800bf7/packages/create-astro/README.md?plain=1#L31-L35) is (rather conveniently for the sake of this PR!) an example of a template without a `tsconfig.json` file, and installing it with the `default` ("Relaxed") Typescript option results in no `tsconfig.json` file, rather than a `tsconfig.json` file containing `{ "extends": "astro/tsconfigs/base" }` as would be expected.
This PR addresses this scenario.
It also explicitly sets the `tsconfig.json` file to `{ "extends": "astro/tsconfigs/base" }` when `default` (which I renamed to `base`, still presented to the user as "Relaxed") or `optout` is selected (`optout` has always printed a warning about the importance of `tsconfig.json` & `src/env.d.ts` but otherwise behaved identically to `default`). This is necessary in two scenarios:
1. When the `tsconfig.json` file was created by this script.
2. When it either didn't already include `"extends"`, or it extended a different config by default. For example, some third-party templates might default to `strict`, in which case I'm guessing we'd want to respect the user's choice and change that to `base`.
* update `del` 6.1.1 --> 7.0.0
* test: prevent excess writes
(without this it triggers many times)
* test: create-astro typescript prompt
* changeset
* fix: recursive `mkdirSync`
* test: longer timeout for `windows-latest` OS
(see if this fixes failing tests)
* better glob path creation, don't hardcode `/`
* test: longer timeout for windows-latest OS
(since I'm about to trigger another CI run by pushing a commit, might as well try this too)
* create-astro test: show last CLI output on timeout
* drop variable timeout
Typescript tests are slower than directory tests, but they are all usually less than 5000 ms. Less complexity, easier to maintain.
* DRY new error output
* Update lockfile
* Sync lockfile with main
* Update lockfile
Co-authored-by: Princesseuh <princssdev@gmail.com>
* Revert "Update preact example to match @astrojs/preact ranges (#4840)"
This reverts commit d650a1161a.
* Revert "[ci] format"
This reverts commit e3c78c5b16.
* Revert "Support shared signals in Preact islands (#4763)"
This reverts commit 5e46be5468.
* Support signals in Preact islands
* Add a changeset
* Only add signals if we need them
* Refactor signal logic into its own module
* Keep track of the signals used
* Update peer dep
* Create leaders-of-the-free-world.md
Update: `@astrojs/tailwindcss` project with `tailwindcss` as a `peer-dependency`
* Removed tailwindcss as 'dependency'
* Update `pnpm-lock` with changes to deps
* Update .changeset/leaders-of-the-free-world.md
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
* Prevent locking up when encountering invalid CSS
* Add a changeset
* Move the unit test to the test folder
* ponyfill aggregateerror
* Use the exported type
* keep original errors
* fix
* Added `background` option and prop.
This optional color specifies which background to use when removing the
alpha channel if the output format doesn't support transparency.
* Modified existing tests
* Fixed wrong dimensions in tests
* Fixing a few instances of jpeg vs jpg
* Added color checking
* working on the tests
* tests are now passing
* Adding tests
* Added tests for background color
* no need to test with subpath
* Added fixture
* Renamed test fixture for background-color
* skipping test until fixed
* Typo
* Working on tests
* tests are passing
* Updated readme and added changeset
* Updated lockfile
* Updated lockfile
* Updated lockfile
Co-authored-by: Tony Sullivan <tony.f.sullivan@outlook.com>
* feat(image): throw if no `alt` is provided
* chore: add changeset
* docs(image): update README
* updated alt text stuff throughout
* fixing with-mdx test suite
* warn for missing alt text, will throw an error in a future release
* final README tweaks
Co-authored-by: Tony Sullivan <tony.f.sullivan@outlook.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* WIP: simplifying the use of `fs` vs. the vite plugin
* removing a few node deps (etag and node:path)
* adding ts defs for sharp
* using the same mime package as astro's core App
* fixing file URL support in windows
* using file URLs when loading local image metadata
* fixing a bug in the etag helper
* Windows compat
* splitting out dev & build tests
* why do these suites fail in parallel?
* one last windows compat case
* Adding tests for treating /public images the same as remote URLs
* a couple fixes for Astro's `base` config
* adding base path tests for SSR
* fixing a bad merge, lost the kleur dependency
* adding a test suite for images + MDX
* chore: add changeset
* simplifying the with-mdx tests
* bugfix: don't duplicate the period when using existing file extensions
* let Vite cache the image loader service
* adding some docs for using /public images
* fixing changeset
* Update packages/integrations/image/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/integrations/image/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* nit: minor README syntax tweaks
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* make remark-rehype config available in astro.config.mjs
* add test for remark-rehype config, checks that footnotes can be translated
* update lockfile to take the added test into account
* omit handlers and unkownHandler from the RemarkRehype type
* define RemarkRehype with proper references to the handler and handlers types
* formatting
* changeset
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
* Make Astro.url conform to build.format during the build
* Adding a changeset
* Better implementation
* fix some stuff that tests failed on
* Add docs
* Change to minor
* account for empty path
* 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>
* 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>
* First pass at supporting React 18 in @astrojs/react
* Try marking React 18’s `react-dom/client` as external
* Try a different approach to importing different React versions
* Allow resolving JSON modules
* Revert "Allow resolving JSON modules"
This reverts commit 5279b7249c.
* Try the separate client entrypoint approach from #2946
* Clean up diff
* Trying to see something
* Just keep swimming… 🐠
* update to support react 18
* update React to React 18 across the board
Co-authored-by: delucis <swithinbank@gmail.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
* First pass at supporting React 18 in @astrojs/react
* Try marking React 18’s `react-dom/client` as external
* Try a different approach to importing different React versions
* Allow resolving JSON modules
* Revert "Allow resolving JSON modules"
This reverts commit 5279b7249c.
* Try the separate client entrypoint approach from #2946
* Clean up diff
* Trying to see something
* Just keep swimming… 🐠
* update to support react 18
* add changeset
* add docs
Co-authored-by: delucis <swithinbank@gmail.com>
* Bundle everything, commit 1
* Get everything working
* Remove dependency on readable-stream
* Adds a changeset
* Fix ts errors
* Use the node logger in tests
* Callback the logger when done writing
* Fix test helper to await the callback
* Use serialize-javascript again
* Remove dead code
* Rename hook
* Oops
* Netlify adapter
* Remove package.json export that doesnt exist
* Fix out path
* Make netlifyFunctions the default
* Make the dist configurable
* Add an export for the functions
* Append of the file exists
* Adapter v0
* Finalizing adapters
* Update the lockfile
* Add the default adapter after config setup is called
* Create the default adapter in config:done
* Fix lint error
* Remove unused callConfigSetup
* remove unused export
* Use a test adapter to test SSR
* Adds a changeset
* Updated based on feedback
* Updated the lockfile
* Only throw if set to a different adapter
* Clean up outdated comments
* Move the adapter to an config option
* Make adapter optional
* Update the docs/changeset to reflect config API change
* Clarify regular Node usage