Skip to content

Commit ed9a1dc

Browse files
committed
Revert "yarn prettier:write"
This reverts commit 3a38621.
1 parent 3a38621 commit ed9a1dc

File tree

17 files changed

+138
-133
lines changed

17 files changed

+138
-133
lines changed

packages/bigquery/src/__tests__/index.test.bigquery.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ test(`insert record with error via SQL`, async () => {
157157
tableName,
158158
)} (id, decimal_number, the_date, the_date_time, the_time, the_timestamp)
159159
VALUES (${42}, ${new Big(
160-
`3.14`,
161-
)}, ${`not a valid date`}, ${`2000-06-03T06:14:00`}, ${`04:41:00`}, ${testDate})
160+
`3.14`,
161+
)}, ${`not a valid date`}, ${`2000-06-03T06:14:00`}, ${`04:41:00`}, ${testDate})
162162
`),
163163
).rejects.toMatchObject({
164164
message: expect.stringMatching(/Invalid date/),

packages/migrations-base/src/DirectoryContext.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ export default class DirectoryContext<TMigration>
4040
async listFiles(): Promise<string[]> {
4141
return (
4242
await Promise.all(
43-
(await promises.readdir(this._directory)).map(async (file) => {
43+
(
44+
await promises.readdir(this._directory)
45+
).map(async (file) => {
4446
return (await promises.stat(this._resolve(file))).isFile()
4547
? file
4648
: null;

packages/migrations-base/src/methods/readMigrationsDir.ts

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,31 @@ export default async function readMigrationsDir(
1717

1818
const migrations = (
1919
await Promise.all(
20-
(await migrationsDirectory.listFiles()).map(
21-
async (fileName): Promise<MigrationFile | null> => {
22-
if (fileName[0] === '_') return null;
23-
24-
if (
25-
IGNORED_EXTENSIONS.some((e) => fileName.endsWith(e)) ||
26-
!INCLUDED_EXTENSIONS.some((e) => fileName.endsWith(e))
27-
) {
28-
return null;
29-
}
30-
const match = /^(\d+)\-/.exec(fileName);
31-
if (!match) {
32-
invalidFilenames.push(fileName);
33-
return null;
34-
}
35-
const index = parseInt(match[1], 10);
36-
const src = await migrationsDirectory.read(fileName);
37-
38-
return {
39-
index,
40-
name: fileName,
41-
script: src,
42-
};
43-
},
44-
),
20+
(
21+
await migrationsDirectory.listFiles()
22+
).map(async (fileName): Promise<MigrationFile | null> => {
23+
if (fileName[0] === '_') return null;
24+
25+
if (
26+
IGNORED_EXTENSIONS.some((e) => fileName.endsWith(e)) ||
27+
!INCLUDED_EXTENSIONS.some((e) => fileName.endsWith(e))
28+
) {
29+
return null;
30+
}
31+
const match = /^(\d+)\-/.exec(fileName);
32+
if (!match) {
33+
invalidFilenames.push(fileName);
34+
return null;
35+
}
36+
const index = parseInt(match[1], 10);
37+
const src = await migrationsDirectory.read(fileName);
38+
39+
return {
40+
index,
41+
name: fileName,
42+
script: src,
43+
};
44+
}),
4545
)
4646
).filter(notNull);
4747

packages/mock-db-typed/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ class FieldQuery<T> {
5555

5656
export type {FieldQuery};
5757

58-
export type WhereCondition<TRecord> = Partial<{
59-
[key in keyof TRecord]: TRecord[key] | FieldQuery<TRecord[key]>;
60-
}>;
58+
export type WhereCondition<TRecord> = Partial<
59+
{[key in keyof TRecord]: TRecord[key] | FieldQuery<TRecord[key]>}
60+
>;
6161

6262
export function anyOf<T>(values: {
6363
[Symbol.iterator](): IterableIterator<T | FieldQuery<T>>;

packages/mysql-schema-print-types/src/printers/printSchema.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ export default function printSchema(
4949
columns.length === 0
5050
? `false`
5151
: columns.length === 1
52-
? `c === ${JSON.stringify(columns[0])}`
53-
: `(${columns
54-
.map((columnName) => `c === ${JSON.stringify(columnName)}`)
55-
.join(' || ')})`;
52+
? `c === ${JSON.stringify(columns[0])}`
53+
: `(${columns
54+
.map((columnName) => `c === ${JSON.stringify(columnName)}`)
55+
.join(' || ')})`;
5656
const tableConditions = tables.map(
5757
({tableName, jsonAttributes}) =>
5858
`t === ${JSON.stringify(tableName)} && ${columnCondition(

packages/mysql-typed/src/index.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ class FieldQuery<T> {
5555

5656
export type {FieldQuery};
5757

58-
export type WhereCondition<TRecord> = Partial<{
59-
[key in keyof TRecord]: TRecord[key] | FieldQuery<TRecord[key]>;
60-
}>;
58+
export type WhereCondition<TRecord> = Partial<
59+
{[key in keyof TRecord]: TRecord[key] | FieldQuery<TRecord[key]>}
60+
>;
6161

6262
export function anyOf<T>(values: {
6363
[Symbol.iterator](): IterableIterator<T | FieldQuery<T>>;
@@ -245,12 +245,13 @@ class Table<TRecord, TInsertParameters> {
245245
async insert<TRecordsToInsert extends readonly TInsertParameters[]>(
246246
...rows: keyof TRecordsToInsert[number] extends keyof TInsertParameters
247247
? TRecordsToInsert
248-
: readonly ({[key in keyof TInsertParameters]: TInsertParameters[key]} & {
249-
[key in Exclude<
250-
keyof TRecordsToInsert[number],
251-
keyof TInsertParameters
252-
>]: never;
253-
})[]
248+
: readonly ({[key in keyof TInsertParameters]: TInsertParameters[key]} &
249+
{
250+
[key in Exclude<
251+
keyof TRecordsToInsert[number],
252+
keyof TInsertParameters
253+
>]: never;
254+
})[]
254255
): Promise<void> {
255256
if (rows.length === 0) return;
256257
const {sql} = this._underlyingDb;

packages/pg-connection-string/src/parseConnectionURI.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ export default function parseConnectionURI(
2020
let str = originalString.startsWith('postgresql://')
2121
? originalString.substr('postgresql://'.length)
2222
: originalString.startsWith('postgres://')
23-
? originalString.substr('postgres://'.length)
24-
: fail(
25-
`Expected the connection string to start with "postgresql://" or "postgres://"`,
26-
);
23+
? originalString.substr('postgres://'.length)
24+
: fail(
25+
`Expected the connection string to start with "postgresql://" or "postgres://"`,
26+
);
2727

2828
// [user[:password]@]
2929
str = parseAuth(config, str);

packages/pg-schema-introspect/src/__tests__/getTypes.test.pg.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ test('get built in types', async () => {
194194
});
195195

196196
const groupedTypes = builtInTypesFromFile.reduce<{
197-
[key: string]: (typeof builtInTypesFromFile)[number][];
197+
[key: string]: typeof builtInTypesFromFile[number][];
198198
}>((result, ty) => {
199199
const category = Object.keys(TypeCateogry).find(
200200
(c) => (TypeCateogry as any)[c] === ty.category,

packages/pg-schema-introspect/src/getSchema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export default async function getSchema(
2929
const schemaName = query.schemaName
3030
? query.schemaName
3131
: query.schemaID
32-
? await getSchemaName(connection, query.schemaID)
33-
: (await getSearchPath(connection))[0];
32+
? await getSchemaName(connection, query.schemaID)
33+
: (await getSearchPath(connection))[0];
3434
if (!schemaName) {
3535
throw new Error('No schema found');
3636
}

packages/pg-schema-print-types/src/printers/printSchema.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ export default function printSchema(type: Schema, context: PgPrintContext) {
5353
columns.length === 0
5454
? `false`
5555
: columns.length === 1
56-
? `c === ${JSON.stringify(columns[0])}`
57-
: `(${columns
58-
.map((columnName) => `c === ${JSON.stringify(columnName)}`)
59-
.join(' || ')})`;
56+
? `c === ${JSON.stringify(columns[0])}`
57+
: `(${columns
58+
.map((columnName) => `c === ${JSON.stringify(columnName)}`)
59+
.join(' || ')})`;
6060
const tableConditions = tables.map(
6161
({tableName, jsonAttributes}) =>
6262
`t === ${JSON.stringify(tableName)} && ${columnCondition(

0 commit comments

Comments
 (0)