From 8517a7de477bc961639a68f3dab6b57e69c8b305 Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Thu, 4 Jan 2018 01:08:55 +0200 Subject: [PATCH] Update prettier Code changes are due to: https://github.com/prettier/prettier/pull/3299 --- package.json | 2 +- src/execution/values.js | 6 +++--- src/type/__tests__/validation-test.js | 16 ++++------------ src/validation/rules/KnownArgumentNames.js | 4 +--- yarn.lock | 6 +++--- 5 files changed, 12 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 8780359df8..7fefb180ba 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "flow-bin": "0.61.0", "isparta": "4.0.0", "mocha": "3.5.0", - "prettier": "^1.8.2", + "prettier": "^1.9.2", "sane": "2.0.0" } } diff --git a/src/execution/values.js b/src/execution/values.js index 50a79d939b..b09e49f0bd 100644 --- a/src/execution/values.js +++ b/src/execution/values.js @@ -84,9 +84,9 @@ export function getVariableValues( const coerced = coerceValue(value, varType, varDefNode); const coercionErrors = coerced.errors; if (coercionErrors) { - const messagePrelude = `Variable "$${ - varName - }" got invalid value ${JSON.stringify(value)}; `; + const messagePrelude = `Variable "$${varName}" got invalid value ${JSON.stringify( + value, + )}; `; coercionErrors.forEach(error => { error.message = messagePrelude + error.message; }); diff --git a/src/type/__tests__/validation-test.js b/src/type/__tests__/validation-test.js index 5e0572d4e0..307a8c7067 100644 --- a/src/type/__tests__/validation-test.js +++ b/src/type/__tests__/validation-test.js @@ -760,9 +760,7 @@ describe('Type System: Object fields must have output types', () => { const schema = schemaWithObjectFieldOfType(type); expect(validateSchema(schema)).to.containSubset([ { - message: `The type of BadObject.badField must be Output Type but got: ${ - type - }.`, + message: `The type of BadObject.badField must be Output Type but got: ${type}.`, }, ]); }); @@ -902,9 +900,7 @@ describe('Type System: Interface fields must have output types', () => { const schema = schemaWithInterfaceFieldOfType(type); expect(validateSchema(schema)).to.containSubset([ { - message: `The type of BadInterface.badField must be Output Type but got: ${ - type - }.`, + message: `The type of BadInterface.badField must be Output Type but got: ${type}.`, }, ]); }); @@ -980,9 +976,7 @@ describe('Type System: Field arguments must have input types', () => { const schema = schemaWithArgOfType(type); expect(validateSchema(schema)).to.containSubset([ { - message: `The type of BadObject.badField(badArg:) must be Input Type but got: ${ - type - }.`, + message: `The type of BadObject.badField(badArg:) must be Input Type but got: ${type}.`, }, ]); }); @@ -1054,9 +1048,7 @@ describe('Type System: Input Object fields must have input types', () => { const schema = schemaWithInputFieldOfType(type); expect(validateSchema(schema)).to.containSubset([ { - message: `The type of BadInputObject.badField must be Input Type but got: ${ - type - }.`, + message: `The type of BadInputObject.badField must be Input Type but got: ${type}.`, }, ]); }); diff --git a/src/validation/rules/KnownArgumentNames.js b/src/validation/rules/KnownArgumentNames.js index ecdb7e9dbf..65531d0a7f 100644 --- a/src/validation/rules/KnownArgumentNames.js +++ b/src/validation/rules/KnownArgumentNames.js @@ -34,9 +34,7 @@ export function unknownDirectiveArgMessage( directiveName: string, suggestedArgs: Array, ): string { - let message = `Unknown argument "${argName}" on directive "@${ - directiveName - }".`; + let message = `Unknown argument "${argName}" on directive "@${directiveName}".`; if (suggestedArgs.length) { message += ` Did you mean ${quotedOrList(suggestedArgs)}?`; } diff --git a/yarn.lock b/yarn.lock index 9bab2f7959..f6b537b370 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2218,9 +2218,9 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@^1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.8.2.tgz#bff83e7fd573933c607875e5ba3abbdffb96aeb8" +prettier@^1.9.2: + version "1.9.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.2.tgz#96bc2132f7a32338e6078aeb29727178c6335827" private@^0.1.6, private@^0.1.7: version "0.1.8"