* wip: support true react vnodes in renderer
* Add new experimentalReactChildren option to React integration
* Update the test
* Add docs
* Update packages/integrations/react/server.js
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Update with a better test
* Update .changeset/yellow-snakes-jam.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/integrations/react/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/integrations/react/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Filter out Svelte's unexpected class prop console warnings
Astro's hydration code passes a `class` prop to Svelte components, inducing Svelte to log a warning about an unknown prop. Preempting this by exporting a `class` prop from the Svelte component isn't a viable workaround since `class` is a reserved identifier in JS.
This PR implements the console-filtering workaround suggested by @HiDeoo in #5665, borrowing the `useConsoleFilter` approach from the [preact integration](a1c0cbe604/packages/integrations/preact/src/server.ts (L72-L94)).
It would probably be better to generalize console filtering so it could be shared across multiple integrations.
Ideally there would be a way to handle this in Svelte, but as was pointed out in the issue thread even they resort to [similar cringe-inducing hackery](https://github.com/sveltejs/kit/blob/master/packages/kit/src/runtime/client/client.js#L1974-L1996) in sveltekit.
* Only filter Svelte console warnings in dev builds
* Add changeset
* Fix lint error.
---------
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
This was causing React components rendered with client:only
to be prefixed with null. While not technically causing any
issues, it is unintended and could be considered a bug.
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* docs(netlify): remove comma
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* them -> these functions
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* JSX refactor
* Get preact/compat test to pass
* Use include config
* Remove old astro flavored markdown test
* Move babel dep to preact
* Remove errant debugger
* Update lockfile
* Update the multi-framework example
* Update e2e tests
* Fix nested-in-vue tests
* Add back in astro check
* Update packages/astro/src/core/create-vite.ts
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Update packages/astro/src/core/create-vite.ts
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Update packages/integrations/solid/src/index.ts
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Update packages/integrations/solid/src/index.ts
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Update .changeset/perfect-horses-tell.md
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Move the comment about the include config
* Remove redundant alias config
* Use react's own preamble code
* Use the base for the preamble
* Remove solid redundancy
* Update .changeset/perfect-horses-tell.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update based on review comments
* Oops
---------
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* supporting a network address access a website when an user set host = true in Node environment
* fix bug
* sumbit test code
* optimism
* delect white space
* test
* fix test
* fix test error
* test
* test
* test
* fix test error
* Optimizing code based on the comments
* optimize test
* fix: rebase issues
* chore: format
* chore: add changeset
* chore: format
* chore: format
* chore: lint
---------
Co-authored-by: wuls <linsheng.wu@beantechs.com>
Co-authored-by: Nate Moore <nate@astro.build>
* add support for advanced mode
* add support for directory mode
* use asset fallback as in cloudflare's docs
* update locals
* come up with new runtime in `Astro.locals`
* add overwrite protection
* minor cleanup
* changeset
* address review comments
* move overwrite protection to adapter
* fix types
* fix comment
* resolve review comments
* update changeset
* add test
* redo ts
* fix integration test port
* updated tests, add new port
* add TODO comment
* update changeset
* add JSDoc
* Update packages/integrations/cloudflare/src/runtime.ts
---------
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* more efficient _routes.json for cloudflare integration
* added tests
* updated pnpm-lock.yaml
* added changeset
* cleaned up test
* fix: convert window path separators
* updated docs
* handle more cases
* Apply suggestions from code review
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* incorporate feedback from code review
* used other pnpm version
* better fallback for empty include array
* adjust test case to changed fallback for empty include array
* updated docs
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
I trend to implement the sitemap and I found out that filter option works only when the URL has slashes at the end. I changed the examples.
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* fix: res.writeHead is not a function
* fix: handler params type added
* fix: handler function params error
* Update packages/integrations/node/src/nodeMiddleware.ts
---------
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* 7576 - initial support for HTML inside Markdoc.
This uses htmlparser2 to perform a pure token transform/mutation
on the markdown-it tokens, replacing the original raw HTML string
tokens with a richer set of tokens per HTML node, and in the process
Markdoc tags are interleaved in the resulting token graph at the
appropriate locations
This removes the legacy config of the @astrojs/markdoc integration
entirely (suggested by @bholmesdev) and introduces a new type for
options to be specified in the astro config, initially, with just the new
"enableHTML" option
When "enableHTML" is *not* enabled (the default), the behavior
of the entire @astrojs/markdoc integration should remain functionally
equivalent to before this change
* 7576 - fixed issues with whitespace preservation
also:
* cleaned up " to ' for astro project preferred linting
* made the html rendering test fixture use a dynamic path
* 7576 - detailed nested HTML test coverage
* 7576 - component + HTML interleaved tests
* 7576 - fix lint problems from previous changes
* 7576 - some commentary
* 7576 - file naming, refactor html under imports, package.json exports definition for html
* 7576
* move out of extensions dir, remove export
* cdata handling changes
* 7576
* inline license from third party code
* cleanup test class copy of HTML output
* remove // third party indicators for imports (clarification: not third party code, just a indicator this group of imports is third party)
* 7576 - fixed test before/after for DRY'ness
* 7576 - no need to React-ify HTML attribute case
* 7576 - rename "enableHTML" option to "allowHTML"
* Added Markdoc allowHTML feature changeset
* 7576 - updated README with allowHTML info
* 7576 - fixed changeset typo
* 7576 - minor edits based on PR feedback for docs
* 7576 - minor edits based on PR feedback for docs