@mapbox/flow-remove-types
Advanced tools
Comparing version 1.3.0-await.upstream.1 to 1.3.0-await.upstream.2
{ | ||
"name": "@mapbox/flow-remove-types", | ||
"version": "1.3.0-await.upstream.1", | ||
"version": "1.3.0-await.upstream.2", | ||
"description": "Removes Flow type annotations from JavaScript files with speed and simplicity.", | ||
@@ -42,2 +42,3 @@ "author": "Lee Byron <lee@leebyron.com> (http://leebyron.com/)", | ||
"babylon": "^7.0.0-beta.41", | ||
"node-modules-regexp": "^1.0.0", | ||
"pirates": "^3.0.2", | ||
@@ -44,0 +45,0 @@ "vlq": "^0.2.1" |
@@ -19,2 +19,3 @@ var flowRemoveTypes = require('./index'); | ||
var exts = [ '.js', '.mjs', '.jsx', '.flow', '.es6' ]; | ||
var nodeModulesRegexp = require('node-modules-regexp'); | ||
@@ -29,3 +30,3 @@ var revert = pirates.addHook(function hook(code, filename) { | ||
} | ||
}, { exts: exts, matcher: shouldTransform }); | ||
}, { exts: exts, matcher: shouldTransform, ignoreNodeModules: false }); | ||
@@ -37,4 +38,10 @@ function shouldTransform(filename) { | ||
options && 'exclude' in options ? regexpPattern(options.exclude) : | ||
/\/node_modules\//; | ||
return (!includes || includes.test(filename)) && !(excludes && excludes.test(filename)); | ||
nodeModulesRegexp; | ||
if (includes && includes.test(filename)) { | ||
return true; | ||
} | ||
if (excludes && excludes.test(filename)) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
@@ -41,0 +48,0 @@ |
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
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
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
32273
486
4
1
+ Addednode-modules-regexp@^1.0.0