Skip to content

wurfl-microservice-client-nodejs v3.3.0

Latest

Choose a tag to compare

@silvio-terzi silvio-terzi released this 06 Nov 17:07
385f0be
  • No runtime dependencies: removed the unused unirest (and the deprecated request and form-data 0.2 it pulled in),
    replaced axios with the built-in fetch and lru-cache 4.1.1 with an internal LRU cache with the same API
  • Requires Node.js 18 or later
  • lookupRequest() also accepts a Fetch API Request (Bun, Deno, edge runtimes)
  • The HTTP timeout (10 seconds by default, setHTTPTimeout) now applies to every request; setHTTPTimeout no longer
    changes the global axios defaults of the application
  • Fixed: getAllDeviceMakes() never settled when the request failed
  • Fixed: the device makes and OS versions were downloaded again on every call instead of being cached
  • Fixed: checkData leaked into the global scope
  • Fixed: lookupDeviceID() failed with a TypeError ("Cannot read properties of null") when the device ID did not exist;
    it now rejects with an Error carrying the message returned by the server
  • Fixed: errors reported by the server were returned as if they were device data by lookupUserAgent() and
    lookupRequest(); they now reject with an Error carrying the server message, like lookupDeviceID(), and are never cached
  • Fixed: setRequestedCapabilities(), setRequestedStaticCapabilities() and setRequestedVirtualCapabilities() left
    results cached with the previous capability list in place; they now clear the caches
  • Added TypeScript types (index.d.ts)
  • Tests: WM_URL selects the WURFL Microservice for the live tests; new offline tests run against a stub server