Replace unmaintained useragent dependency with ua-parser-js#67
Replace unmaintained useragent dependency with ua-parser-js#67johnwatson484 wants to merge 3 commits intohapijs:masterfrom
useragent dependency with ua-parser-js#67Conversation
|
@johnwatson484 merging this might introduce some liability on the users of this library for non-open-source usages https://github.com/faisalman/ua-parser-js/blob/master/CHANGELOG.md#whats-breaking Perhaps, we may want to go with something else? https://github.com/mcollina/my-ua-parser |
@damusix - good suggestion. I've created PR #68 that uses Like |
|
I think it's safe to say we can close this one now. |
useragent is no longer actively maintained and has several outstanding vulnerabilities within itself and an outdated version of tmp.
This PR replaces
useragentwith highly popularua-parser-js.This PR is proposed as an alternative to #65 where a successor fork of
useragent,useragent-ngwas proposed.Unfortunately
useragent-ngdoes not currently support Windows. An issue has been raised to clarify this -> schmod/useragent-ng#8As
ua-parser-jsreturns a different response structure thanuseragent, an adapter function has been added to preserve the current Scooter contract to avoid breaking current consumers.To ensure that the adapter is maintaining the contract as expected, a more comprehensive set of tests have been added covering all properties of the current contract.