Skip to content

Duplicate source: html.js / shell.js / store.js / registry.js exist at repo root *and* under losos/ #17

@melvincarvalho

Description

@melvincarvalho

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

  1. Every PR has to remember to patch both copies.
  2. Reviewers can't tell which one is canonical without checking package.json.
  3. 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/).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions