Repository navigation
fix: narrow the private-file rule for hidden files, build output and lint - #7990
Conversation
…ips private compositions Review follow-ups: - Hidden framework build-output folders (.next, .nuxt, .output, .svelte-kit, .vercel, .netlify, .wrangler, .astro, .turbo) are private whatever the file type, since their scripts can carry inlined server environment values. - credentials.json and common service-account key names are private. - Lint's compositions/ walk skips private files and folders, and an explicit lint entry that is a private file is refused. - New lint tests link .git/m.json, .mcp.json and a .hyperframes record as an import map; they fail when lint's private-file check is removed.
…ers keep the asset rule
eddy-heygen
left a comment
There was a problem hiding this comment.
(Eddy's agent) Reviewed by Eddy's Claude agent at commit a032550.
Verdict: approved, good to ship.
Summary. A follow-up that tightens the private-file rule: a hidden file is no longer treated as a loadable asset just because of its extension, framework build-output folders inside the project are private, a few more credential file names are listed, and lint refuses a private file as an explicit entry and skips private paths when walking compositions. I read the whole change (4 files). Each edit only makes the rule stricter; the media folder and the studio's own files keep their exceptions.
Blockers
None.
Non-blockers
- A project that deliberately keeps a composition or a loaded script under one of the listed build-output folder names, or loads a dot-named asset file, will now have it treated as private. That looks intended; worth a line in the release notes.
- The credential-file list is by exact lower-case name, so it stays a best-effort list; the hidden-file and folder rules do the main work.
CI: all checks pass at this commit (the rest are skipped by path).
How this was reviewed: I read the full diff and the helper it calls myself. Nothing was built or run.
What
This follow-up to #7979 narrows the shared private-file rule (
@hyperframes/parsers/private-path) in four ways:.secrets.js,.eslintrc.cjsandsub/.tokens.cssare refused. Before this change, a hidden file with a script, style or picture extension was served..next,.nuxt,.output,.svelte-kit,.vercel,.netlify,.wrangler,.astroand.turboare refused for every file type.credentials.json,serviceAccountKey.json,service-account.jsonandservice_account.json.compositions/, and it refuses a private file named as its explicit entry.Why
These are the review points left open on #7979.
Related work
Refs #7979
How
isStudioPrivatePathadds the build-output folder set, and it applies the asset-type exception only when the file's own name is not hidden.CREDENTIAL_FILESgains the four names. Names are compared in lowercase, as before.lintProjectchecks the explicit entry withisPrivateFileUnder, and the composition walk skips paths thatisStudioPrivatePathrefuses.Test plan
safePath.test.ts: the new refused paths. 153 tests pass.project.test.ts:.git/m.json,.mcp.jsonand.hyperframes/share.jsonlinked as an import map are never read; a hidden composition folder is never linted; a private explicit entry is refused. 109 tests pass.The comment ratchet and oxfmt pass on the changed files.