{"id":31037664,"url":"https://github.com/igorskyflyer/npm-astro-render-component","last_synced_at":"2025-09-14T05:59:11.082Z","repository":{"id":309050222,"uuid":"1034682065","full_name":"igorskyflyer/npm-astro-render-component","owner":"igorskyflyer","description":"🤖 Plug-and-play Astro component renderer for fast, zero-config testing in any DOM-like JS/TS environment. 🐬","archived":false,"fork":false,"pushed_at":"2025-08-14T13:06:09.000Z","size":137,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-12T13:27:00.907Z","etag":null,"topics":["astro","back-end","component","dom","framework","front-end","happy-dom","happydom","igorskyflyer","jsdom","render","test","ui","vdom"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@igor.dvlpr/astro-render-component","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/igorskyflyer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"ko_fi":"igorskyflyer"}},"created_at":"2025-08-08T19:53:01.000Z","updated_at":"2025-08-17T20:42:44.000Z","dependencies_parsed_at":"2025-08-09T15:12:53.780Z","dependency_job_id":"b14b2c0a-129f-4cc4-b6d4-40195d79c79d","html_url":"https://github.com/igorskyflyer/npm-astro-render-component","commit_stats":null,"previous_names":["igorskyflyer/npm-astro-render-component"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/igorskyflyer/npm-astro-render-component","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-astro-render-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-astro-render-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-astro-render-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-astro-render-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igorskyflyer","download_url":"https://codeload.github.com/igorskyflyer/npm-astro-render-component/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorskyflyer%2Fnpm-astro-render-component/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275067164,"owners_count":25399641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["astro","back-end","component","dom","framework","front-end","happy-dom","happydom","igorskyflyer","jsdom","render","test","ui","vdom"],"created_at":"2025-09-14T05:59:06.787Z","updated_at":"2025-09-14T05:59:11.064Z","avatar_url":"https://github.com/igorskyflyer.png","language":"TypeScript","funding_links":["https://ko-fi.com/igorskyflyer"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/igorskyflyer/npm-astro-render-component/main/assets/astro-render-component.png\" alt=\"Icon of Astro Render Component\" width=\"256\" height=\"256\"\u003e\n\u003ch1 align=\"center\"\u003eAstro Render Component\u003c/h1\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n  🤖 Plug-and-play Astro component renderer for fast, zero-config testing in any DOM-like JS/TS environment. 🐬\n\u003c/div\u003e\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## 📃 Table of Contents\n\n- [Features](#-features)\n- [Usage](#-usage)\n- [Example](#️-example)\n- [Changelog](#-changelog)\n- [Support](#-support)\n- [License](#-license)\n- [Related](#-related)\n- [Author](#-author)\n\n---\n\n## 🤖 Features\n\n- 🔧 Server-side rendering of Astro components in non-Astro environments like Vitest or Node.js\n- 🧪 Test-friendly API for rendering `.astro` components with props, slots, and hydration strategies\n- 🪄 Zero-config usage—just import and render, no need for full Astro setup\n- 🧩 Supports static, lazy, and client-only hydration modes\n- 🧠 Typed API with JSDoc annotations for IntelliSense and DX-first workflows\n- 🕸️ Compatible with Astro v5+, leveraging the experimental [AstroContainer API](https://docs.astro.build/en/reference/container-reference/)\n- 🚀 Ideal for unit and integration testing of UI components\n\n---\n\n## 🕵🏼 Usage\n\nInstall the package using your favorite package manager:\n\n```bash\nnpm install \"@igor.dvlpr/astro-render-component\"\n# or\npnpm add \"@igor.dvlpr/astro-render-component\"\n# or\nyarn add \"@igor.dvlpr/astro-render-component\"\n```  \n\nBring your own testing framework, e.g. [Vitest](https://vitest.dev/) and your own DOM-like environment, e.g. [Happy-Dom](https://www.npmjs.com/package/happy-dom) and start rendering your Astro components in order to test them.\n\n---\n\n## 🗒️ Example\n\n```ts\n// @​vitest-environment happy-dom\nimport { renderAstroComponent } from '@igor.dvlpr/astro-render-component'\nimport MyComponent from '../components/MyComponent.astro'\nimport { expect } from 'vitest'\n\nconst fragment = await renderAstroComponent(MyComponent, { props: { title: 'Hello' } })\nexpect(fragment.querySelector('h1')?.textContent).toBe('Hello')\n```\n\n---\n\n## 📝 Changelog\n\n📑 The changelog is available here: [CHANGELOG.md](https://github.com/igorskyflyer/npm-astro-render-component/blob/main/CHANGELOG.md).\n\n---\n\n## 🪪 License\n\nLicensed under the MIT license which is available here, [MIT license](https://github.com/igorskyflyer/npm-astro-render-component/blob/main/LICENSE.txt).\n\n---\n\n## 💖 Support\n\n\u003cdiv align=\"center\"\u003e\n  I work hard for every project, including this one and your support means a lot to me!\n  \u003cbr\u003e\n  Consider buying me a coffee. ☕\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://ko-fi.com/igorskyflyer\" target=\"_blank\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/igorskyflyer/igorskyflyer/main/assets/ko-fi.png\" alt=\"Donate to igorskyflyer\" width=\"180\" height=\"46\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003cem\u003eThank you for supporting my efforts!\u003c/em\u003e 🙏😊\n\u003c/div\u003e\n\n---\n\n## 🧬 Related\n\n[@igor.dvlpr/astro-easynav-button](https://www.npmjs.com/package/@igor.dvlpr/astro-easynav-button)\n\n\u003e _🧭 Add an easy-to-use navigational button (jump to top/bottom) to your Astro site. 🔼_\n\n\u003cbr\u003e\n\n[@igor.dvlpr/astro-post-excerpt](https://www.npmjs.com/package/@igor.dvlpr/astro-post-excerpt)\n\n\u003e _⭐ An Astro component that renders post excerpts for your Astro blog - directly from your Markdown and MDX files. Astro v2+ collections are supported as well! 💎_\n\n\u003cbr\u003e\n\n[@igor.dvlpr/chars-in-string](https://www.npmjs.com/package/@igor.dvlpr/chars-in-string)\n\n\u003e _🪐 Provides ways of testing whether an array of chars is present inside a given String. ☄_\n\n\u003cbr\u003e\n\n[@igor.dvlpr/magic-queryselector](https://www.npmjs.com/package/@igor.dvlpr/magic-queryselector)\n\n\u003e _🪄 A TypeScript-types patch for querySelector/querySelectorAll, make them return types you expect them to! 🔮_\n\n\u003cbr\u003e\n\n[@igor.dvlpr/vscode-folderpicker](https://www.npmjs.com/package/@igor.dvlpr/vscode-folderpicker)\n\n\u003e _✨ Provides a custom Folder Picker API + UI for Visual Studio Code. 🎨_\n\n---\n\n## 👨🏻‍💻 Author\nCreated by **Igor Dimitrijević** ([*@igorskyflyer*](https://github.com/igorskyflyer/)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorskyflyer%2Fnpm-astro-render-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorskyflyer%2Fnpm-astro-render-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorskyflyer%2Fnpm-astro-render-component/lists"}