New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-openui5-support

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-openui5-support - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

test/fixtures/remove/techinfo-1.56/actual.js

49

lib/index.js

@@ -105,15 +105,11 @@ 'use strict';

function handleTechInfo(path, mode) {
var callee = path.node.callee;
function handleOldTechInfo(path, mode, callee, args) {
var object = callee.object,
property = callee.property;
var args = path.node.arguments;
if (callee.type !== 'MemberExpression' || args.length !== 1) {
if (!object) {
return;
}
var object = callee.object,
property = callee.property;
if (object.type !== 'Identifier' || property.type !== 'Identifier') {

@@ -129,3 +125,3 @@ return;

if (arg.type !== 'ObjectExpression') {
if (!arg || arg.type !== 'ObjectExpression') {
return;

@@ -153,2 +149,37 @@ }

function handleNewTechInfo(path, mode, callee) {
var obj = callee.object;
if (!obj || obj.type !== 'CallExpression') {
return;
}
var args = obj.arguments;
if (!args || args.length !== 2) {
return;
}
if (args[0].type !== 'StringLiteral' || args[0].value !== 'sap.ui.support') {
return;
}
var prop = obj.callee.property;
if (prop && prop.type === 'Identifier' && prop.name === 'loadLibrary') {
path.remove();
}
}
function handleTechInfo(path, mode) {
var callee = path.node.callee;
var args = path.node.arguments;
if (callee.type !== 'MemberExpression' && args.length !== 1) {
return;
}
handleOldTechInfo(path, mode, callee, args);
handleNewTechInfo(path, mode, callee);
}
return {

@@ -155,0 +186,0 @@ visitor: {

2

package.json
{
"name": "babel-plugin-openui5-support",
"description": "Handle support tool loading behavior for UI5",
"version": "0.1.0",
"version": "0.1.1",
"license": "Apache-2.0",

@@ -6,0 +6,0 @@ "author": "Christoph Kraemer <chr.kraemer@sap.com>",

@@ -102,12 +102,9 @@ export default function ({ types: t }) {

function handleTechInfo(path, mode) {
const { callee } = path.node;
const args = path.node.arguments;
function handleOldTechInfo(path, mode, callee, args) {
const { object, property } = callee;
if (callee.type !== 'MemberExpression' || args.length !== 1) {
if (!object) {
return;
}
const { object, property } = callee;
if (object.type !== 'Identifier' || property.type !== 'Identifier') {

@@ -123,3 +120,3 @@ return;

if (arg.type !== 'ObjectExpression') {
if (!arg || arg.type !== 'ObjectExpression') {
return;

@@ -194,2 +191,37 @@ }

function handleNewTechInfo(path, mode, callee) {
const obj = callee.object;
if (!obj || obj.type !== 'CallExpression') {
return;
}
const args = obj.arguments;
if (!args || args.length !== 2) {
return;
}
if (args[0].type !== 'StringLiteral' || args[0].value !== 'sap.ui.support') {
return;
}
const prop = obj.callee.property;
if (prop && prop.type === 'Identifier' && prop.name === 'loadLibrary') {
path.remove();
}
}
function handleTechInfo(path, mode) {
const { callee } = path.node;
const args = path.node.arguments;
if (callee.type !== 'MemberExpression' && args.length !== 1) {
return;
}
handleOldTechInfo(path, mode, callee, args);
handleNewTechInfo(path, mode, callee);
}
return {

@@ -196,0 +228,0 @@ visitor: {

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