Skip to content

Commit 67f947e

Browse files
IvanGoncharovleebyron
authored andcommitted
Update prettier (#1191)
Code changes are due to: prettier/prettier#3299
1 parent fd4a69c commit 67f947e

File tree

5 files changed

+12
-22
lines changed

5 files changed

+12
-22
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"flow-bin": "0.61.0",
6969
"isparta": "4.0.0",
7070
"mocha": "3.5.0",
71-
"prettier": "^1.8.2",
71+
"prettier": "^1.9.2",
7272
"sane": "2.0.0"
7373
}
7474
}

src/execution/values.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ export function getVariableValues(
8484
const coerced = coerceValue(value, varType, varDefNode);
8585
const coercionErrors = coerced.errors;
8686
if (coercionErrors) {
87-
const messagePrelude = `Variable "$${
88-
varName
89-
}" got invalid value ${JSON.stringify(value)}; `;
87+
const messagePrelude = `Variable "$${varName}" got invalid value ${JSON.stringify(
88+
value,
89+
)}; `;
9090
coercionErrors.forEach(error => {
9191
error.message = messagePrelude + error.message;
9292
});

src/type/__tests__/validation-test.js

+4-12
Original file line numberDiff line numberDiff line change
@@ -760,9 +760,7 @@ describe('Type System: Object fields must have output types', () => {
760760
const schema = schemaWithObjectFieldOfType(type);
761761
expect(validateSchema(schema)).to.containSubset([
762762
{
763-
message: `The type of BadObject.badField must be Output Type but got: ${
764-
type
765-
}.`,
763+
message: `The type of BadObject.badField must be Output Type but got: ${type}.`,
766764
},
767765
]);
768766
});
@@ -902,9 +900,7 @@ describe('Type System: Interface fields must have output types', () => {
902900
const schema = schemaWithInterfaceFieldOfType(type);
903901
expect(validateSchema(schema)).to.containSubset([
904902
{
905-
message: `The type of BadInterface.badField must be Output Type but got: ${
906-
type
907-
}.`,
903+
message: `The type of BadInterface.badField must be Output Type but got: ${type}.`,
908904
},
909905
]);
910906
});
@@ -980,9 +976,7 @@ describe('Type System: Field arguments must have input types', () => {
980976
const schema = schemaWithArgOfType(type);
981977
expect(validateSchema(schema)).to.containSubset([
982978
{
983-
message: `The type of BadObject.badField(badArg:) must be Input Type but got: ${
984-
type
985-
}.`,
979+
message: `The type of BadObject.badField(badArg:) must be Input Type but got: ${type}.`,
986980
},
987981
]);
988982
});
@@ -1054,9 +1048,7 @@ describe('Type System: Input Object fields must have input types', () => {
10541048
const schema = schemaWithInputFieldOfType(type);
10551049
expect(validateSchema(schema)).to.containSubset([
10561050
{
1057-
message: `The type of BadInputObject.badField must be Input Type but got: ${
1058-
type
1059-
}.`,
1051+
message: `The type of BadInputObject.badField must be Input Type but got: ${type}.`,
10601052
},
10611053
]);
10621054
});

src/validation/rules/KnownArgumentNames.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ export function unknownDirectiveArgMessage(
3434
directiveName: string,
3535
suggestedArgs: Array<string>,
3636
): string {
37-
let message = `Unknown argument "${argName}" on directive "@${
38-
directiveName
39-
}".`;
37+
let message = `Unknown argument "${argName}" on directive "@${directiveName}".`;
4038
if (suggestedArgs.length) {
4139
message += ` Did you mean ${quotedOrList(suggestedArgs)}?`;
4240
}

yarn.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -2218,9 +2218,9 @@ preserve@^0.2.0:
22182218
version "0.2.0"
22192219
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
22202220

2221-
prettier@^1.8.2:
2222-
version "1.8.2"
2223-
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.8.2.tgz#bff83e7fd573933c607875e5ba3abbdffb96aeb8"
2221+
prettier@^1.9.2:
2222+
version "1.9.2"
2223+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.2.tgz#96bc2132f7a32338e6078aeb29727178c6335827"
22242224

22252225
private@^0.1.6, private@^0.1.7:
22262226
version "0.1.8"

0 commit comments

Comments
 (0)