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

babel-relay-plugin

Package Overview
Dependencies
Maintainers
8
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-relay-plugin - npm Package Compare versions

Comparing version 0.6.1 to 0.6.3

lib/GraphQLRelayDirective.js

13

lib/RelayQLAST.js

@@ -35,16 +35,7 @@ // @generated

var GraphQLRelayDirective = require('./GraphQLRelayDirective');
var find = require('./find');
var invariant = require('./invariant');
var GraphQLRelayDirective = {
name: 'relay',
args: [{
name: 'pattern',
type: types.GraphQLBoolean
}, {
name: 'plural',
type: types.GraphQLBoolean
}]
};
var RelayQLNode = (function () {

@@ -51,0 +42,0 @@ function RelayQLNode(context, ast) {

@@ -75,6 +75,5 @@ // @generated

var RelayQLPrinter = (function () {
function RelayQLPrinter(documentHash, tagName, variableNames) {
function RelayQLPrinter(tagName, variableNames) {
_classCallCheck(this, RelayQLPrinter);
this.documentHash = documentHash;
this.tagName = tagName;

@@ -191,3 +190,2 @@ this.variableNames = variableNames;

directives: this.printDirectives(fragment.getDirectives()),
hash: t.valueToNode(this.documentHash),
kind: t.valueToNode('Fragment'),

@@ -194,0 +192,0 @@ metadata: metadata,

@@ -40,3 +40,2 @@ // @generated

var crypto = require('crypto');
var invariant = require('./invariant');

@@ -69,7 +68,6 @@ var util = require('util');

var documentText = this.processTemplateText(templateText, documentName);
var documentHash = hash(documentText);
var definition = this.processDocumentText(documentText, documentName);
var Printer = RelayQLPrinter(t, this.options);
return new Printer(documentHash, tagName, variableNames).print(definition, substitutions);
return new Printer(tagName, variableNames).print(definition, substitutions);
}

@@ -204,8 +202,2 @@

function hash(string) {
var hash = crypto.createHash('sha1').update(string);
invariant(hash != null, 'Failed to create sha1 hash.');
return hash.digest('base64').substr(0, 8);
}
module.exports = RelayQLTransformer;
{
"name": "babel-relay-plugin",
"version": "0.6.1",
"version": "0.6.3",
"description": "Babel Relay Plugin for transpiling GraphQL queries for use with Relay.",

@@ -5,0 +5,0 @@ "license": "BSD-3-Clause",

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