Comparing version 1.1.2 to 1.1.3
{ | ||
"name": "hrt", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "HTTP Rewrite Tool", | ||
@@ -5,0 +5,0 @@ "author": "Longhao Luo <lhluo@tudou.com>", |
@@ -150,3 +150,3 @@ var Fs = require('fs'); | ||
if (!/src(\/[^\/]+)+\/(lib|lite|loader)\.js$/.test(newPath) && /src(\/[^\/]+)+\/.+\.js$/.test(newPath)) { | ||
if (!/src(\/[^\/]+)+\/(lib|lite|loader|react)\.js$/.test(newPath) && /src(\/[^\/]+)+\/.+\.js$/.test(newPath)) { | ||
if(Fs.existsSync(path)){ | ||
@@ -153,0 +153,0 @@ var str = Util.readFileSync(path, 'utf-8'); |
@@ -7,2 +7,3 @@ var Fs = require('fs'); | ||
var Iconv = require('iconv-lite'); | ||
var ReactTools = require('react-tools'); | ||
@@ -151,3 +152,3 @@ var RE_AUTOFIXNAME = /define\((?=[^'"])/; | ||
if (!/src\/js\/(lib|lite|loader)\.js$/.test(newPath) && /src\/js\/.+\.js$/.test(newPath)) { | ||
if (!/src\/js\/(lib|lite|loader|react)\.js$/.test(newPath) && /src\/js\/.+\.js$/.test(newPath)) { | ||
if(Fs.existsSync(path)){ | ||
@@ -157,2 +158,6 @@ var str = Util.readFileSync(path, 'utf-8'); | ||
str = replaceTemplate(path, str); | ||
if (str.indexOf('use strict') > 0) { | ||
str = ReactTools.transform(str, { harmony: true }); | ||
// console.log(ReactTools.transform(str)); | ||
} | ||
return callback('application/javascript', str); | ||
@@ -159,0 +164,0 @@ }else{ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
28360
714
4