Skip to content

Conversation

@tassoevan
Copy link
Contributor

@tassoevan tassoevan commented Nov 26, 2025

Proposed changes (including videos or screenshots)

It normalizes ESLint configuration for @rocket.chat/rest-typings.

Issue(s)

ARCH-1897

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • New Features

    • Package now includes proper distribution exports and TypeScript type definitions metadata.
  • Bug Fixes

    • Updated type definitions for OpenAPI security scheme components to improve type accuracy.

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

@dionisio-bot
Copy link
Contributor

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

⚠️ No Changeset found

Latest commit: c2fc916

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

Walkthrough

Build configuration cleanup for the rest-typings package: removes Jest-specific ESLint settings, adds package metadata (main, typings, files entries), replaces test script with typecheck script, adjusts type definitions from empty object to unknown, and removes an unused import.

Changes

Cohort / File(s) Summary
Build configuration
packages/rest-typings/.eslintrc.json, packages/rest-typings/package.json
Removed Jest-specific ESLint configuration (overrides, plugin, globals); simplified ignore patterns. Added public package metadata (main, typings, files); replaced test script with typecheck script; reordered devDependencies block.
Type definitions
packages/rest-typings/src/default/index.ts, packages/rest-typings/src/index.ts
Changed components.securitySchemes.schemas type from {} to unknown in DefaultEndpoints interface. Removed unused EnterpriseEndpoints import.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • packages/rest-typings/package.json: Verify metadata fields (main, typings, files) align with actual build output and export structure
  • packages/rest-typings/src/default/index.ts: Confirm type change from {} to unknown for components.securitySchemes.schemas maintains backward compatibility and intended type safety

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • ggazzo

Poem

🐰 Jest is gone, configs are clean,
Types refined, metadata seen,
Typecheck scripts replace the test,
Build settings put to rest! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Changes to DefaultEndpoints interface (schemas type from {} to unknown) appear unrelated to build configuration review and may be out of scope. Clarify whether the DefaultEndpoints type change is intentional and related to build configuration; if not, move it to a separate PR focused on type refinements.
Linked Issues check ❓ Inconclusive The PR references ARCH-1897 but the linked issue provides no specific coding requirements or objectives to validate against, making compliance assessment impossible. Review the linked issue ARCH-1897 to ensure all specified coding requirements have been met; currently insufficient details are available for validation.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change of reviewing and normalizing build configuration for the rest-typings package, aligning with the actual modifications to ESLint, package.json, and related build files.
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/rest-typings-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.

@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 -1.2KiB
queue-worker-service 132MiB 132MiB -487B
ddp-streamer-service 127MiB 127MiB -119B
account-service 114MiB 114MiB -3.3KiB
stream-hub-service 111MiB 111MiB -1.5KiB
authorization-service 111MiB 111MiB +314B
presence-service 111MiB 111MiB +641B

📊 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/26 17:48 (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-37618
  • Baseline: develop
  • Timestamp: 2025-11-26 17:48:56 UTC
  • Historical data points: 7

Updated: Wed, 26 Nov 2025 17:48:56 GMT

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

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

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37618      +/-   ##
===========================================
- Coverage    68.83%   68.82%   -0.02%     
===========================================
  Files         3361     3361              
  Lines       114340   114291      -49     
  Branches     20619    20618       -1     
===========================================
- Hits         78706    78657      -49     
- Misses       33536    33540       +4     
+ Partials      2098     2094       -4     
Flag Coverage Δ
e2e 57.33% <ø> (-0.01%) ⬇️
e2e-api 42.21% <ø> (-0.02%) ⬇️

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 26, 2025 18:14
@tassoevan tassoevan requested review from a team as code owners November 26, 2025 18:14
@tassoevan tassoevan added this to the 7.14.0 milestone Nov 26, 2025
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: 0

🧹 Nitpick comments (2)
packages/rest-typings/src/default/index.ts (1)

72-85: schemas: unknown is a safer, more accurate type for opaque OpenAPI schemas

Changing schemas from {} to unknown avoids implying any object structure and forces consumers to narrow or cast before using it, which matches an “opaque blob from OpenAPI” better than {}.

If you expect to iterate over schema entries in this package in the future, you could later tighten this to something like Record<string, unknown> once you know the access pattern.

packages/rest-typings/package.json (1)

4-30: Validate dist layout for new entrypoints and reconsider @types/jest

  • The new "main" and "typings" assume the build produces dist/index.js and dist/index.d.ts. Please confirm tsconfig.json for this package uses outDir: "dist" and that index is the compiled entry; otherwise publishing could expose broken entrypoints.
  • With Jest-specific config and the test script removed, @types/jest in devDependencies may be dead weight for this package. If there are no Jest tests under this package anymore, consider dropping it:
-    "@types/jest": "~30.0.0",
📜 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 a20c1cc and c2fc916.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • packages/rest-typings/.eslintrc.json (1 hunks)
  • packages/rest-typings/package.json (1 hunks)
  • packages/rest-typings/src/default/index.ts (1 hunks)
  • packages/rest-typings/src/index.ts (0 hunks)
💤 Files with no reviewable changes (1)
  • packages/rest-typings/src/index.ts
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • packages/rest-typings/src/default/index.ts
🧠 Learnings (2)
📓 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/rest-typings/.eslintrc.json
🔇 Additional comments (1)
packages/rest-typings/.eslintrc.json (1)

3-3: ESLint ignorePatterns targeting dist is appropriate for this package

With this .eslintrc at the package root, "dist" correctly ignores the local build output without affecting other folders. Nothing else to adjust here.

@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Nov 26, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Nov 26, 2025
@kodiakhq kodiakhq bot merged commit 5dbe482 into develop Nov 26, 2025
54 checks passed
@kodiakhq kodiakhq bot deleted the chore/rest-typings-build-configuration branch November 26, 2025 18:46
@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