Skip to content

chore: build @rocket.chat/ai-search to dist instead of raw ts - #41753

Merged
dionisio-bot[bot] merged 1 commit into
developfrom
chore/ai-search-build
Aug 12, 2026
Merged

chore: build @rocket.chat/ai-search to dist instead of raw ts#41753
dionisio-bot[bot] merged 1 commit into
developfrom
chore/ai-search-build

Conversation

@dougfabris

@dougfabris dougfabris commented Aug 11, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

@rocket.chat/ai-search is the only client-consumed workspace package whose entry points resolve to raw TypeScript instead of compiled output:

"main": "./src/index.ts",
"types": "./src/index.ts",
"typings": "./src/index.ts",

This came from 4b57346 (feat: (poc) Unified AI Search, #40890), which moved the package off the dist entry points it originally had. Every other client-consumed package (ui-client, ui-contexts, core-typings, …) ships from dist.

Shipping raw .ts means each consumer's bundler has to transpile the package itself. Meteor and Jest do; Storybook's webpack build doesn't, and it fails:

ERROR in ../../packages/ai-search/src/index.ts 5:7
Module parse failed: Unexpected token (5:7)
> export type * from './types';

Storybook only applies swc-loader under its detected project root, and packages/ can fall outside that root, leaving the TypeScript untranspiled for webpack's JS parser.

Building to dist removes the dependency on that detection — webpack parses plain JS, exactly as it already does for every other workspace package.

Packaging only; no source or runtime changes. The build/dev scripts, tsconfig.json, and "files": ["/dist"] were already in place — only the three entry-point fields move back to the compiled output.

Issue(s)

Steps to test or reproduce

  1. yarn build at the repo root, so packages/ai-search/dist exists.
  2. cd apps/meteor && yarn storybook
  3. The preview compiles with no errors and Storybook starts.
    Before this change, step 3 ends in Failed to build the preview.
    Also verified: build, typecheck, and test all pass in packages/ai-search.

Further comments

Summary by CodeRabbit

  • Chores
    • Updated package entry points to use compiled distribution files, improving package consumption and release reliability.

CORE-2547

@dionisio-bot

dionisio-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1c4ecc8

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

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The AI Search package now exposes compiled files from dist through its main, types, and typings entry points.

Changes

Package entry points

Layer / File(s) Summary
Compiled package entry points
packages/ai-search/package.json
The main, types, and typings fields now reference compiled files under ./dist.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested labels: type: chore

Suggested reviewers: rocketchat-github-ci

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the change from raw TypeScript entry points to compiled files in dist.

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.

@dougfabris dougfabris changed the title chore: build @rocket.chat/ai-search to dist chore: build @rocket.chat/ai-search to dist instead of raw ts Aug 11, 2026
@dougfabris dougfabris added this to the 8.8.0 milestone Aug 11, 2026
@dougfabris
dougfabris marked this pull request as ready for review August 11, 2026 20:35
@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.69%. Comparing base (6083f5b) to head (1c4ecc8).
⚠️ Report is 10 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41753      +/-   ##
===========================================
- Coverage    68.69%   68.69%   -0.01%     
===========================================
  Files         4167     4167              
  Lines       159437   159437              
  Branches     28334    28271      -63     
===========================================
- Hits        109524   109521       -3     
+ Misses       44754    44748       -6     
- Partials      5159     5168       +9     
Flag Coverage Δ
e2e 58.91% <ø> (+0.04%) ⬆️
e2e-api 45.74% <ø> (+<0.01%) ⬆️
unit 70.57% <ø> (-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.

@dougfabris
dougfabris requested a review from Dnouv August 11, 2026 20:36

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 1 file

Re-trigger cubic

@tassoevan
tassoevan added this pull request to the merge queue Aug 11, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 11, 2026
@cardoso cardoso added the stat: QA assured Means it has been tested and approved by a company insider label Aug 12, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Aug 12, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Aug 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 12, 2026
@cardoso cardoso removed the stat: QA assured Means it has been tested and approved by a company insider label Aug 12, 2026
@dionisio-bot dionisio-bot Bot removed the stat: ready to merge PR tested and approved waiting for merge label Aug 12, 2026
@cardoso cardoso added the stat: QA assured Means it has been tested and approved by a company insider label Aug 12, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Aug 12, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Aug 12, 2026
Merged via the queue into develop with commit f9d3ec3 Aug 12, 2026
56 checks passed
@dionisio-bot
dionisio-bot Bot deleted the chore/ai-search-build branch August 12, 2026 16:47
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 type: chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants