Skip to content

Publish to npm as @linkedobjects/losos #19

@melvincarvalho

Description

@melvincarvalho

Why

Downstream consumers (e.g. `nosdav/browser`) currently vendor a full copy of the LOSOS source rather than depending on it as a package. This works but means every fix needs an upstream PR + a downstream mirror PR (recent example: #16nosdav/browser#4 for the cache-validity guard).

A published package would let consumers `npm install @linkedobjects/losos` and pin a specific version, eliminating the manual mirror dance.

Suggested shape

  • Package name: `@linkedobjects/losos` (scoped under the org)
  • Entry: `./losos.js` (re-exports `createStore`, `html`, `render`, `Namespace`, etc.)
  • Files published: `losos.js`, `html.js`, `store.js`, `shell.js`, `registry.js` — no build step needed (it's already plain ESM)
  • Versioning: start at `0.1.0` to signal pre-1.0 / API may change
  • Publish flow: `npm publish --access public` from CI on tag push

Blockers / open questions

  • Source layout (Duplicate source: html.js / shell.js / store.js / registry.js exist at repo root *and* under losos/ #17): currently the same files exist at repo root and under `losos/`. The `files` field in package.json needs the duplicate situation resolved first, or you risk publishing both copies.
  • Browser-direct usage: even after publish, browser consumers using `<script type="module">` will still want a CDN URL (unpkg / esm.sh / jsdelivr) — those mirror npm automatically once published, so this issue unblocks both flows.
  • API surface stability: are `createStore`, `html`, `render`, `shell.boot`, `shell.resolvePane` ready to be considered the public surface? Anything still in flux that should be marked internal before the first publish?

Acceptance

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