Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump ua-parser-js from 1.0.39 to 2.0.0 #13856

Merged
merged 3 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 89 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"mitt": "^3.0.1",
"mockconsole": "0.0.1",
"pinia": "^2.2.6",
"ua-parser-js": "^1.0.39",
"ua-parser-js": "^2.0.0",
Antreesy marked this conversation as resolved.
Show resolved Hide resolved
"util": "^0.12.5",
"vue": "^2.7.16",
"vue-cropperjs": "^4.2.0",
Expand All @@ -83,7 +83,6 @@
"@nextcloud/stylelint-config": "^3.0.1",
"@nextcloud/webpack-vue-config": "^6.2.0",
"@types/jest": "^29.5.14",
"@types/ua-parser-js": "^0.7.39",
"@vue/test-utils": "^1.3.6",
"@vue/tsconfig": "^0.5.1",
"@vue/vue2-jest": "^29.2.6",
Expand Down
10 changes: 5 additions & 5 deletions src/utils/browserCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import UAParser from 'ua-parser-js'
import { UAParser } from 'ua-parser-js'

import { showError, TOAST_PERMANENT_TIMEOUT } from '@nextcloud/dialogs'
import { t } from '@nextcloud/l10n'
Expand All @@ -16,22 +16,22 @@ const os = parser.getOS()
* Per-OS flags
*/

export const isMac = os.name === 'Mac OS'
export const isMac = os.name === 'macOS'

/**
* Per-browser flags and a major version
*/

export const isFirefox = browser.name === 'Firefox'
export const isChrome = browser.name === 'Chrome' || browser.name === 'Chromium'
export const isFirefox = browser.name === 'Firefox' || browser.name === 'Mobile Firefox'
export const isChrome = browser.name === 'Chrome' || browser.name === 'Chromium' || browser.name === 'Mobile Chrome'
export const isOpera = browser.name === 'Opera'
export const isSafari = browser.name === 'Safari' || browser.name === 'Mobile Safari'
export const isEdge = browser.name === 'Edge'
export const isBrave = browser.name === 'Brave'
export const isIE = browser.name === 'IE' || browser.name === 'IEMobile'
export const isYandex = browser.name === 'Yandex'

export const majorVersion = browser.version ? parseInt(browser.version.split('.')[0], 10) : 0
export const majorVersion = browser.major ? parseInt(browser.major, 10) : 0

/**
* Is the browser Chromium-based
Expand Down
Loading