Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

acorn-jsx

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acorn-jsx - npm Package Compare versions

Comparing version 0.6.1-1 to 0.6.1-2

2

package.json

@@ -5,3 +5,3 @@ {

"main": "acorn.js",
"version": "0.6.1-1",
"version": "0.6.1-2",
"maintainers": [

@@ -8,0 +8,0 @@ {

@@ -1,2 +0,2 @@

# Acorn (JSX edition)
# Acorn-JSX

@@ -7,14 +7,8 @@ [![Build Status](https://travis-ci.org/RReverser/acorn.svg?branch=master)](https://travis-ci.org/RReverser/acorn)

It was forked to create experimental, alternative, faster [React.js JSX][jsx] parser by integrating pieces
It was forked to create experimental alternative, faster [React.js JSX][jsx] parser by integrating pieces
of code from official parser, modified to match Acorn's parsing logic.
According to [benchmarks](http://marijnhaverbeke.nl/acorn/test/bench.html), Acorn is 5x faster than Esprima
when parsing code with location tracking (call it "source maps enabled mode"), and JSX extensions almost don't
affect those numbers. However, [esprima-fb](https://github.com/facebook/esprima) is forked&maintained from
harmony branch of esprima which is being heavily optimized and currently `acorn-jsx` is only 1.5-2x faster than
`esprima-fb`.
According to [benchmarks](test/bench.html), Acorn-JSX is 2x faster than official [Esprima-based parser][esprima-fb] when location tracking is turned on in both (call it "source maps enabled mode"). At the same time, it consumes all the ES6+JSX syntax that can be consumed by Esprima-FB (this is proved by [official tests](test/tests-jsx.js)).
Currently, it consumes all the ES5+JSX syntax that can be consumed by official [Esprima-based parser][esprima-fb].
However, official parser can consume ES6 syntax as well, and is maintained by authors of React.js itself, so it's
preferred to be used in real projects.
However, Esprima-FB is maintained by authors of React.js itself, so it's recommended to be used in production code.

@@ -222,3 +216,3 @@ [acorn]: http://marijnhaverbeke.nl/acorn/

- `--ecma3|--ecma5`: Sets the ECMAScript version to parse. Default is
- `--ecma3|--ecma5|--ecma6`: Sets the ECMAScript version to parse. Default is
version 5.

@@ -225,0 +219,0 @@

@@ -1,2 +0,2 @@

// JSX syntax tests.
// React JSX tests

@@ -3,0 +3,0 @@ var fbTestFixture = {

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

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