Skip to content

Commit 4faf748

Browse files
authored
Update prettier dev-dependency to v2.5.1 in Search (Azure#19566)
* Upgrade prettier version to latest * Format files
1 parent 1a77b3c commit 4faf748

Some content is hidden

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

43 files changed

+535
-534
lines changed

common/config/rush/pnpm-lock.yaml

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

sdk/search/perf-tests/search-documents/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"devDependencies": {
1717
"@types/node": "^12.0.0",
1818
"eslint": "^7.15.0",
19-
"prettier": "^1.16.4",
19+
"prettier": "^2.5.1",
2020
"rimraf": "^3.0.0",
2121
"tslib": "^2.2.0",
2222
"ts-node": "^10.0.0",
@@ -29,9 +29,9 @@
2929
"build": "npm run clean && tsc -p .",
3030
"build:samples": "echo skipped",
3131
"build:test": "echo skipped",
32-
"check-format": "prettier --list-different --config ../../../../.prettierrc.json --ignore-path ../../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
32+
"check-format": "prettier --list-different --config ../../../../.prettierrc.json --ignore-path ../../../../.prettierignore \"test/**/*.ts\" \"*.{js,json}\"",
3333
"clean": "rimraf dist dist-* types *.tgz *.log",
34-
"format": "prettier --write --config ../../../../.prettierrc.json --ignore-path ../../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
34+
"format": "prettier --write --config ../../../../.prettierrc.json --ignore-path ../../../../.prettierignore \"test/**/*.ts\" \"*.{js,json}\"",
3535
"integration-test:browser": "echo skipped",
3636
"integration-test:node": "echo skipped",
3737
"integration-test": "echo skipped",

sdk/search/perf-tests/search-documents/test/autoCompleteTest.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export class AutoCompleteTest extends SearchDocumentsBase<SearchDocumentsTestOpt
88
description: "Number of Documents to be created",
99
shortName: "dc",
1010
longName: "documentsCount",
11-
defaultValue: 10
12-
}
11+
defaultValue: 10,
12+
},
1313
};
1414

1515
constructor() {

sdk/search/perf-tests/search-documents/test/core/documentsGenerator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ function createHotel(hotelId: number): Hotel {
2626
city: "New York",
2727
stateProvince: "NY",
2828
country: "USA",
29-
postalCode: "10022"
30-
}
29+
postalCode: "10022",
30+
},
3131
};
3232
return hotel;
3333
}

sdk/search/perf-tests/search-documents/test/core/searchDocumentsBase.spec.ts

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
AzureKeyCredential,
55
SearchIndexClient,
66
SearchIndex,
7-
KnownAnalyzerNames
7+
KnownAnalyzerNames,
88
} from "@azure/search-documents";
99
import { Hotel } from "./hotel";
1010
import { generateHotels } from "./documentsGenerator";
@@ -13,9 +13,9 @@ export interface SearchDocumentsTestOptions {
1313
documentsCount: number;
1414
}
1515

16-
export abstract class SearchDocumentsBase<TOptions = Record<string, unknown>> extends PerfTest<
17-
TOptions
18-
> {
16+
export abstract class SearchDocumentsBase<
17+
TOptions = Record<string, unknown>
18+
> extends PerfTest<TOptions> {
1919
searchIndexClient: SearchIndexClient;
2020
searchClient: SearchClient<Hotel>;
2121
indexName: string;
@@ -40,75 +40,75 @@ export abstract class SearchDocumentsBase<TOptions = Record<string, unknown>> ex
4040
name: "hotelId",
4141
key: true,
4242
filterable: true,
43-
sortable: true
43+
sortable: true,
4444
},
4545
{
4646
type: "Edm.String",
4747
name: "hotelName",
4848
searchable: true,
4949
filterable: true,
50-
sortable: true
50+
sortable: true,
5151
},
5252
{
5353
type: "Edm.String",
5454
name: "description",
5555
searchable: true,
56-
analyzerName: KnownAnalyzerNames.EnLucene
56+
analyzerName: KnownAnalyzerNames.EnLucene,
5757
},
5858
{
5959
type: "Edm.String",
6060
name: "descriptionFr",
6161
searchable: true,
62-
analyzerName: KnownAnalyzerNames.FrLucene
62+
analyzerName: KnownAnalyzerNames.FrLucene,
6363
},
6464
{
6565
type: "Edm.String",
6666
name: "category",
6767
searchable: true,
6868
filterable: true,
6969
sortable: true,
70-
facetable: true
70+
facetable: true,
7171
},
7272
{
7373
type: "Collection(Edm.String)",
7474
name: "tags",
7575
searchable: true,
7676
filterable: true,
77-
facetable: true
77+
facetable: true,
7878
},
7979
{
8080
type: "Edm.Boolean",
8181
name: "parkingIncluded",
8282
filterable: true,
8383
sortable: true,
84-
facetable: true
84+
facetable: true,
8585
},
8686
{
8787
type: "Edm.Boolean",
8888
name: "smokingAllowed",
8989
filterable: true,
9090
sortable: true,
91-
facetable: true
91+
facetable: true,
9292
},
9393
{
9494
type: "Edm.DateTimeOffset",
9595
name: "lastRenovationDate",
9696
filterable: true,
9797
sortable: true,
98-
facetable: true
98+
facetable: true,
9999
},
100100
{
101101
type: "Edm.Double",
102102
name: "rating",
103103
filterable: true,
104104
sortable: true,
105-
facetable: true
105+
facetable: true,
106106
},
107107
{
108108
type: "Edm.GeographyPoint",
109109
name: "location",
110110
filterable: true,
111-
sortable: true
111+
sortable: true,
112112
},
113113
{
114114
type: "Edm.ComplexType",
@@ -117,41 +117,41 @@ export abstract class SearchDocumentsBase<TOptions = Record<string, unknown>> ex
117117
{
118118
type: "Edm.String",
119119
name: "streetAddress",
120-
searchable: true
120+
searchable: true,
121121
},
122122
{
123123
type: "Edm.String",
124124
name: "city",
125125
searchable: true,
126126
filterable: true,
127127
sortable: true,
128-
facetable: true
128+
facetable: true,
129129
},
130130
{
131131
type: "Edm.String",
132132
name: "stateProvince",
133133
searchable: true,
134134
filterable: true,
135135
sortable: true,
136-
facetable: true
136+
facetable: true,
137137
},
138138
{
139139
type: "Edm.String",
140140
name: "country",
141141
searchable: true,
142142
filterable: true,
143143
sortable: true,
144-
facetable: true
144+
facetable: true,
145145
},
146146
{
147147
type: "Edm.String",
148148
name: "postalCode",
149149
searchable: true,
150150
filterable: true,
151151
sortable: true,
152-
facetable: true
153-
}
154-
]
152+
facetable: true,
153+
},
154+
],
155155
},
156156
{
157157
type: "Collection(Edm.ComplexType)",
@@ -161,62 +161,62 @@ export abstract class SearchDocumentsBase<TOptions = Record<string, unknown>> ex
161161
type: "Edm.String",
162162
name: "description",
163163
searchable: true,
164-
analyzerName: KnownAnalyzerNames.EnLucene
164+
analyzerName: KnownAnalyzerNames.EnLucene,
165165
},
166166
{
167167
type: "Edm.String",
168168
name: "descriptionFr",
169169
searchable: true,
170-
analyzerName: KnownAnalyzerNames.FrLucene
170+
analyzerName: KnownAnalyzerNames.FrLucene,
171171
},
172172
{
173173
type: "Edm.String",
174174
name: "type",
175175
searchable: true,
176176
filterable: true,
177-
facetable: true
177+
facetable: true,
178178
},
179179
{
180180
type: "Edm.Double",
181181
name: "baseRate",
182182
filterable: true,
183-
facetable: true
183+
facetable: true,
184184
},
185185
{
186186
type: "Edm.String",
187187
name: "bedOptions",
188188
searchable: true,
189189
filterable: true,
190-
facetable: true
190+
facetable: true,
191191
},
192192
{
193193
type: "Edm.Int32",
194194
name: "sleepsCount",
195195
filterable: true,
196-
facetable: true
196+
facetable: true,
197197
},
198198
{
199199
type: "Edm.Boolean",
200200
name: "smokingAllowed",
201201
filterable: true,
202-
facetable: true
202+
facetable: true,
203203
},
204204
{
205205
type: "Collection(Edm.String)",
206206
name: "tags",
207207
searchable: true,
208208
filterable: true,
209-
facetable: true
210-
}
211-
]
212-
}
209+
facetable: true,
210+
},
211+
],
212+
},
213213
],
214214
suggesters: [
215215
{
216216
name: "sg",
217217
searchMode: "analyzingInfixMatching",
218-
sourceFields: ["description", "hotelName"]
219-
}
218+
sourceFields: ["description", "hotelName"],
219+
},
220220
],
221221
scoringProfiles: [
222222
{
@@ -229,16 +229,16 @@ export abstract class SearchDocumentsBase<TOptions = Record<string, unknown>> ex
229229
boost: 2,
230230
parameters: {
231231
referencePointParameter: "myloc",
232-
boostingDistance: 100
233-
}
234-
}
235-
]
236-
}
232+
boostingDistance: 100,
233+
},
234+
},
235+
],
236+
},
237237
],
238238
corsOptions: {
239239
// for browser tests
240-
allowedOrigins: ["*"]
241-
}
240+
allowedOrigins: ["*"],
241+
},
242242
};
243243
await this.searchIndexClient.createIndex(hotelIndex);
244244
}

sdk/search/perf-tests/search-documents/test/indexDocumentsTest.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export class IndexDocumentsTest extends SearchDocumentsBase<SearchDocumentsTestO
1111
description: "Number of Documents to be created",
1212
shortName: "dc",
1313
longName: "documentsCount",
14-
defaultValue: 10
15-
}
14+
defaultValue: 10,
15+
},
1616
};
1717
private hotels: Hotel[];
1818

sdk/search/perf-tests/search-documents/test/searchDocumentsTest.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export class SearchDocumentsTest extends SearchDocumentsBase<SearchDocumentsTest
88
description: "Number of Documents to be created",
99
shortName: "dc",
1010
longName: "documentsCount",
11-
defaultValue: 10
12-
}
11+
defaultValue: 10,
12+
},
1313
};
1414

1515
constructor() {

sdk/search/perf-tests/search-documents/test/suggestTest.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export class SuggestTest extends SearchDocumentsBase<SearchDocumentsTestOptions>
88
description: "Number of Documents to be created",
99
shortName: "dc",
1010
longName: "documentsCount",
11-
defaultValue: 10
12-
}
11+
defaultValue: 10,
12+
},
1313
};
1414

1515
constructor() {

0 commit comments

Comments
 (0)