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

babel-plugin-aexpr-source-transformation

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-aexpr-source-transformation - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

test/expected/all-accesses.js

4

dist/index.js
"use strict";
/**
* see http://astexplorer.net/#/h1zFzvogmm/13 for interactive development
*/
Object.defineProperty(exports, "__esModule", {

@@ -4,0 +8,0 @@ value: true

2

package.json
{
"name": "babel-plugin-aexpr-source-transformation",
"version": "2.1.1",
"version": "2.1.2",
"description": "3rd implementation strategy of active expressions, via a babel transformation",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -1,10 +0,2 @@

var x;
let y = 42;
function z() {}
({
x,
y,
z
});
import { getMember as _getMember } from "aexpr-source-transformation-propagation";
let r = _getMember(Number, "POSITIVE_INFINITY");

@@ -12,5 +12,8 @@ "use strict";

{file: 'base'},
{file: 'none'},
{file: 'locals-declared'},
{file: 'nested'}
{file: 'ignore'},
{file: 'nested_left_assignment'},
{file: 'all-accesses'},
{file: 'class_example'},
{file: 'class_example'},
{file: 'with_aexpr'}
];

@@ -17,0 +20,0 @@

@@ -1,39 +0,1 @@

class Rectangle {
constructor(x, y, width, height) {
this["x"] = x;
this["y"] = y;
this["width"] = width;
this["height"] = height;
}
area() {
return this["width"] * this["height"];
}
}
a.b = c.d
c(c, "bar")
let r1 = new Rectangle(0, 0, 10, 20),
r2 = new Rectangle(5, 10, 20, 30);
aexpr(() => r1["area"](), locals)["onChange"](() => console["log"]('changed'));
var arr = [1,2,3];
arr[2]
/*
// currently not supported is the following scenario
var obj = {
x: 42,
fn: function() {
return this.x
}
}
function getter(o,p) { return o[p]; }
// when we have a CallExpression as parent of the MemberExpression, the this reference is bound implicitly
obj.fn() // 42
// also working fine
obj["fn"]() // 42
// however, with the current implementation we loose the this reference when wrapping just the inner MemberExpression
getter(obj, "fn")() // undefined
*/
let r = Number.POSITIVE_INFINITY;
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