Skip to content

Update prettier to v1.18.0 #1956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@
"flow-bin": "0.100.0",
"mocha": "6.1.4",
"nyc": "14.1.1",
"prettier": "1.17.1"
"prettier": "1.18.0"
}
}
8 changes: 2 additions & 6 deletions src/execution/execute.js
Original file line number Diff line number Diff line change
Expand Up @@ -855,9 +855,7 @@ function completeValue(
);
if (completed === null) {
throw new Error(
`Cannot return null for non-nullable field ${info.parentType.name}.${
info.fieldName
}.`,
`Cannot return null for non-nullable field ${info.parentType.name}.${info.fieldName}.`,
);
}
return completed;
Expand Down Expand Up @@ -934,9 +932,7 @@ function completeListValue(
): PromiseOrValue<$ReadOnlyArray<mixed>> {
invariant(
isCollection(result),
`Expected Iterable, but did not find one for field ${
info.parentType.name
}.${info.fieldName}.`,
`Expected Iterable, but did not find one for field ${info.parentType.name}.${info.fieldName}.`,
);

// This is specified as a simple map, however we're optimizing the path
Expand Down
4 changes: 2 additions & 2 deletions src/jsutils/instanceOf.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ declare function instanceOf(

// See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production
// See: https://webpack.js.org/guides/production/
export default (process.env.NODE_ENV === 'production'
export default process.env.NODE_ENV === 'production'
? // eslint-disable-next-line no-shadow
function instanceOf(value: mixed, constructor: mixed) {
return value instanceof constructor;
Expand Down Expand Up @@ -49,4 +49,4 @@ spurious results.`,
}
}
return false;
});
};
12 changes: 3 additions & 9 deletions src/utilities/findBreakingChanges.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,7 @@ function findUnionTypeChanges(
for (const newPossibleType of possibleTypesDiff.added) {
schemaChanges.push({
type: DangerousChangeType.TYPE_ADDED_TO_UNION,
description: `${newPossibleType.name} was added to union type ${
oldType.name
}.`,
description: `${newPossibleType.name} was added to union type ${oldType.name}.`,
});
}

Expand Down Expand Up @@ -304,9 +302,7 @@ function findEnumTypeChanges(
for (const oldValue of valuesDiff.removed) {
schemaChanges.push({
type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM,
description: `${oldValue.name} was removed from enum type ${
oldType.name
}.`,
description: `${oldValue.name} was removed from enum type ${oldType.name}.`,
});
}

Expand Down Expand Up @@ -389,9 +385,7 @@ function findArgChanges(
for (const oldArg of argsDiff.removed) {
schemaChanges.push({
type: BreakingChangeType.ARG_REMOVED,
description: `${oldType.name}.${oldField.name} arg ${
oldArg.name
} was removed.`,
description: `${oldType.name}.${oldField.name} arg ${oldArg.name} was removed.`,
});
}

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2141,10 +2141,10 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"

prettier@1.17.1:
version "1.17.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.1.tgz#ed64b4e93e370cb8a25b9ef7fef3e4fd1c0995db"
integrity sha512-TzGRNvuUSmPgwivDqkZ9tM/qTGW9hqDKWOE9YHiyQdixlKbv7kvEqsmDPrcHJTKwthU774TQwZXVtaQ/mMsvjg==
prettier@1.18.0:
version "1.18.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.0.tgz#d1701ca9b2941864b52f3262b35946d2c9cd88f0"
integrity sha512-YsdAD29M0+WY2xXZk3i0PA16olY9qZss+AuODxglXcJ+2ZBwFv+6k5tE8GS8/HKAthaajlS/WqhdgcjumOrPlg==

private@^0.1.6:
version "0.1.8"
Expand Down