Skip to content

Commit e069133

Browse files
committed
Fix #787 - Avoid using lookbehind assertion in regex to ensure compatibility
1 parent 848cd1d commit e069133

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/extensions/ua-parser-extensions.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ const Libraries = Object.freeze({
329329
// Apache-HttpClient/Axios/go-http-client/got/GuzzleHttp/Java[-HttpClient]/jsdom/libwww-perl/lua-resty-http/Needle/node-fetch/OkHttp/PHP-SOAP/PostmanRuntime/python-urllib/python-requests/Scrapy/superagent
330330
[
331331
/^(apache-httpclient|axios|(?:go|java)-http-client|got|guzzlehttp|java|libwww-perl|lua-resty-http|needle|node-(?:fetch|superagent)|okhttp|php-soap|postmanruntime|python-(?:urllib|requests)|scrapy)\/([\w\.]+)/i,
332-
/(jsdom|(?<=\()java)\/([\w\.]+)/i
332+
/(jsdom)\/([\w\.]+)/i,
333+
/\((java)\/([\w\.]+)/i
333334
], [NAME, VERSION, [TYPE, LIBRARY]]
334335
]
335336
});

0 commit comments

Comments
 (0)