chore(build): remove outDir before tsup so no empty dirs survive - #19
Merged
Conversation
tsup's clean:true deletes files but leaves empty directories behind. That produced a phantom dist/data during the pre-publish check on #18, which made a docs-only release look like it had changed dist — exactly the wrong false alarm to hit while deciding whether 'patch' was the right bump. Removing the outDir outright is deterministic and needs no new dependency. Verified by planting dist/data and dist/nested/deep before a build: 0 empty directories survive, and the output stays byte-identical to the published 0.5.0 dist. No changeset: consumers receive identical bytes, so this warrants no version entry.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The one loose end from the #18 review. Build tooling only — no changeset, because consumers receive byte-identical output.
Problem
tsup'sclean: truedeletes files but leaves empty directories behind:That produced a phantom
dist/dataduring the pre-publish integrity check on #18, making a docs-only release look like it had changeddist— the worst possible false alarm while deciding whetherpatchwas the correct bump.Fix
Remove the outDir outright before
tsup. Deterministic, no new dependency:Verified
Planted
dist/dataanddist/nested/deep, then rebuilt:That last check matters — the release workflow runs
biome format --write package.json, so a script edit that left the file unformatted would show up as noise in the next Version Packages PR.