Socket
Socket
Sign inDemoInstall

buble

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buble - npm Package Compare versions

Comparing version 0.9.3 to 0.10.0

src/program/types/JSXAttribute.js

4

CHANGELOG.md
# buble changelog
## 0.10.0
* Basic JSX support
## 0.9.3

@@ -4,0 +8,0 @@

4

package.json
{
"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

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