Skip to content

Conversation

@JensAstrup
Copy link
Member

@JensAstrup JensAstrup commented May 30, 2025

What's Changed

  • Update dist command to not copy entire node_modules directory

Summary by CodeRabbit

  • Chores
    • Simplified the build and packaging process for React distributions, resulting in smaller and cleaner build outputs.

@linear
Copy link

linear bot commented May 30, 2025

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 30, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The dist:react script in package.json was updated to remove the step that copied the node_modules directory into the build output before creating a zip archive. Now, the script builds the project and zips the build directory contents directly, excluding coverage and test files.

Changes

File(s) Change Summary
package.json Modified the dist:react script to remove copying of node_modules and simplify the zip process.

Possibly related PRs

  • SHA-245: Fix dist path #547: Adjusts the GitHub workflow to fix the path used for downloading the dist.zip artifact, which is directly related to how the dist.zip file is created and handled.

🪧 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.

@codecov
Copy link

codecov bot commented May 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #663      +/-   ##
===========================================
- Coverage    93.60%   92.29%   -1.32%     
===========================================
  Files           57       68      +11     
  Lines         1173     1479     +306     
  Branches       181      247      +66     
===========================================
+ Hits          1098     1365     +267     
- Misses          75      109      +34     
- Partials         0        5       +5     

see 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0dfcc07 and 5f0a118.

📒 Files selected for processing (1)
  • package.json (1 hunks)
🔇 Additional comments (1)
package.json (1)

19-19:

Details

✅ Verification successful

Verify removal of node_modules copy from dist:react

The updated dist:react script no longer copies node_modules into build, which is ideal if Webpack bundles all dependencies. Please ensure that your extension functions correctly without external modules at runtime.

Run this script to confirm no node_modules references remain:


🏁 Script executed:

#!/bin/bash
# Verify no 'node_modules' references in the dist:react script
jq -r '.scripts["dist:react"]' package.json | grep -q 'node_modules' \
  && echo "❌ node_modules found in dist:react" \
  || echo "✅ no node_modules references"

Length of output: 135


Lines 19–19:

"dist:react": "ENABLE_REACT=true NODE_ENV=production npx webpack && cd build && zip -r ../dist/dist.zip . -x \"coverage*\" \"*/*.test.js\"",

dist:react script no longer references node_modules – verified

The updated dist:react script omits copying node_modules, which is correct since Webpack bundles all dependencies. Ran the verification script—no node_modules references found. ✅ Approved for merge.

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.

2 participants