New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@qwikdev/astro

Package Overview
Dependencies
Maintainers
7
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qwikdev/astro - npm Package Compare versions

Comparing version 0.7.8 to 0.7.9

2

package.json
{
"name": "@qwikdev/astro",
"description": "Use Qwik components and Resumability within Astro",
"version": "0.7.8",
"version": "0.7.9",
"contributors": [

@@ -6,0 +6,0 @@ {

@@ -18,2 +18,12 @@ import { type JSXNode, jsx } from "@builder.io/qwik";

/**
* Because inline components are very much like normal functions, it's hard to distinguish them from normal functions.
*
* We currently identify them through the jsx transform function call.
*
* In Qwik v1, the identifiers are _jsxQ - _jsxC - _jsxS
*
* In Qwik v2, it is jsxsplit and I believe jsxSorted
*
*/
function isInlineComponent(component: unknown): boolean {

@@ -24,4 +34,5 @@ if (typeof component !== "function") {

const codeStr = component?.toString().toLowerCase();
const qwikJsxIdentifiers = ["_jsxq", "_jsxc", "_jsxs", "jsxsplit"];
return (
(codeStr.includes("_jsxq") || codeStr.includes("jsxsplit")) &&
qwikJsxIdentifiers.some((id) => codeStr.includes(id)) &&
component.name !== "QwikComponent"

@@ -176,6 +187,5 @@ );

isClientRouter &&
isQwikLoaderNeeded &&
htmlWithRerun +
`
<script data-qwik-astro-client-router>document.addEventListener('astro:after-swap',()=>{const e=document.querySelectorAll('[on\\\\:qvisible]');if(e.length){const o=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(e.target.dispatchEvent(new CustomEvent('qvisible')),o.unobserve(e.target))})});e.forEach(e=>o.observe(e))}});</script>
${isQwikLoaderNeeded ? `<script data-qwik-astro-client-router>document.addEventListener('astro:after-swap',()=>{const e=document.querySelectorAll('[on\\\\:qvisible]');if(e.length){const o=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(e.target.dispatchEvent(new CustomEvent('qvisible')),o.unobserve(e.target))})});e.forEach(e=>o.observe(e))}});</script>` : ""}
`;

@@ -182,0 +192,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc