Comparing version 0.9.3 to 0.10.0
# buble changelog | ||
## 0.10.0 | ||
* Basic JSX support | ||
## 0.9.3 | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "buble", | ||
"version": "0.9.3", | ||
"version": "0.10.0", | ||
"description": "The blazing fast, batteries-included ES2015 compiler", | ||
@@ -54,2 +54,3 @@ "main": "dist/buble.umd.js", | ||
"rollup-plugin-buble": "^0.8.0", | ||
"rollup-plugin-commonjs": "^2.2.1", | ||
"rollup-plugin-json": "^2.0.0", | ||
@@ -62,2 +63,3 @@ "rollup-plugin-node-resolve": "^1.5.0", | ||
"acorn": "^3.1.0", | ||
"acorn-jsx": "^3.0.1", | ||
"chalk": "^1.1.3", | ||
@@ -64,0 +66,0 @@ "magic-string": "^0.14.0", |
@@ -1,2 +0,2 @@ | ||
import { parse } from 'acorn'; | ||
import acorn from 'acorn-jsx'; | ||
import Program from './program/Program.js'; | ||
@@ -44,6 +44,7 @@ import { features, matrix } from './support.js'; | ||
try { | ||
ast = parse( source, { | ||
ast = acorn.parse( source, { | ||
ecmaVersion: 7, | ||
preserveParens: true, | ||
sourceType: 'module' | ||
sourceType: 'module', | ||
plugins: { jsx: true } | ||
}); | ||
@@ -67,5 +68,5 @@ } catch ( err ) { | ||
return new Program( source, ast, transforms ).export( options ); | ||
return new Program( source, ast, transforms, options ).export( options ); | ||
} | ||
export { version as VERSION } from '../package.json'; |
@@ -5,5 +5,8 @@ import MagicString from 'magic-string'; | ||
export default function Program ( source, ast, transforms ) { | ||
export default function Program ( source, ast, transforms, options ) { | ||
this.type = 'Root'; | ||
// options | ||
this.jsx = options.jsx || 'React.createElement'; | ||
this.source = source; | ||
@@ -10,0 +13,0 @@ this.magicString = new MagicString( source ); |
@@ -22,2 +22,7 @@ import ArrayExpression from './ArrayExpression.js'; | ||
import ImportSpecifier from './ImportSpecifier.js'; | ||
import JSXAttribute from './JSXAttribute.js'; | ||
import JSXClosingElement from './JSXClosingElement.js'; | ||
import JSXElement from './JSXElement.js'; | ||
import JSXExpressionContainer from './JSXExpressionContainer.js'; | ||
import JSXOpeningElement from './JSXOpeningElement.js'; | ||
import Literal from './Literal.js'; | ||
@@ -60,2 +65,7 @@ import LoopStatement from './shared/LoopStatement.js'; | ||
ImportSpecifier, | ||
JSXAttribute, | ||
JSXClosingElement, | ||
JSXElement, | ||
JSXExpressionContainer, | ||
JSXOpeningElement, | ||
Literal, | ||
@@ -62,0 +72,0 @@ MemberExpression, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
High entropy strings
Supply chain riskContains high entropy strings. This could be a sign of encrypted data, leaked secrets or obfuscated code.
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
1424244
73
13103
5
12
6
+ Addedacorn-jsx@^3.0.1
+ Addedacorn-jsx@3.0.1(transitive)