-
Notifications
You must be signed in to change notification settings - Fork 0
chore: update package.json scripts for bun and next compatibility #718
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
Modified the scripts in package.json to ensure compatibility with the latest bun and next versions, including changes to the build, dev, and start commands. Additionally, adjusted the clean script to enhance file removal processes.
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.
Summary of Changes
Hello @roderik, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request primarily focuses on enhancing development workflow efficiency and improving UI responsiveness. It updates key build and development scripts to leverage modern tooling features and introduces a minor CSS adjustment to ensure better layout consistency.
Highlights
- Script Updates: The build and dev scripts in package.json have been updated to utilize --turbopack for potentially faster compilation and development.
- UI Styling Adjustment: The #nd-page style in src/app/global.css now includes max-width: 100% to ensure proper rendering across different screen sizes.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
|
To view in Slack, search for: 1757483933.931329 |
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.
Hey there - I've reviewed your changes - here's some feedback:
- The clean script now includes bun install which mixes cleaning with installation—consider splitting these into separate scripts to keep responsibilities clear.
- You’ve added --turbopack flags to build and dev but not start—ensure consistency or confirm that start doesn’t require the flag.
- The max-width:100% on #nd-page may override intended layout constraints; verify this change works across all breakpoints.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The clean script now includes bun install which mixes cleaning with installation—consider splitting these into separate scripts to keep responsibilities clear.
- You’ve added --turbopack flags to build and dev but not start—ensure consistency or confirm that start doesn’t require the flag.
- The max-width:100% on #nd-page may override intended layout constraints; verify this change works across all breakpoints.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Code Review
This pull request updates the package.json scripts to use Turbopack for both development and production builds, and adds a CSS rule to global.css. While using Turbopack for development is a good performance enhancement, using it for production builds is still considered beta and may lead to instability. I have suggested removing the --turbopack flag from the build script to ensure production stability. The CSS change seems to be a straightforward layout improvement.
package.json
Outdated
| "clean": "git clean -fdX -e '.env' -e '.env.*' -e '!.env' -e '!.env.*' && find . -type f \\( -name 'pnpm-lock.yaml' -o -name 'package-lock.json' -o -name 'yarn.lock' -o -name 'bun.lockb' -o -name 'bun.lock' \\) -exec rm -f {} + && bun install", | ||
| "build": "bun generate-sdk-docs && next build", | ||
| "dev": "bun generate-sdk-docs && next dev", | ||
| "build": "bun generate-sdk-docs && next build --turbopack", |
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.
Using --turbopack for production builds (next build) is currently in beta and may not be stable. It is generally recommended to use experimental features like this for development environments only, to avoid potential issues in production. Consider removing the --turbopack flag from the build script to ensure a stable production build.
| "build": "bun generate-sdk-docs && next build --turbopack", | |
| "build": "bun generate-sdk-docs && next build", |
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.
Codex Review: Here are some suggestions.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
package.json
Outdated
| "build": "bun generate-sdk-docs && next build --turbopack", | ||
| "dev": "bun generate-sdk-docs && next dev --turbopack", |
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.
[P1] Use current Next.js flag for Turbopack builds
The build and dev scripts now call next build --turbopack and next dev --turbopack, but the Next 15 CLI bundled in this repo exposes the Turbopack switch as --turbo (the --turbopack alias was removed). When these scripts run, Next exits with “Unknown or unexpected option: --turbopack”, preventing both bun run build and bun run dev from starting at all. Switching the flag to --turbo restores compatibility with Next 15.5.2.
Useful? React with 👍 / 👎.
Updated the package.json scripts to improve compatibility with bun and next, including modifications to the clean, build, dev, and start commands. The clean script was enhanced for better file management.
Modified the scripts in package.json to ensure compatibility with the latest bun and next versions, including changes to the build, dev, and start commands. Additionally, adjusted the clean script to enhance file removal processes.
Summary by Sourcery
Improve package.json scripts for bun and Next.js compatibility and tweak global CSS.
Enhancements:
Build: