Skip to content

fix(cli): let .hyperframesignore negation re-include hidden directories - #3859

Merged
miguel-heygen merged 1 commit into
mainfrom
fix/hyperframesignore-hidden-dir-negation
Sep 11, 2026
Merged

miguel-heygen merged 1 commit into
mainfrom
fix/hyperframesignore-hidden-dir-negation

Conversation

@miga-heygen

Copy link
Copy Markdown
Contributor

What

.hyperframesignore negation 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 called shouldIgnoreSegment first for every directory entry, and that check unconditionally excluded any name starting with . — before the project's ignore matcher (built from DEFAULT_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

  • Moved the dot-prefix exclusion out of the hard shouldIgnoreSegment short-circuit and into the same ignore matcher that already parses .hyperframesignore, as a new default pattern (.*) in DEFAULT_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 .hyperframesignore can override it.
  • shouldIgnoreSegment is now reserved for the fixed, non-negotiable exclusions only (.git, node_modules, dist, .next, coverage, .DS_Store, Thumbs.db) — the set no .hyperframesignore rule should ever be able to reach.
  • Added regression coverage for both directions: a .hyperframesignore negation 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 --noEmit in packages/cli — clean
  • bunx oxlint / bunx oxfmt --write on changed files — clean, no changes needed

🤖 Generated with Claude Code

`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
miguel-heygen merged commit 9c84277 into main Sep 11, 2026
50 checks passed
@miguel-heygen
miguel-heygen deleted the fix/hyperframesignore-hidden-dir-negation branch September 11, 2026 03:20
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.

2 participants