From be323edf10288c11113d6eafecf47c158fb714f7 Mon Sep 17 00:00:00 2001 From: Thore Cimbal Date: Tue, 18 Aug 2026 12:00:00 +0000 Subject: [PATCH] build: pin the @sorb scope to rohana instead of relying on the lockfile Nothing in this repo said where @sorb/threadnet-call-embedded comes from. It worked only because pnpm-lock.yaml carries the full tarball URL and CI installs with --frozen-lockfile; the first version bump drops that cover. Today that ends in a 404 because the name is still free on npmjs - which makes our only protection the fact that nobody has claimed @sorb there. Claim it and the same command resolves silently against a stranger's package, in the exact moment a fresh download looks normal. The checked-in .npmrc closes the wrong path instead of documenting it. It holds a URL and no secret: read access to the registry is anonymous. Upstream's .gitignore ignores /.npmrc - reasonable where the file holds tokens, and it would have swallowed this fix without a word. The negation is explicit and carries the reason, so the next merge does not quietly restore the hole. Verified in an isolated tree, not assumed: without the file pnpm resolves to npmjs and fails; with it the scope resolves to rohana at the same integrity hash the repo lockfile already carries; with rohana unreachable the install fails outright rather than falling back to npmjs. pnpm install --frozen-lockfile still passes and leaves the lockfile untouched. Co-Authored-By: Claude Opus 5 --- .gitignore | 5 +++++ .npmrc | 15 +++++++++++++++ docs/axion1337-fork.md | 26 ++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 .npmrc diff --git a/.gitignore b/.gitignore index 34a8640e7..74cd2f75e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,11 @@ /lib node_modules /.npmrc +# ThreadNet-Fork: unsere .npmrc IST versioniert. Sie bindet nur den Scope @sorb an +# die Registry auf rohana und enthaelt kein Geheimnis (Lesezugriff ist anonym). +# Ohne diese Ausnahme bliebe die Datei lokal, und CI wie frischer Klon loesten +# @sorb weiter gegen npmjs auf - siehe management#0055. +!/.npmrc /*.log package-lock.json .DS_Store diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..cffdbfb9d --- /dev/null +++ b/.npmrc @@ -0,0 +1,15 @@ +# Der Scope @sorb liegt in der Gitea-Registry auf rohana, nicht auf npmjs. +# +# Ohne diese Zeile loest pnpm @sorb/threadnet-call-embedded gegen +# registry.npmjs.org auf. Dass das bisher gutging, lag allein am Lockfile: es +# pinnt die vollstaendige Tarball-URL, und die CI installiert mit +# --frozen-lockfile. Beim ersten Anheben der Version faellt dieser Schutz weg. +# +# Heute endet das in einem 404, weil der Name auf npmjs frei ist. Genau darauf +# darf man sich nicht verlassen: registriert dort jemand @sorb, loest derselbe +# Befehl still gegen ein fremdes Paket auf (dependency confusion) - und zwar in +# dem Moment, in dem ein neuer Download ohnehin erwartet wird. +# +# Kein Geheimnis in dieser Datei: der Lesezugriff auf die Registry ist anonym. +# Siehe management#0055. +@sorb:registry=https://rohana.axion1337.de/api/packages/sorb/npm/ diff --git a/docs/axion1337-fork.md b/docs/axion1337-fork.md index da15a333a..bacc1fb5c 100644 --- a/docs/axion1337-fork.md +++ b/docs/axion1337-fork.md @@ -148,3 +148,29 @@ auflösbar) — dort laufen Entwicklung und CI (`.gitlab-ci.yml`). Die Kopie auf `rohana.axion1337.de/sorb/ThreadNet-Web` ist ein **Push-Mirror** (automatisch, GitLab → Gitea) und dient als Lesekopie plus Standort für Issues, Container-Registry und Releases. **Niemals direkt nach rohana pushen** — der Mirror überschreibt divergente Stände. + +## Element Call anheben (`@sorb/threadnet-call-embedded`) + +Das Call-Widget kommt als npm-Paket aus der **Gitea-Registry auf rohana**, nicht von +npmjs. `.npmrc` im Wurzelverzeichnis bindet den Scope fest: + +``` +@sorb:registry=https://rohana.axion1337.de/api/packages/sorb/npm/ +``` + +Zum Anheben genügt damit der normale Weg — **kein Zusatzschritt, keine Umgebungsvariable**: + +```sh +# Version in apps/web/package.json setzen, dann: +pnpm install --lockfile-only # Lockfile zieht die neue Tarball-URL von rohana +pnpm --dir apps/web build # NICHT --filter web: das endet mit exit 0, ohne zu bauen +``` + +Danach muss die Tarball-URL im `pnpm-lock.yaml` auf `rohana.axion1337.de` zeigen. Tut sie +das nicht, ist die `.npmrc` verlorengegangen: **ohne sie löst pnpm gegen npmjs auf**, und +das geht heute nur deshalb laut aus (404), weil der Name `@sorb` dort noch frei ist — +verlässt man sich darauf, ist es ein *dependency-confusion*-Weg. Siehe management#0055. + +Vor dem Anheben liegt das Paket erst dann in der Registry, wenn in `threadnet-call` der +manuelle Job `publish_npm` gelaufen ist — der ist bewusst manuell und wird von sorb +ausgelöst.