Summary
The repository has two byte-identical copies of each LOSOS module — one at the repo root, one under losos/:
$ md5sum html.js losos/html.js
2afefdabde88862e3d3f7fa84edaa879 html.js
2afefdabde88862e3d3f7fa84edaa879 losos/html.js
package.json only publishes the losos/ subtree ("files": ["losos/", "lion/", ...]) and exports the subtree paths ("./html": "./losos/html.js" etc.). The root copies are unused by consumers but tracked in git, so they drift over time and force every fix to be applied twice (or, worse, applied to the wrong copy and silently miss the published path — see #16's review).
Files affected
html.js ↔ losos/html.js
shell.js ↔ losos/shell.js
store.js ↔ losos/store.js
registry.js ↔ losos/registry.js
losos.js ↔ losos/losos.js
(All confirmed identical at gh-pages HEAD by md5 at the time of filing.)
Why this is a problem
- Every PR has to remember to patch both copies.
- Reviewers can't tell which one is canonical without checking
package.json.
- The root copies aren't covered by
files, so consumers npm installing the package never see them — but a contributor who clones the repo and edits the root copy (because it's at the top of the tree, easier to find) will see their fix work locally and not on consumers.
Proposed resolution
Pick one home for each module and delete the other. The natural choice is losos/ (matches package.json exports + files) — delete the root copies.
If anything in the repo's own demos or tooling imports from the root paths (e.g. a top-level index.html, test.js), update those references at the same time.
Out of scope
- Republishing or version bumping — this is a tree-cleanup, not a behavioral change.
- Restructuring the
losos/ layout further (e.g. src/, dist/).
Summary
The repository has two byte-identical copies of each LOSOS module — one at the repo root, one under
losos/:package.jsononly publishes thelosos/subtree ("files": ["losos/", "lion/", ...]) and exports the subtree paths ("./html": "./losos/html.js"etc.). The root copies are unused by consumers but tracked in git, so they drift over time and force every fix to be applied twice (or, worse, applied to the wrong copy and silently miss the published path — see #16's review).Files affected
(All confirmed identical at gh-pages HEAD by md5 at the time of filing.)
Why this is a problem
package.json.files, so consumersnpm installing the package never see them — but a contributor who clones the repo and edits the root copy (because it's at the top of the tree, easier to find) will see their fix work locally and not on consumers.Proposed resolution
Pick one home for each module and delete the other. The natural choice is
losos/(matchespackage.jsonexports +files) — delete the root copies.If anything in the repo's own demos or tooling imports from the root paths (e.g. a top-level
index.html,test.js), update those references at the same time.Out of scope
losos/layout further (e.g.src/,dist/).