-
Notifications
You must be signed in to change notification settings - Fork 205
Bun #2635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Bun #2635
Conversation
Console (appwrite/console)Project ID: Sites (1)
Tip Schedule functions to run as often as every minute with cron expressions |
WalkthroughThis 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)
✅ Passed checks (1 passed)
✨ Finishing touches
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. Comment |
There was a problem hiding this 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 featuressvelte/prefer-writable-derived: Suggests using writable derived storesWhile 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: latestmay 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.42Replace
1.1.42with the specific Bun version you've tested with. Check your package.jsonpackageManagerfield 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
COPYshould be used instead ofADDfor local files and folders.ADDhas additional features (tar extraction, URL fetching) that aren't needed here, makingCOPYmore 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.lockConsider updating other
ADDcommands (lines 10-15) toCOPYas well for consistency, unless tar extraction is specifically needed.
1-1: Consider pinning the Bun Alpine image version.Using
oven/bun:alpinewithout 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 buildReplace
1.1.42with the specific Bun version you've tested with. Check your local Bun version or package.jsonpackageManagerfield for the appropriate value.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (12)
.github/workflows/copilot-setup-steps.yml.github/workflows/e2e.yml.github/workflows/tests.yml.gitpod.yml.prettierignoreCONTRIBUTING.mdDockerfilebuild.jseslint.config.jspackage.jsonplaywright.config.tssrc/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.tsbuild.jseslint.config.jsplaywright.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.tsplaywright.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.tsbuild.jspackage.jsoneslint.config.jsplaywright.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.ymlCONTRIBUTING.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.lockto 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 toconst blob = new Blob([tar], { type: 'application/gzip' })iftaris already a Uint8Array or Buffer.
| "vite": "npm:rolldown-vite@latest" | ||
| }, | ||
| "packageManager": "pnpm@10.20.0" | ||
| "packageManager": "bun@1.3.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 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.

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
Tests
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.