Repository navigation
Rename package to @flashynetwork/ledger, bump to 2.0.0 - #28
Merged
Merged
Conversation
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
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
Owner
Author
|
CI status on this branch (head
The dependency-audit failure is 11 transitive devDependency advisories (vitest/ Everything else is green. Proceeding to merge. Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Part of the estate-wide npm scope reorganisation (
@flashyfinancialand@flashynetworkalready 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'sscope→@flashynetwork; the token-refusal step and the publish step now readsecrets.NPM_TOKEN_FLASHYNETWORK_CI || secrets.NPM_TOKEN(wassecrets.NPM_TOKENalone), with the error message updated to name the new secret and scope; added aSkip if this version is already publishedstep (same shape asflashy-rails'publish.yml) so a re-run of the dispatch flow is idempotent against a version already on the registry instead of failingE409..github/workflows/deprecate-old-scope.yml(new):workflow_dispatch-only, ported fromflashy-rails' own workflow of the same name, with its actions pinned to the same commit SHAspublish.ymlalready uses (this repo'stests/workflow-pins.test.tsrequires that). Runsnpm deprecate @flashyos/ledger@* "moved to @flashynetwork/ledger"— never onpush,pull_requestorschedule.tests/package-scope.test.ts(new, vitest, matching this repo's existingtests/*.test.tsconvention): sweepspackage.json,package-lock.json(if present),README.mdand every.github/workflows/*.ymlfile for leftover@flashyos/ledgertext, excluding the files that legitimately still name it on purpose (the deprecate workflow,RELEASES.md,README.md's own history prose); assertspublish.ymlnames the new scope and not the old one; asserts the deprecate workflow exists, callsnpm deprecate, triggers onworkflow_dispatchonly, and reuses the existing npm secret rather than inventing a new one.RELEASES.md: new2.0.0row (commit—, tagged❌, publishpending), 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.tsrequires one forpackage.json's declared version and for every versionRELEASES.mdrecords, so this was necessary for the suite to stay green, not just nice-to-have.README.md: title, thenpm installline, theUsing itimport, theStatusline and the wholePublishingsection now name@flashynetwork/ledgerandNPM_TOKEN_FLASHYNETWORK_CI; the@flashylabs→@flashyoshistory stays exactly as written, with the@flashyos→@flashynetworkmove added on top of it rather than replacing it.tests/public-api.test.ts: one stale@flashyos/ledgerstring in an assertion-failure message, updated for consistency (cosmetic; not somethingpackage-scope.test.tssweeps, 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'spackage.jsonalready declares:— and currently 404s installing it, because nothing has ever been published under that name or that major. A
1.0.2release under the new scope would still leaveflashy-rails's^2.0.0range unsatisfied;2.0.0is the version that actually closes the gap. The tree itself is unchanged from1.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:NPM_TOKEN_FLASHYNETWORK_CIrepository secret (or confirmNPM_TOKENalready has@flashynetworkpublish rights).Publishworkflow (or push av2.0.0tag) frommainafter this merges.Deprecate old npm scopeby hand to point any stragglers on@flashyos/ledgerat the new name.RELEASES.md's2.0.0row (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.0will keep 404ing forflashy-railsexactly 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 newdeprecate-old-scope.yml— bothuses:lines pinned to the same commit SHAspublish.ymluses, with version comments.tests/docs-drift.test.ts:CHANGELOG.mdnow has a## [2.0.0]section matchingpackage.json's version, and a section for every versionRELEASES.mdrecords (including the new row).tests/releases.test.ts: the newRELEASES.mdrow is in ascending order, appears once, and is the versionpackage.jsondeclares.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.NPM_TOKEN_FLASHYNETWORK_CI, dispatchPublish, confirmnpm view @flashynetwork/ledger@2.0.0resolves, then dispatchDeprecate old npm scope.Generated by Claude Code