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

babel-plugin-inline-import-graphql-ast

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-inline-import-graphql-ast - npm Package Compare versions

Comparing version 2.0.1-rc.0 to 2.0.1-rc.1

9

build/index.js

@@ -52,9 +52,8 @@ Object.defineProperty(exports, "__esModule", {

query.makeSourceEnumerable();
curPath.replaceWith(t.variableDeclaration('const', [buildInlineVariable(query.ast)]));
curPath.replaceWith(buildInlineVariableAST(query.ast));
}
function buildInlineVariable(graphqlAST) {
var babelAST = (0, _babylon.parse)('(' + JSON.stringify(graphqlAST) + ')');
var objExp = babelAST.program.body[0].expression;
return t.variableDeclarator(t.identifier(curPath.node.specifiers[0].local.name), t.objectExpression(objExp.properties));
function buildInlineVariableAST(graphqlAST) {
var inlineVarName = curPath.node.specifiers[0].local.name;
return (0, _babylon.parse)('const ' + inlineVarName + ' = ' + JSON.stringify(graphqlAST)).program.body[0];
}

@@ -61,0 +60,0 @@ }

{
"name": "babel-plugin-inline-import-graphql-ast",
"version": "2.0.1-rc.0",
"version": "2.0.1-rc.1",
"description": "Babel plugin to make raw files importable",

@@ -5,0 +5,0 @@ "author": "Alexander Roberts <detrohutt@gmail.com>",

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