fix(cli): bundle patched diff parser dependency#2957
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: Approved Build configuration change that adds You can customize Macroscope's approvability policy. Learn more. |
|
🚀 Expo continuous deployment is ready!
|
Dismissing prior approval to re-evaluate 5bd69e2
Summary
@pierre/diffsinto the publishedt3CLI bundleWhy
The workspace uses a pnpm patch to add
@pierre/diffs/utils/parsePatchFilesto the package exports map. Local builds work because that patch is applied. Published npm users install vanilla@pierre/diffs, so the currentt3@nightlybundle crashes immediately withERR_PACKAGE_PATH_NOT_EXPORTEDwhen Node resolves the external subpath import.Bundling
@pierre/diffskeeps the source subpath import, preserves the React Native-compatible import strategy, and removes the external runtime dependency on the patched exports map.Validation
vp test apps/server/src/packageConfig.test.ts apps/server/src/checkpointing/Diffs.test.tsvp run --filter t3 build:bundlenode apps/server/dist/bin.mjs --helpapps/server/dist/bin.mjshas no external@pierre/diffsimportvp checkvp installto repair a partial local install from filtered deploy probesvp run typecheckNote
Low Risk
Packaging-only change to dependency bundling; reduces runtime failure risk for published CLI users without touching auth or data paths.
Overview
The published
t3CLI was resolving@pierre/diffsat runtime using a pnpm-patched subpath that npm installs do not export, causing immediateERR_PACKAGE_PATH_NOT_EXPORTEDcrashes.This change always bundles
@pierre/diffsinto the server pack output alongside existing internal prefixes, and replaces the inlinealwaysBundlepredicate with an exportedshouldBundleCliDependencyhelper backed bybundledPackagePrefixesso the bundling rule is explicit and testable.Reviewed by Cursor Bugbot for commit 5bd69e2. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Bundle
@pierre/diffsdependency in CLI packagingAdds
@pierre/diffsto the list of prefixes in vite.config.ts that are always bundled during CLI packaging. Extracts the prefix list into abundledPackagePrefixesconstant and ashouldBundleCliDependencyhelper, replacing the previous inline predicate.Macroscope summarized 5bd69e2.