Skip to content

Move upstream README mirror out of src/ into content/ - #980

Open
kitsuyui wants to merge 1 commit into
mainfrom
fix/audit-directory-layout-audit-002
Open

Move upstream README mirror out of src/ into content/#980
kitsuyui wants to merge 1 commit into
mainfrom
fix/audit-directory-layout-audit-002

Conversation

@kitsuyui

Copy link
Copy Markdown
Member

Why

src/ is expected to hold this app's implementation modules, but the
upstream README mirror (src/readme.md, rendered on the homepage and
checked for sync by scripts/check-readme-sync.ts) lived in the same
directory. Mixing runtime code and mirrored documentation content in
one source root makes it harder for contributors to tell which src/
files are app modules versus copied data, and it forces the README
sync tooling to special-case a non-code file inside the app module
tree.

What changed

  • Moved src/readme.md to content/readme.md.
  • Updated every reference to the old path:
    • src/index.tsx (the ?raw import)
    • scripts/check-readme-sync.ts
    • scripts/check-readme-sync.test.ts
    • scripts/check-readme-html-elements.ts
    • README.md

No behavior changes: the README content, sync check, and HTML-element
check still operate on the same file, only its path changed.

Verification

  • bun test scripts/check-readme-sync.test.ts — 14 pass, 0 fail.
  • bun scripts/check-readme-html-elements.ts — passes against the
    relocated file.
  • Verified by grep that no remaining reference to src/readme.md
    exists in the repository.
  • Biome lint (bun run lint) and vite build could not be executed
    in this sandbox because the platform-specific biome/vite
    binaries failed to materialize during bun install here; the
    import path change is a mechanical rename verified via source
    inspection and the passing unit/script checks above.

src/ is expected to hold application implementation modules, but the
upstream README mirror (rendered on the homepage and checked for sync
by scripts/check-readme-sync.ts) lived in the same directory. This
blurs the boundary between runtime code and mirrored documentation
content and forces contributors to guess which src/ files are app
modules versus copied data.

Move src/readme.md to content/readme.md and update every reference
(src/index.tsx, src/readme-html-sanitizer.ts,
scripts/check-readme-sync.ts, scripts/check-readme-sync.test.ts,
scripts/check-readme-html-elements.ts, README.md, CONTRIBUTING.md)
accordingly.
@github-actions

Copy link
Copy Markdown

Code Metrics Report

main (6219157) #980 (69b5a27) +/-
Coverage 91.2% 91.2% 0.0%
Code to Test Ratio 1:0.9 1:0.9 0.0
Test Execution Time 13s 17s +4s
Details
  |                     | main (6219157) | #980 (69b5a27) | +/-  |
  |---------------------|----------------|----------------|------|
  | Coverage            |          91.2% |          91.2% | 0.0% |
  |   Files             |              3 |              3 |    0 |
  |   Lines             |            114 |            114 |    0 |
  |   Covered           |            104 |            104 |    0 |
  | Code to Test Ratio  |          1:0.9 |          1:0.9 |  0.0 |
  |   Code              |            306 |            306 |    0 |
  |   Test              |            288 |            288 |    0 |
- | Test Execution Time |            13s |            17s |  +4s |

Code coverage of files in pull request scope (90.9% → 90.9%)

Files Coverage +/- Status
src/index.tsx 85.7% 0.0% modified
src/readme-html-sanitizer.ts 91.2% 0.0% modified

Reported by octocov

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