Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-helper-mark-eval-scopes

Package Overview
Dependencies
Maintainers
12
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-helper-mark-eval-scopes - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

2

__tests__/helper-mark-eval-scopes-test.js

@@ -12,3 +12,3 @@ jest.autoMockOff();

plugins: [
function ({ traverse }) {
function({ traverse }) {
traverse.clearCache();

@@ -15,0 +15,0 @@ return {

{
"name": "babel-helper-mark-eval-scopes",
"version": "0.0.3",
"version": "0.1.0",
"description": "Mark scopes for deopt which contain a direct eval call",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/babel/babili#readme",

@@ -10,7 +10,7 @@ "use strict";

isMarked,
hasEval,
hasEval
};
function getEvalScopes(path) {
const evalScopes = new Set;
const evalScopes = new Set();

@@ -21,3 +21,3 @@ function add(scope) {

evalScopes.add(evalScope);
} while (evalScope = evalScope.parent);
} while ((evalScope = evalScope.parent));
}

@@ -29,3 +29,7 @@

if (callee.isIdentifier() && callee.node.name === "eval" && !callee.scope.getBinding("eval")) {
if (
callee.isIdentifier() &&
callee.node.name === "eval" &&
!callee.scope.getBinding("eval")
) {
add(callee.scope);

@@ -41,3 +45,3 @@ }

const evalScopes = getEvalScopes(path);
[...evalScopes].forEach((scope) => {
[...evalScopes].forEach(scope => {
scope[key] = true;

@@ -44,0 +48,0 @@ });

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