Changelog - 2026-10-24
The fetcher and the socket.io client run in a browser
Enhancement Bug FixIn one line. NodeFetcher, NodeFetchNetworkRequest and toQueryString cover what a browser app needs, and SocketIOClientHelper has a browser-pure entry, so an app reuses them instead of keeping its own copies.
typescript
const request = new NodeFetchNetworkRequest({
name: 'api',
networkOptions: { baseUrl: 'https://api.example.com', queryString: { nullish: 'skip', nested: 'json' } },
});
await request.getNetworkService().post({
url: request.getRequestUrl({ paths: ['items'] }),
params: { filter: { where: { id: 1 } } }, // ?filter=%7B%22where%22%3A%7B%22id%22%3A1%7D%7D
body: { name: 'lamp' }, // sent as JSON
});What changed
- JSON bodies.
NodeFetcherJSON-encodes a plain object or an array. A string,Blob,ArrayBuffer, typed array,FormData,URLSearchParamsorReadableStreampasses through;nullorundefinedsends no body. - Query-string options.
toQueryStringtakesnullish: 'empty' | 'skip'andnested: 'drop' | 'json'.'json'sends an object or an array as one JSON parameter (ids=%5B1%2C2%5D).NodeFetcherandNodeFetchNetworkRequesttake them asqueryString. The defaults are unchanged. getWorker().NodeFetcher.getWorker()returns the globalfetch; it returnedundefined.AbstractNetworkFetchableHelpertakes an optionalworkerin its constructor.- Logger type. The fetchers' logger parameter is
TFetcherLogger = Pick<ILogger, 'debug' | 'info'>.NodeFetcherlogs its request line atdebug(it wasinfo). With no logger it logs nothing. - Browser socket client.
@venizia/ignis-helpers/socket-io/clientexportsSocketIOClientHelperwith nothing node in its graph; you passsocket.io-clientasmodule.@venizia/ignis-helpers/socket-iokeeps the class name and API and finds the module itself whenmoduleis omitted.
Who is affected
- Everyone. No action needed for the new options; defaults are unchanged.
- A
NodeFetcherwithdefaultConfigs.headers. Bug fix: a call that passed noheaderserased the defaults, so the defaultcontent-typeand any default token were not sent. It now keeps them. A call that passesheadersstill replaces the defaults, as before. - A caller that passed a plain-object body to
NodeFetcher. Bug fix:fetchreceived the object and sent[object Object]; it is now JSON. - Anything reading
infolines fromNodeFetcher. The request line is nowdebug.