Bump version 0.7.39

This commit is contained in:
Faisal Salman 2024-09-11 20:26:07 +07:00
parent c25e22fa87
commit 2ad60d4d8e
10 changed files with 58 additions and 41 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "ua-parser-js", "name": "ua-parser-js",
"version": "0.7.38", "version": "0.7.39",
"authors": [ "authors": [
"Faisal Salman <f@faisalman.com>" "Faisal Salman <f@faisalman.com>"
], ],

View File

@ -4,6 +4,14 @@
Version 1.0.x is basically the equivalent of version 0.7.x. See [#536](https://github.com/faisalman/ua-parser-js/issues/536) for the reason behind this confusion. Version 1.0.x is basically the equivalent of version 0.7.x. See [#536](https://github.com/faisalman/ua-parser-js/issues/536) for the reason behind this confusion.
## Version 0.7.39 / 1.0.39
- Add new feature: executable command using `npx ua-parser-js "[INSERT-UA-HERE]"`
- Add new browser: Helio, Pico Browser, Wolvic
- Add new device vendor: itel, Nothing, TCL
- Improve browser detection: ICEBrowser, Klar, QQBrowser, Quark, Rekonq, Sleipnir
- Improve device detection: Xiaomi Pro, Amazon Echo Show, Samsung Galaxy Watch
- Removed from browser: Viera
## Version 0.7.38 / 1.0.38 ## Version 0.7.38 / 1.0.38
- Fix error on getOS() when userAgentData.platform is undefined - Fix error on getOS() when userAgentData.platform is undefined
- Add new browser: Opera GX, Twitter - Add new browser: Opera GX, Twitter

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2012-2023 Faisal Salman <<f@faisalman.com>> Copyright (c) 2012-2024 Faisal Salman <<f@faisalman.com>>
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -1,6 +1,6 @@
Package.describe({ Package.describe({
name: 'faisalman:ua-parser-js', name: 'faisalman:ua-parser-js',
version: '0.7.38', version: '0.7.39',
summary: 'Lightweight JavaScript-based user-agent string parser', summary: 'Lightweight JavaScript-based user-agent string parser',
git: 'https://github.com/faisalman/ua-parser-js.git', git: 'https://github.com/faisalman/ua-parser-js.git',
documentation: 'readme.md' documentation: 'readme.md'

View File

@ -1,29 +1,27 @@
{ {
"title": "UAParser.js", "title": "UAParser.js",
"name": "ua-parser-js", "name": "ua-parser-js",
"version": "0.7.38", "version": "0.7.39",
"author": "Faisal Salman <f@faisalman.com> (http://faisalman.com)", "author": "Faisal Salman <f@faisalman.com> (http://faisalman.com)",
"description": "Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Supports browser & node.js environment", "description": "Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Supports browser & node.js environment",
"keywords": [ "keywords": [
"ua-parser-js",
"user-agent", "user-agent",
"parser",
"browser", "browser",
"engine", "engine",
"os", "os",
"device", "device",
"mobile",
"cpu", "cpu",
"jquery-plugin", "platform",
"ecosystem:jquery", "detect",
"ua-parser-js", "javascript",
"client-hints", "jquery",
"user-agent-detection", "typescript",
"device-detection", "node-js",
"platform-detection", "client-hints"
"mobile-detection",
"browser-detection",
"architecture-detection"
], ],
"homepage": "https://github.com/faisalman/ua-parser-js", "homepage": "https://uaparser.dev",
"contributors": [ "contributors": [
"Aamir Poonawalla <aamir@urx.com>", "Aamir Poonawalla <aamir@urx.com>",
"Admas <mollases@users.noreply.github.com>", "Admas <mollases@users.noreply.github.com>",
@ -196,7 +194,7 @@
"test": "test" "test": "test"
}, },
"bugs": "https://github.com/faisalman/ua-parser-js/issues", "bugs": "https://github.com/faisalman/ua-parser-js/issues",
"demo": "https://faisalman.github.io/ua-parser-js", "demo": "https://uaparser.dev",
"download": "https://raw.github.com/faisalman/ua-parser-js/master/dist/ua-parser.min.js", "download": "https://raw.github.com/faisalman/ua-parser-js/master/dist/ua-parser.min.js",
"funding": [ "funding": [
{ {

View File

@ -15,11 +15,11 @@
JavaScript library to detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data with relatively small footprint (~17KB minified, ~6KB gzipped) that can be used either in browser (client-side) or node.js (server-side). JavaScript library to detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data with relatively small footprint (~17KB minified, ~6KB gzipped) that can be used either in browser (client-side) or node.js (server-side).
* Author : Faisal Salman <<f@faisalman.com>> * Author : Faisal Salman <<f@faisalman.com>>
* Demo : https://faisalman.github.io/ua-parser-js * Demo : https://uaparser.dev
* Source : https://github.com/faisalman/ua-parser-js * Source : https://github.com/faisalman/ua-parser-js
* Documentation : * Documentation :
* v1 : https://github.com/faisalman/ua-parser-js/tree/1.0.35#documentation * v1 : https://github.com/faisalman/ua-parser-js/tree/1.0.39#documentation
* v2 : https://faisalman.github.io/ua-parser-js-docs/v2 * v2 : https://docs.uaparser.dev
*** ***
@ -36,6 +36,8 @@ JavaScript library to detect Browser, Engine, OS, CPU, and Device type/model fro
</tbody> </tbody>
</table> </table>
<a href="https://uaparser.dev"><img src="https://raw.githubusercontent.com/faisalman/ua-parser-js/gh-pages/images/uap-header.png"></a>
--- ---
# Documentation # Documentation
@ -102,19 +104,19 @@ The methods are self explanatory, here's a small overview on all the available m
AVG, Baidu, Basilisk, Blazer, Bolt, Brave, Bowser, Camino, Chimera, AVG, Baidu, Basilisk, Blazer, Bolt, Brave, Bowser, Camino, Chimera,
Chrome Headless, Chrome WebView, Chrome, Chromium, Cobalt, Comodo Dragon, Dillo, Chrome Headless, Chrome WebView, Chrome, Chromium, Cobalt, Comodo Dragon, Dillo,
Dolphin, Doris, DuckDuckGo, Edge, Electron, Epiphany, Facebook, Falkon, Fennec, Dolphin, Doris, DuckDuckGo, Edge, Electron, Epiphany, Facebook, Falkon, Fennec,
Firebird, Firefox [Focus/Reality], Flock, Flow, GSA, GoBrowser, Heytap, Firebird, Firefox [Focus/Reality], Flock, Flow, GSA, GoBrowser, Helio, Heytap,
Huawei Browser, iCab, ICE Browser, IE, IEMobile, IceApe, IceCat, IceDragon, Huawei Browser, iCab, ICE Browser, IE, IEMobile, IceApe, IceCat, IceDragon,
Iceweasel, Instagram, Iridium, Iron, Jasmine, Kakao[Story/Talk], K-Meleon, Iceweasel, Instagram, Iridium, Iron, Jasmine, Kakao[Story/Talk], K-Meleon,
Kindle, Klar, Klarna, Konqueror, LBBROWSER, Line, LinkedIn, Links, Lunascape, Kindle, Klar, Klarna, Konqueror, LBBROWSER, Line, LinkedIn, Links, Lunascape,
Lynx, MIUI Browser, Maemo, Maxthon, Midori, Minimo, Mobile Safari, Mosaic, Lynx, MIUI Browser, Maemo, Maxthon, Midori, Minimo, Mobile Safari, Mosaic,
Mozilla, NetFront, NetSurf, Netfront, Netscape, NokiaBrowser, Obigo, Mozilla, NetFront, NetSurf, Netfront, Netscape, NokiaBrowser, Obigo,
Oculus Browser, OmniWeb, Opera Coast, Opera [GX/Mini/Mobi/Tablet], PaleMoon, Oculus Browser, OmniWeb, Opera Coast, Opera [GX/Mini/Mobi/Tablet], PaleMoon,
PhantomJS, Phoenix, Polaris, Puffin, QQ, QQBrowser, QQBrowserLite, Quark, PhantomJS, Phoenix, Pico Browser, Polaris, Puffin, QQ, QQBrowser, QQBrowserLite,
QupZilla, RockMelt, Safari, Sailfish Browser, Samsung Internet, SeaMonkey, Silk, Quark, QupZilla, RockMelt, Safari, Sailfish Browser, Samsung Internet, SeaMonkey,
Skyfire, Sleipnir, Slim, SlimBrowser, Smart Lenovo Browser, Snapchat, Silk, Skyfire, Sleipnir, Slim, SlimBrowser, Smart Lenovo Browser, Snapchat,
Sogou [Explorer/Mobile], Swiftfox, Tesla, TikTok, Tizen Browser, Twitter, Sogou [Explorer/Mobile], Swiftfox, Tesla, TikTok, Tizen Browser, Twitter,
UCBrowser, UP.Browser, Viera, Vivaldi, Vivo Browser, Waterfox, WeChat, Weibo, UCBrowser, UP.Browser, Vivaldi, Vivo Browser, w3m, Waterfox, WeChat, Weibo,
Yandex, w3m, Whale Browser, ... Whale Browser, Wolvic, Yandex, ...
# 'browser.version' determined dynamically # 'browser.version' determined dynamically
``` ```
@ -136,10 +138,10 @@ console, mobile, tablet, smarttv, wearable, embedded
# Possible 'device.vendor': # Possible 'device.vendor':
Acer, Alcatel, Amazon, Apple, Archos, ASUS, AT&T, BenQ, BlackBerry, Dell, Acer, Alcatel, Amazon, Apple, Archos, ASUS, AT&T, BenQ, BlackBerry, Dell,
Essential, Facebook, Fairphone, GeeksPhone, Google, HP, HTC, Huawei, Infinix, Essential, Facebook, Fairphone, GeeksPhone, Google, HP, HTC, Huawei, Infinix,
Jolla, Kobo, Lenovo, LG, Meizu, Microsoft, Motorola, Nexian, Nintendo, Nokia, itel, Jolla, Kobo, Lenovo, LG, Meizu, Microsoft, Motorola, Nexian, Nintendo,
Nvidia, OnePlus, OPPO, Ouya, Palm, Panasonic, Pebble, Polytron, Realme, RIM, Nokia, Nothing, Nvidia, OnePlus, OPPO, Ouya, Palm, Panasonic, Pebble, Polytron,
Roku, Samsung, Sharp, Siemens, Sony[Ericsson], Sprint, Tecno, Tesla, Ulefone, Realme, RIM, Roku, Samsung, Sharp, Siemens, Sony[Ericsson], Sprint, TCL, Tecno,
Vivo, Vodafone, Xbox, Xiaomi, Zebra, ZTE, ... Tesla, Ulefone, Vivo, Vodafone, Xbox, Xiaomi, Zebra, ZTE, ...
# 'device.model' determined dynamically # 'device.model' determined dynamically
``` ```
@ -321,6 +323,14 @@ console.log(parseInt($.ua.browser.version.split('.')[0], 10)); // 4
$('body').addClass('ua-browser-' + $.ua.browser.name + ' ua-devicetype-' + $.ua.device.type); $('body').addClass('ua-browser-' + $.ua.browser.name + ' ua-devicetype-' + $.ua.device.type);
``` ```
## Using npx
UAParser.js can be executed as a command that returns the parsed data in JSON format:
```sh
$ npx ua-parser-js "[INSERT-UA-HERE]"
```
## Using Extension ## Using Extension
* `UAParser([uastring,] extensions)` * `UAParser([uastring,] extensions)`
@ -364,7 +374,7 @@ Made with [contributors-img](https://contrib.rocks).
MIT License MIT License
Copyright (c) 2012-2021 Faisal Salman <<f@faisalman.com>> Copyright (c) 2012-2024 Faisal Salman <<f@faisalman.com>>
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
/* UAParser.js v0.7.38 /* UAParser.js v0.7.39
Copyright © 2012-2021 Faisal Salman <f@faisalman.com> Copyright © 2012-2021 Faisal Salman <f@faisalman.com>
MIT License *//* MIT License *//*
Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.
@ -17,7 +17,7 @@
///////////// /////////////
var LIBVERSION = '0.7.38', var LIBVERSION = '0.7.39',
EMPTY = '', EMPTY = '',
UNKNOWN = '?', UNKNOWN = '?',
FUNC_TYPE = 'function', FUNC_TYPE = 'function',
@ -60,7 +60,8 @@
ZEBRA = 'Zebra', ZEBRA = 'Zebra',
FACEBOOK = 'Facebook', FACEBOOK = 'Facebook',
CHROMIUM_OS = 'Chromium OS', CHROMIUM_OS = 'Chromium OS',
MAC_OS = 'Mac OS'; MAC_OS = 'Mac OS',
SUFFIX_BROWSER = ' Browser';
/////////// ///////////
// Helper // Helper
@ -171,7 +172,7 @@
return (i === UNKNOWN) ? undefined : i; return (i === UNKNOWN) ? undefined : i;
} }
} }
return str; return map.hasOwnProperty('*') ? map['*'] : str;
}; };
/////////////// ///////////////