Skip to content

Commit 9d77fff

Browse files
committed
chore: adapt tsdown configs
1 parent 77e992c commit 9d77fff

10 files changed

Lines changed: 120 additions & 84 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"type": "module",
33
"version": "0.0.0-alpha.33",
44
"private": true,
5-
"packageManager": "pnpm@10.32.0",
5+
"packageManager": "pnpm@10.32.1",
66
"scripts": {
77
"build": "turbo run build",
88
"build:debug": "NUXT_DEBUG_BUILD=true pnpm -r run build",

packages/core/tsdown.config.ts

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,31 @@ export default defineConfig({
1414
isProduction: true,
1515
}),
1616
],
17-
external: [
18-
'@vitejs/devtools/client/webcomponents',
19-
/^node:/,
20-
],
17+
deps: {
18+
neverBundle: [
19+
'@vitejs/devtools/client/webcomponents',
20+
/^node:/,
21+
],
22+
// @keep-sorted
23+
onlyAllowBundle: [
24+
'@clack/core',
25+
'@clack/prompts',
26+
'@vue/reactivity',
27+
'@vue/runtime-core',
28+
'@vue/runtime-dom',
29+
'@vue/shared',
30+
'@vueuse/core',
31+
'@vueuse/shared',
32+
'@xterm/addon-fit',
33+
'@xterm/xterm',
34+
'ansis',
35+
'csstype',
36+
'dompurify',
37+
'get-port-please',
38+
'sisteransi',
39+
'vue',
40+
],
41+
},
2142
clean: true,
2243
platform: 'neutral',
2344
tsconfig: '../../tsconfig.base.json',
@@ -45,5 +66,4 @@ export default defineConfig({
4566
await buildCSS()
4667
},
4768
},
48-
inlineOnly: false,
4969
})

packages/kit/package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,12 @@
4646
"immer": "catalog:deps"
4747
},
4848
"devDependencies": {
49-
"my-ua-parser": "catalog:frontend",
5049
"tsdown": "catalog:build",
50+
"ua-parser-modern": "catalog:frontend",
5151
"vite": "catalog:build"
5252
},
5353
"inlinedDependencies": {
5454
"ohash": "2.0.11",
55-
"@vue/shared": "3.5.30",
56-
"@vue/reactivity": "3.5.30",
57-
"@vue/runtime-core": "3.5.30",
58-
"csstype": "3.2.3",
59-
"@vue/runtime-dom": "3.5.30",
60-
"vue": "3.5.30"
55+
"ua-parser-modern": "0.1.1"
6156
}
6257
}

packages/kit/src/client/docks.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { RpcFunctionsCollector } from '@vitejs/devtools-rpc'
2-
import type { Raw } from 'vue'
32
import type { DevToolsDockEntriesGrouped, DevToolsDockEntry, DevToolsDocksUserSettings, DevToolsDockUserEntry, DevToolsRpcClientFunctions, EventEmitter } from '../types'
43
import type { SharedState } from '../utils/shared-state'
54
import type { DevToolsRpcClient } from './rpc'
@@ -82,7 +81,7 @@ export interface DockEntryState {
8281
iframe?: HTMLIFrameElement | null
8382
panel?: HTMLDivElement | null
8483
}
85-
events: Raw<EventEmitter<DockEntryStateEvents>>
84+
events: EventEmitter<DockEntryStateEvents>
8685
}
8786

8887
export interface DockEntryStateEvents {

packages/kit/src/client/rpc-ws.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { DevToolsClientRpcHost, RpcClientEvents } from './docks'
33
import type { DevToolsRpcClientMode, DevToolsRpcClientOptions } from './rpc'
44
import { createRpcClient } from '@vitejs/devtools-rpc/client'
55
import { createWsRpcPreset } from '@vitejs/devtools-rpc/presets/ws/client'
6-
import { UAParser } from 'my-ua-parser'
6+
import { parseUA } from 'ua-parser-modern'
77
import { promiseWithResolver } from '../utils/promise'
88

99
export interface CreateWsRpcClientModeOptions {
@@ -55,7 +55,7 @@ export function createWsRpcClientMode(
5555
if (isTrusted)
5656
return true
5757

58-
const info = new UAParser(navigator.userAgent).getResult()
58+
const info = parseUA(navigator.userAgent)
5959
const ua = [
6060
info.browser.name,
6161
info.browser.version,

packages/kit/tsdown.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ export default defineConfig({
1313
clean: true,
1414
tsconfig: '../../tsconfig.base.json',
1515
dts: true,
16-
inlineOnly: false,
1716
platform: 'neutral',
17+
deps: {
18+
onlyAllowBundle: [
19+
'ohash',
20+
'ua-parser-modern',
21+
],
22+
},
1823
})

packages/rpc/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
"watch": "tsdown --watch",
3737
"prepack": "pnpm build"
3838
},
39+
"peerDependencies": {
40+
"ws": "*"
41+
},
3942
"peerDependenciesMeta": {
4043
"ws": {
4144
"optional": true
@@ -51,8 +54,5 @@
5154
"devDependencies": {
5255
"tsdown": "catalog:build",
5356
"ws": "catalog:deps"
54-
},
55-
"inlinedDependencies": {
56-
"ws": "8.19.0"
5757
}
5858
}

packages/rpc/tsdown.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ export default defineConfig({
1313
clean: true,
1414
dts: true,
1515
exports: true,
16-
inlineOnly: false,
1716
})

0 commit comments

Comments
 (0)