Skip to content

Update the consoles to the latest js-sdk weekly - #211

Merged
bgrant0607 merged 1 commit into
mainfrom
add-js-sdk-update-workflow
Aug 26, 2026
Merged

Update the consoles to the latest js-sdk weekly#211
bgrant0607 merged 1 commit into
mainfrom
add-js-sdk-update-workflow

Conversation

@bgrant0607

Copy link
Copy Markdown
Member

The JavaScript counterpart of update-sdk.yml, which already bumps the Go
examples weekly. The consoles had no equivalent, so they sat on whatever
@confighub/* version they were written against.

Based on #210 (the bundle-duplication fix) so CI runs against a working build.
Retarget to main once that merges.

What it does

scripts/update-js-sdk.sh mirrors scripts/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 fails
to verify is restored to its previous package.json/package-lock.json and
listed in the PR body, so one stale console does not hold back the rest.

Two details specific to this repo:

  • webkit goes first. It is a file: dependency whose sources the consoles
    typecheck, so it has to be on the new version before any console is verified.
  • peerDependencies are 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-app and pilot-example-addons-manager each asserted the literal
range:

assert.equal(packageJson.dependencies['@confighub/api'], '^0.1.0');

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

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
@bgrant0607
bgrant0607 changed the base branch from fix-bundle-duplication to main August 26, 2026 18:30
@bgrant0607
bgrant0607 merged commit 63c9514 into main Aug 26, 2026
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.

1 participant