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.0 to 2.1.1

26

dist/index.js

@@ -10,2 +10,3 @@ "use strict";

var template = param.template;
var traverse = param.traverse;

@@ -74,3 +75,14 @@ console.log(arguments);

pre: function pre(file) {
console.log("fff", file);
console.log("fff", file, traverse);
traverse(file.ast, {
enter: function enter(path) {
if (path.node.leadingComments && path.node.leadingComments.some(function (comment) {
return comment.value.includes(IGNORE_STRING);
})) {
console.log("IGNORED!!!");
file[IGNORE_INDICATOR] = true;
}
}
});
},

@@ -81,7 +93,10 @@

enter: function enter(path, state) {
console.log("file", path);
//state.file.addImport("aexpr-source-transformation-propagation21", "aexpr");
console.log("file", path, state);
if (state.file[IGNORE_INDICATOR]) {
console.log("read ignored");return;
};
path.traverse({
Identifier: function Identifier(path) {
console.log(path.node.name);
//console.log(path.node.name)
// Check for a call to aexpr:

@@ -292,2 +307,5 @@ if (t.isCallExpression(path.parent) && path.node.name === AEXPR_IDENTIFIER_NAME && !path.scope.hasBinding(AEXPR_IDENTIFIER_NAME)) {

var IGNORE_STRING = "aexpr ignore";
var IGNORE_INDICATOR = Symbol("aexpr ignore");
// const SET_LOCAL = "setLocal";

@@ -294,0 +312,0 @@ // const GET_LOCAL = "getLocal";

@@ -7,2 +7,5 @@ const AEXPR_IDENTIFIER_NAME = "aexpr";

const IGNORE_STRING = "aexpr ignore";
const IGNORE_INDICATOR = Symbol("aexpr ignore");
// const SET_LOCAL = "setLocal";

@@ -15,3 +18,3 @@ // const GET_LOCAL = "getLocal";

export default function(param) {
let { types: t, template } = param;
let { types: t, template, traverse } = param;
console.log(arguments);

@@ -93,3 +96,15 @@

pre(file) {
console.log("fff", file)
console.log("fff", file, traverse);
traverse(file.ast, {
enter(path) {
if (
path.node.leadingComments &&
path.node.leadingComments.some(comment => comment.value.includes(IGNORE_STRING))
) {
console.log("IGNORED!!!")
file[IGNORE_INDICATOR] = true;
}
}
});
},

@@ -99,7 +114,8 @@ visitor: {

enter(path, state) {
console.log("file", path);
//state.file.addImport("aexpr-source-transformation-propagation21", "aexpr");
console.log("file", path, state);
if(state.file[IGNORE_INDICATOR]) { console.log("read ignored"); return; };
path.traverse({
Identifier(path) {
console.log(path.node.name)
//console.log(path.node.name)
// Check for a call to aexpr:

@@ -106,0 +122,0 @@ if(

2

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

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

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