Skip to content
Merged
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
cdd04ea
Initial v2 commit
WarningImHack3r Feb 22, 2025
138a39a
chore!: let's start (almost) from scratch
WarningImHack3r Mar 22, 2025
bbb9d46
refactor(repos): move repos to a separate file
WarningImHack3r Mar 22, 2025
2829362
refactor(repos): create a getRepositories utility
WarningImHack3r Mar 22, 2025
afd6219
feat(backend): add a GitHub releases cached middleware w/ cron
WarningImHack3r Mar 22, 2025
82945a6
feat(routes): scaffold the /package routes
WarningImHack3r Mar 22, 2025
995766b
fix(cron): change from every 5 minutes to once a day
WarningImHack3r Mar 22, 2025
eeea23e
feat(repos): transition to a built-in way to get the package names al…
WarningImHack3r Mar 22, 2025
9fac94a
feat(backend): add a packages discoverer to get packages from repos
WarningImHack3r Mar 22, 2025
3173675
fix(backend): fix potential duplicates inside the discovered packages
WarningImHack3r Mar 22, 2025
0b007e2
feat(frontend): prepare all data loading, add basic pages
WarningImHack3r Mar 23, 2025
2c4ea21
chore(deps): upgrade shadcn components
WarningImHack3r Mar 23, 2025
d775653
refactor: set container style to all pages under main layout
WarningImHack3r Mar 23, 2025
03b6541
refactor(backend): revamp the logic for enriched data
WarningImHack3r Mar 23, 2025
4fd147e
refactor(backend): other refactors to finally get what I want
WarningImHack3r Mar 23, 2025
dc57b29
feat(backend): increase the GitHub fetch size to the maximum
WarningImHack3r Mar 23, 2025
5185d79
feat(frontend): add main release page, fix broken animation, better code
WarningImHack3r Mar 23, 2025
09d6b4a
refactor(backend): transition to generic cache
WarningImHack3r Mar 23, 2025
9824ee7
style(releases): use text-pretty
WarningImHack3r Mar 24, 2025
c7a8aea
fix(backend): sort releases by version
WarningImHack3r Mar 24, 2025
da284d0
chore(backend): adjust format of discoverer
WarningImHack3r Mar 24, 2025
777fe0c
chore(backend): adjust code style in cache
WarningImHack3r Mar 24, 2025
19c8b0b
feat(cache): add support for repositories with tags & changelogs
WarningImHack3r Mar 24, 2025
c84568f
feat(frontend): add loading bar for slow navigation times
WarningImHack3r Mar 25, 2025
664bb26
feat(frontend): redirect to first package from home page instead of list
WarningImHack3r Mar 25, 2025
77fa6ea
feat(releases): replace slow cron jobs by cache TTL
WarningImHack3r Mar 25, 2025
b923d50
chore(lint): adjust ESLint rule
WarningImHack3r Mar 25, 2025
ec69ce0
fix(packages): handle duplicated packages
WarningImHack3r Mar 25, 2025
80750ed
chore(types): fix ESLint config, simplify type
WarningImHack3r Mar 26, 2025
1058317
fix(frontend): fix weird hydration mismatch
WarningImHack3r Mar 26, 2025
fba4511
feat(packages): get package descriptions
WarningImHack3r Mar 28, 2025
dc8a020
fix(packages): improve algorithm to filter packages
WarningImHack3r Mar 28, 2025
fc1015b
fix(packages): fix missing variable replacement
WarningImHack3r Mar 28, 2025
6b67b98
feat(frontend): add proper loading state on the main page
WarningImHack3r Mar 28, 2025
495886b
feat(main-page): add a link for the list page, improve side panel look
WarningImHack3r Mar 28, 2025
2593e32
fix(backend): add TTL for descriptions, improve package json filtering
WarningImHack3r Mar 28, 2025
53e6910
style(side-panel): adjust the look of the side panel
WarningImHack3r Mar 29, 2025
626e9ba
style(side-panel): highlight and disable active page
WarningImHack3r Mar 29, 2025
45c5df5
style(releases): adjust the date formatting for releases
WarningImHack3r Mar 30, 2025
9181652
feat(releases): bring back the Latest and Maintenance badges, correct…
WarningImHack3r Mar 30, 2025
c170393
feat(side-panel): wire back `show prereleases` checkbox
WarningImHack3r Mar 30, 2025
692770e
fix(side-panel): fix incorrect active state management
WarningImHack3r Mar 30, 2025
d8a2240
fix(lint): fix false positive
WarningImHack3r Mar 30, 2025
1dc5e03
feat(releases): improve date formatting
WarningImHack3r Mar 30, 2025
0b68dcb
style(releases): redesign the main page, fix styles
WarningImHack3r Apr 1, 2025
a7dcdb8
style(releases): add hover effect for release cards
WarningImHack3r Apr 1, 2025
eaf0323
style!: use custom font & tweak theme
WarningImHack3r Apr 8, 2025
9f8628f
style: improve the look of the list page
WarningImHack3r Apr 8, 2025
00dbb60
style: adjust serif fonts
WarningImHack3r Apr 8, 2025
670a554
style(layout): align navbar shadow with bottom border
WarningImHack3r Apr 8, 2025
fcca0dc
feat: re-wire the details page
WarningImHack3r Apr 9, 2025
54b43a8
fix: fix missing property
WarningImHack3r Apr 9, 2025
65e0242
feat(seo): revamp SEO
WarningImHack3r Apr 10, 2025
0fcf12d
feat: handle v1 migration
WarningImHack3r Apr 10, 2025
2e4c6f5
style: improve light mode look
WarningImHack3r Apr 10, 2025
5aeb508
chore: get rid of svelte-persisted-store
WarningImHack3r Apr 10, 2025
d0c7dbf
feat(analytics): add posthog
WarningImHack3r Apr 10, 2025
a3071e9
chore: update README
WarningImHack3r Apr 10, 2025
2ee2b26
chore: update redirect codes
WarningImHack3r Apr 10, 2025
2f65f44
feat(blog): create the v2 post
WarningImHack3r Apr 11, 2025
8bbba99
feat(layout): add support for markdown in news banner, add v2 news
WarningImHack3r Apr 11, 2025
4672e00
feat(layout): add (back) navigation buttons, change redirection
WarningImHack3r Apr 11, 2025
55a873f
fix: apply suggestions from the rabbit
WarningImHack3r Apr 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
PUBLIC_GITHUB_TOKEN=your_github_token
KV_REST_API_TOKEN=your_kv_token
KV_REST_API_URL="https://your.api/url"
GITHUB_TOKEN=your_github_token
39 changes: 11 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# svelte-changelog

[svelte-changelog.vercel.app](https://svelte-changelog.vercel.app/)
[svelte-changelog.dev](https://svelte-changelog.dev)

Made with SvelteKit, TailwindCSS & shadcn-svelte.

Expand All @@ -13,36 +13,19 @@ Made with SvelteKit, TailwindCSS & shadcn-svelte.
- Dynamically computed badges to indicate whether a package is the Latest, a Major version, a Prerelease, or a Maintenance version
- Hover popups at multiple places across the site
- "What's new" banner to keep users updated about the latest changes to the website
- Authenticate with GitHub to bypass rate limits and get access to more features
- Optional use of a GitHub token to avoid rate limiting in dev mode in a `.env` file (see `.env.example`)
- ...and more!

## How does it work?

The site makes requests to the GitHub API on the client side to get the latest releases for all the packages.
As such, the data is fresh from GitHub every time you refresh the page.
The site makes requests to the GitHub API on the server side to get the latest releases for all the packages.
It smartly caches the data, frequently invalidating it to always be up to date while avoiding hitting GitHub as
much as possible.

Some computations are made to generate the badges, but everything else is a simple cosmetic
wrapper around GitHub releases.
**No data alteration is performed by the site other than for styling and rendering purposes**.

### What is that "Log in with GitHub" button?

With the growing amount of features and supported packages, the site went from requesting the GitHub API
very few times to request it a lot.
As such, the rate limit of the GitHub API was quickly reached, and the site became hard to browse.

To solve this issue, I [initially implemented](https://github.com/WarningImHack3r/svelte-changelog/commit/f28218cbf3d57d509e771520e8c02a610dab4b95) a way to input a GitHub token in the website settings.
This became [the next week](https://github.com/WarningImHack3r/svelte-changelog/pull/27) a full-fledged authentication system with GitHub OAuth, which is what you see today.

**By logging in with GitHub, you can browse the site (almost) without any rate limit issues**.
You will also get access to more features, such as the ability to see the details of a pull request
or issue directly on the site.

The site does not store any data about you. The only thing the login system does is store the token given
by the GitHub authentication process in the browser's local storage to use it for the GitHub API requests.

Logging in is entirely optional but highly recommended. You can remove the token from the website at any time
by clicking the "Log out" button in your avatar dropdown.
For more info, visit the [v2 release blog](https://svelte-changelog.dev/blog/v2).

## Missing a package?

Expand All @@ -57,15 +40,15 @@ If you think I missed a package, you can either open an issue or directly contri

### How to contribute

Fork the repo, edit the `/src/routes/+layout.ts` file, and open a PR.
Fork the repo, edit the `/src/lib/repositories.ts` file, and open a PR.
**If the repo is not in the `sveltejs` GitHub organization, please open an issue instead.**

The code architecture is made to be as flexible as possible, here's how it works:

```typescript
const repos: Record<Tab, { name: string; repos: Repo[] }> = {
svelte: ...,
kit: ...,
export const repos = {
svelte: {/* ... */},
kit: {/* ... */},
others: {
name: "Other",
repos: [
Expand All @@ -76,7 +59,7 @@ const repos: Record<Tab, { name: string; repos: Repo[] }> = {
changesMode: "releases", // Optional line, the way to get the changes; either "releases" or "changelog", defaults to "releases"
repoName: "your-repo", // The name of the repo on GitHub, as it appears in the URL: https://github.com/sveltejs/your-repo
dataFilter: ({ tag_name }) => true, // Optional line, return false to exclude a version from its tag name
versionFromTag: tag => "...", // Return the version from the tag name; must be a valid semver
metadataFromTag: tag => ["package-name", "2.4.3"], // Return the package name and version from the tag name; the version must be a valid semver without any leading "v"
changelogContentsReplacer: contents => contents, // Optional line, replace the contents of the changelog file before parsing it; only used if `changesMode` is "changelog"
}
]
Expand Down
5 changes: 5 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ export default tseslint.config(
}
}
},
{
rules: {
"@typescript-eslint/no-unused-vars": ["error", { ignoreRestSiblings: true }]
}
},
{
ignores: ["build/", ".svelte-kit/", "dist/", "src/lib/components/ui/", "src/lib/utils.[jt]s"]
}
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@
},
"devDependencies": {
"@eslint/js": "^9.22.0",
"@fontsource/dm-serif-display": "^5.2.5",
"@fontsource/pretendard": "^5.2.5",
"@lucide/svelte": "^0.483.0",
"@neoconfetti/svelte": "^2.2.2",
"@octokit/graphql-schema": "^15.26.0",
"@prgm/sveltekit-progress-bar": "^3.0.2",
"@shikijs/langs": "^3.2.1",
"@shikijs/rehype": "^3.2.1",
"@shikijs/themes": "^3.2.1",
Expand All @@ -28,9 +31,10 @@
"@tailwindcss/vite": "^4.0.14",
"@total-typescript/ts-reset": "^0.6.1",
"@types/eslint-config-prettier": "^6.11.3",
"@types/node": "^22.13.13",
"@types/semver": "^7.5.8",
"@upstash/redis": "^1.34.6",
"@vercel/speed-insights": "^1.2.0",
"arctic": "^3.5.0",
"bits-ui": "^1.3.13",
"clsx": "^2.1.1",
"eslint": "^9.22.0",
Expand All @@ -39,6 +43,7 @@
"globals": "^16.0.0",
"mode-watcher": "^0.5.1",
"octokit": "^4.1.2",
"posthog-js": "^1.235.4",
"prettier": "^3.5.3",
"prettier-plugin-svelte": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.11",
Expand All @@ -49,9 +54,7 @@
"svelte-check": "^4.1.5",
"svelte-exmarkdown": "^4.0.3",
"svelte-meta-tags": "^4.2.0",
"svelte-persisted-store": "^0.12.0",
"svelte-sonner": "^0.3.28",
"sveltekit-search-params": "^3.0.0",
"tailwind-merge": "^3.0.2",
"tailwind-variants": "^1.0.0",
"tailwindcss": "^4.0.14",
Expand All @@ -65,6 +68,7 @@
"pnpm": {
"onlyBuiltDependencies": [
"@vercel/speed-insights",
"core-js",
"esbuild"
]
},
Expand Down
Loading
Loading