You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CSS and HTML headers get the folder name as @Project instead of the project's package.json name #70
area: coreTouches core library / runtime source codepriority: highNeeds attention soon — not blocking, but don't let it sitstatus: implementedBuilt and deployed, but not yet fully tested/verifiedtype: bugSomething is broken or not behaving as expected
@Project should be the name from the project's own config file: package.json for Node, pyproject.toml for Python, composer.json, go.mod, Cargo.toml and so on. The Node, JSON, YAML, Python, PHP, Go and Rust detectors do this. The CSS and HTML detectors don't:
css finds package.json as its marker but parseProjectName ignores the content and returns the folder name.
html doesn't look for package.json at all (markers: index.html, vite.config.*, next.config.*) and returns the folder name, which is the file's own folder when no marker is found.
Reproduced on next, project pn/ with package.json{"name":"@scope/real-name"} and pyproject.tomlname = "py-real":
File
@Project today
Expected
src/m.mjs, src/c.yml
@scope/real-name
✓
src/p.py
py-real
✓
src/s.css
pn
@scope/real-name
src/i.html
src
@scope/real-name
So CSS and HTML files in any Node repo (for example slothlet) would be headed with the folder name instead of @cldmv/<pkg>.
Fix
CSS and HTML read the name from package.json when that is the project marker, exactly as the Node detector does; package.json is looked for first (a vite.config.* / postcss.config.* in the same folder must not win over it). Without a manifest they keep falling back to the project folder name.
Tests for both, including a package.json without a name, invalid JSON, and a non-package.json marker.
README: state the rule — @Project comes from the project's config file, the folder name only when there is none.
area: coreTouches core library / runtime source codepriority: highNeeds attention soon — not blocking, but don't let it sitstatus: implementedBuilt and deployed, but not yet fully tested/verifiedtype: bugSomething is broken or not behaving as expected
Activity
release: v2.0.0 - re-cut the release notes as v2.0.0