ReviewOS

also looking at this

stacks/bun-plugin-auto-imports

fix: resolve generated export collisions consistently

#1186
Merged chris wants to merge codex/runtime-export-collisions into main
3 files +107 -5
README.mdmodified+9-0
Changes to README.md
@@ -93,6 +93,15 @@ declarations, and as the fourth argument to `generateGlobalsScript()`. This keep
9393generated package imports stable when the consumer directory or install layout
9494changes. The package must export every returned specifier.
9595
96### Export name collisions
97
98Directory scans use the caller's directory order and sorted file paths. The first
99registration of an exported name wins, matching auto-import injection. Runtime
100indexes, their returned export metadata, globals scripts and global declarations
101use that same selection. Repeated overload signatures and re-exports do not emit
102duplicate names. Import a module explicitly when helpers in different modules
103share a name but have different meanings.
104
96105## Testing
97106
98107```bash