Repository navigation
bump stitch-wasm floor to ^0.6.0 for connection-status transitions - #58
Merged
Merged
Conversation
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
Fixes #48 —
subscribeToConnectionStatus(cb)registered the callback but never fired it on connectivity transitions. The getter (connectionStatus) stayed correct; only the push channel was dead, so React/Vue connection indicators showed a permanently stale status.Root cause was in the engine:
@laboverwire/stitch-wasm0.5.1 did not fan the MQTT client's connectivity events out to the wasmStore's status subscribers. Fixed upstream in stitch-rs #65 and shipped as@laboverwire/stitch-wasm0.6.0. This release delivers it by raising the floor^0.5.1→^0.6.0.Changes
package.json— version0.6.3→0.6.4;@laboverwire/stitch-wasmfloor^0.5.1→^0.6.0.src/store.ts— folded in the adapter replay gap:deferrableSubscribenow pokes on the ready path too, not only the pre-init path. A subscriber attaching afterinitialize()resolved previously got no initial callback; it now gets a current read immediately, matching the pre-init path (connection indicators reflect live status on mount).CHANGELOG.md—## 0.6.4.tests/integration/connection-status.test.ts— 2 regression tests: initial emit on subscribe-after-ready, and a real connecting → disconnected transition delivered to the subscriber (the scenario that produced[]on 0.5.1).Compatibility
The 0.5 → 0.6 engine step is additive to the
Storesurface this adapter consumes — two new compare-and-set methods (updateIf,deleteIf) the wrapper does not expose — with no removed or changed signatures.subscribeToConnectionStatus,connectionStatus, andcreateStorekeep their exact shapes. No@laboverwire/stitchtype or signature changes.Verification (on real stitch-wasm 0.6.0)
npm run check— type-check + lint + format + 38/38 browser tests (was 36; +2 new).npm run buildclean.@esbuildremovals.Closes #48.