babel-relay-plugin
Advanced tools
Comparing version 0.6.1 to 0.6.3
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84791
17
1931