Skip to content

Commit 787c0ba

Browse files
committed
chore: fix prettier config and reformat
1 parent 57f740c commit 787c0ba

File tree

4 files changed

+21
-15
lines changed

4 files changed

+21
-15
lines changed

netlify/functions/process-new-releases.ts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ export default async function handler() {
1414
(release) => release.version === latestRelease.version,
1515
)
1616
) {
17-
return new Response(JSON.stringify({ message: "Release already analyzed" }), {
18-
status: 200,
19-
headers: { 'Content-Type': 'application/json' },
20-
});
17+
return new Response(
18+
JSON.stringify({ message: "Release already analyzed" }),
19+
{
20+
status: 200,
21+
headers: { "Content-Type": "application/json" },
22+
},
23+
);
2124
}
2225

2326
const analysis = await analyzeReleaseNotes(
@@ -41,15 +44,18 @@ export default async function handler() {
4144
);
4245
}
4346

44-
return new Response(JSON.stringify({ message: "Release analyzed and stored" }), {
45-
status: 200,
46-
headers: { 'Content-Type': 'application/json' },
47-
});
47+
return new Response(
48+
JSON.stringify({ message: "Release analyzed and stored" }),
49+
{
50+
status: 200,
51+
headers: { "Content-Type": "application/json" },
52+
},
53+
);
4854
} catch (error) {
49-
console.error("Error in check-nextjs-release function:", error);
55+
console.error("Error in process-nextjs-release function:", error);
5056
return new Response(JSON.stringify({ error: "Internal server error" }), {
5157
status: 500,
52-
headers: { 'Content-Type': 'application/json' },
58+
headers: { "Content-Type": "application/json" },
5359
});
5460
}
5561
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"astro": "astro",
99
"build": "astro build",
1010
"dev": "astro dev",
11-
"format": "prettier --write .",
11+
"format": "prettier --write '**/*.{astro,js,jsx,ts,tsx,json,md}'",
1212
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.astro",
1313
"lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx,.astro --fix",
1414
"migrate": "tsx src/scripts/migrate.ts",

src/env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/// <reference path="../.astro/types.d.ts" />
1+
/// <reference path="../.astro/types.d.ts" />

src/lib/db.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ export async function getAnalyzedReleases(): Promise<Release[]> {
2020
"SELECT * FROM releases ORDER BY analyzed_at DESC",
2121
);
2222
// TODO(serhalp) Verify the right turso typing pattern
23-
return result.rows.map(row => ({
23+
return result.rows.map((row) => ({
2424
...row,
25-
relevantPRs: JSON.parse(row.relevantPRs as string)
25+
relevantPRs: JSON.parse(row.relevantPRs as string),
2626
})) as unknown[] as Release[];
2727
}
2828

@@ -43,7 +43,7 @@ export async function insertAnalyzedRelease(
4343
relevance,
4444
releaseLink,
4545
JSON.stringify(relevantPRs),
46-
new Date().toISOString()
46+
new Date().toISOString(),
4747
],
4848
});
4949
}

0 commit comments

Comments
 (0)