Skip to content

[WRONG BRANCH] test: distinguish package files from directories - #366

Draft
luvs01 wants to merge 1 commit into
mainfrom
codex/fix-readme-asset-check-vulnerability
Draft

[WRONG BRANCH] test: distinguish package files from directories#366
luvs01 wants to merge 1 commit into
mainfrom
codex/fix-readme-asset-check-vulnerability

Conversation

@luvs01

@luvs01 luvs01 commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Motivation

  • The README asset check treated every package.json files entry as if it could have descendants, allowing nonexistent paths (e.g. assets/banner.png/missing.gif) to be accepted when the listed entry was actually a regular file rather than a directory.

Description

  • Update tests/repo-hygiene.test.ts to detect which files entries are real directories using existsSync + statSync(...).isDirectory(), introduce an isShipped helper that only allows prefix-matching for those directory entries, and add regression assertions that reject imaginary descendants of regular-file entries.

Testing

  • Ran bun test tests/repo-hygiene.test.ts -t 'every relative README asset is actually shipped in the npm tarball', bun run typecheck, and bun run privacy:scan, and all three checks passed.

Codex Task

@github-actions

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the chore label Aug 28, 2026
@github-actions github-actions Bot changed the title test: distinguish package files from directories [WRONG BRANCH] test: distinguish package files from directories Aug 28, 2026
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

⏳ DRAFT

  • wrong target branch (main); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
This pull request was already a draft. Its draft status will be preserved after every issue above is resolved.

@github-actions
github-actions Bot marked this pull request as draft August 28, 2026 07:12
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant