feat(cli): bundle the v0.4.0 base spec and release a minor version - #1090
Merged
Conversation
The v0.4.0 base spec reached `lib/cli/lib/openapi/` in the core v0.4.0 version-bump commit (d4293de), because `ci-bump-version.yml` builds the CLI before versioning and the build regenerates that directory. It has therefore been shipping since `@common-grants/cli@0.3.7` with no changelog entry, and `cg check spec` has silently defaulted to it since then. Add the minor changeset that announces the capability. Parameterize the protocolVersion accept cases over every bundled version, which closes a pre-existing gap where 0.3.0 had no coverage and drops three copy-pasted blocks. Refresh the stale `--protocol-version` examples in the README and man page.
SnowboardTechie
force-pushed
the
bryan/1052-cli-v0.4.0-base-spec
branch
from
August 13, 2026 16:57
750c1d6 to
f355be7
Compare
SnowboardTechie
marked this pull request as ready for review
August 13, 2026 16:58
widal001
approved these changes
Aug 14, 2026
widal001
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for making these updates!
SnowboardTechie
added a commit
that referenced
this pull request
Aug 14, 2026
The changeset from #1090 landed on main after this branch removed the changesets machinery, so the merge from main reintroduced it as an orphan. Release-please will cut the CLI 0.4.0 release from the conventional feat(cli) commit instead.
SnowboardTechie
added a commit
that referenced
this pull request
Aug 14, 2026
🤖 I have created a release *beep* *boop* --- ## [0.4.0](https://github.com/HHS/simpler-grants-protocol/compare/@common-grants/cli@0.3.9...@common-grants/cli@0.4.0) (2026-08-14) ### Features * **cli:** bundle the v0.4.0 base spec and release a minor version ([#1090](#1090)) ([2152bea](2152bea)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bryan Thompson <bryan@snowboardtechie.com>
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.
Summary
Changes proposed
minorchangeset for@common-grants/cli(0.3.9 → 0.4.0) announcing that the v0.4.0 base spec is bundled and selectable viacg check spec --protocol-version 0.4.0, and that a barecg check specnow resolves to it.protocolVersionaccept cases over every bundled version. This adds 0.4.0, closes a pre-existing gap where 0.3.0 had no coverage at all, and replaces three copy-pasted blocks with one.--protocol-versionexamples in the CLI README (0.1.0) and man page (0.2.0) to0.4.0.No source changes.
getAvailableBaseVersions()already discovers versions by scanninglib/openapi/at runtime, so 0.4.0 became selectable the moment the spec file landed.Context for reviewers
Why this is a release rather than a code change.
lib/cli/lib/openapi/openapi.0.4.0.yamlreachedmainin d4293de, thechore: bump version [skip ci]commit for the core v0.4.0 release — not in a reviewed PR.ci-bump-version.ymlrunspnpm --filter @common-grants/cli run buildbefore versioning; the CLI'stypespec:cleandoesrm -rf lib/openapi/*andtypespec:openapiregenerates every version core declares, and the workflow then commits withgit add ..Two consequences worth knowing:
@common-grants/cli@0.3.7with nothing in the CLI changelog. I confirmed it is in the published0.3.9tarball and thatcg check spec --protocol-version 0.4.0works against it today.getBaseSpecPath()takesavailableVersions[0], the default base spec silently moved from 0.3.0 to 0.4.0 in that same patch release.The default flip is benign: every route 0.4.0 adds (Awards, Organizations) is tagged
experimental, and the onlyrequired-tagged routes remain the two/common-grants/opportunitiesGETs. I verified a 0.3.0-compliant spec still passes against the 0.4.0 base. The changeset documents both facts so the 0.4.0 changelog entry is accurate.About the test. The version list is a literal rather than
availableVersions, deliberately — iterating the live list would be self-referential, since a dropped spec file would just shrink the loop and pass silently. As written, each version is pinned: deletingopenapi.0.1.0.yaml,openapi.0.3.0.yaml, oropenapi.0.4.0.yamlfails that version's own named case, and hardcoding theprotocolVersionenum away fromavailableVersionsfails too. I confirmed each by mutation. This matters because every CLI build wipes and regenerateslib/openapi/.Verification. Full
ci-lib-cli.ymlgate green locally (core build → cli checks →test:coverage(121 passed) → cli build →pnpm audit). Also: afterrun build,git status lib/cli/lib/openapi/is clean, so the four committed specs are byte-for-byte what core 0.4.0 emits.Packed the CLI and installed it into a scratch directory outside the repo, per the
DEVELOPMENT.mdpre-release checklist. Against the installed package:--protocol-version 0.4.0validates, no-flag validates (default resolves to 0.4.0),--protocol-version 0.3.0still validates, and a bad version reportsexpected one of "0.4.0"|"0.3.0"|"0.2.0"|"0.1.0".One incidental note:
npm packfails repo-wide right now (must not have multiple workspaces with the same name) becauselib/changelog-emitter's build copies itspackage.jsonintodist/.pnpm packworks. Not touched here since it is unrelated to this change, but theDEVELOPMENT.mdchecklist still saysnpm pack.Additional information
Post-merge,
ci-bump-version.ymlbumps 0.3.9 → 0.4.0 and pushes tag@common-grants/cli@0.4.0;cd-deploy-lib-cli.ymlthen needs a manual trigger with that tag to publish.