Skip to content

Conversation

@ItzNotABug
Copy link
Member

@ItzNotABug ItzNotABug commented Nov 23, 2025

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

Summary by CodeRabbit

  • Chores

    • Migrated project from pnpm to Bun package manager across development, CI/CD workflows, and deployment configurations.
    • Updated Docker build process to use Bun.
  • Tests

    • Updated automated testing workflows to execute with Bun.
  • Documentation

    • Updated contributing guidelines with Bun-based development commands.

✏️ Tip: You can customize this high-level summary in your review settings.

@ItzNotABug ItzNotABug self-assigned this Nov 23, 2025
@appwrite
Copy link

appwrite bot commented Nov 23, 2025

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Failed Failed View Logs Preview URL QR Code

Tip

Schedule functions to run as often as every minute with cron expressions

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 23, 2025

Walkthrough

This PR migrates the project's package manager and build tooling from Node.js/npm/pnpm to Bun. Changes include updating CI/CD workflows, configuration files, documentation, and development setup files to use Bun equivalents for dependency installation and script execution. Additional changes include minor code refactoring in build.js, updates to eslint configuration rules, restructuring of package.json scripts and metadata, and a logic adjustment in src/lib/helpers/files.ts for Blob construction.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Bun' is vague and generic, providing no meaningful information about the specific changes in the changeset. Use a more descriptive title that clearly conveys the main change, such as 'Migrate from pnpm to Bun package manager' or 'Switch package manager to Bun'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ItzNotABug ItzNotABug changed the base branch from improve-perf-size to main December 31, 2025 13:14
@ItzNotABug ItzNotABug marked this pull request as ready for review December 31, 2025 13:15
@ItzNotABug ItzNotABug changed the title Bun 🚧 Bun Dec 31, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/e2e.yml (1)

28-28: Update cache key to reference Bun lockfile.

The cache key still references pnpm-lock.yaml, but the project has migrated to Bun. This should reference Bun's lockfile instead.

🔎 Proposed fix
-                  key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }}
+                  key: ${{ runner.os }}-playwright-${{ hashFiles('**/bun.lockb') }}
🧹 Nitpick comments (4)
eslint.config.js (1)

37-39: Consider addressing these Svelte reactivity rules in a future refactor.

Two additional Svelte-specific rules have been disabled:

  • svelte/prefer-svelte-reactivity: Recommends using Svelte's reactivity features
  • svelte/prefer-writable-derived: Suggests using writable derived stores

While disabling these rules is acceptable for now, consider adding them to the technical debt backlog for future improvement as they promote better Svelte patterns and maintainability.

.github/workflows/copilot-setup-steps.yml (1)

21-27: Consider pinning the Bun version for CI stability.

The workflow correctly migrates to Bun setup, but using bun-version: latest may introduce non-deterministic behavior in CI if Bun releases breaking changes.

🔎 Suggested fix to pin Bun version
 - name: Setup Bun
   uses: oven-sh/setup-bun@v2
   with:
-      bun-version: latest
+      bun-version: 1.1.42

Replace 1.1.42 with the specific Bun version you've tested with. Check your package.json packageManager field or local Bun version for the appropriate value.

Dockerfile (2)

5-6: Use COPY instead of ADD for local files.

The Hadolint static analysis correctly identifies that COPY should be used instead of ADD for local files and folders. ADD has additional features (tar extraction, URL fetching) that aren't needed here, making COPY more explicit and safer.

🔎 Proposed fix
-ADD ./package.json /app/package.json
-ADD ./bun.lock /app/bun.lock
+COPY ./package.json /app/package.json
+COPY ./bun.lock /app/bun.lock

Consider updating other ADD commands (lines 10-15) to COPY as well for consistency, unless tar extraction is specifically needed.


1-1: Consider pinning the Bun Alpine image version.

Using oven/bun:alpine without a specific version tag may lead to non-deterministic builds if the image is updated with breaking changes.

🔎 Suggested fix to pin image version
-FROM --platform=$BUILDPLATFORM oven/bun:alpine AS build
+FROM --platform=$BUILDPLATFORM oven/bun:1.1.42-alpine AS build

Replace 1.1.42 with the specific Bun version you've tested with. Check your local Bun version or package.json packageManager field for the appropriate value.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between caa4d79 and 0a4ca86.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • .github/workflows/copilot-setup-steps.yml
  • .github/workflows/e2e.yml
  • .github/workflows/tests.yml
  • .gitpod.yml
  • .prettierignore
  • CONTRIBUTING.md
  • Dockerfile
  • build.js
  • eslint.config.js
  • package.json
  • playwright.config.ts
  • src/lib/helpers/files.ts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js,jsx,svelte}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx,svelte}: Import reusable modules from the src/lib directory using the $lib alias
Use minimal comments in code; reserve comments for TODOs or complex logic explanations
Use $lib, $routes, and $themes aliases instead of relative paths for module imports

Files:

  • src/lib/helpers/files.ts
  • build.js
  • eslint.config.js
  • playwright.config.ts
src/lib/helpers/**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Implement pure functions in src/lib/helpers/ directory and use camelCase for helper function names

Files:

  • src/lib/helpers/files.ts
**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.ts: Define types inline or in .d.ts files, avoid creating separate .types.ts files
Use TypeScript in non-strict mode; any type is tolerated in this project

Files:

  • src/lib/helpers/files.ts
  • playwright.config.ts
**/*.{ts,tsx,js,jsx,svelte,json}

📄 CodeRabbit inference engine (AGENTS.md)

Use 4 spaces for indentation, single quotes, 100 character line width, and no trailing commas per Prettier configuration

Files:

  • src/lib/helpers/files.ts
  • build.js
  • package.json
  • eslint.config.js
  • playwright.config.ts
🧠 Learnings (9)
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Applies to src/lib/helpers/**/*.ts : Implement pure functions in src/lib/helpers/ directory and use camelCase for helper function names

Applied to files:

  • src/lib/helpers/files.ts
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Run the mandatory pre-completion checklist before finishing work: pnpm run format → pnpm run check → pnpm run lint → pnpm run test → pnpm run build, ensuring all commands pass with zero errors

Applied to files:

  • .github/workflows/copilot-setup-steps.yml
  • CONTRIBUTING.md
  • .github/workflows/tests.yml
  • .gitpod.yml
  • .github/workflows/e2e.yml
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Configure environment variables by copying .env.example to .env and setting PUBLIC_APPWRITE_ENDPOINT and PUBLIC_CONSOLE_MODE

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Run pnpm run format before pnpm run lint to auto-fix formatting conflicts

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Run pnpm commands with --frozen-lockfile flag to ensure consistent dependencies

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Applies to **/*.svelte : Use Svelte 5 + SvelteKit 2 syntax with TypeScript for component development

Applied to files:

  • eslint.config.js
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Applies to **/*.{ts,tsx,js,jsx,svelte,json} : Use 4 spaces for indentation, single quotes, 100 character line width, and no trailing commas per Prettier configuration

Applied to files:

  • eslint.config.js
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Ensure Playwright tests have access to preview server on port 4173; wait 120s for startup before running E2E tests

Applied to files:

  • playwright.config.ts
  • .github/workflows/e2e.yml
📚 Learning: 2025-11-25T03:15:27.539Z
Learnt from: CR
Repo: appwrite/console PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T03:15:27.539Z
Learning: Applies to e2e/journeys/*.spec.ts : Write Playwright E2E tests in e2e/journeys/*.spec.ts files with 120s timeout and 3x retry configuration

Applied to files:

  • .github/workflows/e2e.yml
🪛 Hadolint (2.14.0)
Dockerfile

[error] 5-5: Use COPY instead of ADD for files and folders

(DL3020)


[error] 6-6: Use COPY instead of ADD for files and folders

(DL3020)

🪛 markdownlint-cli2 (0.18.1)
CONTRIBUTING.md

179-179: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


181-181: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


183-183: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: e2e
🔇 Additional comments (5)
build.js (1)

1-1: LGTM! Import consolidation improves code organization.

Moving the kleur import to the top and removing the duplicate import later in the file follows best practices for module organization.

.prettierignore (1)

1-5: LGTM! Properly excludes Bun lock file from formatting.

The addition of bun.lock to the ignore list is consistent with the existing treatment of other package manager lock files.

playwright.config.ts (1)

22-22: LGTM! Playwright webServer command updated for Bun.

The command has been correctly updated to use Bun equivalents while preserving the existing timeout and port configuration that ensures E2E tests have adequate startup time.

.gitpod.yml (1)

8-9: LGTM! Gitpod configuration updated for Bun.

The init and command steps have been correctly updated to use Bun for dependency installation, building, and running the development server.

src/lib/helpers/files.ts (1)

68-71: The Uint8Array wrapping is unnecessary; nanotar v0.1.1 is fully compatible with Bun.

nanotar v0.1.1 explicitly advertises support for "any JavaScript runtime (Node.js, Bun, Deno, Browsers, Edge Workers)" and works without modification. Both Bun and Node.js handle Uint8Array and Blob identically—wrapping the tar buffer in new Uint8Array(tar) is redundant since Blob accepts Buffer or Uint8Array directly with zero-copy or negligible overhead. The code works as-is, but you can simplify lines 68-70 to const blob = new Blob([tar], { type: 'application/gzip' }) if tar is already a Uint8Array or Buffer.

"vite": "npm:rolldown-vite@latest"
},
"packageManager": "pnpm@10.20.0"
"packageManager": "bun@1.3.3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

Bun latest stable version December 2025

💡 Result:

The latest stable Bun release (as of December 31, 2025) is Bun v1.3.4. [1][2]

Sources:

  • GitHub releases (oven-sh/bun) — Bun v1.3.4. [1]
  • Bun blog — Bun 1.3 release notes. [2]

🌐 Web query:

Bun version history 1.3.3 release

💡 Result:

Summary of Bun v1.3.3 (release)

  • Released: November 21, 2025. [1]
  • Fixes: ~95 issues. [1]
  • Notable changes:
    • Implements Web CompressionStream and DecompressionStream (gzip, deflate, brotli, zstd). [1]
    • New build flags to disable loading .env and bunfig.toml for compiled executables: --no-compile-autoload-dotenv, --no-compile-autoload-bunfig. [1]
    • New runtime flag --no-env-file and bunfig.toml env = false to disable automatic .env loading. [1]
    • bun:sqlite upgraded to SQLite 3.51.0. [1]
    • Internal: built with Zig 0.15.2 (smaller binary, improved build times). [1]

Install/upgrade: bun upgrade (also install via curl/npm/powershell/brew/scoop/docker). [1]

Source: Bun blog release notes for v1.3.3. [1]


Update Bun to latest stable version 1.3.4.

The specified version bun@1.3.3 exists and is stable (released November 21, 2025), but Bun v1.3.4 is now the latest stable release. Update to bun@1.3.4 for the latest fixes and features.

🤖 Prompt for AI Agents
In package.json around line 95, the packageManager field pins Bun to
"bun@1.3.3"; update this value to the latest stable "bun@1.3.4" by replacing the
version string so the project uses Bun v1.3.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants