Socket
Socket
Sign inDemoInstall

espower

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

espower - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

8

CHANGELOG.md

@@ -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 @@

12

lib/instrumentor.js

@@ -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",

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