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

jsx-transform

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsx-transform - npm Package Compare versions

Comparing version 2.4.0 to 2.4.1

20

lib/jsx.js

@@ -167,9 +167,17 @@ /*!

return function (filename) {
return through(function (buf, enc, next) {
if (!~options.extensions.indexOf(getExtension(filename))) {
// We don't need to apply any transforms, just provide a simple pass-through stream
return through();
}
var data = "";
return through(function (chunk, enc, next) {
// This function receives chunks of data and we don't want to perform any transforms on an incomplete file.
// We buffer the data until the flush function is called. We can then safely perform the transforms on the full file.
data += chunk.toString('utf8');
next();
}, function (next) {
try {
if (~options.extensions.indexOf(getExtension(filename))) {
this.push(fromString(buf.toString('utf8'), options));
} else {
this.push(buf.toString());
}
this.push(fromString(data, options));
next();

@@ -176,0 +184,0 @@ } catch (err) {

@@ -1,3 +0,3 @@

var Syntax = require('esprima-fb').Syntax;
var utils = require('jstransform/src/utils');
var Syntax = require('jstransform').Syntax;

@@ -4,0 +4,0 @@ module.exports = visitNode;

{
"name": "jsx-transform",
"version": "2.4.0",
"version": "2.4.1",
"description": "JSX transpiler. Desugar JSX into JavaScript. A standard and configurable implementation of JSX decoupled from React.",

@@ -11,3 +11,3 @@ "files": [

"scripts": {
"test": "mocha test"
"test": "gulp test"
},

@@ -35,3 +35,3 @@ "repository": {

"esprima-fb": "^15001.1001.0-dev-harmony-fb",
"jstransform": "^11.0.0",
"jstransform": "^11.0.3",
"through2": "^2.0.0"

@@ -38,0 +38,0 @@ },

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