Repository navigation
fix(cli): let .hyperframesignore negation re-include hidden directories - #3859
Merged
Merged
Conversation
`shouldIgnoreSegment` unconditionally skipped any dot-prefixed path segment before `collectProjectFiles` ever consulted the project's ignore matcher, so a `.hyperframesignore` negation rule (e.g. `!/.media/`) could never re-include a hidden directory in the publish or cloud-render archive — the walker discarded it first. Move the dot-prefix exclusion into the same ignore matcher that already handles `.hyperframesignore` (as a default `.*` pattern in `DEFAULT_PROJECT_IGNORE`), so it participates in normal gitignore-style negation like any other default exclusion. `shouldIgnoreSegment` now only hard-skips the fixed, non-negotiable set (`.git`, `node_modules`, `.DS_Store`, etc.) that no `.hyperframesignore` rule should be able to override. Adds regression coverage for both directions: negation re-including a hidden directory, and an unmatched hidden directory still being excluded by default. Co-Authored-By: Claude Sonnet 5 <[email protected]>
miguel-heygen
approved these changes
Sep 11, 2026
4 tasks done
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.
What
.hyperframesignorenegation rules (e.g.!/.media/) could never re-include a hidden (dot-prefixed) directory in the publish or cloud-render project archive, even though negation works correctly for every other kind of path.Why
collectProjectFiles's walker calledshouldIgnoreSegmentfirst for every directory entry, and that check unconditionally excluded any name starting with.— before the project's ignore matcher (built fromDEFAULT_PROJECT_IGNORE+.hyperframesignore, where negation is evaluated) ever ran on that path. A hidden directory was discarded at the walk step, so no negation rule downstream could ever reach it.How
shouldIgnoreSegmentshort-circuit and into the same ignore matcher that already parses.hyperframesignore, as a new default pattern (.*) inDEFAULT_PROJECT_IGNORE. Dot-prefixed paths are still excluded by default, but now via the same gitignore-style negation path as everything else, so a project's.hyperframesignorecan override it.shouldIgnoreSegmentis now reserved for the fixed, non-negotiable exclusions only (.git,node_modules,dist,.next,coverage,.DS_Store,Thumbs.db) — the set no.hyperframesignorerule should ever be able to reach..hyperframesignorenegation re-including a hidden directory, and an unmatched hidden directory still being excluded by default (no behavior change for existing projects without an explicit negation rule).Testing
bunx vitest run packages/cli/src/utils/publishProject.test.ts— 40/40 passing (2 new)bunx vitest run packages/cli/src/commands/cloud/render.test.ts— 10/10 passing (cloud render reuses the same archive builder)bunx tsc --noEmitinpackages/cli— cleanbunx oxlint/bunx oxfmt --writeon changed files — clean, no changes needed🤖 Generated with Claude Code