Skip to content

Commit

Permalink
Make it personal - 2.0.0-rc.3
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalman committed Nov 14, 2024
2 parents 99d59f7 + ba980c8 commit 138e6b7
Show file tree
Hide file tree
Showing 215 changed files with 3,080 additions and 476 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ assignees: ''
**Library version**
Which version of the library that you use, eg: v0.7.35 or v2.0.0-alpha.3

For the issue related with detection result, you can use the demo section in https://uaparser.js.org to confirm

**Describe the bug**
A clear and concise description of what the bug is.

Expand All @@ -23,11 +21,13 @@ Steps to reproduce the behavior:
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.
A clear and concise description of what you expected to happen, or what's referred in the docs https://docs.uaparser.dev/

**Screenshots**
If applicable, add screenshots to help explain your problem.

For issues related to detection results, you can send the screenshots of the demo section at https://uaparser.dev/#demo to confirm.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
Expand All @@ -40,4 +40,4 @@ If applicable, add screenshots to help explain your problem.
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
Add any other context about the problem here.
File renamed without changes.
138 changes: 116 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,122 @@
# UAParser.js Changelog

# Version 2.0
- What's breaking:
- Dual-licensed under AGPLv3 or PRO License
- Browser detection on mobile device: `"Chrome" => "Mobile Chrome"`, `"Firefox" => "Mobile Firefox"`
- OS detection: `"Mac OS" => "macOS"`, `"Chromium OS" => "Chrome OS"`
- What's new:
- Some new methods in result object:
- Support for client hints: `withClientHints()`
- Support for feature detection: `withFeatureCheck()`
- Utility for easy comparison: `is()`
- Utility to print full-name: `toString()`
- Support for ES module `import { UAParser } from 'ua-parser-js'`
- Provided Enums submodule `'ua-parser-js/enums'`
- Provided Extensions submodule `'ua-parser-js/extensions'`
- Provided Helpers submodule `'ua-parser-js/helpers'`
## Migrating from v1 to v2

### What's Breaking:

- **Licensing Changes:**
- UAParser.js is now licensed under AGPLv3 for open-source use, with PRO Licenses available for commercial/proprietary use

- **Browser Detection on Mobile Devices:**
- `"Chrome"` => `"Mobile Chrome"`
- `"Firefox"` => `"Mobile Firefox"`

- **OS Detection:**
- `"Mac OS"` => `"macOS"`
- `"Chromium OS"` => `"Chrome OS"`

### What's New:

- **Support for ES Modules & TypeScript:**
- Import directly as an ES module with TypeScript support: `import { UAParser } from 'ua-parser-js'`

- **Support for Custom/Predefined Extensions:**
- Pass custom regexes or predefined extensions as a list to `UAParser()`

- **Support for CLI Parsing:**
- Parse a user-agent directly from the command line using `npx ua-parser-js "[User-Agent]"`

- **Enhanced Detection with Client Hints:**
- `withClientHints()`: Improves detection accuracy by leveraging client hints

- **Enhanced Detection with Feature Detection:**
- `withFeatureCheck()`: Refines detection results using feature detection

- **Simple Comparison for Detection Results:**
- `is()`: Enables easy comparison checks against the detection result

- **Detailed Result Output:**
- `toString()`: Returns the detection result in form of a full-name string

- **New Device Type:**
- Added `xr` to identify AR/VR devices

- **New Browser Property:**
- Added `browser.type` to identify additional browser types:
- `crawler`, `cli`, `email`, `fetcher`, `inapp`, `library`, `mediaplayer`

- **New Submodules:**
- **`'ua-parser-js/enums'`**: Provides constants for these specific properties:
- `browser.name`, `browser.type`, `cpu.architecture`, `device.type`, `device.vendor`, `engine.name`, `os.name`

- **`'ua-parser-js/extensions'`**: Predefined extensions for various use cases:
- `Bots`, `Crawlers`, `CLIs`, `Emails`, `ExtraDevices`, `Fetchers`, `InApps`, `Libraries`, `Mediaplayers`

- **`'ua-parser-js/helpers'`**: Provides utility methods to extend detection functionality:
- `getDeviceVendor()`: Guesses the device vendor based on its model name
- `isAppleSilicon()`: Detects Apple Silicon device properties
- `isBot()`: Checks if the browser is a bot
- `isChromeFamily()`: Checks if the browser is Chrome-based (uses Blink engine) — e.g., New Opera, New Edge, Vivaldi, Brave, Arc, etc.
- `isElectron()`: Detects if current window is running within Electron
- `isFromEU()`: Detects if current browser's timezone is from an EU country
- `isFrozenUA()`: Checks if the user-agent matches a frozen/reduced user-agent pattern
- `isStandalonePWA()`: Detects if current window is a standalone PWA

---

## Version 2.0.0-rc.3

- Add support for Headers object
- Add new device: Advan, Cat, Energizer, Honor, IMO, Micromax, Smartfren
- Add new engine: Servo
- `ua-parser-js/extensions` submodule:
- Breaking change: rename `module` to `library`
- Add new email clients: Evolution, KMail, Kontact
- Add new bots: 360Spider, Archive.org Bots, CCBot, DataForSeoBot, DuckAssistBot, Exabot, Google Bots, Meta Bots, MojeekBot, PerplexityBot, PetalBot, TurnitinBot, Yeti, YisouSpider

## Version 2.0.0-rc.2

- Fix incorrect import path in ESM files
- Add new browser: 115, SlimBoat, Slimjet, LibreWolf
- Improve browser detection: 2345, 360, Dragon, Iron, Maxthon
- `ua-parser-js/enums` submodule:
- Add Chromecast OS variants: Android/Fuchsia/Linux/SmartSpeaker
- `ua-parser-js/helpers` submodule:
- Add new method: `isBot()` to check if the browser is identified as a bot

## Version 2.0.0-rc.1

- Fix Python Request mistakenly identified as Meta Quest
- Add new browser: Helio
- Add new device: itel, Nothing, Pico, TCL
- Add new engine: ArkWeb
- Add new OS: OpenHarmony, Pico
- Improve browser detection: Quark
- Improve device detection: Xiaomi, Amazon Echo Show, Google Chromecast, Samsung Galaxy Watch
- `ua-parser-js/helpers` submodule:
- Add new method:
- `getDeviceVendor()` to guess for a device vendor based on its model name
- `isElectron()` to check if current window is running inside Electron
- `isFromEU()` to check if current window is from an EU (European Union) country
- `isStandalonePWA()` to check if current window is a standalone PWA
- Rename `isChromiumBased()` to `isChromeFamily()`
- Update `isAppleSilicon()` to also checks for WebGL renderer info
- `ua-parser-js/extensions` submodule:
- Restore `Bots` as a compilation of all these browser types: `cli`, `crawler`, `fetcher`, and `library`

## Version 2.0.0-beta.3

- Breaking:
- AR/VR devices moved to new device type: `xr`
- New property in `browser`: `type`
- In `ua-parser-js/extensions` submodule, `bots` divided into `crawler` / `fetcher`
- New features:
- Parse directly from command line using `npx ua-parser-js`
- Extensions can be passed as a list to `UAParser()`
- Add new browser: Pico Browser, Twitter, Wolvic
- Improve browser detection: DuckDuckGo, ICEBrowser, Klar, QQ, Sleipnir
- Improve device detection: Oculus Quest & Oppo Pad
- Update latest client hints spec: `formFactor` -> `formFactors`
- In `ua-parser-js/extensions` submodule, `bots` divided into `crawler` / `fetcher`

## Version 2.0.0-beta.2

Expand Down Expand Up @@ -64,13 +152,15 @@

- Initial work on new major version

---

# Version 0.7 / 1.0

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.37
## Version 0.7.38 / 1.0.38
- Fix error on getOS() when userAgentData.platform is undefined
- Add new browser: Opera GX, Twitter
- Improve browser detection: DuckDuckGo
- Improve device detection: OPPO Pad, Oculus Quest

## Version 0.7.37 / 1.0.37
- Fix misidentified WebView token as device model
- Increase UA_MAX_LENGTH to 500
- Add new browser: Alipay, Klarna, Smart Lenovo Browser, Vivo Browser
Expand Down Expand Up @@ -143,6 +233,10 @@ Version 1.0.x is basically the equivalent of version 0.7.x. See [#536](https://g
- Fix trailing comma for ES3 compatibility
- Some code refactor

# Version 0.8
## Version 0.7 / 1.0

Version 1.0.x is basically the equivalent of version 0.7.x (mirror/duplicate). See [#536](https://github.com/faisalman/ua-parser-js/issues/536) for the reason behind this confusion.

## Version 0.8

Version 0.8 was created by accident. This version is now deprecated and no longer maintained, please update to version 0.7 / 1.0.
3 changes: 3 additions & 0 deletions dist/icons/color/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MIT License
Copyright (c) Cătălin Mariș
https://github.com/alrra/browser-logos
1 change: 1 addition & 0 deletions dist/icons/color/browser/android-browser.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/icons/color/browser/avant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/icons/color/browser/basilisk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/color/browser/basilisk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/icons/color/browser/brave.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/color/browser/brave.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/icons/color/browser/chrome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/color/browser/chrome.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/icons/color/browser/chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/color/browser/chromium.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/icons/color/browser/coc-coc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/icons/color/browser/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dist/icons/color/browser/default.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/icons/color/browser/dolphin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/icons/color/browser/edge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 138e6b7

Please sign in to comment.