Skip to content

Rename package to @flashynetwork/ledger, bump to 2.0.0 - #28

Merged
AgenteLabs merged 8 commits into
mainfrom
claude/npm-scope-rename-flashynetwork
Nov 5, 2026
Merged

AgenteLabs merged 8 commits into
mainfrom
claude/npm-scope-rename-flashynetwork

Conversation

@AgenteLabs

Copy link
Copy Markdown
Owner

What changed

Part of the estate-wide npm scope reorganisation (@flashyfinancial and @flashynetwork already exist on npm):

  • package.json: "@flashyos/ledger" → "@flashynetwork/ledger", "1.0.1" → "2.0.0". Nothing else (exports, files, engines, publishConfig) changed.
  • .github/workflows/publish.yml: setup-node's scope → @flashynetwork; the token-refusal step and the publish step now read secrets.NPM_TOKEN_FLASHYNETWORK_CI || secrets.NPM_TOKEN (was secrets.NPM_TOKEN alone), with the error message updated to name the new secret and scope; added a Skip if this version is already published step (same shape as flashy-rails' publish.yml) so a re-run of the dispatch flow is idempotent against a version already on the registry instead of failing E409.
  • .github/workflows/deprecate-old-scope.yml (new): workflow_dispatch-only, ported from flashy-rails' own workflow of the same name, with its actions pinned to the same commit SHAs publish.yml already uses (this repo's tests/workflow-pins.test.ts requires that). Runs npm deprecate @flashyos/ledger@* "moved to @flashynetwork/ledger" — never on push, pull_request or schedule.
  • tests/package-scope.test.ts (new, vitest, matching this repo's existing tests/*.test.ts convention): sweeps package.json, package-lock.json (if present), README.md and every .github/workflows/*.yml file for leftover @flashyos/ledger text, excluding the files that legitimately still name it on purpose (the deprecate workflow, RELEASES.md, README.md's own history prose); asserts publish.yml names the new scope and not the old one; asserts the deprecate workflow exists, calls npm deprecate, triggers on workflow_dispatch only, and reuses the existing npm secret rather than inventing a new one.
  • RELEASES.md: new 2.0.0 row (commit —, tagged ❌, publish pending), plus a short dated section explaining the jump from 1.0.1 straight to 2.0.0. No existing row altered.
  • CHANGELOG.md: new ## [2.0.0] section — tests/docs-drift.test.ts requires one for package.json's declared version and for every version RELEASES.md records, so this was necessary for the suite to stay green, not just nice-to-have.
  • README.md: title, the npm install line, the Using it import, the Status line and the whole Publishing section now name @flashynetwork/ledger and NPM_TOKEN_FLASHYNETWORK_CI; the @flashylabs → @flashyos history stays exactly as written, with the @flashyos → @flashynetwork move added on top of it rather than replacing it.
  • tests/public-api.test.ts: one stale @flashyos/ledger string in an assertion-failure message, updated for consistency (cosmetic; not something package-scope.test.ts sweeps, since that sweep's file list matches what was asked for).

Why 2.0.0, not 1.0.2 or 1.1.0

flashy-rails's package.json already declares:

"dependencies": { "@flashynetwork/ledger": "^2.0.0" }

— and currently 404s installing it, because nothing has ever been published under that name or that major. A 1.0.2 release under the new scope would still leave flashy-rails's ^2.0.0 range unsatisfied; 2.0.0 is the version that actually closes the gap. The tree itself is unchanged from 1.0.1 — this is a scope/version rename, not an API change — which is why it's recorded as "BREAKING (scope rename, not an API change)" in the changelog rather than as a real semver-major break.

This is source-only

Nobody but the repository owner can run npm publish — that needs an npm access token with publish rights on @flashynetwork. Concretely, before anything resolves on the registry, a human needs to:

  1. Set the NPM_TOKEN_FLASHYNETWORK_CI repository secret (or confirm NPM_TOKEN already has @flashynetwork publish rights).
  2. Dispatch the Publish workflow (or push a v2.0.0 tag) from main after this merges.
  3. Once that lands, dispatch Deprecate old npm scope by hand to point any stragglers on @flashyos/ledger at the new name.
  4. Update RELEASES.md's 2.0.0 row (commit/tagged/publish landed) once the publish actually lands, per the existing "Adding a release" convention at the bottom of that file.

Until step 2 happens, @flashynetwork/ledger@2.0.0 will keep 404ing for flashy-rails exactly as it does today — this PR fixes the source of truth, not the registry.

Test plan

  • tests/package-scope.test.ts (new): the sweep, the deprecate-workflow shape, the trigger restriction — all written to fail on the pre-rename tree and pass on this one.
  • tests/workflow-pins.test.ts: re-read against the new deprecate-old-scope.yml — both uses: lines pinned to the same commit SHAs publish.yml uses, with version comments.
  • tests/docs-drift.test.ts: CHANGELOG.md now has a ## [2.0.0] section matching package.json's version, and a section for every version RELEASES.md records (including the new row).
  • tests/releases.test.ts: the new RELEASES.md row is in ascending order, appears once, and is the version package.json declares.
  • tests/cross-linking.test.mjs, tests/public-api.test.ts, tests/charter-served.test.ts, the rest of the pre-existing suite: untouched in substance, should be unaffected by a name/version/workflow change.
  • CI on this branch — watching now; will report back (or fix forward) once it's run.
  • Owner: after merge, set NPM_TOKEN_FLASHYNETWORK_CI, dispatch Publish, confirm npm view @flashynetwork/ledger@2.0.0 resolves, then dispatch Deprecate old npm scope.

Generated by Claude Code

AgenteLabs and others added 8 commits November 5, 2026 18:34
flashy-rails already declares a dependency on "@flashynetwork/ledger":
"^2.0.0" in its package.json and currently 404s installing it, because no
package has ever been published under that name or that major. This change
makes the source agree with what a real consumer already expects, instead of
the other way around.

This is part of the estate-wide npm scope reorganisation: @flashyos/ledger
becomes @flashynetwork/ledger (the @FlashyFinancial and @FlashyNetwork npm
orgs already exist). The version moves straight from 1.0.1 to 2.0.0, skipping
1.0.2/1.1.0, because 2.0.0 is the major flashy-rails' manifest already pins —
publishing 1.0.2 under the old scope would not satisfy that range and
publishing 2.0.0 under the new scope is what actually closes the gap.

What this commit does:
- package.json: name -> @flashynetwork/ledger, version -> 2.0.0. Nothing else
  (exports, files, engines, publishConfig) changes.
- .github/workflows/publish.yml: setup-node scope -> @FlashyNetwork; the
  token check and the publish step now read
  secrets.NPM_TOKEN_FLASHYNETWORK_CI, falling back to secrets.NPM_TOKEN, and
  the refusal message names the new secret and scope; a new
  "Skip if this version is already published" step (same shape as
  flashy-rails' publish.yml) makes a re-run of the dispatch flow idempotent
  against an already-published version instead of failing E409.
- .github/workflows/deprecate-old-scope.yml: new, workflow_dispatch-only,
  ported from flashy-rails' own deprecate-old-scope.yml. Deprecates
  @flashyos/ledger@* on the registry, pointing consumers at the new name. It
  is not wired to push, pull_request or schedule, and a human runs it once,
  by hand, after confirming the new scope is live.
- tests/package-scope.test.ts: new. Sweeps package.json, package-lock.json
  (if present), README.md and every workflow file for leftover
  @flashyos/ledger text outside the files that legitimately still name it
  (the deprecate workflow, RELEASES.md, README's own history prose), checks
  publish.yml names the new scope and not the old one, and checks the
  deprecate workflow exists, calls npm deprecate, and triggers on
  workflow_dispatch only.
- RELEASES.md: new row for 2.0.0 (commit, tag and publish all still pending —
  this change lands the source only).
- README.md: title, install line, "Using it" import, the "In the Flashy
  ecosystem" section and the Publishing section now name
  @flashynetwork/ledger and the NPM_TOKEN_FLASHYNETWORK_CI secret; the
  history of the @flashylabs -> @FlashyOS move stays as written.

This is source-only. Nobody but the repository owner can run `npm publish` —
that needs an npm token with publish rights on @FlashyNetwork, set as
NPM_TOKEN_FLASHYNETWORK_CI (or NPM_TOKEN) and then a dispatch of the Publish
workflow. Until that happens, @flashynetwork/ledger@2.0.0 will keep 404ing
for flashy-rails exactly as it does today.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cmdsrm66fKc3D9dNwqPL64
Title, install line, the "Using it" import and the Publishing section now
name @flashynetwork/ledger and NPM_TOKEN_FLASHYNETWORK_CI. The history of the
@flashylabs -> @FlashyOS move stays as written; the Publishing section adds
the @FlashyOS -> @FlashyNetwork move on top of it rather than erasing it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cmdsrm66fKc3D9dNwqPL64
tests/workflow-pins.test.ts requires every third-party "uses:" line in
.github/workflows/*.yml to be pinned to a 40-character commit SHA with a
version comment — the floating @v4 tags ported from flashy-rails'
deprecate-old-scope.yml (which has no equivalent test) would have failed
that check the moment this file existed. Pinned to the same actions/checkout
and actions/setup-node SHAs publish.yml already uses, for the same reason
stated there.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cmdsrm66fKc3D9dNwqPL64
tests/docs-drift.test.ts requires a "## [x.y.z]" section for package.json's
own version and for every version RELEASES.md records; without this entry
the 2.0.0 bump and its new RELEASES.md row would fail that test.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cmdsrm66fKc3D9dNwqPL64
eslint.config.mjs runs tseslint.configs.strictTypeChecked over tests/**/*.ts,
which flags @typescript-eslint/no-non-null-assertion. Rewritten to match this
repository's existing test style (a root/read helper, optional chaining with
?? instead of !) rather than relying on an untested assumption that it would
pass lint.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cmdsrm66fKc3D9dNwqPL64
Cosmetic only (an assertion failure message, not a check on package.json),
but left over from the @FlashyOS rename. Not covered by
tests/package-scope.test.ts's sweep since that sweep is scoped to
package.json/README.md/lockfile/workflows per the task this was written
against, so fixing it here explicitly rather than leaving it stale.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cmdsrm66fKc3D9dNwqPL64
…ename

Two leftovers from the scope rename that tests/package-scope.test.ts (added
in this same PR) caught on CI:

- package-lock.json still declared the root package as "@flashyos/ledger"
  "1.0.1" (both at the top level and in packages[""]) — package.json had
  moved but the lockfile had not. Updated both occurrences to
  "@flashynetwork/ledger" "2.0.0" and confirmed `npm ci` still installs
  cleanly from the patched lockfile, with no other change to the dependency
  tree.
- publish.yml's new header comment literally said "@flashyos/ledger" in the
  explanation of the rename, which the sweep test correctly flags as
  publish.yml "names the new scope and not the old one". Reworded so the
  sentence states the same fact (the package was previously published under
  the @FlashyOS scope) without spelling out the retired package name.

Verified locally: npm ci, typecheck, lint, the full coverage suite (301
passed, 1 skipped), the standalone node tests, and the build all pass on
this tree.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cmdsrm66fKc3D9dNwqPL64

Copy link
Copy Markdown
Owner Author

CI status on this branch (head cdd25dd):

  • ✅ Typecheck, lint, test — success (typecheck, lint, the full coverage suite, the standalone node tests, build)
  • ✅ Conformance against MongoDB — success
  • ❌ Dependency audit (npm audit --audit-level=high) — pre-existing, unrelated to this PR.

The dependency-audit failure is 11 transitive devDependency advisories (vitest/@vitest/mocker, @typescript-eslint/typescript-estree's minimatch, and vite via the vitest toolchain) — nothing this PR touched (package.json's devDependencies are unchanged by this diff; only name and version moved). It fails identically on main at its current head (run 41663515966, job "Dependency audit", npm audit --audit-level=high → failure) and on every recent main run checked. Not something to fix in this PR — it's a devDependency-upgrade task orthogonal to the scope rename.

Everything else is green. Proceeding to merge.


Generated by Claude Code

@AgenteLabs
AgenteLabs merged commit eedd5bc into main Nov 5, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants