From 1635cd86070852bcfe40bc03e4851d7ab678ba2a Mon Sep 17 00:00:00 2001 From: Ville Kentta Date: Sat, 24 Feb 2018 11:05:43 +0200 Subject: [PATCH 1/3] Add samsungBrowser to browser version typings --- typings.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/typings.d.ts b/typings.d.ts index cb247c2..54a4b3b 100644 --- a/typings.d.ts +++ b/typings.d.ts @@ -39,6 +39,7 @@ declare namespace bowser { android: boolean; ios: boolean; opera: boolean; + samsungBrowser: boolean; phantom: boolean; blackberry: boolean; webos: boolean; From aea92824260f45fab8d0557f125a29274224558a Mon Sep 17 00:00:00 2001 From: Denis Demchenko Date: Mon, 12 Mar 2018 22:04:11 +0200 Subject: [PATCH 2/3] Define iphone, ipad, ipod as flags in typings.d.ts --- typings.d.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/typings.d.ts b/typings.d.ts index 54a4b3b..55b527a 100644 --- a/typings.d.ts +++ b/typings.d.ts @@ -8,6 +8,15 @@ export = bowser; export as namespace bowser; declare namespace bowser { + export interface IBowserPlatform { + ipad: boolean; + ipod: boolean; + iphone: boolean; + /** If a tablet device is detected, the flag tablet is set instead of mobile. */ + tablet: boolean; + /** All detected mobile OSes are additionally flagged mobile, unless it's a tablet */ + mobile: boolean; + } export interface IBowserOS { mac: boolean; @@ -66,11 +75,6 @@ declare namespace bowser { gecko: boolean; /** IE > 11 */ msedge: boolean; - /** If a tablet device is detected, the flag tablet is set instead of mobile. */ - tablet: boolean; - /** All detected mobile OSes are additionally flagged mobile, unless it's a tablet */ - mobile: boolean; - } export interface IBowserGrade { @@ -90,7 +94,7 @@ declare namespace bowser { osversion: string|number; } - export interface IBowserDetection extends IBowserGrade, IBowserEngines, IBowserOS, IBowserVersions { } + export interface IBowserDetection extends IBowserGrade, IBowserEngines, IBowserOS, IBowserVersions, IBowserPlatform { } export interface IBowserMinVersions { // { msie: "11", "firefox": "4" } From 6575e4a0abfa9b21286e99e9b9ed4fc658add22e Mon Sep 17 00:00:00 2001 From: Denis Demchenko Date: Mon, 12 Mar 2018 22:05:10 +0200 Subject: [PATCH 3/3] Bump version, write changelog --- CHANGELOG.md | 3 +++ bower.json | 2 +- package.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa5e7a3..2fbbe64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Bowser Changelog +### 1.9.3 (March 12, 2018) +- [FIX] Fix `typings.d.ts` — add `ipad`, `iphone`, `ipod` flags to the interface + ### 1.9.2 (February 5, 2018) - [FIX] Fix `typings.d.ts` — add `osname` flag to the interface diff --git a/bower.json b/bower.json index 4df7f05..fb81bbb 100644 --- a/bower.json +++ b/bower.json @@ -11,7 +11,7 @@ "ender", "sniff" ], - "version": "1.9.2", + "version": "1.9.3", "homepage": "https://github.com/lancedikson/bowser", "scripts": [ "src/bowser.js" diff --git a/package.json b/package.json index bc1e6df..ba8e884 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bowser", - "version": "1.9.2", + "version": "1.9.3", "description": "Lightweight browser detector", "keywords": [ "browser",