fix: update dependency smocket to v0.5.0 - #343
Conversation
37736c4 to
023215e
Compare
023215e to
421e0d3
Compare
|
Closing this update because the published-smocket fixture is an intentionally pinned case-study snapshot, not a dependency that should follow the current package release automatically. Updating only its package manifests to 0.5.0 would leave the accompanying documentation and recorded observations describing the 0.4.2 adoption state. A future snapshot refresh should update and revalidate the entire case study as one deliberate change. |
Renovate Ignore NotificationBecause you closed this PR without merging, Renovate will ignore this update ( If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR. |
This PR contains the following updates:
0.4.2→0.5.0Release Notes
electrohyun/smocket (smocket)
v0.5.0Compare Source
What matters in this one
v0.5.0 is expected to be the last minor release before v1.0.0. The remaining stabilization work may produce one or two v0.5.x patch releases, but the public surface intended for 1.0.0 is now substantially in place.
This is the first synchronized release of
smocketandsmocket-client. The rootsmocketpackage owns the in-memory server and connection registry. The newsmocket-clientpackage preserves Socket.IO Client's package shape—default,io,connect, callable CommonJS, and the clientSockettype—while delegating every lookup to an exact-versionsmocketpeer. Publishing both as 0.5.0 means a test's client import and its in-memory server resolve through the same implementation and registry instead of duplicating connection state (#235, #276).Install both packages at the same version:
An application can keep its existing import:
In tests, substitute that client package with
smocket-clientand provide the in-memory server:Runner-specific substitution examples live in the test-runner integration guide.
New public surface
The package boundary now matches the server/client split applications already use.
smocketexports the server-sideSockettype, whilesmocket-clientexports the client-sideSockettype with the correct event-map direction. The facade works through ESM, callable CommonJS, Node16 resolution, bundler resolution, and Chromium (#178, #235, #276).Sockets gained the observable state and extension points used by real applications:
connected,disconnected,recovered, mutable clientauth, per-packet server middleware, complete catch-all and listener-inspection methods, and the accepted inherited emitter surface. A directServer.connect()plusnextConnection()pair is also available for tests that already hold the server instance (#266, #267, #268, #274, #275, #277).Namespace and broadcast coverage grew together. Dynamic namespace parents and
new_namespaceare supported; broadcast operators gained Promise acknowledgements, aliases, compression modifiers, local socket lookup, bulk room membership, and bulk disconnect. The built-in Adapter lifecycle is observable through its live rooms map, and deterministic tracing or dropping adapters can inspect or alter local delivery without pretending to implement multi-server scaling (#238, #261, #262, #269, #278, #322, #323, #324).Non-binary payloads now cross the same JSON snapshot boundary measured on Socket.IO's default parser, and
disconnect(true)closes every namespace socket sharing the client Manager rather than only the selected namespace (#237, #250, #254).Corrected observable results
These corrections move the mock to the results measured on Socket.IO 4.7.5 and 4.8.3:
Invalid namespacebefore a connection handler runs (case, #228).volatileas an operator again (volatile cases, timeout cases, #231, #259).void. They now return the same receiver measured on Socket.IO, preserving chaining and event maps (cases, #233).disconnect(true)could leave sibling namespace sockets from the same client alive. It now closes the shared Manager group and reports each namespace lifecycle once (cases, #236, #254).removeListenerobserver now follows the maintained Node and Socket.IO host behavior instead of a locally fixed bulk-removal rule (cases, #309).Upgrade notes
The two packages must stay on the same exact version. Load both through ESM or both through CommonJS so they share one in-process registry; mixed formats can create separate root module instances.
This release includes public declaration changes that can reject TypeScript call sites accepted by 0.4.2. Code that assigned to
socket.volatile, treated fluent APIs as explicitlyvoid, or passed names outside a typed event map to listener-removal methods may need adjustment. The runtime changes generally expose the Socket.IO-compatible receiver or restriction, but helpers and type assertions written around the older declarations should be checked during the upgrade.The Node.js floor remains
>=20, and the packed root package still has zero runtime dependencies.The governing ADR 0019 row is “a public type change that still compiles at existing call sites, else major.” Existing call sites no longer compile in the cases above, so the change is major under the stable-version rule. Before 1.0.0 that rule applies one place to the right, making 0.5.0 the required minor release. Newly covered Socket.IO surface and observable corrections also ship here, with the corrected results called out above rather than hidden in the version number.
Package adoption and release reliability
The documented Vitest and Jest substitutions now run as clean consumers outside the checkout. Candidate checks install the exact two tarballs through ESM, CommonJS, Node16, bundler, browser, and application fixtures. Release candidates also record each package's name, version, size, and SHA-256 digest so every package-level check consumes the same artifact set (#280, #281, #310).
The supported Socket.IO declarations are independently inventoried, package tarballs reject runtime dependencies, non-receipt assertions use completion markers instead of wall-clock waits, and exact published versions have a bounded registry verifier and remediation path (#273, #282, #283, #284, #310, #314, #316, #318).
What's Changed
Full Changelog: v0.4.2...v0.5.0
Configuration
📅 Schedule: (in timezone Asia/Seoul)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.