Skip to content

fix: preserve selected barrels with remaining consumers - #9

Open
everton-dgn wants to merge 1 commit into
webpro-nl:mainfrom
everton-dgn:fix/preserve-only-barrels-with-remaining-consumers
Open

everton-dgn wants to merge 1 commit into
webpro-nl:mainfrom
everton-dgn:fix/preserve-only-barrels-with-remaining-consumers

Conversation

@everton-dgn

Copy link
Copy Markdown

With --only, consumer registration was skipped. A selected barrel could be deleted while a dynamic import, namespace import or non-TypeScript file still needed it.

Track consumers for explicitly selected barrels, including imports inside files forced to be barrels. Register the full selection before checking its relationships so selection order does not affect preservation, and retain the correct reason for star re-exports. Supported JavaScript namespace consumers now report the same preservation reason as TypeScript consumers.

The 197-test suite passed on Node 24. All 16 focused cases passed on Node 24 and compiled Node 20, including before/after execution, selection-order controls and dry-run/check behavior. Build, typecheck, lint and formatting checks passed.

With --only, consumer registration was skipped. A selected barrel could be deleted while a dynamic import, namespace import or non-TypeScript file still needed it.

Track consumers for explicitly selected barrels, including imports inside files forced to be barrels. Register the full selection before checking its relationships so selection order does not affect preservation, and retain the correct reason for star re-exports. Supported JavaScript namespace consumers now report the same preservation reason as TypeScript consumers.

The 197-test suite passed on Node 24. All 16 focused cases passed on Node 24 and compiled Node 20, including before/after execution, selection-order controls and dry-run/check behavior. Build, typecheck, lint and formatting checks passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant