Skip to content

Conversation

@tassoevan
Copy link
Contributor

@tassoevan tassoevan commented Nov 27, 2025

Proposed changes (including videos or screenshots)

It normalizes TypeScript and ESLint configurations for @rocket.chat/patch-injection.

Issue(s)

ARCH-1899

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Chores
    • Consolidated package distribution metadata and development scripts into unified configuration structure.
    • Updated linting patterns and TypeScript compiler output settings to align with project standards.

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

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

dionisio-bot bot commented Nov 27, 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 27, 2025

⚠️ No Changeset found

Latest commit: 304a1e5

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 27, 2025

Walkthrough

Configuration files for the patch-injection package are updated: ESLint's ignorePatterns simplified from recursive to non-recursive, package.json reorganized with consolidated main, typings, files, and scripts entries, and TypeScript compiler module output changed to esnext.

Changes

Cohort / File(s) Summary
Build Configuration
packages/patch-injection/.eslintrc.json, packages/patch-injection/package.json, packages/patch-injection/tsconfig.json
Updated ESLint to ignore non-recursive dist pattern; reorganized package.json main/typings/files fields and build/lint/test scripts; added TypeScript module: "esnext" compiler option

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Configuration-only changes with no functional code modifications
  • Straightforward reorganization of existing package metadata and build settings

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • ggazzo

Poem

🐰 Build configs neat, so clean and tidy,
ESLint patterns trimmed on Friday,
TypeScript modules now flow as esnext,
Package scripts aligned—what comes next?
Hopping forward with configs so bright!

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The linked issue ARCH-1899 has no detailed coding requirements or objectives specified, making it impossible to validate whether the code changes meet specific requirements. Review the linked issue ARCH-1899 to ensure its objectives and requirements are clearly documented and met by the code changes in this PR.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'chore(patch-injection): Review build configuration' directly describes the changeset, which involves reviewing and normalizing build configuration files for the patch-injection package.
Out of Scope Changes check ✅ Passed All changes are limited to build configuration files (.eslintrc.json, package.json, tsconfig.json) for the patch-injection package, directly aligning with the PR's stated objective of reviewing build configuration.
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/patch-injection-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 5dbe482 and 304a1e5.

📒 Files selected for processing (3)
  • packages/patch-injection/.eslintrc.json (1 hunks)
  • packages/patch-injection/package.json (1 hunks)
  • packages/patch-injection/tsconfig.json (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 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.
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37408
File: apps/meteor/client/views/admin/ABAC/useRoomAttributeOptions.tsx:53-69
Timestamp: 2025-11-10T19:06:20.146Z
Learning: In the Rocket.Chat repository, do not provide suggestions or recommendations about code sections marked with TODO comments. The maintainers have already identified these as future work and external reviewers lack the full context about implementation plans and timing.
🔇 Additional comments (5)
packages/patch-injection/package.json (3)

19-26: Dependencies are appropriately pinned.

The devDependencies use consistent tilde constraints (~) for direct packages and workspace protocol for monorepo-internal packages. TypeScript 5.9.3 is compatible with the esnext module output. No concerns identified.


10-18: Jest and ESLint configurations are properly set up.

Verification confirms:

  • jest.config.ts exists in packages/patch-injection/
  • @rocket.chat/jest-presets is included in devDependencies
  • .eslintrc.json is present for ESLint configuration
  • Jest and ESLint are properly listed in devDependencies

The test and testunit scripts are identical, which may be intentional for the monorepo workflow; consider consolidating them if they serve no distinct purpose.


5-9: Build output is correctly configured and will match declared entry points.

The source structure, TypeScript configuration, and package.json entry points are all properly aligned:

  • src/index.ts exists and serves as the entry point
  • tsconfig.json configures rootDir: "./src" and outDir: "./dist" with declaration: true
  • The build script (tsc) will correctly generate dist/index.js and dist/index.d.ts
  • Entry points in package.json ("main" and "typings") correctly reference these generated artifacts
  • The "files": ["/dist"] field is valid (the leading slash anchors to the package root, equivalent to "dist")

No issues detected.

packages/patch-injection/.eslintrc.json (1)

3-3: The ignorePatterns change from "**/dist" to "dist" is correct and safe.

Verification confirms:

  • tsconfig.json specifies "outDir": "./dist" (flat structure at root)
  • No nested dist/ directories exist in src/
  • package.json declares files: ["/dist"] (only root-level dist)

The simplified pattern is appropriate and actually preferable—it's more explicit and avoids unnecessary recursive matching.

packages/patch-injection/tsconfig.json (1)

4-4: Resolve the module format mismatch: "module": "esnext" contradicts the parent config and package.json.

The parent tsconfig (@rocket.chat/tsconfig/server.json) sets "module": "commonjs", but packages/patch-injection/tsconfig.json overrides it to "esnext". Without adding "type": "module" to the package.json, the built code will emit ES2020+ syntax but be resolved as CommonJS by npm, breaking consumers that expect CommonJS.

Either:

  1. Remove the "module": "esnext" override to inherit the parent's "commonjs" setting (recommended for monorepo consistency), or
  2. Add "type": "module" to package.json and ensure all consumers support ESM.

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 +235B
queue-worker-service 132MiB 132MiB -309B
ddp-streamer-service 127MiB 127MiB +943B
account-service 114MiB 114MiB +308B
stream-hub-service 111MiB 111MiB +220B
authorization-service 111MiB 111MiB -256B
presence-service 111MiB 111MiB -88B

📊 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 04:40 (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-37630
  • Baseline: develop
  • Timestamp: 2025-11-27 04:40:16 UTC
  • Historical data points: 7

Updated: Thu, 27 Nov 2025 04:40:16 GMT

@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.81%. Comparing base (f5eedbe) to head (304a1e5).
⚠️ Report is 10 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37630      +/-   ##
===========================================
- Coverage    68.83%   68.81%   -0.02%     
===========================================
  Files         3361     3361              
  Lines       114340   114291      -49     
  Branches     20619    20618       -1     
===========================================
- Hits         78706    78654      -52     
- Misses       33536    33542       +6     
+ Partials      2098     2095       -3     
Flag Coverage Δ
e2e 57.32% <ø> (-0.02%) ⬇️
e2e-api 42.27% <ø> (+0.03%) ⬆️

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 27, 2025 14:05
@tassoevan tassoevan requested a review from ggazzo November 27, 2025 14:05
@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Nov 27, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Nov 27, 2025
@ggazzo ggazzo merged commit 66a2a20 into develop Nov 27, 2025
165 of 174 checks passed
@ggazzo ggazzo deleted the chore/patch-injection-build-configuration branch November 27, 2025 17:06
@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.

3 participants