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

babel-plugin-blade

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-blade - npm Package Compare versions

Comparing version 0.0.13 to 0.0.14

58

dist/index.js

@@ -205,2 +205,7 @@ 'use strict';

// this is a hacky dodge but it will work for now
// these properties will just all be ignored by us
// (untested) destructure if your graphql field is really named one of these
var arrayPrototype = ["length", "copyWithin", "fill", "pop", "push", "reverse", "shift", "unshift", "sort", "splice", "concat", "includes", "indexOf", "join", "lastIndexOf", "slice", "toSource", "toString", "toLocaleString", "entries", "every", "filter", "find", "findIndex", "forEach", "keys", "map", "reduce", "reduceRight", "some", "values"];
function processReference(blade, razorData) {

@@ -274,4 +279,21 @@

}
if (childpath.parentKey !== 'arguments' && childpath.node.property.name !== 'length' // hacky for now
)
// hacky dodge for array methods; just ignores them for now
// we will have to make iteration methods also count as blades
for (var _iterator = arrayPrototype, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var prop = _ref;
if (childpath.node.property.name === prop) return;
}
if (childpath.parentKey !== 'arguments')
// else it will include membexps inside call arguments

@@ -302,6 +324,6 @@ RHS.push({

var currentData = razorData;
RHS.forEach(function (_ref) {
var calleeArguments = _ref.calleeArguments,
name = _ref.name,
aliasPath = _ref.aliasPath;
RHS.forEach(function (_ref2) {
var calleeArguments = _ref2.calleeArguments,
name = _ref2.name,
aliasPath = _ref2.aliasPath;

@@ -313,15 +335,15 @@ var args = [];

if (calleeArguments) {
for (var _iterator = calleeArguments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref2;
for (var _iterator2 = calleeArguments, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
var _ref3;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref2 = _iterator[_i++];
if (_isArray2) {
if (_i2 >= _iterator2.length) break;
_ref3 = _iterator2[_i2++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref2 = _i.value;
_i2 = _iterator2.next();
if (_i2.done) break;
_ref3 = _i2.value;
}
var x = _ref2;
var x = _ref3;

@@ -356,5 +378,5 @@ if (x.type === 'StringLiteral' || x.type === 'TemplateLiteral') {

var LHSpointer = currentData;
LHS.forEach(function (_ref3) {
var name = _ref3.name,
alias = _ref3.alias;
LHS.forEach(function (_ref4) {
var name = _ref4.name,
alias = _ref4.alias;

@@ -361,0 +383,0 @@ LHSpointer = currentData.add({ name });

{
"name": "babel-plugin-blade",
"version": "0.0.13",
"version": "0.0.14",
"description": "generate inline graphql",

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