refactor(readme-sync): move synced upstream README under src/upstream/ - #978
Open
kitsuyui wants to merge 1 commit into
Open
refactor(readme-sync): move synced upstream README under src/upstream/#978kitsuyui wants to merge 1 commit into
kitsuyui wants to merge 1 commit into
Conversation
src/ mixed website implementation files with a file synced verbatim from gitignore-in/gitignore-in's README, so the tree alone did not show which files were local implementation versus an external sync target. Move the synced copy into src/upstream/ and update the sync check, HTML allowlist check, and the raw import that renders it so the split is visible without reading source.
Code Metrics Report
Details | | main (6219157) | #978 (271c93f) | +/- |
|---------------------|----------------|----------------|------|
| 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 | 10s | -3s |Code coverage of files in pull request scope (90.9% → 90.9%)
Reported by octocov |
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.
Why
src/mixed website implementation files (index.tsx,readme-html-sanitizer.ts) withsrc/readme.md, a verbatim synced copy of the upstreamgitignore-in/gitignore-inREADME. Looking at the directory tree alone did not distinguish local implementation from the external sync target, which risks contributors editingsrc/readme.mdas ordinary documentation and breakingbun run check:readme.What changed
src/readme.mdtosrc/upstream/readme.md(git rename, content unchanged).src/index.tsxto./upstream/readme.md?raw.scripts/check-readme-sync.ts(local file URL, ENOENT guidance message, and the out-of-sync error message) to point at the new path.scripts/check-readme-html-elements.ts(file URL and console error text) to the new path.scripts/check-readme-sync.test.tsexpectation for the ENOENT guidance message.README.mdto describesrc/upstream/as the location for files synced from other repositories.No behavior changes: the README sync check still compares the same local file content against the same pinned upstream commit, and the rendered page still imports the same markdown content, just from its new path.
Verification
bun test scripts/check-readme-sync.test.ts-- 14 pass, 0 fail.bun run check:readme-html-- passes against the newsrc/upstream/readme.mdpath.bun run check:readme-- reaches the local-file read step correctly (fails only on the outbound network fetch toraw.githubusercontent.com, which this sandbox blocks; that step is unrelated to the path change).biome check .-- passes (fixed one import-order finding introduced by the edit).bun installin this sandbox required overridingBUN_TMPDIR/BUN_INSTALL_CACHE_DIR/HOMEto writable paths and--ignore-scripts(the sandbox has nonodebinary forcypress's postinstall); this is a pre-existing local environment limitation unrelated to this change, not a change to the project's install process.Finding:
audit-directory-layout-audit-001.