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

weex-vue-precompiler

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weex-vue-precompiler - npm Package Compare versions

Comparing version 0.1.20 to 0.1.21

2

package.json
{
"name": "weex-vue-precompiler",
"version": "0.1.20",
"version": "0.1.21",
"description": "a precompiler for weex-vue-render.",

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

@@ -5,3 +5,4 @@ const util = require('../util')

extend,
getStaticStyleObject
getStaticStyleObject,
fixStyleUnit
} = util

@@ -65,3 +66,4 @@

else if (px2remTags.indexOf(keyName) > -1) {
propNode.value = transformNode(propNode.value, 'text', rootValue, true/*asPropValue*/)
propNode.value = transformNode(fixStyleUnit(keyName, propNode.value), 'text',
rootValue, true/*asPropValue*/)
}

@@ -68,0 +70,0 @@ }

@@ -10,3 +10,3 @@ /**

const { ast } = require('../util')
const { ast, fixStyleUnit } = require('../util')
const { getCompiler } = require('../components')

@@ -55,3 +55,4 @@ const { getTransformer } = require('wxv-transformer')

if (bindingStyleNamesForPx2Rem.indexOf(key) > -1) {
prop.value = transformNode(prop.value, tagName, rootValue, true/*asPropValue*/)
prop.value = transformNode(fixStyleUnit(key, prop.value), tagName,
rootValue, true/*asPropValue*/)
}

@@ -58,0 +59,0 @@ }

@@ -45,2 +45,13 @@ const ast = require('./ast')

exports.fixStyleUnit = function (styleName, literal) {
const unitless = ['lineHeight']
let value = literal.value
if (unitless.indexOf(styleName) < 0 && typeof value === 'number') {
console.warn(`[weex-vue-precompiler] style '${styleName}: ${value}' should end with 'px'.`)
value += 'px'
literal.value = value
}
return literal
}
exports.mergeStringArray = function () {

@@ -47,0 +58,0 @@ const arrs = Array.prototype.slice.call(arguments)

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