Comparing version 2.0.2 to 2.0.3
@@ -0,1 +1,9 @@ | ||
### [2.0.3](https://github.com/power-assert-js/espower/releases/tag/v2.0.3) (2017-02-19) | ||
#### Bug Fixes | ||
* [Store scopes in a stack to push/pop them in a consistent way](https://github.com/power-assert-js/espower/pull/36) | ||
### [2.0.2](https://github.com/power-assert-js/espower/releases/tag/v2.0.2) (2017-01-12) | ||
@@ -2,0 +10,0 @@ |
@@ -32,4 +32,5 @@ 'use strict'; | ||
var scopeManager = escope.analyze(ast); | ||
var currentScope = scopeManager.acquire(ast); | ||
var globalScope = currentScope; | ||
var globalScope = scopeManager.acquire(ast); | ||
var scopeStack = []; | ||
scopeStack.push(globalScope); | ||
var transformation = new Transformation(); | ||
@@ -39,3 +40,3 @@ var visitor = { | ||
if (/Function/.test(currentNode.type)) { | ||
currentScope = scopeManager.acquire(currentNode); | ||
scopeStack.push(scopeManager.acquire(currentNode)); | ||
} | ||
@@ -61,3 +62,4 @@ var controller = this; | ||
globalScope: globalScope, | ||
currentScope: currentScope | ||
scopeManager: scopeManager, | ||
currentScope: scopeStack[scopeStack.length - 1] | ||
}, that.options)); | ||
@@ -104,3 +106,3 @@ assertionVisitor.enter(controller); | ||
if (/Function/.test(currentNode.type)) { | ||
currentScope = currentScope.upper; | ||
scopeStack.pop(); | ||
} | ||
@@ -107,0 +109,0 @@ } |
{ | ||
"name": "espower", | ||
"description": "Power Assert feature instrumentor based on the ECMAScript AST", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Takuto Wada", |
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
62291
1082