Skip to content

add remote.autoConnect and bump stitch-wasm to 0.3.0 - #34

Merged
fabracht merged 2 commits into
mainfrom
bump-stitch-wasm-0.3.0
Aug 14, 2026
Merged

fabracht merged 2 commits into
mainfrom
bump-stitch-wasm-0.3.0

Conversation

@fabracht

Copy link
Copy Markdown
Contributor

Adopts @laboverwire/stitch-wasm 0.3.0, which adds the remote.autoConnect option, and exposes it through the adapter's RemoteConfig.

The autoConnect fix

remote.autoConnect (default true). With autoConnect: false, initialize() skips the startup broker connect and the caller drives it via reconnect(url, ticket) — the fix for dynamically-minted-JWT setups where the old ticketless startup probe was rejected once per page load. Default true preserves existing behavior, so this is additive, non-breaking.

Changes

  • dependencies: @laboverwire/stitch-wasm ^0.2.2 → ^0.3.0 (0.2→0.3 crosses the caret, so this is a deliberate floor bump).
  • src/types.ts: RemoteConfig gains autoConnect?: boolean. No adapter code change needed — createStore already forwards the whole options object to the wasm verbatim, so autoConnect flows through; this only makes it type-safe for consumers.
  • docs/configuration.md: documents autoConnect.
  • New tests/integration/auto-connect.test.ts (2 tests).

What the tests verify (behavioral, broker-free)

  • autoConnect: false + a bogus remote → after initialize(), connectionStatus stays 'offline' (no connect attempted), hasRemote is true.
  • default (omitted) + a bogus remote → connectionStatus is not 'offline' (a connect was attempted).

Verification

  • tsc, eslint, prettier --check clean.
  • 35 tests pass (11 files; +2) against real 0.3.0 wasm in Chromium.
  • npm audit = 0.
  • No @laboverwire/stitch API removal or breaking change; the only surface addition is RemoteConfig.autoConnect.

@fabracht
fabracht merged commit e9ea32a into main Aug 14, 2026
4 checks passed
@fabracht
fabracht deleted the bump-stitch-wasm-0.3.0 branch August 14, 2026 14:37
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