Skip to content

fix: keep barrels outside the target directory - #4

Open
everton-dgn wants to merge 1 commit into
webpro-nl:mainfrom
everton-dgn:fix/respect-barrel-directory-boundaries
Open

everton-dgn wants to merge 1 commit into
webpro-nl:mainfrom
everton-dgn:fix/respect-barrel-directory-boundaries

Conversation

@everton-dgn

Copy link
Copy Markdown

Running with cwd: "packages/app" can delete a barrel in packages/app-shared. The current prefix check treats that sibling as part of app, even though its other consumers were never scanned.

Keep the existing path spelling requirement and add path-relative containment in both classification passes. A write-mode regression verifies that the sibling barrel and its consumer survive while an eligible barrel inside app is still removed. Unit cases cover root directories, trailing separators and Windows path forms.

Validation: 188 tests, build, typecheck, lint and formatting passed. Build/tests and installed-check also passed on the CI's Node 24. Windows paths were tested with path.win32; no Windows runtime was used.

Running with `cwd: "packages/app"` can delete a barrel in `packages/app-shared`. The current prefix check treats that sibling as part of app, even though its other consumers were never scanned.

Keep the existing path spelling requirement and add path-relative containment in both classification passes. A write-mode regression verifies that the sibling barrel and its consumer survive while an eligible barrel inside app is still removed. Unit cases cover root directories, trailing separators and Windows path forms.

Validation: 188 tests, build, typecheck, lint and formatting passed. Build/tests and installed-check also passed on the CI's Node 24. Windows paths were tested with path.win32; no Windows runtime was used.
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