Skip to content

Conversation

@tassoevan
Copy link
Contributor

@tassoevan tassoevan commented Nov 25, 2025

Proposed changes (including videos or screenshots)

It splits TypeScript configurations for @rocket.chat/tools.

Issue(s)

ARCH-1895

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Chores
    • Updated build configuration with proper package export points
    • Enhanced TypeScript build setup with separate configuration for production builds
    • Added type-checking script to validate code during development
    • Refined ESLint configuration for improved linting consistency

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

@tassoevan tassoevan added this to the 7.14.0 milestone Nov 25, 2025
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Nov 25, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is targeting the wrong base branch. It should target 7.14.0, but it targets 7.13.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Nov 25, 2025

⚠️ No Changeset found

Latest commit: 075a768

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 Nov 25, 2025

Walkthrough

Updates build configuration for the tools package: modifies ESLint ignorePatterns, adds package.json entry points and build scripts, and creates a dedicated TypeScript build configuration that excludes test files from compilation.

Changes

Cohort / File(s) Summary
ESLint Configuration
packages/tools/.eslintrc.json
Updated ignorePatterns from "**/dist" to "dist" for more specific dist directory exclusion
Package Configuration
packages/tools/package.json
Added entry points (main, typings, files); introduced build, dev (watch mode), and typecheck scripts using separate tsconfig.build.json; removed old build scripts
TypeScript Build Configuration
packages/tools/tsconfig.build.json
New file extending root tsconfig.json with **/*.spec.ts excluded from compilation

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Standard, homogeneous configuration changes following established patterns
  • ESLint ignorePatterns update is a single-line modification
  • Package.json changes are straightforward field and script additions
  • New tsconfig.build.json follows typical build configuration conventions

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • ggazzo

Poem

🐰 The tools are building strong and true,
With configs fresh and patterns new,
TypeScript files exclude the test,
Build scripts configured for the best! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The linked issue ARCH-1895 provides no specific coding requirements beyond the generic title, making it impossible to validate whether code changes meet stated objectives. The linked issue should contain detailed requirements for the build configuration review. Add specific acceptance criteria or implementation requirements to the issue.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: reviewing the build configuration for the tools package by splitting TypeScript configurations and updating ESLint/package.json settings.
Out of Scope Changes check ✅ Passed All changes are directly related to the build configuration review: ESLint config updates, package.json build/type definitions, and TypeScript build configuration separation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/tools-build-configuration

📜 Recent review details

Configuration used: CodeRabbit 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 f5eedbe and 075a768.

📒 Files selected for processing (3)
  • packages/tools/.eslintrc.json (1 hunks)
  • packages/tools/package.json (1 hunks)
  • packages/tools/tsconfig.build.json (1 hunks)
🧰 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-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 **/*.spec.ts : Use `.spec.ts` extension for test files (e.g., `login.spec.ts`)

Applied to files:

  • packages/tools/tsconfig.build.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/tools/tsconfig.build.json
🔇 Additional comments (5)
packages/tools/.eslintrc.json (1)

3-3: Pattern change is appropriate for the new build structure.

The change from "**/dist" to "dist" correctly reflects the top-level build output directory introduced by the updated package.json (main: "./dist/index.js").

packages/tools/tsconfig.build.json (1)

1-4: Build configuration properly excludes test files.

The new tsconfig.build.json correctly extends the base configuration and excludes .spec.ts files, preventing test code from being included in production builds.

packages/tools/package.json (3)

5-9: Public package exports properly configured.

The main, typings, and files fields correctly point to the dist directory, ensuring the package exports only compiled artifacts.


11-12: Build and typecheck workflow is well-structured.

The separation of concerns is appropriate:

  • build and dev scripts use tsconfig.build.json to exclude test files from compilation
  • typecheck uses tsconfig.json to verify types in all files (including tests)

This allows type checking to catch errors in test code while keeping the production build lean.

Also applies to: 18-18


23-30: DevDependencies versions are consistent and appropriate.

Using ~ constraints for TypeScript 5.9.3, Jest 30.2.0, ESLint 8.45.0, and @types/jest 30.0.0 allows patch updates while maintaining stability. The workspace: protocols for local @rocket.chat packages correctly reference the monorepo structure.


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.

@github-actions
Copy link
Contributor

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.2GiB 1.2GiB +12MiB
rocketchat 358MiB 346MiB +12MiB
omnichannel-transcript-service 132MiB 132MiB -268B
queue-worker-service 132MiB 132MiB -849B
ddp-streamer-service 127MiB 127MiB -539B
account-service 114MiB 114MiB -14KiB
stream-hub-service 111MiB 111MiB +278B
authorization-service 111MiB 111MiB -125B
presence-service 111MiB 111MiB -2.3KiB

📊 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/25 19:46 (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]
  line "authorization-service" [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]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14, 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]
  line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13]
  line "rocketchat" [0.36, 0.36, 0.35, 0.35, 0.35, 0.34, 0.34, 0.35]
  line "stream-hub-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
Loading

Statistics (last 7 days):

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

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

  • Tag: pr-37610
  • Baseline: develop
  • Timestamp: 2025-11-25 19:46:54 UTC
  • Historical data points: 7

Updated: Tue, 25 Nov 2025 19:46:55 GMT

@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.84%. Comparing base (f5eedbe) to head (075a768).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #37610   +/-   ##
========================================
  Coverage    68.83%   68.84%           
========================================
  Files         3361     3361           
  Lines       114340   114340           
  Branches     20619    20619           
========================================
+ Hits         78706    78717   +11     
+ Misses       33536    33532    -4     
+ Partials      2098     2091    -7     
Flag Coverage Δ
e2e 57.35% <ø> (+0.01%) ⬆️
e2e-api 42.28% <ø> (+0.05%) ⬆️

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.

@tassoevan tassoevan marked this pull request as ready for review November 25, 2025 20:36
@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Nov 26, 2025
@ggazzo ggazzo merged commit b33673b into develop Nov 26, 2025
89 of 92 checks passed
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Nov 26, 2025
@ggazzo ggazzo deleted the chore/tools-build-configuration branch November 26, 2025 12:11
@dougfabris dougfabris modified the milestones: 7.14.0, 8.0.0 Jan 19, 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 stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants