Skip to content

Conversation

@DTTerastar
Copy link
Collaborator

@DTTerastar DTTerastar commented Jun 4, 2025

Summary

  • use pnpm instead of npm in build scripts
  • remove package-lock.json files
  • update Playwright config to run with pnpm

Testing

  • dotnet test -c Release --no-build --verbosity normal --filter "Category!=LongRunning" (fails: dotnet not installed)

https://chatgpt.com/codex/tasks/task_e_683fb5d095048324bff8d21699bd8aa8

Summary by CodeRabbit

  • Chores
    • Updated project and test configuration to use pnpm instead of npm for package management and related commands.
    • Enhanced build instructions to include Node.js 20 and pnpm setup.
    • Updated Dockerfile to globally install pnpm during the build stage.
    • Added d3-selection package to development dependencies.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 4, 2025

Warning

Rate limit exceeded

@DTTerastar has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 3 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between ab5c839 and 7cac1a3.

⛔ Files ignored due to path filters (1)
  • src/ui/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • src/ui/package.json (1 hunks)
📝 Walkthrough

Walkthrough

The changes update build and development scripts from using the npm package manager to pnpm in the project configuration, Playwright test configuration, CI workflow, Dockerfile, and build instructions. All related commands and informational messages referencing npm have been replaced with their pnpm equivalents. Node.js 20 setup was added to CI, and pnpm installation was added to the Dockerfile. The d3-selection package was added to devDependencies. No other logic or public API changes were made.

Changes

File(s) Change Summary
src/ESPresense.Companion.csproj Replaced npm commands with pnpm for SPA proxy, restore, and build steps; updated messages accordingly.
src/ui/playwright.config.ts Updated Playwright web server command from npm to pnpm scripts.
.github/workflows/ci.yml Added Node.js 20 setup and pnpm enable step before .NET restore.
BUILDING.md Expanded build instructions to include Node.js 20 installation and global pnpm installation steps.
Dockerfile Added global pnpm installation after Node.js installation in the build stage.
src/ui/package.json Added "d3-selection" package to devDependencies alongside existing d3 packages.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant ProjectConfig
    participant PlaywrightConfig
    participant CIWorkflow
    participant DockerBuild

    Developer->>ProjectConfig: Start/Build/Publish Project
    ProjectConfig->>ProjectConfig: Use pnpm install/build/start (was npm)
    Developer->>PlaywrightConfig: Run Playwright tests
    PlaywrightConfig->>PlaywrightConfig: Use pnpm run build & pnpm run preview (was npm)
    CIWorkflow->>CIWorkflow: Setup Node.js 20 and enable pnpm before .NET restore
    DockerBuild->>DockerBuild: Install Node.js, then globally install pnpm
Loading

Possibly related PRs

  • Nicer Dockerfile #773: Related Dockerfile changes focusing on reorganization and cleanup, while this PR adds pnpm installation in the Dockerfile build stage.

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:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2662794 and 872c323.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • src/ui/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • src/ESPresense.Companion.csproj (2 hunks)
  • src/ui/playwright.config.ts (1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Deploy to Docker
src/ESPresense.Companion.csproj

[error] 64-64: The command "pnpm install" exited with code 127. Error: pnpm not found during dotnet publish.

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (csharp)
🔇 Additional comments (3)
src/ui/playwright.config.ts (1)

5-5:

Details

❓ Verification inconclusive

LGTM! Verify pnpm availability in test environment.

The command change from npm to pnpm is consistent with the package manager migration. However, ensure that pnpm is installed in the environment where Playwright tests run.


🏁 Script executed:

#!/bin/bash
# Description: Check if there are any CI/test configuration files that need to install pnpm
# Expected: Find workflow files or Docker configurations that may need pnpm installation

echo "Searching for CI/workflow files that may need pnpm installation..."
fd -e yml -e yaml -e json | xargs grep -l "npm\|node" | head -10

echo -e "\nSearching for Docker files that may need pnpm installation..."
fd -e dockerfile -e Dockerfile | head -5

echo -e "\nSearching for package.json to verify pnpm workspace configuration..."
fd package.json | head -5

Length of output: 658


Ensure pnpm is installed in CI/test environments

Please confirm that pnpm is available where Playwright tests execute:

  • src/ui/playwright.config.ts: updated to
    command: 'pnpm run build && pnpm run preview',
  • CI workflows (.github/workflows/*.yml): include pnpm setup (e.g. actions/setup-pnpm or npm install -g pnpm).
  • Dockerfiles (if any): install pnpm globally.
  • src/config.example.yaml and other sample configs: replace any npm run references with pnpm run.
src/ESPresense.Companion.csproj (2)

13-13: LGTM! Consistent with pnpm migration.

The SPA proxy launch command change is appropriate for the package manager migration.


58-60: LGTM! Clear messaging and correct command.

The updated message and pnpm install command are consistent with the migration goals.

@DTTerastar DTTerastar had a problem deploying to CI - release environment June 4, 2025 11:00 — with GitHub Actions Failure
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 872c323 and 51e009b.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml (1 hunks)
  • BUILDING.md (2 hunks)
  • Dockerfile (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • .github/workflows/ci.yml
  • BUILDING.md
🧰 Additional context used
🪛 GitHub Actions: Deploy to Docker
Dockerfile

[warning] 24-24: Dockerfile warning: Usage of undefined variable '$TARGETPLATFORM'.

@DTTerastar DTTerastar had a problem deploying to CI - release environment June 4, 2025 17:13 — with GitHub Actions Failure
@DTTerastar DTTerastar had a problem deploying to CI - release environment June 4, 2025 17:24 — with GitHub Actions Failure
@DTTerastar DTTerastar had a problem deploying to CI - release environment June 5, 2025 17:34 — with GitHub Actions Failure
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

28-28: Remove trailing whitespace

YAML lint flagged a trailing space on this line. Removing it will satisfy lint rules.

-        working-directory: src/ui  
+        working-directory: src/ui
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 28-28: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 331ba84 and 6feaf6b.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/ci.yml

[error] 28-28: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (csharp)
🔇 Additional comments (1)
.github/workflows/ci.yml (1)

27-27: Verify UI directory path

Ensure that the src/ui directory exists at the repository root. The pnpm setup step will fail if this path is incorrect.

@DTTerastar DTTerastar had a problem deploying to CI - release environment June 5, 2025 18:36 — with GitHub Actions Failure
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
.github/workflows/ci.yml (1)

22-27: ⚠️ Potential issue

Swap pnpm and Node.js setup steps
pnpm/action-setup is executed before Node.js is installed, which will cause failures. Move the Node.js setup step above the pnpm setup and ensure consistent ordering of name before uses.

Apply this diff:

@@ jobs.build.steps
-    - uses: pnpm/action-setup@v4
-      name: Install pnpm
+    - name: Install Node.js
+      uses: actions/setup-node@v4
+      with:
+        node-version: 20
+        cache: 'pnpm'
+
+    - uses: pnpm/action-setup@v4
+      name: Install pnpm
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6feaf6b and 44a26da.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/ci.yml

34-34: input "working-directory" is not defined in action "actions/setup-node@v4". available inputs are "always-auth", "architecture", "cache", "cache-dependency-path", "check-latest", "node-version", "node-version-file", "registry-url", "scope", "token"

(action)

🪛 YAMLlint (1.37.1)
.github/workflows/ci.yml

[error] 28-28: trailing spaces

(trailing-spaces)

@DTTerastar DTTerastar had a problem deploying to CI - release environment June 5, 2025 18:45 — with GitHub Actions Failure
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

♻️ Duplicate comments (1)
.github/workflows/ci.yml (1)

22-34: Reorder Node.js and pnpm setup steps; align key ordering
pnpm requires Node.js to be available before installation. Move the Install Node.js step above Install pnpm, and list name before uses in both steps for consistency.

@@
-    - uses: pnpm/action-setup@v4
-      name: Install pnpm
-      with:
-        version: 10
-        run_install: false
-        working-directory: src/ui
+    - name: Install Node.js
+      uses: actions/setup-node@v4
+      with:
+        node-version: 20
+        cache: 'pnpm'
+        cache-dependency-path: src/ui
+
+    - name: Install pnpm
+      uses: pnpm/action-setup@v4
+      with:
+        version: 10
+        run_install: false
+        working-directory: src/ui
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 28-28: trailing spaces

(trailing-spaces)

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

28-28: Remove trailing whitespace
A trailing space on this empty line can cause lint errors.

-  
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 28-28: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 44a26da and 4b2161d.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/ci.yml

[error] 28-28: trailing spaces

(trailing-spaces)

@DTTerastar DTTerastar had a problem deploying to CI - release environment June 5, 2025 18:56 — with GitHub Actions Failure
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

♻️ Duplicate comments (1)
.github/workflows/ci.yml (1)

22-28: ⚠️ Potential issue

Reorder Node.js and pnpm setup and standardize key order

pnpm/action-setup requires Node.js to be present first; please move the Node.js setup step (lines 29–34) above the pnpm setup. Also, place name: before uses: for consistency.

Proposed diff:

@@ jobs.build.steps
-    - uses: pnpm/action-setup@v4
-      name: Install pnpm
+    - name: Install Node.js
+      uses: actions/setup-node@v4
+      with:
+        node-version: 20
+        cache: 'pnpm'
+        cache-dependency-path: src/ui/pnpm-lock.yaml
+
+    - name: Install pnpm
+      uses: pnpm/action-setup@v4
       with:
         version: 10
         run_install: false
         working-directory: src/ui
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 28-28: trailing spaces

(trailing-spaces)

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

22-28: Remove trailing spaces

Line 28 contains trailing whitespace flagged by YAMLlint. Please remove it.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 28-28: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4b2161d and 5b73ba9.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/ci.yml

[error] 28-28: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Deploy to Docker add-on with tag
  • GitHub Check: Analyze (csharp)

@DTTerastar DTTerastar had a problem deploying to CI - release environment June 5, 2025 19:01 — with GitHub Actions Failure
@DTTerastar DTTerastar had a problem deploying to CI - release environment June 5, 2025 19:16 — with GitHub Actions Failure
@DTTerastar DTTerastar enabled auto-merge (squash) June 5, 2025 19:17
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

♻️ Duplicate comments (1)
.github/workflows/ci.yml (1)

22-27: ⚠️ Potential issue

Critical: Ensure Node.js is installed before pnpm

pnpm requires a Node.js runtime and will error out if Node isn't available. This job currently adds pnpm without any preceding actions/setup-node step. Either remove this pnpm setup if it isn’t used here, or insert a Node.js setup step immediately before it.

Proposed diff:

@@ jobs.build.steps
-   - uses: pnpm/action-setup@v4
-     name: Install pnpm
-     with:
-       version: 10
-       run_install: false
+   - name: Install Node.js
+     uses: actions/setup-node@v4
+     with:
+       node-version: 20
+       cache: 'pnpm'
+
+   - name: Install pnpm
+     uses: pnpm/action-setup@v4
+     with:
+       version: 10
+       run_install: false
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 27-27: trailing spaces

(trailing-spaces)

🧹 Nitpick comments (2)
.github/workflows/ci.yml (2)

22-23: Nitpick: Consistent key ordering

Most steps list name before uses. Swap these two lines for the pnpm step to match the existing style.

@@
-    - uses: pnpm/action-setup@v4
-      name: Install pnpm
+    - name: Install pnpm
+      uses: pnpm/action-setup@v4

27-27: Nitpick: Remove trailing whitespace

YAML lint flags trailing spaces on this line. Please delete the extra spaces at end-of-line.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 27-27: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5b73ba9 and ab5c839.

⛔ Files ignored due to path filters (1)
  • src/ui/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • .github/workflows/ci.yml (1 hunks)
  • src/ui/package.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/ui/package.json
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/ci.yml

[error] 27-27: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Deploy to Docker add-on with tag
  • GitHub Check: Analyze (csharp)

@DTTerastar DTTerastar temporarily deployed to CI - release environment June 5, 2025 19:32 — with GitHub Actions Inactive
@DTTerastar DTTerastar merged commit 3b460fc into main Jun 5, 2025
8 checks passed
@DTTerastar DTTerastar deleted the codex/migrate-from-npm-to-pnpm branch June 5, 2025 19:35
@coderabbitai coderabbitai bot mentioned this pull request Sep 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants