babel-plugin-transform-vue-jsx
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -11,3 +11,6 @@ var esutils = require('esutils') | ||
JSXNamespacedName (path) { | ||
throw path.buildCodeFrameError('Namespace tags are not supported. JSX is not XML.') | ||
throw path.buildCodeFrameError( | ||
'Namespaced tags/attributes are not supported. JSX is not XML.\n' + | ||
'For attributes like xlink:href, use xlinkHref instead.' | ||
) | ||
}, | ||
@@ -14,0 +17,0 @@ JSXElement: { |
var makeMap = require('./make-map') | ||
var isTopLevel = makeMap('class,staticClass,style,key,ref,slot') | ||
var isNestable = makeMap('domProps,on,nativeOn,hook') | ||
var xlinkRE = /^xlink([A-Z])/ | ||
@@ -54,2 +55,8 @@ module.exports = function groupProps (props, t) { | ||
var attrs = currentNestedObjects.attrs | ||
// guard xlink attributes | ||
if (xlinkRE.test(prop.key.name)) { | ||
prop.key.name = JSON.stringify(prop.key.name.replace(xlinkRE, function (m, p1) { | ||
return 'xlink:' + p1.toLowerCase() | ||
})) | ||
} | ||
if (!attrs) { | ||
@@ -56,0 +63,0 @@ attrs = currentNestedObjects.attrs = t.objectProperty( |
{ | ||
"name": "babel-plugin-transform-vue-jsx", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "Babel plugin for Vue 2.0 JSX", | ||
@@ -39,3 +39,3 @@ "main": "index.js", | ||
"babel-cli": "^6.10.1", | ||
"babel-helper-vue-jsx-merge-props": "^2.0.0", | ||
"babel-helper-vue-jsx-merge-props": "^2.0.2", | ||
"babel-loader": "^6.2.4", | ||
@@ -47,4 +47,4 @@ "babel-plugin-syntax-jsx": "^6.8.0", | ||
"eslint": "^2.12.0", | ||
"eslint-config-vue": "^1.0.3", | ||
"eslint-plugin-html": "^1.5.2", | ||
"eslint-config-vue": "^2.0.0", | ||
"eslint-plugin-vue": "^1.0.0", | ||
"mocha": "^2.5.3", | ||
@@ -51,0 +51,0 @@ "vue": "^2.0.0-alpha.5", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12214
211