Skip to content

Conversation

@tassoevan
Copy link
Contributor

@tassoevan tassoevan commented Dec 22, 2025

Proposed changes (including videos or screenshots)

This pull request simplifies and cleans up the configuration for the core-services package by removing unused Babel-related files and dependencies, updating ESLint and test script configurations, and streamlining the ESLint setup. The main focus is on modernizing and reducing unnecessary complexity in the development setup.

Build and Tooling Cleanup:

  • Removed the babel.config.js file and all Babel-related dependencies from package.json, as Babel is no longer needed for this package. [1] [2]

ESLint and Testing Improvements:

  • Simplified the ESLint command in the package.json scripts to lint all files by default and updated the fix command accordingly.
  • Removed the custom Jest environment override from .eslintrc.json, relying on the default configuration instead.
  • Added a test script to package.json for running Jest tests.

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Chores
    • Updated testing and development infrastructure configuration for the core-services package, including adjustments to linting configuration and removal of transpilation tooling dependencies.

✏️ Tip: You can customize this high-level summary in your review settings.

@tassoevan tassoevan added this to the 8.1.0 milestone Dec 22, 2025
@tassoevan tassoevan requested a review from a team December 22, 2025 16:55
@changeset-bot
Copy link

changeset-bot bot commented Dec 22, 2025

⚠️ No Changeset found

Latest commit: 8e5c6fd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 22, 2025

Walkthrough

Removed Babel configuration and related tooling from the core-services package. Updated ESLint configuration to remove Jest-specific environment settings for spec files, simplified lint commands, added a Jest test script, and removed Babel-related devDependencies.

Changes

Cohort / File(s) Change Summary
Build tooling and configuration cleanup
packages/core-services/.eslintrc.json, packages/core-services/babel.config.js, packages/core-services/package.json
Removed ESLint Jest environment overrides block for spec files; deleted babel.config.js file entirely; updated package.json to remove @babel/core, @babel/preset-env, @babel/preset-typescript, and babel-jest devDependencies; simplified lint commands from explicit file patterns to eslint . and eslint --fix .; added test: jest script.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Straightforward removal of Babel configuration and dependencies across 3 coordinated files with no complex logic changes
  • Verify that removing Babel transpilation does not break existing builds or tests
  • Confirm that ESLint configuration change does not inadvertently affect test file linting

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • ggazzo

Poem

🐰 Babel bids farewell, config files take flight,
Jest rules refined, ESLint set right,
Simpler the build, cleaner the way,
Core services brightened—hip hip hooray! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'chore(core-services): Review build configuration' is vague and generic, using the non-descriptive term 'Review' that doesn't clearly convey the specific changes made (removal of Babel config, simplification of scripts). Revise the title to be more specific about the main change, such as 'chore(core-services): Remove Babel configuration and simplify build setup' to clearly indicate what was removed and why.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/core-services-build-configuration

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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)
packages/core-services/package.json (1)

15-16: Optional: Consider consolidating duplicate test scripts.

Both test and testunit scripts run the same command (jest). While harmless, you might consider removing testunit if it's no longer needed, or document why both exist if they serve different purposes in your workflow.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a587ab3 and 8e5c6fd.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (3)
  • packages/core-services/.eslintrc.json
  • packages/core-services/babel.config.js
  • packages/core-services/package.json
💤 Files with no reviewable changes (2)
  • packages/core-services/.eslintrc.json
  • packages/core-services/babel.config.js
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37547
File: packages/i18n/src/locales/en.i18n.json:634-634
Timestamp: 2025-11-19T12:32:29.696Z
Learning: Repo: RocketChat/Rocket.Chat
Context: i18n workflow
Learning: In this repository, new translation keys should be added to packages/i18n/src/locales/en.i18n.json only; other locale files are populated via the external translation pipeline and/or fall back to English. Do not request adding the same key to all locale files in future reviews.
📚 Learning: 2025-12-10T21:00:54.909Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37091
File: ee/packages/abac/jest.config.ts:4-7
Timestamp: 2025-12-10T21:00:54.909Z
Learning: Rocket.Chat monorepo: Jest testMatch pattern '<rootDir>/src/**/*.spec.(ts|js|mjs)' is valid in this repo and used across multiple packages (e.g., packages/tools, ee/packages/omnichannel-services). Do not flag it as invalid in future reviews.

Applied to files:

  • packages/core-services/package.json
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to **/*.{ts,tsx,js} : Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests

Applied to files:

  • packages/core-services/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (1)
packages/core-services/package.json (1)

15-16: The test scripts will run successfully with the current configuration. TypeScript transformation is handled by @swc/jest, which is already included as a dependency in @rocket.chat/jest-presets and properly inherited by the core-services jest configuration.

Likely an incorrect or invalid review comment.

Comment on lines +13 to +14
"lint": "eslint .",
"lint:fix": "eslint --fix .",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify ESLint configuration for Jest globals

# Check the base ESLint config for Jest support
echo "=== Checking @rocket.chat/eslint-config for Jest support ==="
find . -path "*/eslint-config*" -name "*.js" -o -path "*/eslint-config*" -name ".eslintrc*" 2>/dev/null | head -5
echo ""

# Look for @rocket.chat/eslint-config in packages
fd "eslint-config" -t d | head -5

# Check the main eslint-config directory
if [ -d "packages/eslint-config" ]; then
  echo "=== Contents of packages/eslint-config ==="
  ls -la packages/eslint-config/
  echo ""
  echo "=== Main config file ==="
  cat packages/eslint-config/index.js 2>/dev/null || cat packages/eslint-config/.eslintrc.json 2>/dev/null || echo "Not found"
fi

# Check packages/core-services ESLint configuration
echo -e "\n=== packages/core-services ESLint config ==="
if [ -d "packages/core-services" ]; then
  cat packages/core-services/.eslintrc.json 2>/dev/null || echo ".eslintrc.json not found"
fi

# Check root .eslintrc.json for Jest overrides
echo -e "\n=== Root .eslintrc.json (first 50 lines) ==="
head -50 .eslintrc.json 2>/dev/null || echo "Not found"

# Check if spec files exist in core-services
echo -e "\n=== Check for spec files in packages/core-services ==="
find packages/core-services -name "*.spec.ts" -o -name "*.spec.js" 2>/dev/null | head -10

Repository: RocketChat/Rocket.Chat

Length of output: 1589


🏁 Script executed:

#!/bin/bash
# Check the standard ESLint config content
echo "=== packages/eslint-config/standard/index.js ==="
cat packages/eslint-config/standard/index.js

# Check if other packages in monorepo have Jest spec files
echo -e "\n=== Packages with spec files in monorepo ==="
find packages ee/packages -name "*.spec.ts" -o -name "*.spec.js" 2>/dev/null | head -20

# Check ESLint config in one package that has spec files (if any)
echo -e "\n=== Checking for ESLint overrides in packages with tests ==="
for pkg in $(find packages ee/packages -maxdepth 2 -name ".eslintrc.json" | head -5); do
  if grep -l "files.*spec" "$pkg" 2>/dev/null; then
    echo "Found Jest override in: $pkg"
    cat "$pkg"
  fi
done

# Check if ee/packages/abac has Jest config
echo -e "\n=== ee/packages/abac/.eslintrc.json ==="
cat ee/packages/abac/.eslintrc.json 2>/dev/null || echo "Not found"

Repository: RocketChat/Rocket.Chat

Length of output: 5328


The simplified lint commands are appropriate. However, note that @rocket.chat/eslint-config does not include Jest globals support by default. If test files are added to this package in the future, ensure Jest globals (describe, it, expect, etc.) are either imported from @jest/globals in test files or configure ESLint overrides with Jest support.

🤖 Prompt for AI Agents
In packages/core-services/package.json around lines 13 to 14, the lint scripts
are fine but the project ESLint config (@rocket.chat/eslint-config) doesn't
enable Jest globals; to prepare for future test files either (A) add an ESLint
override in the package's ESLint config enabling the jest environment or adding
the recommended plugin/config for Jest so describe/it/expect are recognized, or
(B) ensure test files import Jest globals from @jest/globals; implement one of
these approaches to avoid lint errors when adding tests.

@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.78%. Comparing base (a587ab3) to head (8e5c6fd).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37925      +/-   ##
===========================================
+ Coverage    71.70%   71.78%   +0.08%     
===========================================
  Files         1453     1453              
  Lines        76689    76689              
  Branches     11138    11132       -6     
===========================================
+ Hits         54988    55054      +66     
+ Misses       21274    21206      -68     
- Partials       427      429       +2     
Flag Coverage Δ
unit 71.78% <ø> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@github-actions
Copy link
Contributor

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.1GiB 1.1GiB +11MiB
rocketchat 355MiB 345MiB +11MiB
omnichannel-transcript-service 132MiB 132MiB +336B
queue-worker-service 132MiB 132MiB +146B
ddp-streamer-service 126MiB 126MiB +372B
account-service 113MiB 113MiB +928B
authorization-service 111MiB 111MiB +372B
presence-service 111MiB 111MiB +448B

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/15 22:28", "11/16 01:28", "11/17 23:50", "11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 20:15", "12/09 22:17", "12/10 23:26", "12/11 21:56", "12/12 22:45", "12/13 01:34", "12/15 22:31", "12/16 22:18", "12/17 21:04", "12/18 23:12", "12/19 23:27", "12/20 21:03", "12/22 17:24 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "rocketchat" [0.36, 0.36, 0.35, 0.35, 0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.35]
Loading

Statistics (last 26 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.2GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 1.1GiB
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-37925
  • Baseline: develop
  • Timestamp: 2025-12-22 17:24:45 UTC
  • Historical data points: 26

Updated: Mon, 22 Dec 2025 17:24:46 GMT

@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Dec 22, 2025
@ggazzo ggazzo merged commit 0f6159d into develop Dec 22, 2025
74 of 79 checks passed
@ggazzo ggazzo deleted the chore/core-services-build-configuration branch December 22, 2025 18:17
gaolin1 pushed a commit to gaolin1/medsense.webchat that referenced this pull request Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants