-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore: update turbo configuration #142
Conversation
Warning Rate limit exceeded@Sma1lboy has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 45 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
WalkthroughThis pull request streamlines several build and start processes across multiple projects by updating various scripts in the Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant PM as Package Manager
participant Builder as Build System
Dev->>PM: Run Build Command
alt Old Flow
PM->>Builder: Execute "build:common"
Builder->>Builder: Perform common build tasks
PM->>Builder: Continue with framework build (e.g., nest build / next build)
else New Flow
PM->>Builder: Execute primary build command directly (e.g., nest build or next build)
end
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 0
🧹 Nitpick comments (2)
codefox-common/package.json (1)
12-12
: Streamlined Build Process.
The"build"
script was modified to remove a pre-cleaning step (i.e. reference torimraf
) and now runs the individual build steps consecutively. Note that a dedicated"clean"
script still exists, so manual cleaning is possible if needed.llm-server/package.json (1)
10-10
: Minor Formatting in Build Script.
The"build"
script currently contains a leading space in" tsc"
. Removing the extra space would improve consistency.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (6)
backend/package.json
(2 hunks)codefox-common/package.json
(2 hunks)codefox-docs/package.json
(2 hunks)frontend/package.json
(2 hunks)llm-server/package.json
(2 hunks)package.json
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: autofix
🔇 Additional comments (11)
package.json (1)
16-17
: New Turbo Start Script and JSON Cleanup.
The new"start": "turbo start"
script entry simplifies the startup process using Turbo, and the trailing comma on the"fix"
script now ensures proper JSON formatting.codefox-docs/package.json (1)
8-8
: Enhanced Docusaurus Build Command.
The build script now explicitly sets the port to9999
and disables auto-opening the browser (--no-open
), which provides better control in development and CI environments.llm-server/package.json (3)
7-8
: Streamlined Start and Dev Commands.
Both the"start"
and"dev"
scripts have been updated to directly invokenodemon
withtsx
, thereby removing unnecessary build steps and streamlining the development workflow.
16-16
: Consistent Test Coverage Command.
The"test:cov"
command remains configured properly with the necessary NODE options for coverage reporting.
22-22
: Dependency Relocation Confirmed.
Moving the"codefox-common": "workspace:*"
dependency to this position is acceptable as it does not affect the resolution. Ensure that consumers are aware of this new ordering if they rely on a specific dependency sequence.backend/package.json (4)
10-10
: Simplified Build Script.
The"build"
script now directly invokesnest build
after removing the dependency onbuild:common
, which aligns with the project's move toward a more streamlined build process.
12-12
: Lint Command Verification.
The lint command remains unchanged aside from potential whitespace adjustments. Verify that the use ofts-prune
alongside ESLint still meets your project's linting strategy.
13-13
: Updated Start Command.
The"start"
script now omits the--watch
flag, which is appropriate for production startup scenarios. Confirm that this aligns with the intended runtime behavior.
15-15
: Consistent Dev Command.
The"dev"
script now directly calls"pnpm start:dev"
, which simplifies the development workflow by eliminating the extra build step.frontend/package.json (2)
6-6
: Simplified Build Script with Next.js
The new"build": "next build"
script streamlines the build process by directly triggering Next.js’s build command. This change helps remove the dependency on intermediary build steps and should result in a more maintainable configuration.
18-18
: Dependency Update forcodefox-common
The dependency"codefox-common": "workspace:*"
has been (re)introduced in the dependencies section. Please verify that this workspace reference is intended and that it aligns with your monorepo’s dependency management. Confirm that no residual build dependencies or conflicts remain from the previous setup.
1ac031a
to
e12dce3
Compare
6e272b6
to
9bb7448
Compare
ebe487e
to
664f7b5
Compare
ff8fd35
to
f6668ae
Compare
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: 0
🧹 Nitpick comments (1)
turbo.json (1)
18-20
: Clarify Format Task Configuration
The"format"
task now explicitly specifies"outputs": []
. Confirm that this configuration is intentional and that it meets your formatting task requirements. If the task is only for formatting purposes without generating artifacts, this configuration is appropriate—but document its purpose if needed for future maintainability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
codefox-common/package.json
(1 hunks)codefox-docs/package.json
(1 hunks)turbo.json
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- codefox-docs/package.json
- codefox-common/package.json
🔇 Additional comments (3)
turbo.json (3)
5-8
: Streamlined Build Task Configuration
The "build" task now removes the "inputs" and "outputs" properties and adds"cache": true
for caching build results. This change aligns with the intent to simplify and optimize build operations. Double-check that enabling caching does not introduce side effects in environments where build inputs might change unexpectedly.
9-10
: Simplified Development Tasks
Both"dev"
and"dev:backend"
tasks have been simplified to empty objects, effectively removing previous configurations (like persistent caching or other properties). Ensure that these stripped-down configurations still support the required developer workflow without unintended regressions.
21-23
: New Start Task Addition
A new"start"
task is introduced with"dependsOn": ["^build"]
and"cache": false
. This configuration ensures that the start-up process always utilizes a fresh build (by disabling caching), which can help avoid issues related to stale artifacts. Verify that this behavior is in line with your deployment and development strategies.
e3b6684
to
45dfd88
Compare
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: 0
🧹 Nitpick comments (1)
codefox-common/package.json (1)
20-20
: Modified Build Script: Validate Removal of Directory Cleanup
The updated"build"
script now omits the"rimraf dist &&"
command. Confirm that removing the automatic cleanup of thedist
folder is an intentional change—ensuring that either stale build artifacts are handled elsewhere or acknowledged as acceptable in your new turbo configuration.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (8)
codefox-common/package.json
(1 hunks)codefox-docs/package.json
(1 hunks)llm-server/src/downloader/model-downloader.ts
(1 hunks)llm-server/src/downloader/universal-status.ts
(1 hunks)llm-server/src/downloader/universal-utils.ts
(1 hunks)llm-server/src/llm-provider.ts
(1 hunks)llm-server/tsconfig.json
(1 hunks)turbo.json
(2 hunks)
✅ Files skipped from review due to trivial changes (4)
- llm-server/src/downloader/universal-utils.ts
- llm-server/src/downloader/model-downloader.ts
- llm-server/src/downloader/universal-status.ts
- llm-server/src/llm-provider.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- codefox-docs/package.json
- turbo.json
- llm-server/tsconfig.json
🔇 Additional comments (1)
codefox-common/package.json (1)
8-15
: New Exports Field Setup: Verify Export Resolution Paths
The newly added"exports"
field properly defines dedicated entry points for CommonJS (require
), type definitions (types
), and ES module subpaths. Please ensure that the build process correctly outputs the files to the corresponding directories (dist/cjs/index.js
,dist/types/index.d.ts
, anddist/esm/index.js
/./dist/esm/*
).
36c0d33
to
3611f31
Compare
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: 0
🧹 Nitpick comments (2)
codefox-common/package.json (2)
15-16
: Review Wildcard Export Usage.
The wildcard mapping"./dist/*": "./dist/*"
exposes all files within thedist
directory. If your intent is to provide access to all compiled modules, this is fine. However, if some internal modules should remain private, consider restricting these exports to avoid accidental public exposure.
21-21
: Evaluate Removal of the Clean Step in the Build Script.
The"build"
script now omits therimraf dist &&
command, which may speed up builds when using Turbo configuration if cleaning is managed elsewhere. Ensure that your build or CI/CD pipeline addresses potential stale artifacts in thedist
folder to prevent unexpected issues.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
codefox-common/package.json
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: autofix
🔇 Additional comments (1)
codefox-common/package.json (1)
8-16
: Clear Export Definitions for Module Resolution.
The new"exports"
field is well-defined, explicitly mapping the package’s entry points for ES modules, CommonJS, and type declarations. This enhances module resolution and enforces a clean public API surface. Please verify that the paths (e.g.,"./dist/esm/index.js"
) exactly match the build outputs produced by your TypeScript configurations.
…ts and setting working directory for build step
1891f6f
to
1e58f25
Compare
1b3a07f
to
84511e0
Compare
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: 0
🧹 Nitpick comments (6)
codefox-common/package.json (1)
21-21
: Simplify the Build Script with CautionThe
"build"
script has been streamlined by removing therimraf dist &&
cleanup step. While this simplification reduces command complexity, ensure that any potential issues with stale build artifacts are managed (either by invoking the"clean"
script explicitly in CI or as part of a pre-build process)..github/workflows/frontend-ci.yml (1)
60-60
: Newline and Trailing Whitespace Issue
Static analysis indicates there is no newline at the end of the file (YAMLlint error). Please add a newline at the end of the file to comply with formatting standards.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 60-60: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/backend-ci.yml (2)
19-24
: Action Versions: Checkout and Setup Node.js
The workflow currently usesactions/checkout@v3
andactions/setup-node@v3
. Static analysis suggests these versions might be outdated. Consider updating to newer versions (e.g., checkout@v4 and setup-node@v4) to benefit from the latest features and fixes. For example:- uses: actions/checkout@v3 + uses: actions/checkout@v4- uses: actions/setup-node@v3 + uses: actions/setup-node@v4🧰 Tools
🪛 actionlint (1.7.4)
19-19: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
22-22: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.35.1)
[error] 20-20: trailing spaces
(trailing-spaces)
53-60
: Cache Artifacts and Formatting Concerns
The caching setup for backend build artifacts is properly configured with unique keys based on the OS, pnpm lock file hash, and the current commit SHA. A couple of suggestions:
- Consider updating the
actions/cache
usage if newer stable versions exist.- Also, note that static analysis flagged a missing newline at the end of the file and potential trailing whitespace issues. Please address these formatting issues.
🧰 Tools
🪛 actionlint (1.7.4)
53-53: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.35.1)
[error] 60-60: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/llm-server-ci.yml (2)
18-24
: Action Versions: Checkout and Setup Node.js
Similar to the backend workflow, this file usesactions/checkout@v3
andactions/setup-node@v3
. It is recommended to update these steps to their latest versions to take advantage of improvements and security fixes. For instance:- uses: actions/checkout@v3 + uses: actions/checkout@v4- uses: actions/setup-node@v3 + uses: actions/setup-node@v4🧰 Tools
🪛 actionlint (1.7.4)
19-19: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
22-22: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.35.1)
[error] 20-20: trailing spaces
(trailing-spaces)
53-60
: Cache Artifacts and Formatting Concerns
The caching step for LLM Server artifacts is well-configured with clear keys and restore keys. As with the other workflow files, there is a static analysis warning regarding a missing newline at the end of the file. Please add a newline and review any trailing whitespace issues. Additionally, consider updating theactions/cache@v3
action if newer versions are available.🧰 Tools
🪛 actionlint (1.7.4)
53-53: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.35.1)
[error] 60-60: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (6)
.github/workflows/backend-ci.yml
(1 hunks).github/workflows/frontend-ci.yml
(2 hunks).github/workflows/llm-server-ci.yml
(1 hunks)codefox-common/package.json
(1 hunks)codefox-docs/package.json
(1 hunks)turbo.json
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- codefox-docs/package.json
- turbo.json
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/frontend-ci.yml
[error] 60-60: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/backend-ci.yml
[error] 16-16: trailing spaces
(trailing-spaces)
[error] 20-20: trailing spaces
(trailing-spaces)
[error] 25-25: trailing spaces
(trailing-spaces)
[error] 31-31: trailing spaces
(trailing-spaces)
[error] 36-36: trailing spaces
(trailing-spaces)
[error] 44-44: trailing spaces
(trailing-spaces)
[error] 47-47: trailing spaces
(trailing-spaces)
[error] 51-51: trailing spaces
(trailing-spaces)
[error] 60-60: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/llm-server-ci.yml
[error] 16-16: trailing spaces
(trailing-spaces)
[error] 20-20: trailing spaces
(trailing-spaces)
[error] 25-25: trailing spaces
(trailing-spaces)
[error] 31-31: trailing spaces
(trailing-spaces)
[error] 36-36: trailing spaces
(trailing-spaces)
[error] 44-44: trailing spaces
(trailing-spaces)
[error] 47-47: trailing spaces
(trailing-spaces)
[error] 51-51: trailing spaces
(trailing-spaces)
[error] 60-60: no new line character at the end of file
(new-line-at-end-of-file)
🪛 actionlint (1.7.4)
.github/workflows/backend-ci.yml
19-19: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
22-22: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
38-38: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
53-53: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
.github/workflows/llm-server-ci.yml
19-19: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
22-22: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
38-38: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
53-53: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (6)
codefox-common/package.json (1)
8-16
: Define and Configure the Exports FieldThe new
"exports"
field is clearly defined with separate entries for ES modules, CommonJS, types, and the default export. This setup facilitates proper module resolution for different environments and improves internal module referencing with the"./dist/*"
wildcard. Please verify that these paths align with your intended distribution structure..github/workflows/frontend-ci.yml (1)
49-50
: Explicit Build Directory for Frontend
The explicit declaration ofworking-directory: ./frontend
in the "Build frontend" step is clear and ensures that the build command runs in the correct directory after removing the global defaults. Please confirm that all related build commands reference the correct path..github/workflows/backend-ci.yml (2)
1-16
: New Backend CI Workflow Definition
The new workflow for the backend is well structured with clear triggers for changes in thebackend/**
directory. The overall job and step definitions appear sound and align with the intended build process.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 16-16: trailing spaces
(trailing-spaces)
49-50
: Explicit Build Directory for Backend
The use ofworking-directory: ./backend
in the "Build backend" step is clear and explicit. Ensure that the./backend
directory is correctly located at the repository root for the workflow to execute properly..github/workflows/llm-server-ci.yml (2)
1-16
: New LLM Server CI Workflow Definition
The new LLM Server CI workflow is cleanly introduced with the appropriate triggers for thellm-server/**
path. The job structure meets the CI requirements and properly segregates the steps for building the LLM Server application.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 16-16: trailing spaces
(trailing-spaces)
49-50
: Explicit Build Directory for LLM Server
The use ofworking-directory: ./llm-server
ensures that the build is executed in the proper directory. This change is consistent with the other workflow files, so please ensure that the directory structure remains consistent.
1b4456a
to
593ead1
Compare
…efox-common support
Summary by CodeRabbit