-
Notifications
You must be signed in to change notification settings - Fork 71
feat: add Bun support to project #1531
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?
Conversation
Signed-off-by: sujitaw <[email protected]>
Signed-off-by: sujitaw <[email protected]>
WalkthroughUpdated Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2025-12-04T07:15:05.237ZApplied to files:
🔇 Additional comments (3)
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: 3
🧹 Nitpick comments (1)
package.json (1)
213-242: Verify monorepo workspace catalog compatibility and completeness.The workspaces and catalog structure is well-designed, but confirm:
- Bun correctly resolves
catalog:entries (pnpm has native support; Bun's behavior may differ)- All 17 cataloged packages are actually used across
apps/*andlibs/*(redundant entries waste cognitive load and maintenance)- The
^version ranges align with your stability/velocity trade-offsConsider verifying this works end-to-end with Bun in CI/CD before merging.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
package.json(4 hunks)
🔇 Additional comments (1)
package.json (1)
12-12: Scripts usingprismaandnestdirectly are compatible with npm, pnpm, and Bun.Both
prisma(^5.1.1) and@nestjs/cli(^11.0.10) are installed as dependencies and will be available innode_modules/.bin. Package managers automatically link these CLIs, so the removal ofnpxis not a breaking change—the scripts work identically with npm, pnpm, and Bun. This is a minor optimization rather than a compatibility issue.If this is a Bun migration, consider updating
packageManageron line 209 from pnpm to Bun for clarity. Also review the@types/bunversion on line 161—using"latest"instead of a pinned version introduces non-deterministic builds.Likely an incorrect or invalid review comment.
| "^@credebl/logger(|/.*)$": "<rootDir>/libs/logger/src/$1" | ||
| } | ||
| }, | ||
| "packageManager": "[email protected]+sha512.1f79bc245a66eb0b07c5d4d83131240774642caaa86ef7d0434ab47c0d16f66b04e21e0c086eb61e62c77efc4d7f7ec071afad3796af64892fae66509173893a", |
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
🏁 Script executed:
# Check the package.json file around line 209 to see the packageManager field
cat -n package.json | sed -n '200,220p'Repository: credebl/platform
Length of output: 1030
🏁 Script executed:
# Look for any Bun-related changes or configuration in the repository
fd -t f "bun\|tsconfig\|package.json" | head -20
rg -i "bun" --type json package.jsonRepository: credebl/platform
Length of output: 86
🏁 Script executed:
# Check git log or status for changes to packageManager field
git diff HEAD package.json | grep -A 5 -B 5 "packageManager" || echo "No packageManager changes in diff"
git log --oneline -n 20Repository: credebl/platform
Length of output: 120
🏁 Script executed:
# Check the scripts section in package.json to understand which package manager is being used
cat -n package.json | sed -n '1,60p'Repository: credebl/platform
Length of output: 2955
🏁 Script executed:
# Look for any CI/CD configuration that might indicate package manager usage
fd -t f "\\.github\|Dockerfile\|\.circleci\|\.gitlab-ci" | head -20Repository: credebl/platform
Length of output: 42
🏁 Script executed:
# Check what Bun-related changes were made in this PR
rg -i "bun" package.json -A 2 -B 2Repository: credebl/platform
Length of output: 170
Clarify the package manager policy—packageManager field still specifies pnpm despite Bun additions.
The PR adds @types/bun as a devDependency, but line 209 still declares [email protected] as the package manager. The scripts in package.json remain pnpm/npm-compatible with no Bun-specific tooling.
Clarify whether:
- Bun is being added as a gradual migration (pnpm remains the declared manager for now)
- Bun is intended as an alternative/optional tool alongside pnpm
- This is preparatory work, with packageManager to be updated in a follow-up PR
If the intent is to transition to Bun as the primary manager, update line 209 accordingly.
🤖 Prompt for AI Agents
In package.json around line 209, the packageManager field still pins [email protected]
even though @types/bun was added; clarify the intended policy by either (A)
leaving packageManager as pnpm and adding a short comment in the PR description
that Bun is being added only for types/optional use or gradual migration, (B)
explicitly state Bun is an alternative/optional tool in the PR, or (C) if Bun
should become the primary manager, update the packageManager value to
bun@<version> (or bun@latest) in this file and adjust any lockfiles/scripts
accordingly; implement the chosen option and update the PR description to make
the intent explicit.
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.
@coderabbitai i would like to keep both and use both
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.
@sujitaw, thank you for the clarification! Using both package managers is absolutely feasible. Since the packageManager field specifies pnpm, it will remain the default manager enforced by tools like Corepack, while Bun can be used as an alternative runtime and package manager.
To ensure smooth collaboration across your team, I recommend:
-
Document the usage policy in your README or CONTRIBUTING guide:
- When to use pnpm (e.g., for CI/CD, standard development workflows)
- When to use Bun (e.g., for faster local development, specific scripts)
-
Consider adding Bun-specific scripts if needed, such as:
"start:bun": "bun run start", "dev:bun": "bun --watch ..."
-
Maintain both lock files if your team uses both managers to avoid conflicts
This dual-manager approach gives your team flexibility while maintaining pnpm as the standard.
✏️ Learnings added
Learnt from: sujitaw
Repo: credebl/platform PR: 1531
File: package.json:209-209
Timestamp: 2025-12-04T07:15:05.237Z
Learning: In the credebl/platform repository, the team prefers to support both pnpm and Bun package managers simultaneously, with pnpm as the primary package manager (specified in the packageManager field) and Bun as an alternative option.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
| "packageManager": "[email protected]+sha512.1f79bc245a66eb0b07c5d4d83131240774642caaa86ef7d0434ab47c0d16f66b04e21e0c086eb61e62c77efc4d7f7ec071afad3796af64892fae66509173893a", | ||
| "engines": { | ||
| "node": ">=18" | ||
| "node": ">=24" |
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
🏁 Script executed:
# First, confirm the current package.json Node requirement
cat -n package.json | grep -A 2 -B 2 '"node"'Repository: credebl/platform
Length of output: 478
🏁 Script executed:
# Check git history for this specific change
git log -p --all -- package.json | grep -A 5 -B 5 '"node"' | head -50Repository: credebl/platform
Length of output: 42
🏁 Script executed:
# Search for Node 24-specific APIs or features in the codebase
rg "node.*24|Node.*24|version.*24" -iRepository: credebl/platform
Length of output: 33655
🏁 Script executed:
# Check CHANGELOG or migration guides
fd -e md -e txt | xargs grep -l "node\|Node\|migration" 2>/dev/null | head -10Repository: credebl/platform
Length of output: 92
🏁 Script executed:
# Look for comments about Node version requirements
rg "node.*version|requires.*node|minimum.*node" -i -A 2Repository: credebl/platform
Length of output: 50372
🏁 Script executed:
# Check CHANGELOG for Node version context
find . -iname "CHANGELOG*" -o -iname "HISTORY*" | head -5Repository: credebl/platform
Length of output: 42
🏁 Script executed:
# Search CHANGELOG for Node/version references
fd -e md -e MD | xargs grep -i "node.*24\|v24\|version.*require" 2>/dev/null | head -20Repository: credebl/platform
Length of output: 42
🏁 Script executed:
# Check if there's documentation about the upgrade
fd -i -e md README | xargs grep -i "node\|upgrade\|migration" 2>/dev/null | head -15Repository: credebl/platform
Length of output: 217
🏁 Script executed:
# Look for any CI/deployment configs that might reference Node 24
fd -name ".github" -o -name ".gitlab-ci*" -o -name "Jenkinsfile" -o -name ".travis.yml" | xargs grep -l "node\|24" 2>/dev/nullRepository: credebl/platform
Length of output: 292
🏁 Script executed:
# Try the CI config search with corrected syntax
find . -path "*/.github" -o -path "*/.gitlab-ci.yml" -o -path "*/Jenkinsfile" -o -path "*/.travis.yml" 2>/dev/null | xargs grep -h "node\|24" 2>/dev/null | head -20Repository: credebl/platform
Length of output: 42
🏁 Script executed:
# Search for any docs about dependencies or requirements
fd -type f -name "*.md" | xargs grep -l "dependency\|require" 2>/dev/null | head -10Repository: credebl/platform
Length of output: 230
Document the rationale for Node >=24 requirement in CHANGELOG or migration guide.
Bumping from Node >=18 to >=24 is a major breaking change (+6 major versions) with no documented justification. No Node 24-specific features or dependencies are evident in the codebase. Add a CHANGELOG entry explaining the requirement and provide migration guidance for users currently on Node 18–23.
🤖 Prompt for AI Agents
In package.json at line 211, the Node engine requirement was bumped to ">=24"
without explanation; add a CHANGELOG entry (or a dedicated migration guide)
documenting the rationale and migration steps: state why Node 24 is required
(language/runtime features, V8 behavior, dependency minimums, security fixes, or
performance improvements), list any package or native dependency that mandates
v24 and the exact features used, provide step-by-step migration guidance for
users on Node 18–23 (how to upgrade Node, test matrix, recommended
pins/workarounds, and CI changes), include expected timelines or deprecation
notices and sample commands to verify the app on Node 24, and reference tests or
CI badges proving compatibility; commit the new CHANGELOG/migration markdown and
link it from README or upgrade notes.
Signed-off-by: sujitaw <[email protected]>
|



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