babel-plugin-functional-composition
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -0,1 +1,10 @@ | ||
# v1.0.3 (2016-09-13) | ||
--- | ||
## Bug Fixes | ||
- fix(babel-plugin-functional-composition): recursively check up if the directive is present [8dfa22f1](https://github.com/TylorS/babel-plugin-functional-composition/commits/8dfa22f1048a56122ccfa85c67bcd2435ce98d03) | ||
# v1.0.2 (2016-09-09) | ||
@@ -2,0 +11,0 @@ --- |
12
index.js
@@ -22,3 +22,3 @@ const DIRECTIVE = 'use fc' | ||
const visitor = { | ||
File: { | ||
Program: { | ||
enter (path, { opts }) { | ||
@@ -104,5 +104,11 @@ fileHasDirective = false | ||
path.findParent(({ node }) => { | ||
node.directives && node.directives.some(({ value }) => { | ||
if (!path || typeof path.findParent !== 'function') return matched | ||
path.findParent((parent) => { | ||
parent.node.directives && parent.node.directives.some(({ value }) => { | ||
matched = value.value === DIRECTIVE | ||
if (!matched) { | ||
return hasDirective(parent) | ||
} | ||
}) | ||
@@ -109,0 +115,0 @@ }) |
{ | ||
"name": "babel-plugin-functional-composition", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Functional Composition for JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
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
16025
311