Skip to content

Commit 108a250

Browse files
committed
chore: remove currently unused deps
1 parent 46a96a4 commit 108a250

6 files changed

+25
-133
lines changed

api/http.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { VercelRequest, VercelResponse } from '@vercel/node'
22
import axios from 'axios'
33
import colors from 'colors'
4+
import escapeRegExp from 'lodash.escaperegexp'
45

56
const PROD = process.env.NODE_ENV === 'production'
67

@@ -129,7 +130,10 @@ function isAccepted(req: VercelRequest) {
129130
!!ua &&
130131
Array.isArray(list) &&
131132
(list.length > 0
132-
? !new RegExp(`(${list.join('|')})`, 'gi').test(ua)
133+
? !new RegExp(
134+
`(${list.map((str) => escapeRegExp(str)).join('|')})`,
135+
'gi'
136+
).test(ua)
133137
: true)
134138
)
135139
} catch (e) {

components.d.ts

-71
This file was deleted.

package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"date-fns": "^2.29.3",
2323
"date-fns-tz": "^2.0.0",
2424
"js-cookie": "^3.0.1",
25-
"lodash": "^4.17.21",
2625
"naive-ui": "^2.34.3",
2726
"nprogress": "^0.2.0",
2827
"pinia": "^2.0.34",
@@ -38,25 +37,24 @@
3837
"@types/colors": "^1.2.1",
3938
"@types/cookie": "^0.5.1",
4039
"@types/js-cookie": "^3.0.3",
41-
"@types/lodash": "^4.14.192",
40+
"@types/lodash.escaperegexp": "^4.1.7",
4241
"@types/node": "^18.15.11",
4342
"@types/nprogress": "^0.2.0",
4443
"@vercel/node": "^2.10.3",
4544
"@vitejs/plugin-vue": "^4.1.0",
4645
"@volar/vue-language-plugin-pug": "^1.2.0",
47-
"camelcase-object-deep": "^1.1.7",
4846
"cheerio": "1.0.0-rc.12",
4947
"colors": "^1.4.0",
5048
"conventional-changelog-cli": "^2.2.2",
5149
"cookie": "^0.5.0",
50+
"lodash.escaperegexp": "^4.1.2",
5251
"prettier": "^2.8.7",
5352
"pug": "^3.0.2",
5453
"sass": "^1.61.0",
5554
"tslib": "^2.5.0",
5655
"typescript": "^5.0.4",
5756
"unplugin-auto-import": "^0.15.2",
5857
"unplugin-icons": "^0.16.1",
59-
"unplugin-vue-components": "^0.24.1",
6058
"vercel": "28.10.2",
6159
"vite": "^4.2.1"
6260
}

pnpm-lock.yaml

+16-49
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"importHelpers": true,
1717
"paths": {
1818
"@/*": ["src/*"]
19-
}
19+
},
20+
"types": ["unplugin-icons/types/vue"]
2021
},
2122
"include": [
2223
"src/**/*.ts",
@@ -25,7 +26,6 @@
2526
"src/**/*.vue",
2627
"src/**/*.json",
2728
"vite.config.ts",
28-
"components.d.ts",
2929
"auto-imports.d.ts"
3030
],
3131
"exclude": ["node_modules/**", "**/dist"],

vite.config.ts

-6
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import { defineConfig } from 'vite'
33
import vue from '@vitejs/plugin-vue'
44
import AutoImport from 'unplugin-auto-import/vite'
55
import Icons from 'unplugin-icons/vite'
6-
import IconsResolver from 'unplugin-icons/resolver'
7-
import Components from 'unplugin-vue-components/vite'
86

97
const PROD = process.env.NODE_ENV === 'production'
108

@@ -24,10 +22,6 @@ export default defineConfig({
2422
scale: 1,
2523
defaultClass: 'svg--inline',
2624
}),
27-
Components({
28-
dts: true,
29-
resolvers: [IconsResolver()],
30-
}),
3125
],
3226
build: {},
3327
esbuild: {

0 commit comments

Comments
 (0)