Skip to content

Commit 114aa17

Browse files
committed
feat: use ua-parser-modern
1 parent dacc5d1 commit 114aa17

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

packages/devtools/client/composables/dev-auth.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { devtoolsUiShowNotification } from '#imports'
22
import { until } from '@vueuse/core'
3-
import { UAParser } from 'my-ua-parser'
3+
import { parseUA } from 'ua-parser-modern'
44
import { ref } from 'vue'
55
import { AuthConfirm } from './dialog'
66
import { rpc } from './rpc'
@@ -53,7 +53,7 @@ export async function ensureDevAuthToken() {
5353
return devAuthToken.value!
5454
}
5555

56-
export const userAgentInfo = new UAParser(navigator.userAgent).getResult()
56+
export const userAgentInfo = parseUA(navigator.userAgent)
5757

5858
export async function requestForAuth() {
5959
const desc = [

packages/devtools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@
121121
"lightningcss": "catalog:buildtools",
122122
"markdown-it": "catalog:frontend",
123123
"markdown-it-link-attributes": "catalog:frontend",
124-
"my-ua-parser": "catalog:frontend",
125124
"nitropack": "catalog:buildtools",
126125
"nuxt": "catalog:buildtools",
127126
"ofetch": "catalog:frontend",
@@ -131,6 +130,7 @@
131130
"shiki-codegen": "catalog:buildtools",
132131
"theme-vitesse": "catalog:frontend",
133132
"tsx": "catalog:cli",
133+
"ua-parser-modern": "catalog:frontend",
134134
"unimport": "catalog:types",
135135
"unocss": "catalog:buildtools",
136136
"unplugin-vue": "catalog:buildtools",

pnpm-lock.yaml

Lines changed: 12 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ catalogs:
8383
json-editor-vue: ^0.18.1
8484
markdown-it: ^14.1.1
8585
markdown-it-link-attributes: ^4.0.1
86-
my-ua-parser: ^2.0.4
8786
ofetch: ^1.5.1
8887
ohash: ^2.0.11
8988
pathe: ^2.0.3
@@ -95,6 +94,7 @@ catalogs:
9594
splitpanes: ^4.0.4
9695
structured-clone-es: ^1.0.0
9796
theme-vitesse: ^1.0.0
97+
ua-parser-modern: ^0.1.0
9898
v-lazy-show: ^0.3.0
9999
vanilla-jsoneditor: ^3.11.0
100100
vis-data: ^8.0.3

0 commit comments

Comments
 (0)