chore: build @rocket.chat/ai-search to dist instead of raw ts - #41753
Conversation
|
Looks like this PR is ready to merge! 🎉 |
|
WalkthroughThe AI Search package now exposes compiled files from ChangesPackage entry points
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
@rocket.chat/ai-search to dist instead of raw ts
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Proposed changes (including videos or screenshots)
@rocket.chat/ai-searchis the only client-consumed workspace package whose entry points resolve to raw TypeScript instead of compiled output: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
.tsmeans each consumer's bundler has to transpile the package itself. Meteor and Jest do; Storybook's webpack build doesn't, and it fails:Storybook only applies
swc-loaderunder its detected project root, andpackages/can fall outside that root, leaving the TypeScript untranspiled for webpack's JS parser.Building to
distremoves 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/devscripts,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
yarn buildat the repo root, sopackages/ai-search/distexists.cd apps/meteor && yarn storybookBefore this change, step 3 ends in
Failed to build the preview.Also verified:
build,typecheck, andtestall pass inpackages/ai-search.Further comments
Summary by CodeRabbit
CORE-2547