chore: refactor codebase, update dependencies, and clean up files#69
Open
azdanov wants to merge 13 commits intoCachyOS:developfrom
Open
chore: refactor codebase, update dependencies, and clean up files#69azdanov wants to merge 13 commits intoCachyOS:developfrom
azdanov wants to merge 13 commits intoCachyOS:developfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR is a broad cleanup/refactor pass across the Astro site, combining dependency upgrades with small utility refactors and removal of unused UI components.
Changes:
- Upgraded Astro/Tailwind/ESLint/TypeScript (and lockfile) and adjusted TS compiler options.
- Refactored permalink/canonical utilities and tightened date/time rendering in blog components.
- Removed several unused widget/components and updated content typing setup.
Reviewed changes
Copilot reviewed 16 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Adds an explicit TS option (exactOptionalPropertyTypes). |
| src/utils/permalinks.ts | Refactors permalink helpers and canonical URL typing; reorders helper definitions. |
| src/utils/git.ts | Minor refactor for timestamp parsing; adjusts git_path declaration. |
| src/utils/blog.ts | Refactors normalized post object construction; improves category/tag set building loops. |
| src/env.d.ts | Replaces Astro reference directives with module declarations for CSS/fontsource packages. |
| src/content/config.ts | Removes the old Astro content collection config file. |
| src/config.mjs | Adds trailingSlash to site config. |
| src/components/widgets/Stats.astro | Removed. |
| src/components/widgets/FAQs.astro | Removed. |
| src/components/widgets/Announcement.astro | Removed. |
| src/components/HeroImg.astro | Removed. |
| src/components/common/MetaTags.astro | Refactors canonical/image handling and simplifies SEO tag generation. |
| src/components/Card.astro | Removed. |
| src/components/widgets/LegalNoticeModal.tsx | Formatting-only change. |
| src/components/blog/SinglePost.astro | Uses ISO datetime formatting for <time datetime>. |
| src/components/blog/ListItem.astro | Uses ISO datetime formatting (optionally) for <time datetime>. |
| package.json | Dependency updates (Astro, Tailwind, ESLint, lodash, etc.). |
| bun.lock | Lockfile updated to match dependency bumps. |
| .prettierignore | Ignores src/content/post/ from formatting. |
Comments suppressed due to low confidence (2)
src/utils/git.ts:38
let git_path;will be implicitlyanyunder the repo’s strict TS config (previously this was initialized as a string). Please explicitly type it (e.g.,string) or keep the string initializer so type-checking doesn’t fail and downstreamspawnSyncargs stay typed.
let git_path;
{
const { stdout } = spawnSync('which', ['git'], {
encoding: 'utf-8',
});
src/components/common/MetaTags.astro:59
MetaTagscurrently ignores anyopenGraph/twitterprops passed viameta(e.g. blog post pages buildmeta.openGraph.images, but this component always overwritesopenGraphwith a minimal object derived only fromcanonical+image). This prevents per-page OG settings like article type and post-specific images from being emitted; consider merging/spreadingAstro.props.openGraph/Astro.props.twitterinto the objects passed toAstroSeo(and avoid overriding when provided).
openGraph={{
url: canonical.toString(),
title: ogTitle,
description: description,
type: ogType,
images: image
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.