-
Notifications
You must be signed in to change notification settings - Fork 13.1k
chore(rest-typings): Review build configuration #37618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
WalkthroughBuild 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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: unknownis a safer, more accurate type for opaque OpenAPI schemasChanging
schemasfrom{}tounknownavoids 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: Validatedistlayout for new entrypoints and reconsider@types/jest
- The new
"main"and"typings"assume the build producesdist/index.jsanddist/index.d.ts. Please confirmtsconfig.jsonfor this package usesoutDir: "dist"and thatindexis the compiled entry; otherwise publishing could expose broken entrypoints.- With Jest-specific config and the
testscript removed,@types/jestindevDependenciesmay 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.
⛔ Files ignored due to path filters (1)
yarn.lockis 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: ESLintignorePatternstargetingdistis appropriate for this packageWith this
.eslintrcat the package root,"dist"correctly ignores the local build output without affecting other folders. Nothing else to adjust here.
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
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.