@pact-foundation/pact
Advanced tools
Comparing version 6.0.0-alpha.12 to 6.0.0-alpha.13
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="6.0.0-alpha.13"></a> | ||
# [6.0.0-alpha.13](https://github.com/pact-foundation/pact-js/compare/v6.0.0-alpha.12...v6.0.0-alpha.13) (2018-04-29) | ||
### Features | ||
* **graphql:** escape queries with variables ([8b64dd4](https://github.com/pact-foundation/pact-js/commit/8b64dd4)) | ||
<a name="6.0.0-alpha.12"></a> | ||
@@ -7,0 +17,0 @@ # [6.0.0-alpha.12](https://github.com/pact-foundation/pact-js/compare/v6.0.0-alpha.10...v6.0.0-alpha.12) (2018-04-22) |
@@ -20,3 +20,2 @@ "use strict"; | ||
var matchers_1 = require("./matchers"); | ||
var underscore_1 = require("underscore"); | ||
var lodash_1 = require("lodash"); | ||
@@ -98,6 +97,6 @@ var graphql_tag_1 = require("graphql-tag"); | ||
} | ||
this.state.request = underscore_1.extend({ | ||
this.state.request = lodash_1.extend({ | ||
body: { | ||
operationName: this.operation, | ||
query: matchers_1.regex({ generate: this.query, matcher: this.query.replace(/\s+/g, "\\s*") }), | ||
query: matchers_1.regex({ generate: this.query, matcher: escapeGraphQlQuery(this.query) }), | ||
variables: this.variables, | ||
@@ -113,2 +112,5 @@ }, | ||
exports.GraphQLInteraction = GraphQLInteraction; | ||
var escapeGraphQlQuery = function (s) { return escapeSpace(escapeRegexChars(s)); }; | ||
var escapeRegexChars = function (s) { return s.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); }; | ||
var escapeSpace = function (s) { return s.replace(/\s+/g, "\\s*"); }; | ||
//# sourceMappingURL=graphql.js.map |
{ | ||
"name": "@pact-foundation/pact", | ||
"version": "6.0.0-alpha.12", | ||
"version": "6.0.0-alpha.13", | ||
"description": "Pact for all things Javascript", | ||
@@ -5,0 +5,0 @@ "main": "./pact.js", |
Sorry, the diff of this file is not supported yet
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
170672
2102