Skip to content

merge dev to main (v2.15.0) #2130

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

Merged
merged 2 commits into from
May 21, 2025
Merged

merge dev to main (v2.15.0) #2130

merged 2 commits into from
May 21, 2025

Conversation

ymc9
Copy link
Member

@ymc9 ymc9 commented May 21, 2025

No description provided.

ymc9 and others added 2 commits May 20, 2025 17:07
- explicitly pass "types": [] to tsconfig to avoid bun compilation errors
- detect bun as package manager

fixes Error compiling generated code #2124
Copy link
Contributor

coderabbitai bot commented May 21, 2025

📝 Walkthrough

Walkthrough

The changes extend package manager detection and installation logic to support Bun by recognizing its lock file and adding Bun-specific install commands. Additionally, TypeScript project creation is updated to set new compiler options, specifically skipping default library checks and clearing default types, by modifying the configuration passed to the project constructor.

Changes

File(s) Change Summary
packages/schema/src/utils/pkg-utils.ts Added Bun support by recognizing 'bun.lock' in package manager detection and updating install logic to handle Bun-specific commands and flags.
packages/sdk/src/code-gen.ts Updated the TypeScript project creation to include skipDefaultLibCheck: true and types: [] in the compiler options.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant pkg-utils
    participant Shell

    User->>pkg-utils: getPackageManager()
    pkg-utils->>pkg-utils: Check for lock files (including bun.lock)
    pkg-utils-->>User: Return detected package manager ('npm', 'yarn', 'pnpm', or 'bun')

    User->>pkg-utils: installPackage(pkg, options)
    pkg-utils->>Shell: Run install command (npm/yarn/pnpm/bun) with appropriate flags
    Shell-->>pkg-utils: Installation result
    pkg-utils-->>User: Return result
Loading
sequenceDiagram
    participant User
    participant code-gen

    User->>code-gen: createProject()
    code-gen->>code-gen: Set compilerOptions (including skipDefaultLibCheck, types)
    code-gen-->>User: Return configured Project
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 53bf340 and d27094f.

📒 Files selected for processing (2)
  • packages/schema/src/utils/pkg-utils.ts (3 hunks)
  • packages/sdk/src/code-gen.ts (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/schema/src/utils/pkg-utils.ts (1)
packages/schema/src/utils/exec-utils.ts (1)
  • execSync (6-10)
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: dependency-review
  • GitHub Check: build-test (20.x)
  • GitHub Check: OSSAR-Scan
  • GitHub Check: build-test (20.x)
  • GitHub Check: build-test (20.x)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (4)
packages/sdk/src/code-gen.ts (1)

18-19: TypeScript compiler options refinement looks good.

The added compiler options:

  • skipDefaultLibCheck: true - skips checking of default library declaration files
  • types: [] - prevents automatic inclusion of @types packages

These changes make the TypeScript configuration more explicit about which types are included, potentially reducing type conflicts and improving compilation performance.

packages/schema/src/utils/pkg-utils.ts (3)

70-70: Good addition of 'bun.lock' file detection.

The order of lock files in the array gives a sensible priority: yarn > bun > pnpm > npm when multiple lock files exist.


80-80: Correctly added 'bun' to package manager detection.

This properly extends the match statement to handle Bun's lock file format.


103-110: Good implementation of Bun package installation logic.

The implementation follows the same pattern as other package managers and correctly handles the command-line flags.

✨ 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ymc9 ymc9 merged commit e835599 into main May 21, 2025
16 checks passed
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.

1 participant