Skip to content

Commit 51dce55

Browse files
committed
Bump version 2.0.1
1 parent 3ca2319 commit 51dce55

19 files changed

+276
-210
lines changed

CHANGELOG.md

+40
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,37 @@
6565

6666
---
6767

68+
## Version 2.0.1
69+
70+
- Add new browser: Ladybird, Daum
71+
- Add new device: Apple HomePod
72+
- Add new device vendor: HMD
73+
- Add new OS: Ubuntu Touch, Windows IoT
74+
- Improve CPU detection: ARM, x86
75+
- Improve device detection: Lenovo, Nokia, Nvidia, Xiaomi
76+
- Tablet: Google, Honor, Huawei, Infinix, Nokia, OnePlus, Xiaomi
77+
- Wearable: Asus, Google, LG, Motorola, OnePlus, Oppo, Samsung, Sony
78+
- Smart-TV: Xiaomi, unidentified vendors
79+
- Improve detection for unknown VR devices
80+
- Improve device model detection for Generic devices
81+
- Improve OS detection: Linux, Symbian
82+
- Improve TypeScript definitions for Headers
83+
- Improve `withClientHints()`:
84+
- `engine.version` also get updated
85+
- Infer `device.vendor` & `device.type` by guessing from `device.model`
86+
- Browser naming adjustments:
87+
- `Google Chrome` => `Chrome`
88+
- `Microsoft Edge` => `Edge`
89+
- `Android WebView` => `Chrome WebView`
90+
- `HeadlessChrome` => `Chrome Headless`
91+
- `enums` submodule:
92+
- Add TypeScript definitions
93+
- `extensions` submodule:
94+
- Add new list:
95+
- `Vehicles`: BYD, Rivian, Volvo
96+
- Add new Fetcher: Bluesky
97+
- Add new Library: Apache-HttpClient, go-http-client, got, GuzzleHttp, Java-http-client, libwww-perl, lua-resty-http, Needle, OkHttp, node-fetch, PHP-SOAP, PostmanRuntime, superagent
98+
6899
## Version 2.0.0
69100

70101
- `ua-parser-js/extensions` submodule:
@@ -166,6 +197,15 @@
166197

167198
---
168199

200+
## Version 0.7.40 / 1.0.40
201+
- Add new browser: 115, LibreWolf, Slimboat, Slimjet
202+
- Add new device: Advan, Cat, Energizer, IMO, Micromax, Smartfren
203+
- Add new engine: ArkWeb, Servo
204+
- Add new os: OpenHarmony
205+
- Improve browser detection: 2345, 360, Dragon, Iron, Maxthon
206+
- Recognize Honor as a separate device vendor from Huawei
207+
- Fix Python Request mistakenly identified as Meta Quest
208+
169209
## Version 0.7.39 / 1.0.39
170210
- Add new feature: executable command using `npx ua-parser-js "[INSERT-UA-HERE]"`
171211
- Add new browser: Helio, Pico Browser, Wolvic

dist/ua-parser.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ua-parser.min.mjs

+2-2
Large diffs are not rendered by default.

dist/ua-parser.pack.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ua-parser.pack.mjs

+2-2
Large diffs are not rendered by default.

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"title": "UAParser.js",
33
"name": "ua-parser-js",
4-
"version": "2.0.0",
4+
"version": "2.0.1",
55
"author": "Faisal Salman <[email protected]> (http://faisalman.com)",
66
"description": "Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent & Client Hints data. Supports browser & node.js environment",
77
"keywords": [

src/enums/ua-parser-enums.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for Enums submodule of UAParser.js v2.0.0
1+
// Type definitions for Enums submodule of UAParser.js v2.0.1
22
// Project: https://github.com/faisalman/ua-parser-js
33
// Definitions by: Faisal Salman <https://github.com/faisalman>
44

src/enums/ua-parser-enums.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
///////////////////////////////////////////////
2-
/* Enums for UAParser.js v2.0.0
2+
/* Enums for UAParser.js v2.0.1
33
https://github.com/faisalman/ua-parser-js
44
Author: Faisal Salman <[email protected]>
55
AGPLv3 License */

src/enums/ua-parser-enums.mjs

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Source: /src/enums/ua-parser-enums.js
44

55
///////////////////////////////////////////////
6-
/* Enums for UAParser.js v2.0.0
6+
/* Enums for UAParser.js v2.0.1
77
https://github.com/faisalman/ua-parser-js
88
Author: Faisal Salman <[email protected]>
99
AGPLv3 License */
@@ -38,6 +38,7 @@ const Browser = Object.freeze({
3838
COBALT: 'Cobalt',
3939
COC_COC: 'Coc Coc',
4040
CONKEROR: 'Conkeror',
41+
DAUM: 'Daum',
4142
DILLO: 'Dillo',
4243
DOLPHIN: 'Dolphin',
4344
DORIS: 'Doris',
@@ -370,11 +371,13 @@ const OS = Object.freeze({
370371
SYMBIAN: 'Symbian',
371372
TIZEN: 'Tizen',
372373
UBUNTU: 'Ubuntu',
374+
UBUNTU_TOUCH: 'Ubuntu Touch',
373375
UNIX: 'Unix',
374376
VECTORLINUX: 'VectorLinux',
375377
WATCHOS: 'watchOS',
376378
WEBOS: 'WebOS',
377379
WINDOWS: 'Windows',
380+
WINDOWS_IOT: 'Windows IoT',
378381
WINDOWS_MOBILE: 'Windows Mobile',
379382
WINDOWS_PHONE: 'Windows Phone',
380383
XBOX: 'Xbox',

src/extensions/ua-parser-extensions.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for Helpers submodule of UAParser.js v2.0.0
1+
// Type definitions for Helpers submodule of UAParser.js v2.0.1
22
// Project: https://github.com/faisalman/ua-parser-js
33
// Definitions by: Faisal Salman <https://github.com/faisalman>
44

src/extensions/ua-parser-extensions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
///////////////////////////////////////////////
2-
/* Extensions for UAParser.js v2.0.0
2+
/* Extensions for UAParser.js v2.0.1
33
https://github.com/faisalman/ua-parser-js
44
Author: Faisal Salman <[email protected]>
55
AGPLv3 License */

src/extensions/ua-parser-extensions.mjs

+65-108
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Source: /src/extensions/ua-parser-extensions.js
44

55
///////////////////////////////////////////////
6-
/* Extensions for UAParser.js v2.0.0
6+
/* Extensions for UAParser.js v2.0.1
77
https://github.com/faisalman/ua-parser-js
88
Author: Faisal Salman <[email protected]>
99
AGPLv3 License */
@@ -165,7 +165,7 @@ const ExtraDevices = Object.freeze({
165165
/\b(zur\d{3}) b/i // Swiss ZUR Tablet
166166
], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [
167167

168-
/\b((zeki)?tb.*\b) b/i // Zeki Tablets
168+
/^((zeki)?tb.*\b) b/i // Zeki Tablets
169169
], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [
170170

171171
/\b([yr]\d{2}) b/i,
@@ -222,31 +222,25 @@ const Fetchers = Object.freeze({
222222
// ChatGPT-User - https://platform.openai.com/docs/plugins/bot
223223
// DuckAssistBot - https://duckduckgo.com/duckassistbot/
224224
// BingPreview / Mastodon / Pinterestbot / Redditbot / Rogerbot / Telegrambot / Twitterbot / UptimeRobot
225-
/(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
226-
227-
// Google Site Verifier
228-
/(google-site-verification)\/([\w\.]+)/i,
225+
// Google Site Verifier / Meta / Yahoo! Japan
226+
// Yandex Bots - https://yandex.com/bots
227+
/(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot|google-site-verification|meta-externalfetcher|y!?j-dlc|yandex(?:calendar|direct(?:dyn)?|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
229228

230-
// Meta
231-
/(meta-externalfetcher)\/([\w\.]+)/i,
229+
// Bluesky
230+
/(bluesky) cardyb\/([\w\.]+)/i,
232231

233232
// Slackbot - https://api.slack.com/robots
234233
/(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i,
235234

236235
// WhatsApp
237-
/(whatsapp)\/([\w\.]+)[\/ ][ianw]/i,
238-
239-
// Yahoo! Japan
240-
/(y!?j-dlc)\/([\w\.]+)/i,
241-
242-
// Yandex Bots - https://yandex.com/bots
243-
/(yandex(?:calendar|direct(?:dyn)?|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
244-
/(yandex(?:sitelinks|userproxy))/i
236+
/(whatsapp)\/([\w\.]+)[\/ ][ianw]/i
245237
],
246238
[NAME, VERSION, [TYPE, FETCHER]],
247239

248-
// Google Bots / Cohere / Snapchat / Vercelbot
249-
[/(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat)/i],
240+
[
241+
// Google Bots / Cohere / Snapchat / Vercelbot / Yandex Bots
242+
/(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat|yandex(?:sitelinks|userproxy))/i
243+
],
250244
[NAME, [TYPE, FETCHER]],
251245
]
252246
});
@@ -271,104 +265,48 @@ const InApps = Object.freeze({
271265

272266
const MediaPlayers = Object.freeze({
273267
browser : [[
274-
275-
/(apple(?:coremedia|))\/([\w\._]+)/i, // Generic Apple CoreMedia
276-
/(coremedia) v([\w\._]+)/i
277-
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
278-
279-
/(aqualung|lyssna|bsplayer)\/([\w\.-]+)/i // Aqualung/Lyssna/BSPlayer
280-
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
281-
282-
/(ares|ossproxy)\s([\w\.-]+)/i // Ares/OSSProxy
283-
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
284-
285-
/(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\/([\w\.-]+)/i,
286-
// Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC
268+
/(apple(?:coremedia|tv))\/([\w\._]+)/i, // Generic Apple CoreMedia
269+
/(coremedia) v([\w\._]+)/i,
270+
// Ares/Nexplayer/OSSProxy
271+
/(ares|clementine|music player daemon|nexplayer|ossproxy) ([\w\.-]+)/i,
272+
// Aqualung/Lyssna/BSPlayer/Clementine/MPD
273+
// Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/GnomeMplayer/MoC
287274
// NSPlayer/PSP-InternetRadioPlayer/Videos
288-
/(clementine|music player daemon)\s([\w\.-]+)/i, // Clementine/MPD
289-
/(lg player|nexplayer)\s([\d\.]+)/i,
290-
/player\/(nexplayer|lg player)\s([\w\.-]+)/i // NexPlayer/LG Player
291-
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
292-
/(nexplayer)\s([\w\.-]+)/i // Nexplayer
275+
// Nero Home/Nero Scout/Nokia
276+
// QuickTime/RealMedia/RadioApp/RadioClientApplication/
277+
// SoundTap/Totem/Stagefright/Streamium
278+
// XBMC/gvfs/Xine/XMMS/irapp
279+
/^(aqualung|audacious|audimusicstream|amarok|bass|bsplayer|core|gnomemplayer|gvfs|irapp|lyssna|music on console|nero (?:home|scout)|nokia\d+|nsplayer|psp-internetradioplayer|quicktime|rma|radioapp|radioclientapplication|soundtap|stagefright|streamium|totem|videos|xbmc|xine|xmms)\/([\w\.-]+)/i,
280+
/(lg player|nexplayer) ([\d\.]+)/i,
281+
/player\/(nexplayer|lg player) ([\w\.-]+)/i, // NexPlayer/LG Player
282+
/(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i, // Gstreamer
283+
/(htc streaming player) [\w_]+ \/ ([\d\.]+)/i, // HTC Streaming Player
284+
/(lavf)([\d\.]+)/i, // Lavf (FFMPEG)
285+
// MPlayer SVN
286+
/(mplayer)(?: |\/)(?:(?:sherpya-){0,1}svn)(?:-| )(r\d+(?:-\d+[\w\.-]+))/i,
287+
/ (songbird)\/([\w\.-]+)/i, // Songbird/Philips-Songbird
288+
/(winamp)(?:3 version|mpeg| ) ([\w\.-]+)/i, // Winamp
289+
/(vlc)(?:\/| media player - version )([\w\.-]+)/i, // VLC Videolan
290+
/^(foobar2000|itunes|smp)\/([\d\.]+)/i, // Foobar2000/iTunes/SMP
291+
/com\.(riseupradioalarm)\/([\d\.]*)/i, // RiseUP Radio Alarm
292+
/(mplayer)(?:\s|\/| unknown-)([\w\.\-]+)/i, // MPlayer
293+
// Windows Media Server
294+
/(windows)\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ home media server/i
293295
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
294296

295297
/(flrp)\/([\w\.-]+)/i // Flip Player
296298
], [[NAME, 'Flip Player'], VERSION, [TYPE, MEDIAPLAYER]], [
297-
298-
/(fstream|nativehost|queryseekspider)/i
299299
// FStream/NativeHost/QuerySeekSpider
300+
// MPlayer (no other info)/Media Player Classic/Nero ShowTime
301+
// OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
302+
// inlight radio / YourMuze
303+
/(fstream|media player classic|inlight radio|mplayer|nativehost|nero showtime|ocms-bot|queryseekspider|tapinradio|tunein radio|winamp|yourmuze)/i
300304
], [NAME, [TYPE, MEDIAPLAYER]], [
301305

302-
/(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i
303-
// Gstreamer
304-
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
305-
306-
/(htc streaming player)\s[\w_]+\s\/\s([\d\.]+)/i, // HTC Streaming Player
307-
/(lavf)([\d\.]+)/i // Lavf (FFMPEG)
308-
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
309-
310-
/(htc_one_s)\/([\d\.]+)/i, // HTC One S
311-
], [[NAME, /_/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
312-
313-
/(mplayer)(?:\s|\/)(?:(?:sherpya-){0,1}svn)(?:-|\s)(r\d+(?:-\d+[\w\.-]+))/i,
314-
// MPlayer SVN
315-
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
316-
317-
/(mplayer)(?:\s|\/)([\w\.-]+)/i, // MPlayer
318-
/(mplayer) unknown-([\w\.\-]+)/i // MPlayer UNKNOWN
319-
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
320-
321-
/(mplayer)/i, // MPlayer (no other info)
322-
/(yourmuze)/i, // YourMuze
323-
/(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime
324-
], [NAME, [TYPE, MEDIAPLAYER]], [
325-
326-
/(nero (?:home|scout))\/([\w\.-]+)/i // Nero Home/Nero Scout
327-
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
328-
329-
/(nokia\d+)\/([\w\.-]+)/i // Nokia
330-
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
331-
332-
/\s(songbird)\/([\w\.-]+)/i // Songbird/Philips-Songbird
333-
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
334-
335-
/(winamp)3 version ([\w\.-]+)/i, // Winamp
336-
/(winamp)\s([\w\.-]+)/i,
337-
/(winamp)mpeg\/([\w\.-]+)/i
338-
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
339-
340-
/(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
341-
// inlight radio
342-
], [NAME, [TYPE, MEDIAPLAYER]], [
343-
344-
/(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\/([\w\.-]+)/i
345-
// QuickTime/RealMedia/RadioApp/RadioClientApplication/
346-
// SoundTap/Totem/Stagefright/Streamium
347-
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
348-
349-
/(smp)([\d\.]+)/i // SMP
350-
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
306+
/(htc_one_s|windows-media-player|wmplayer)\/([\w\.-]+)/i, // HTC One S / Windows Media Player
307+
], [[NAME, /[_-]/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
351308

352-
/(vlc) media player - version ([\w\.]+)/i, // VLC Videolan
353-
/(vlc)\/([\w\.-]+)/i,
354-
/(xbmc|gvfs|xine|xmms|irapp)\/([\w\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp
355-
/(foobar2000)\/([\d\.]+)/i, // Foobar2000
356-
/(itunes)\/([\d\.]+)/i // iTunes
357-
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
358-
359-
/(wmplayer)\/([\w\.-]+)/i, // Windows Media Player
360-
/(windows-media-player)\/([\w\.-]+)/i
361-
], [[NAME, /-/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
362-
363-
/windows\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ (home media server)/i,
364-
// Windows Media Server
365-
], [VERSION, [NAME, 'Windows'], [TYPE, MEDIAPLAYER]], [
366-
367-
/(com\.riseupradioalarm)\/([\d\.]*)/i // RiseUP Radio Alarm
368-
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
369-
370-
/(rad.io)\s([\d\.]+)/i, // Rad.io
371-
/(radio.(?:de|at|fr))\s([\d\.]+)/i
309+
/(rad.io|radio.(?:de|at|fr)) ([\d\.]+)/i // Rad.io
372310
], [[NAME, 'rad.io'], VERSION, [TYPE, MEDIAPLAYER]]
373311
]
374312
});
@@ -387,6 +325,24 @@ const Libraries = Object.freeze({
387325
]
388326
});
389327

328+
/////////////
329+
// VEHICLES
330+
////////////
331+
332+
const Vehicles = Object.freeze({
333+
device : [
334+
[
335+
/dilink.+(byd) auto/i, // BYD
336+
], [VENDOR], [
337+
338+
/(rivian) (r1t)/i, // Rivian
339+
], [VENDOR, MODEL], [
340+
341+
/vcc.+netfront/i, // Volvo
342+
], [[VENDOR, 'Volvo']]
343+
]
344+
});
345+
390346
//////////
391347
// BOTS
392348
/////////
@@ -409,5 +365,6 @@ export {
409365
Fetchers,
410366
InApps,
411367
Libraries,
412-
MediaPlayers
368+
MediaPlayers,
369+
Vehicles
413370
};

src/helpers/ua-parser-helpers.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for Helpers submodule of UAParser.js v2.0.0
1+
// Type definitions for Helpers submodule of UAParser.js v2.0.1
22
// Project: https://github.com/faisalman/ua-parser-js
33
// Definitions by: Faisal Salman <https://github.com/faisalman>
44

src/helpers/ua-parser-helpers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
///////////////////////////////////////////////
2-
/* Helpers for UAParser.js v2.0.0
2+
/* Helpers for UAParser.js v2.0.1
33
https://github.com/faisalman/ua-parser-js
44
Author: Faisal Salman <[email protected]>
55
AGPLv3 License */

src/helpers/ua-parser-helpers.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Source: /src/helpers/ua-parser-helpers.js
44

55
///////////////////////////////////////////////
6-
/* Helpers for UAParser.js v2.0.0
6+
/* Helpers for UAParser.js v2.0.1
77
https://github.com/faisalman/ua-parser-js
88
Author: Faisal Salman <[email protected]>
99
AGPLv3 License */

src/main/ua-parser.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for UAParser.js v2.0.0
1+
// Type definitions for UAParser.js v2.0.1
22
// Project: https://github.com/faisalman/ua-parser-js
33
// Definitions by: Faisal Salman <https://github.com/faisalman>
44

0 commit comments

Comments
 (0)