Update the consoles to the latest js-sdk weekly - #211
Merged
Conversation
The Go examples already get a weekly SDK bump as a pull request. The JavaScript
consoles had no equivalent, so they sat on whatever @confighub/* version they were
written against.
scripts/update-js-sdk.sh is the JS counterpart of scripts/update-sdk.sh: it moves
every @confighub/{api,react-auth,rtk-query} requirement to one js-sdk release,
installs, and runs each package's own lint/build/test. A package that fails is
restored and reported instead of held against the others. webkit goes first —
it is a `file:` dependency whose sources the consoles typecheck, so it has to be
on the new version before any of them is verified. peerDependencies are rewritten
too, which is where webkit declares the SDK.
Two apps asserted the literal dependency range in a test:
assert.equal(packageJson.dependencies['@confighub/api'], '^0.1.0');
That fails on every SDK release by construction, which is precisely what the bump
does, so both would have been reported as broken every week forever. The
assertion's intent is that the app depends on the SDK at a caret range; it now
says that instead of naming a version.
The two repos release on their own cadences — the Go modules are tagged in
lockstep with ConfigHub, while the js-sdk packages carry their own version — so
this is a second workflow rather than a branch inside the existing one.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9g7PRiXsoTGFMkzmeNgEJ
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.
The JavaScript counterpart of
update-sdk.yml, which already bumps the Goexamples weekly. The consoles had no equivalent, so they sat on whatever
@confighub/*version they were written against.What it does
scripts/update-js-sdk.shmirrorsscripts/update-sdk.sh: move every@confighub/{api,react-auth,rtk-query}requirement to one js-sdk release,install, and run each package's own
lint/build/test. A package that failsto verify is restored to its previous
package.json/package-lock.jsonandlisted in the PR body, so one stale console does not hold back the rest.
Two details specific to this repo:
file:dependency whose sources the consolestypecheck, so it has to be on the new version before any console is verified.
peerDependenciesare rewritten too, which is where webkit declares the SDK.A stale peer range fails installs.
The workflow runs Mondays at 16:00 UTC — after js-sdk's own spec sync — and opens
or force-updates one PR on
chore/update-js-sdk, same as the Go one.A test that would have broken it every week
cost-management-appandpilot-example-addons-managereach asserted the literalrange:
That fails on any SDK release by construction — which is exactly what this bump
does — so both would have been reported as broken every week forever. I hit it on
the first run. The assertion's intent is that the app depends on the SDK at a
caret range, so it now says that rather than naming a version. Both apps' tests
pass, and the run reports them as updated.
Verification
Run against the repo: all nine packages discovered, verified, and reported — the
seven already-current ones as current, the two behind as updated. Confirmed it
leaves no untracked lockfile behind in the two apps that deliberately keep none.
🤖 Generated with Claude Code
https://claude.ai/code/session_01P9g7PRiXsoTGFMkzmeNgEJ