TAP/Zephyr workflow audit item 20: Fix temporary DTS project root inference and preserve diagnostics
Target: Module Federation DTS package owner
Type: Bug
Priority: P1
Suggested labels: bug, dts, typescript, diagnostics
Problem
The DTS plugin writes a temporary TypeScript project under node_modules/.federation. When the source project omits an explicit rootDir, TypeScript can infer the temporary directory as the project root and report TS6059 for exposed files under the real src directory. Default temporary-config deletion also removes the most useful reproduction evidence.
Reproduction
Use an Rsbuild remote with an exposed src component, DTS enabled, and a TypeScript config without explicit rootDir. Trigger type generation and inspect the generated temporary config and listFilesOnly/TYPE-001 path.
Proposed change
Carry the source project’s effective root semantics into the temporary project or compute a safe common source root. Preserve diagnostic artifacts automatically when generation fails.
Acceptance criteria
Verification evidence
Attach a regression fixture reproducing the original TS6059 shape before the fix and passing after it.
Target: Module Federation DTS package owner
Type: Bug
Priority: P1
Suggested labels:
bug,dts,typescript,diagnosticsProblem
The DTS plugin writes a temporary TypeScript project under
node_modules/.federation. When the source project omits an explicitrootDir, TypeScript can infer the temporary directory as the project root and report TS6059 for exposed files under the realsrcdirectory. Default temporary-config deletion also removes the most useful reproduction evidence.Reproduction
Use an Rsbuild remote with an exposed
srccomponent, DTS enabled, and a TypeScript config without explicitrootDir. Trigger type generation and inspect the generated temporary config andlistFilesOnly/TYPE-001 path.Proposed change
Carry the source project’s effective root semantics into the temporary project or compute a safe common source root. Preserve diagnostic artifacts automatically when generation fails.
Acceptance criteria
.federationdoes not fail solely because the temporary config lives under.federation.rootDirbehavior remains unchanged.rootDirreceive a deterministic effective root that includes all exposed and dependent source files.deleteTsConfig: truedeletes successful temporary state but retains or copies failed-run diagnostics to a documented location.@mf-types.zipgeneration remains unchanged.Verification evidence
Attach a regression fixture reproducing the original TS6059 shape before the fix and passing after it.