-
Notifications
You must be signed in to change notification settings - Fork 0
chore: update dependencies #174
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
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughIntroduces a workflow step to derive the Bun version from package.json and uses it in CI workflows. Updates the root Bun engine version and several devDependencies. Updates frontend dependencies (happy-dom, vue-tsc). No code logic changes; CI control flow now dynamically reads Bun version. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as GitHub Actions Runner
participant WF as Workflow Job
participant PKG as package.json
participant Setup as Setup Bun Action
Dev->>WF: Start job
Note over WF: Determine Bun version (new)
WF->>PKG: Read bun-types field
PKG-->>WF: bun version (e.g., 1.2.23)
WF->>WF: Set output BUN_VERSION
WF->>Setup: bun-version = ${{ steps.bun-version.outputs.BUN_VERSION }}
Setup-->>WF: Bun installed (resolved version)
WF-->>Dev: Continue remaining steps
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests
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. 🧪 Early access (Sonnet 4.5): enabledWe are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
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: 2
📜 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 (4)
.github/workflows/test.yml(1 hunks).github/workflows/typecheck.yml(1 hunks)frontend/package.json(2 hunks)package.json(2 hunks)
🔇 Additional comments (6)
frontend/package.json (2)
63-63: LGTM: Minor version update.The vue-tsc update from ^3.0.8 to ^3.1.0 is a minor version bump and should be backward compatible.
54-54: Ensure happy-dom v19 breaking changes are addressed
v19.0.0 removes CommonJS support, upgrades @happy-dom/jest-environment to Jest v30, and makes Jest packages peerDependencies. Confirm your tests and test setup:
- Import happy-dom via ESM (no
require)- Upgrade Jest to v30 in package.json
- Install matching Jest dependencies to satisfy peerDeps
.github/workflows/typecheck.yml (1)
22-22: LGTM: Dynamic Bun version usage.Using the dynamically determined Bun version improves maintainability by centralizing version management in package.json.
package.json (2)
29-34: LGTM: Consistent Bun and dependency updates.The catalog entries are updated consistently:
- Bun-related packages updated to 1.2.23
- TypeScript ESLint packages updated to ^8.45.0
- Elysia updated to 1.4.9
All changes align with the engine requirement on line 53.
53-53: LGTM: Engine version matches catalog.The Bun engine version 1.2.23 matches the bun-types catalog entry on line 33, ensuring consistency across the workspace.
.github/workflows/test.yml (1)
22-22: LGTM: Dynamic Bun version usage.Using the dynamically determined Bun version improves maintainability by centralizing version management in package.json.
| - name: Determine Bun version | ||
| id: bun-version | ||
| run: echo "BUN_VERSION=$(cat package.json | grep 'bun-types' | head -1 | awk -F'"' '{print $4}')" >> $GITHUB_OUTPUT |
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.
🛠️ Refactor suggestion | 🟠 Major
Replace fragile grep/awk parsing with jq.
This step has the same brittle shell parsing issue as in typecheck.yml. Use jq for reliable JSON parsing, and consider extracting this logic to a reusable composite action to avoid duplication.
Apply this diff:
- - name: Determine Bun version
- id: bun-version
- run: echo "BUN_VERSION=$(cat package.json | grep 'bun-types' | head -1 | awk -F'"' '{print $4}')" >> $GITHUB_OUTPUT
+ - name: Determine Bun version
+ id: bun-version
+ run: echo "BUN_VERSION=$(jq -r '.workspaces.catalog["bun-types"]' package.json)" >> $GITHUB_OUTPUTOptional: Create a composite action at .github/actions/setup-bun/action.yml to encapsulate both the version determination and setup steps, reducing duplication across workflows.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Determine Bun version | |
| id: bun-version | |
| run: echo "BUN_VERSION=$(cat package.json | grep 'bun-types' | head -1 | awk -F'"' '{print $4}')" >> $GITHUB_OUTPUT | |
| - name: Determine Bun version | |
| id: bun-version | |
| run: echo "BUN_VERSION=$(jq -r '.workspaces.catalog[\"bun-types\"]' package.json)" >> $GITHUB_OUTPUT |
🤖 Prompt for AI Agents
.github/workflows/test.yml lines 15-17: the current step uses fragile grep/awk
parsing of package.json; replace it with a jq-based command that reliably
extracts the "bun-types" version from dependencies or devDependencies and writes
BUN_VERSION to $GITHUB_OUTPUT, ensure the runner has jq available (or add an
action to install it), and (optionally) factor this logic into a reusable
composite action at .github/actions/setup-bun/action.yml that exposes the
version and performs Bun setup so other workflows can reuse it.
| - name: Determine Bun version | ||
| id: bun-version | ||
| run: echo "BUN_VERSION=$(cat package.json | grep 'bun-types' | head -1 | awk -F'"' '{print $4}')" >> $GITHUB_OUTPUT |
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.
🛠️ Refactor suggestion | 🟠 Major
Replace fragile grep/awk parsing with jq.
The current shell pipeline is brittle and may break with JSON formatting changes, comments, or multiple occurrences of "bun-types". Use jq for reliable JSON parsing.
Apply this diff:
- - name: Determine Bun version
- id: bun-version
- run: echo "BUN_VERSION=$(cat package.json | grep 'bun-types' | head -1 | awk -F'"' '{print $4}')" >> $GITHUB_OUTPUT
+ - name: Determine Bun version
+ id: bun-version
+ run: echo "BUN_VERSION=$(jq -r '.workspaces.catalog["bun-types"]' package.json)" >> $GITHUB_OUTPUTThis approach:
- Correctly parses JSON structure
- Directly accesses the catalog entry
- Fails explicitly if the field is missing
- Is resilient to formatting changes
🤖 Prompt for AI Agents
.github/workflows/typecheck.yml lines 15-17: replace the fragile grep/awk
pipeline with a jq-based extraction of the bun-types version from package.json;
read package.json with jq to select the catalog entry value (failing if
missing), and echo that value into $GITHUB_OUTPUT as BUN_VERSION so the step
reliably parses JSON and errors explicitly when the field is absent.
No description provided.