[PR #9] [MERGED] Migrate to Bun #98

Closed
opened 2026-02-27 15:55:08 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/RayLabsHQ/gitea-mirror/pull/9
Author: @arunavo4
Created: 5/20/2025
Status: Merged
Merged: 5/21/2025
Merged by: @arunavo4

Base: mainHead: bun


📝 Commits (10+)

  • 94aff30 feat: migrate to bun
  • d5b0102 chore: switch to bun package manager
  • e95f1d9 Merge pull request #5 from arunavo4/ray/migrate-project-to-bun-with-redis-and-sqlite
  • f9c77bb Merge branch 'bun' into l9s9sl-ray/migrate-project-to-bun-with-redis-and-sqlite
  • b09cabd Merge pull request #6 from arunavo4/l9s9sl-ray/migrate-project-to-bun-with-redis-and-sqlite
  • f6b5df4 chore: switch docker build to bun
  • 98973ad Merge pull request #8 from arunavo4/ray/test-code-and-migrate-ci-to-bun
  • 4a01a35 Refactor code structure for improved readability and maintainability
  • cad72da Update Docker and workflow configurations for bun.lock handling
  • 145bee8 chore: update dependencies to latest versions for improved stability and performance

📊 Changes

41 files changed (+3168 additions, -8433 deletions)

View changed files

📝 .dockerignore (+1 -2)
📝 .env.example (+1 -0)
📝 .github/workflows/README.md (+1 -2)
📝 .github/workflows/astro-build-test.yml (+17 -16)
📝 .github/workflows/docker-scan.yml (+2 -2)
📝 Dockerfile (+20 -59)
📝 README.md (+74 -81)
📝 astro.config.mjs (+6 -1)
bun.lock (+1794 -0)
crontab (+4 -0)
📝 docker-compose.dev.yml (+1 -14)
docker-compose.homelab.yml (+38 -0)
📝 docker-compose.yml (+0 -13)
📝 docker-entrypoint.sh (+23 -9)
📝 package.json (+43 -43)
pnpm-lock.yaml (+0 -7713)
📝 scripts/README-docker.md (+1 -1)
📝 scripts/README.md (+12 -12)
scripts/check-events.ts (+38 -0)
scripts/cleanup-events.ts (+43 -0)

...and 21 more files

📄 Description

This pull request transitions the project from using pnpm to Bun as the package manager and runtime, simplifying dependency management and improving performance. The changes span across configuration files, Docker setup, workflows, and documentation to reflect this migration.

Migration to Bun:

  • Updated .dockerignore to include bun.lock and remove references to pnpm-specific files. ([[1]](diffhunk://#diff-2f754321d62f08ba8392b9b168b83e24ea2852bb5d815d63e767f6c3d23c6ac5R8-L11), [[2]](diffhunk://#diff-2f754321d62f08ba8392b9b168b83e24ea2852bb5d815d63e767f6c3d23c6ac5L65))
  • Replaced pnpm with Bun in the Dockerfile, updating dependency installation, build commands, and runtime execution. ([[1]](diffhunk://#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557L3-L80), [[2]](diffhunk://#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557L89-R53))
  • Modified GitHub Actions workflows to use Bun for dependency installation and caching (oven-sh/setup-bun@v1). ([.github/workflows/astro-build-test.ymlL24-R37](diffhunk://#diff-914c22693d7075c84bef195647ca49e319da25095b64d2e7967a073d07c59e48L24-R37))
  • Updated package.json to specify Bun as the engine and replace all pnpm commands with Bun equivalents. ([[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L6-L30), [[2]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L57), [[3]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L76-R82))

Documentation Updates:

  • Revised README.md and workflow documentation to reflect the use of Bun for setup, development, and production commands. ([[1]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L21-R21), [[2]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L66-R68), [[3]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L95-R95), [[4]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L113-R113), [[5]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L209-R242), [[6]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L265-R268), [[7]](diffhunk://#diff-b85456f3f00f8991be16cbb1d023e5a9a5e5849bfc121876fa1add5882b5db05L46-R46), [[8]](diffhunk://#diff-25b96aa16f8b9f68c692d0db061713707e9cfc67b296e0ea30908928fb3ffcd6L22-R53), [[9]](diffhunk://#diff-1fb22d9043c42121e1ada5142faad0fa23f652f3124db258d1df5eff78d0aa09L108-R113))

Code and Runtime Adjustments:

  • Updated docker-entrypoint.sh to use Bun for running setup and database initialization scripts. ([[1]](diffhunk://#diff-79738685a656fe6b25061bb14181442210b599f746faeaba408a2401de45038aL8-R20), [[2]](diffhunk://#diff-79738685a656fe6b25061bb14181442210b599f746faeaba408a2401de45038aL122-R124), [[3]](diffhunk://#diff-79738685a656fe6b25061bb14181442210b599f746faeaba408a2401de45038aL133-R133))
  • Replaced ioredis with Bun's native RedisClient for Redis integration in src/lib/redis.ts. ([README.mdL470-R482](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L470-R482))
  • Adjusted astro.config.mjs to mark bun as an external dependency in Rollup options. ([astro.config.mjsL14-R19](diffhunk://#diff-e0f0c5adbe0b9ca5d0b57caf5cea33a8d88899fd02a43df1e9862b185f8a1e5fL14-R19))

These changes collectively enhance the project's performance, simplify dependency management, and align the tooling with Bun's capabilities.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/RayLabsHQ/gitea-mirror/pull/9 **Author:** [@arunavo4](https://github.com/arunavo4) **Created:** 5/20/2025 **Status:** ✅ Merged **Merged:** 5/21/2025 **Merged by:** [@arunavo4](https://github.com/arunavo4) **Base:** `main` ← **Head:** `bun` --- ### 📝 Commits (10+) - [`94aff30`](https://github.com/RayLabsHQ/gitea-mirror/commit/94aff30ddac4f789e243370ff09ae2217be3168a) feat: migrate to bun - [`d5b0102`](https://github.com/RayLabsHQ/gitea-mirror/commit/d5b0102080bfbeb438c22d966366ab98e842dfe5) chore: switch to bun package manager - [`e95f1d9`](https://github.com/RayLabsHQ/gitea-mirror/commit/e95f1d99b58891beb7f2ee18fd379d151388a58e) Merge pull request #5 from arunavo4/ray/migrate-project-to-bun-with-redis-and-sqlite - [`f9c77bb`](https://github.com/RayLabsHQ/gitea-mirror/commit/f9c77bbee0c795b5ea02fec3ca7f4caeea18d4bd) Merge branch 'bun' into l9s9sl-ray/migrate-project-to-bun-with-redis-and-sqlite - [`b09cabd`](https://github.com/RayLabsHQ/gitea-mirror/commit/b09cabd1540f3160f11c4f3a47b0438410dac371) Merge pull request #6 from arunavo4/l9s9sl-ray/migrate-project-to-bun-with-redis-and-sqlite - [`f6b5df4`](https://github.com/RayLabsHQ/gitea-mirror/commit/f6b5df472a57daa73d73f3eaf031692466d83f2d) chore: switch docker build to bun - [`98973ad`](https://github.com/RayLabsHQ/gitea-mirror/commit/98973adfe5065ba97c430e304168d94e7a49ff03) Merge pull request #8 from arunavo4/ray/test-code-and-migrate-ci-to-bun - [`4a01a35`](https://github.com/RayLabsHQ/gitea-mirror/commit/4a01a351f03dc16ffae5578f8b698470206df9d6) Refactor code structure for improved readability and maintainability - [`cad72da`](https://github.com/RayLabsHQ/gitea-mirror/commit/cad72da016e342462b835fb0f673757e3b1f7c44) Update Docker and workflow configurations for bun.lock handling - [`145bee8`](https://github.com/RayLabsHQ/gitea-mirror/commit/145bee8d962212c9c81434e12e1497ee1e8b92ba) chore: update dependencies to latest versions for improved stability and performance ### 📊 Changes **41 files changed** (+3168 additions, -8433 deletions) <details> <summary>View changed files</summary> 📝 `.dockerignore` (+1 -2) 📝 `.env.example` (+1 -0) 📝 `.github/workflows/README.md` (+1 -2) 📝 `.github/workflows/astro-build-test.yml` (+17 -16) 📝 `.github/workflows/docker-scan.yml` (+2 -2) 📝 `Dockerfile` (+20 -59) 📝 `README.md` (+74 -81) 📝 `astro.config.mjs` (+6 -1) ➕ `bun.lock` (+1794 -0) ➕ `crontab` (+4 -0) 📝 `docker-compose.dev.yml` (+1 -14) ➕ `docker-compose.homelab.yml` (+38 -0) 📝 `docker-compose.yml` (+0 -13) 📝 `docker-entrypoint.sh` (+23 -9) 📝 `package.json` (+43 -43) ➖ `pnpm-lock.yaml` (+0 -7713) 📝 `scripts/README-docker.md` (+1 -1) 📝 `scripts/README.md` (+12 -12) ➕ `scripts/check-events.ts` (+38 -0) ➕ `scripts/cleanup-events.ts` (+43 -0) _...and 21 more files_ </details> ### 📄 Description This pull request transitions the project from using `pnpm` to `Bun` as the package manager and runtime, simplifying dependency management and improving performance. The changes span across configuration files, Docker setup, workflows, and documentation to reflect this migration. ### Migration to Bun: * Updated `.dockerignore` to include `bun.lock` and remove references to `pnpm`-specific files. (`[[1]](diffhunk://#diff-2f754321d62f08ba8392b9b168b83e24ea2852bb5d815d63e767f6c3d23c6ac5R8-L11)`, `[[2]](diffhunk://#diff-2f754321d62f08ba8392b9b168b83e24ea2852bb5d815d63e767f6c3d23c6ac5L65)`) * Replaced `pnpm` with `Bun` in the `Dockerfile`, updating dependency installation, build commands, and runtime execution. (`[[1]](diffhunk://#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557L3-L80)`, `[[2]](diffhunk://#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557L89-R53)`) * Modified GitHub Actions workflows to use Bun for dependency installation and caching (`oven-sh/setup-bun@v1`). (`[.github/workflows/astro-build-test.ymlL24-R37](diffhunk://#diff-914c22693d7075c84bef195647ca49e319da25095b64d2e7967a073d07c59e48L24-R37)`) * Updated `package.json` to specify Bun as the engine and replace all `pnpm` commands with `Bun` equivalents. (`[[1]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L6-L30)`, `[[2]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L57)`, `[[3]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L76-R82)`) ### Documentation Updates: * Revised `README.md` and workflow documentation to reflect the use of Bun for setup, development, and production commands. (`[[1]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L21-R21)`, `[[2]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L66-R68)`, `[[3]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L95-R95)`, `[[4]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L113-R113)`, `[[5]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L209-R242)`, `[[6]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L265-R268)`, `[[7]](diffhunk://#diff-b85456f3f00f8991be16cbb1d023e5a9a5e5849bfc121876fa1add5882b5db05L46-R46)`, `[[8]](diffhunk://#diff-25b96aa16f8b9f68c692d0db061713707e9cfc67b296e0ea30908928fb3ffcd6L22-R53)`, `[[9]](diffhunk://#diff-1fb22d9043c42121e1ada5142faad0fa23f652f3124db258d1df5eff78d0aa09L108-R113)`) ### Code and Runtime Adjustments: * Updated `docker-entrypoint.sh` to use Bun for running setup and database initialization scripts. (`[[1]](diffhunk://#diff-79738685a656fe6b25061bb14181442210b599f746faeaba408a2401de45038aL8-R20)`, `[[2]](diffhunk://#diff-79738685a656fe6b25061bb14181442210b599f746faeaba408a2401de45038aL122-R124)`, `[[3]](diffhunk://#diff-79738685a656fe6b25061bb14181442210b599f746faeaba408a2401de45038aL133-R133)`) * Replaced `ioredis` with Bun's native `RedisClient` for Redis integration in `src/lib/redis.ts`. (`[README.mdL470-R482](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L470-R482)`) * Adjusted `astro.config.mjs` to mark `bun` as an external dependency in Rollup options. (`[astro.config.mjsL14-R19](diffhunk://#diff-e0f0c5adbe0b9ca5d0b57caf5cea33a8d88899fd02a43df1e9862b185f8a1e5fL14-R19)`) These changes collectively enhance the project's performance, simplify dependency management, and align the tooling with Bun's capabilities. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 15:55:08 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gitea-mirror#98
No description provided.