Skip to content

Commit cfe529b

Browse files
renovate[bot]renovate-bottrevor-scheer
authored
chore(deps): update dependency prettier to v2 (#2603)
* npm run lint-fix Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Trevor Scheer <[email protected]>
1 parent 8e423ac commit cfe529b

File tree

121 files changed

+1979
-1932
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+1979
-1932
lines changed

package-lock.json

Lines changed: 11 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"lerna": "4.0.0",
8282
"memfs": "3.4.1",
8383
"nock": "11.9.1",
84-
"prettier": "1.19.1",
84+
"prettier": "2.6.2",
8585
"stdout-stderr": "0.1.13",
8686
"symlink-dir": "5.0.1",
8787
"ts-jest": "28.0.1",

packages/apollo-codegen-core/src/__tests__/jsonOutput.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ function compileFromSource(
1414
const document = parse(source);
1515
return compileToLegacyIR(schema, document, {
1616
mergeInFieldsFromFragmentSpreads: false,
17-
addTypename: true
17+
addTypename: true,
1818
});
1919
}
2020

21-
describe("JSON output", function() {
22-
test(`should generate JSON output for a query with an enum variable`, function() {
21+
describe("JSON output", function () {
22+
test(`should generate JSON output for a query with an enum variable`, function () {
2323
const context = compileFromSource(`
2424
query HeroName($episode: Episode) {
2525
hero(episode: $episode) {
@@ -33,7 +33,7 @@ describe("JSON output", function() {
3333
expect(output).toMatchSnapshot();
3434
});
3535

36-
test(`should generate JSON output for a query with a nested selection set`, function() {
36+
test(`should generate JSON output for a query with a nested selection set`, function () {
3737
const context = compileFromSource(`
3838
query HeroAndFriendsNames {
3939
hero {
@@ -50,7 +50,7 @@ describe("JSON output", function() {
5050
expect(output).toMatchSnapshot();
5151
});
5252

53-
test(`should generate JSON output for a query with a fragment spread and nested inline fragments`, function() {
53+
test(`should generate JSON output for a query with a fragment spread and nested inline fragments`, function () {
5454
const context = compileFromSource(`
5555
query HeroAndDetails {
5656
hero {
@@ -75,7 +75,7 @@ describe("JSON output", function() {
7575
expect(output).toMatchSnapshot();
7676
});
7777

78-
test(`should generate JSON output for a mutation with an enum and an input object variable`, function() {
78+
test(`should generate JSON output for a mutation with an enum and an input object variable`, function () {
7979
const context = compileFromSource(`
8080
mutation CreateReview($episode: Episode, $review: ReviewInput) {
8181
createReview(episode: $episode, review: $review) {
@@ -90,7 +90,7 @@ describe("JSON output", function() {
9090
expect(output).toMatchSnapshot();
9191
});
9292

93-
test(`should generate JSON output for an input object type with default field values`, function() {
93+
test(`should generate JSON output for an input object type with default field values`, function () {
9494
const schema = buildSchema(`
9595
type Query {
9696
someField(input: ComplexInput!): String!
@@ -128,7 +128,7 @@ describe("JSON output", function() {
128128
expect(output).toMatchSnapshot();
129129
});
130130

131-
test(`should generate JSON output for a subscription`, function() {
131+
test(`should generate JSON output for a subscription`, function () {
132132
const schema = buildSchema(`
133133
type Comment {
134134
id: Int!
@@ -158,7 +158,7 @@ describe("JSON output", function() {
158158
expect(output).toMatchSnapshot();
159159
});
160160

161-
test("should list all unions and their types under a `unionTypes` property", function() {
161+
test("should list all unions and their types under a `unionTypes` property", function () {
162162
const context = compileFromSource(`
163163
query Search {
164164
search(text: "an") {
@@ -188,7 +188,7 @@ describe("JSON output", function() {
188188
expect(output).toMatchSnapshot();
189189
});
190190

191-
test("should list all interfaces and their implementing types under a `interfaceTypes` property", function() {
191+
test("should list all interfaces and their implementing types under a `interfaceTypes` property", function () {
192192
const context = compileFromSource(`
193193
query HeroForEpisode {
194194
hero(episode: JEDI) {
@@ -201,10 +201,9 @@ describe("JSON output", function() {
201201
`);
202202

203203
expect(context.interfaceTypes.size).toBe(1);
204-
const [
205-
interfaceType,
206-
implementors
207-
] = context.interfaceTypes.entries().next().value;
204+
const [interfaceType, implementors] = context.interfaceTypes
205+
.entries()
206+
.next().value;
208207
expect(interfaceType.toString()).toBe("Character");
209208
expect(implementors.length).toBe(2);
210209

packages/apollo-codegen-core/src/__tests__/loading.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import path from "path";
55
import {
66
extractDocumentFromJavascript,
77
loadAndMergeQueryDocuments,
8-
loadQueryDocuments
8+
loadQueryDocuments,
99
} from "../loading";
1010

1111
// Test example javascript source files are located within __fixtures__
@@ -64,7 +64,7 @@ describe("extractDocumentFromJavascript", () => {
6464
describe("Validation", () => {
6565
test(`should extract gql snippet from javascript file`, () => {
6666
const inputPaths = [
67-
path.join(__dirname, "../../../../__fixtures__/starwars/gqlQueries.js")
67+
path.join(__dirname, "../../../../__fixtures__/starwars/gqlQueries.js"),
6868
];
6969

7070
const document = loadAndMergeQueryDocuments(inputPaths);
@@ -76,7 +76,7 @@ describe("Validation", () => {
7676
describe("loadQueryDocuments", () => {
7777
test(`should load a schema document from a .graphqls file`, () => {
7878
const inputPaths = [
79-
path.join(__dirname, "../../../../__fixtures__/starwars/schema.graphqls")
79+
path.join(__dirname, "../../../../__fixtures__/starwars/schema.graphqls"),
8080
];
8181

8282
const document = loadQueryDocuments(inputPaths);

packages/apollo-codegen-core/src/__tests__/valueFromValueNode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe("#valueFromValueNode", () => {
6060
"foo",
6161
1,
6262
"JEDI",
63-
{ kind: "Variable", variableName: "something" }
63+
{ kind: "Variable", variableName: "something" },
6464
]);
6565
});
6666

@@ -74,7 +74,7 @@ describe("#valueFromValueNode", () => {
7474
foo: "foo",
7575
bar: 1,
7676
bla: "JEDI",
77-
baz: { kind: "Variable", variableName: "something" }
77+
baz: { kind: "Variable", variableName: "something" },
7878
});
7979
});
8080
});

packages/apollo-codegen-core/src/compiler/__tests__/index.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ describe("Compiling query documents to modern IR with typeNodes", () => {
4949
kind: "NamedType",
5050
name: {
5151
kind: "Name",
52-
value: "String"
53-
}
54-
}
52+
value: "String",
53+
},
54+
},
5555
});
5656

5757
expect(operations["HeroName"].variables[0].typeNode).toEqual({
5858
kind: "NamedType",
5959
name: {
6060
kind: "Name",
61-
value: "Episode"
62-
}
61+
value: "Episode",
62+
},
6363
});
6464

6565
expect(operations["Search"].variables[0].typeNode).toEqual({
@@ -68,25 +68,25 @@ describe("Compiling query documents to modern IR with typeNodes", () => {
6868
kind: "NamedType",
6969
name: {
7070
kind: "Name",
71-
value: "String"
72-
}
73-
}
71+
value: "String",
72+
},
73+
},
7474
});
7575

7676
expect(
7777
operations["Search"].selectionSet.selections[0].selectionSet.selections[0]
7878
.typeNode
7979
).toEqual({
8080
kind: "NamedType",
81-
name: { kind: "Name", value: "Character" }
81+
name: { kind: "Name", value: "Character" },
8282
});
8383

8484
expect(
8585
operations["CreateReviewForEpisode"].selectionSet.selections[0]
8686
.selectionSet.selections[0].typeNode
8787
).toEqual({
8888
kind: "NonNullType",
89-
type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }
89+
type: { kind: "NamedType", name: { kind: "Name", value: "Int" } },
9090
});
9191
});
9292
});

0 commit comments

Comments
 (0)