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

@nozbe/zacs

Package Overview
Dependencies
Maintainers
8
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nozbe/zacs - npm Package Compare versions

Comparing version 1.1.0-0 to 1.1.0-1

2

package.json
{
"name": "@nozbe/zacs",
"version": "1.1.0-0",
"version": "1.1.0-1",
"description": "Zero Abstraction Cost Styling (for React DOM and React Native)",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -41,7 +41,22 @@ /* eslint-disable no-use-before-define */

function renameJSX(node, name) {
function jsxName(t, name) {
if (name.includes('.')) {
const segments = name.split('.')
if (segments.length !== 2) {
throw new Error(`Invalid JSX name ${name}`)
}
const [obj, prop] = segments
return t.jSXMemberExpression(t.jSXIdentifier(obj), t.jSXIdentifier(prop))
}
return t.jSXIdentifier(name)
}
function renameJSX(t, node, name) {
const { openingElement, closingElement } = node
openingElement.name.name = name
const jsxId = jsxName(t, name)
openingElement.name = jsxId
if (closingElement) {
closingElement.name.name = name
closingElement.name = jsxId
}

@@ -772,3 +787,3 @@ }

if (platform === 'web') {
renameJSX(node, elementName)
renameJSX(t, node, elementName)

@@ -785,3 +800,3 @@ // filter out non-DOM attributes (React will throw errors at us for this)

state.set(`uses_rn_${zacsMethod}`, true)
renameJSX(node, elementName)
renameJSX(t, node, elementName)
} else {

@@ -788,0 +803,0 @@ throw new Error('Unknown platform')

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