Skip to content

chore: generate package versions output for releases#2259

Merged
saikumarrs merged 6 commits into
developfrom
chore.generate-versions-table-for-release-prs
May 27, 2025
Merged

chore: generate package versions output for releases#2259
saikumarrs merged 6 commits into
developfrom
chore.generate-versions-table-for-release-prs

Conversation

@saikumarrs

@saikumarrs saikumarrs commented May 26, 2025

Copy link
Copy Markdown
Member

PR Description

I've updated the draft new release workflow to also create table at the end of the release PR description to list all the packages and their new versions.

Linear task (optional)

N/A

Cross Browser Tests

Please confirm you have tested for the following browsers:

  • Chrome
  • Firefox
  • IE11

Sanity Suite

  • All sanity suite test cases pass locally

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

Summary by CodeRabbit

  • Chores
    • Added a script to generate a Markdown table listing package versions across the monorepo for easier tracking of version changes.

@saikumarrs saikumarrs self-assigned this May 26, 2025
@coderabbitai

coderabbitai Bot commented May 26, 2025

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@saikumarrs has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 21 minutes and 21 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 41dd7d8 and 18402ed.

📒 Files selected for processing (1)
  • scripts/collect-packages-versions.sh (1 hunks)
📝 Walkthrough

Walkthrough

A shell script was added to generate a Markdown table listing package versions within a monorepo. It compares current versions to those on the origin/main branch and outputs updated versions or "N/A" if unchanged. No public or exported entities were modified.

Changes

File(s) Change Summary
scripts/collect-packages-versions.sh Added script to generate a Markdown table of package versions in the monorepo, comparing current and remote versions.

Suggested reviewers

  • MoumitaM
✨ Finishing Touches
  • 📝 Generate Docstrings

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.

@saikumarrs saikumarrs marked this pull request as ready for review May 26, 2025 10:32
Copilot AI review requested due to automatic review settings May 26, 2025 10:32
@saikumarrs saikumarrs requested a review from a team as a code owner May 26, 2025 10:32
@codecov

codecov Bot commented May 26, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.85%. Comparing base (9ff732e) to head (18402ed).
Report is 30 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2259   +/-   ##
========================================
  Coverage    61.85%   61.85%           
========================================
  Files          480      480           
  Lines        16561    16561           
  Branches      3266     3284   +18     
========================================
  Hits         10244    10244           
+ Misses        5134     5091   -43     
- Partials      1183     1226   +43     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Adds automation to generate and include a Markdown table of package version changes in the release PR description.

  • Introduces a shell script to compare current and main-branch versions for all packages.
  • Updates the draft-new-release.yml workflow to run the script and embed its output in the PR body.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
scripts/collect-packages-versions.sh New script to list packages and their new versions in a Markdown table
.github/workflows/draft-new-release.yml Executes the script and appends the generated table to the PR message

Comment thread scripts/collect-packages-versions.sh Outdated
Comment thread scripts/collect-packages-versions.sh Outdated
Comment thread scripts/collect-packages-versions.sh Outdated
Comment thread scripts/collect-packages-versions.sh Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
scripts/collect-packages-versions.sh (1)

43-45: Handle filenames with spaces & ensure deterministic order
Switch to null-delimited output and read -r to safely process package paths containing whitespace, and sort the results for consistent ordering.

-find packages -name package.json | while read pkg; do
-  print_version_row "$pkg"
-done
+find packages -type f -name package.json -print0 \
+  | sort -z \
+  | while IFS= read -r -d '' pkg; do
+    print_version_row "$pkg"
+done
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 21ae75d and e689903.

⛔ Files ignored due to path filters (1)
  • .github/workflows/draft-new-release.yml is excluded by !**/*.yml
📒 Files selected for processing (1)
  • scripts/collect-packages-versions.sh (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Unit Tests and Lint
  • GitHub Check: Bundle size checks
  • GitHub Check: Security and code quality checks
🔇 Additional comments (2)
scripts/collect-packages-versions.sh (2)

3-19: Well-documented script header
The multi-line comment clearly explains the purpose, usage, and output format of the script.


22-23: Correct Markdown table headers
The header and separator lines are formatted correctly for a Markdown table.

Comment thread scripts/collect-packages-versions.sh
Comment thread scripts/collect-packages-versions.sh Outdated
@github-actions

github-actions Bot commented May 26, 2025

Copy link
Copy Markdown

size-limit report 📦

Name Size Delta Limit check
Common - No bundling 18.03 KB 0 B (0% 🟢) 19 KB (✅)
Cookies Utils - Legacy - NPM (ESM) 1.54 KB 0 B (0% 🟢) 2 KB (✅)
Cookies Utils - Legacy - NPM (CJS) 1.74 KB 0 B (0% 🟢) 2 KB (✅)
Cookies Utils - Legacy - NPM (UMD) 1.52 KB 0 B (0% 🟢) 2 KB (✅)
Cookies Utils - Modern - NPM (ESM) 1.16 KB 0 B (0% 🟢) 1.5 KB (✅)
Cookies Utils - Modern - NPM (CJS) 1.39 KB 0 B (0% 🟢) 1.5 KB (✅)
Cookies Utils - Modern - NPM (UMD) 1.15 KB 0 B (0% 🟢) 1.5 KB (✅)
Plugins Module Federation Mapping - Legacy - CDN 332 B 0 B (0% 🟢) 512 B (✅)
Plugins Module Federation Mapping - Modern - CDN 331 B 0 B (0% 🟢) 512 B (✅)
Plugins - Legacy - CDN 14.25 KB 0 B (0% 🟢) 14.5 KB (✅)
Plugins - Modern - CDN 5.64 KB 0 B (0% 🟢) 6 KB (✅)
Core - Legacy - NPM (ESM) 47.82 KB 0 B (0% 🟢) 48 KB (✅)
Core - Legacy - NPM (CJS) 48.09 KB 0 B (0% 🟢) 48.5 KB (✅)
Core - Legacy - NPM (UMD) 47.88 KB 0 B (0% 🟢) 48.5 KB (✅)
Core - Legacy - CDN 47.98 KB 0 B (0% 🟢) 48.2 KB (✅)
Core - Modern - NPM (ESM) 26.89 KB 0 B (0% 🟢) 27 KB (✅)
Core - Modern - NPM (CJS) 27.1 KB 0 B (0% 🟢) 27.2 KB (✅)
Core - Modern - NPM (UMD) 26.93 KB 0 B (0% 🟢) 27 KB (✅)
Core - Modern - CDN 27.13 KB 0 B (0% 🟢) 27.5 KB (✅)
Core (Bundled) - Legacy - NPM (ESM) 47.82 KB 0 B (0% 🟢) 48 KB (✅)
Core (Bundled) - Legacy - NPM (CJS) 48.09 KB 0 B (0% 🟢) 48.5 KB (✅)
Core (Bundled) - Legacy - NPM (UMD) 47.88 KB 0 B (0% 🟢) 48.5 KB (✅)
Core (Bundled) - Modern - NPM (ESM) 39.11 KB 0 B (0% 🟢) 39.5 KB (✅)
Core (Bundled) - Modern - NPM (CJS) 39.31 KB 0 B (0% 🟢) 39.5 KB (✅)
Core (Bundled) - Modern - NPM (UMD) 39.14 KB 0 B (0% 🟢) 39.2 KB (✅)
Core (Content Script) - Legacy - NPM (ESM) 47.77 KB 0 B (0% 🟢) 48 KB (✅)
Core (Content Script) - Legacy - NPM (CJS) 48.04 KB 0 B (0% 🟢) 48.5 KB (✅)
Core (Content Script) - Legacy - NPM (UMD) 47.79 KB 0 B (0% 🟢) 48 KB (✅)
Core (Content Script) - Modern - NPM (ESM) 39.06 KB 0 B (0% 🟢) 39.5 KB (✅)
Core (Content Script) - Modern - NPM (CJS) 39.37 KB 0 B (0% 🟢) 39.5 KB (✅)
Core (Content Script) - Modern - NPM (UMD) 39.06 KB 0 B (0% 🟢) 39.5 KB (✅)
Core (v1.1) - NPM (ESM) 29.85 KB 0 B (0% 🟢) 32 KB (✅)
Core (v1.1) - NPM (CJS) 30.04 KB 0 B (0% 🟢) 32 KB (✅)
Core (v1.1) - NPM (UMD) 29.81 KB 0 B (0% 🟢) 32 KB (✅)
Core (Content Script - v1.1) - NPM (ESM) 29.32 KB 0 B (0% 🟢) 30.5 KB (✅)
Core (Content Script - v1.1) - NPM (CJS) 29.54 KB 0 B (0% 🟢) 30.5 KB (✅)
Core (Content Script - v1.1) - NPM (UMD) 29.38 KB 0 B (0% 🟢) 30.5 KB (✅)
Core (v1.1) - Legacy - CDN 31.79 KB 0 B (0% 🟢) 32.5 KB (✅)
Core (v1.1) - Modern - CDN 29.74 KB 0 B (0% 🟢) 32 KB (✅)
All Integrations - Legacy - CDN 96.29 KB 0 B (0% 🟢) 97 KB (✅)
All Integrations - Modern - CDN 90.98 KB 0 B (0% 🟢) 93.5 KB (✅)
Service Worker - Legacy - NPM (ESM) 30.28 KB 0 B (0% 🟢) 31 KB (✅)
Service Worker - Legacy - NPM (CJS) 30.57 KB 0 B (0% 🟢) 31 KB (✅)
Service Worker - Legacy - NPM (UMD) 30.2 KB 0 B (0% 🟢) 31 KB (✅)
Service Worker - Modern - NPM (ESM) 25.6 KB 0 B (0% 🟢) 26 KB (✅)
Service Worker - Modern - NPM (CJS) 25.82 KB 0 B (0% 🟢) 26.5 KB (✅)
Service Worker - Modern - NPM (UMD) 25.61 KB 0 B (0% 🟢) 26 KB (✅)
Load Snippet 765 B 0 B (0% 🟢) 1 KB (✅)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 (4)
scripts/collect-packages-versions.sh (4)

11-13: Verify usage section filename consistency with workflow
The usage example directs output to package_versions.md. Ensure that any CI or release workflow, as well as documentation, references the same filename to prevent mismatches.


42-45: Use robust read and remove trailing whitespace
When iterating over file paths, use IFS= read -r pkg to avoid backslash interpretation. Also eliminate the trailing space after done.

-find packages -name package.json | while read pkg; do
+find packages -name package.json | while IFS= read -r pkg; do
   print_version_row "$pkg"
-done 
+done

1-2: 🛠️ Refactor suggestion

Enhance script robustness with strict modes & dependency checks
Switch to a portable shebang, enable strict error handling with set -euo pipefail, and verify that git and jq are installed before proceeding. Also remove the existing set -e to avoid duplication.

-#!/bin/bash
-set -e
+#!/usr/bin/env bash
+
+# Exit on error, undefined variable, and pipeline failures
+set -euo pipefail
+
+# Ensure required commands are available
+command -v jq >/dev/null 2>&1 || { echo "Error: jq is required but not installed." >&2; exit 1; }
+command -v git >/dev/null 2>&1 || { echo "Error: git is required but not installed." >&2; exit 1; }

Also applies to: 20-20


27-31: 🛠️ Refactor suggestion

Fix command substitution and jq pipeline grouping
The current assignment splits the pipe outside the substitution, leading to syntax errors and incorrect behavior. Wrap the entire pipeline inside the command substitution:

-    prev_version=$(git show origin/main:"$file_path" 2>/dev/null || echo '{}') | jq -r .version)
+    prev_version=$(
+      git show origin/main:"$file_path" 2>/dev/null || echo '{}'
+      | jq -r .version
+    )
🧰 Tools
🪛 Shellcheck (0.10.0)

[error] 27-27: Couldn't find 'fi' for this 'if'.

(SC1046)


[error] 27-27: Couldn't parse this if expression. Fix to allow more checks.

(SC1073)


[error] 31-31: Expected 'fi' matching previously mentioned 'if'.

(SC1047)


[error] 31-31: Expected 'fi'. Fix any mentioned problems and try again.

(SC1072)

🧹 Nitpick comments (1)
scripts/collect-packages-versions.sh (1)

32-34: String comparison portability
Using == inside single [ is a Bash extension; switch to POSIX-compatible = or use [[ ... ]] for clarity:

-if [ "$version" == "$prev_version" ]; then
+if [ "$version" = "$prev_version" ]; then
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e689903 and 07c0fe9.

📒 Files selected for processing (1)
  • scripts/collect-packages-versions.sh (1 hunks)
🧰 Additional context used
🪛 Shellcheck (0.10.0)
scripts/collect-packages-versions.sh

[error] 27-27: Couldn't find 'fi' for this 'if'.

(SC1046)


[error] 27-27: Couldn't parse this if expression. Fix to allow more checks.

(SC1073)


[error] 31-31: Expected 'fi' matching previously mentioned 'if'.

(SC1047)


[error] 31-31: Expected 'fi'. Fix any mentioned problems and try again.

(SC1072)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Security and code quality checks
  • GitHub Check: Bundle size checks
  • GitHub Check: Unit Tests and Lint
🔇 Additional comments (4)
scripts/collect-packages-versions.sh (4)

22-23: Correctly formatted table header
The Markdown header for the package versions table is properly formatted and aligns with expectations.


25-27: Function declaration and file existence check
The print_version_row function is clearly defined and correctly guards against missing files.

🧰 Tools
🪛 Shellcheck (0.10.0)

[error] 27-27: Couldn't find 'fi' for this 'if'.

(SC1046)


[error] 27-27: Couldn't parse this if expression. Fix to allow more checks.

(SC1073)


28-30: Extract package metadata
Using jq to pull the name and version fields is concise and efficient.


39-41: Invoke row printing for root package
Calling print_version_row "package.json" correctly includes the root package in the output.

saikumarrs and others added 3 commits May 26, 2025 20:18
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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

📥 Commits

Reviewing files that changed from the base of the PR and between 07c0fe9 and 41dd7d8.

📒 Files selected for processing (1)
  • scripts/collect-packages-versions.sh (1 hunks)
🧰 Additional context used
🪛 Shellcheck (0.10.0)
scripts/collect-packages-versions.sh

[error] 27-27: Couldn't find 'fi' for this 'if'.

(SC1046)


[error] 27-27: Couldn't parse this if expression. Fix to allow more checks.

(SC1073)


[error] 31-31: Expected 'fi' matching previously mentioned 'if'.

(SC1047)


[error] 31-31: Expected 'fi'. Fix any mentioned problems and try again.

(SC1072)

🔇 Additional comments (3)
scripts/collect-packages-versions.sh (3)

25-30: Approve: JSON parsing and file‐existence check
The print_version_row function correctly guards on file existence, then uses jq to extract the name and version fields. This is clear and efficient.

🧰 Tools
🪛 Shellcheck (0.10.0)

[error] 27-27: Couldn't find 'fi' for this 'if'.

(SC1046)


[error] 27-27: Couldn't parse this if expression. Fix to allow more checks.

(SC1073)


32-36: Approve: unchanged‐version handling and Markdown formatting
The logic to substitute unchanged versions with N/A and emit a Markdown table row is concise and correct.


43-45: Approve: package discovery loop
Using find piped into while read -r is a robust way to enumerate all package.json files under packages.

Comment thread scripts/collect-packages-versions.sh
Comment thread scripts/collect-packages-versions.sh Outdated
@sonarqubecloud

Copy link
Copy Markdown

@MoumitaM MoumitaM left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can also add the current version to that table. At a glance, we will be able to see if it is a patch or a minor version update. This is just a suggestion; otherwise looks good.

@saikumarrs saikumarrs merged commit 79feb10 into develop May 27, 2025
11 checks passed
@saikumarrs saikumarrs deleted the chore.generate-versions-table-for-release-prs branch May 27, 2025 08:53
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.

3 participants