Skip to content

Commit 62a9ede

Browse files
committed
chore: update deps
1 parent 6652f09 commit 62a9ede

10 files changed

Lines changed: 1101 additions & 657 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "unimport",
33
"type": "module",
44
"version": "6.0.1",
5-
"packageManager": "pnpm@10.30.3",
5+
"packageManager": "pnpm@10.32.1",
66
"description": "Unified utils for auto importing APIs in modules",
77
"license": "MIT",
88
"repository": "unjs/unimport",

‎pnpm-lock.yaml‎

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

‎pnpm-workspace.yaml‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ packages:
55
- playground
66
catalogs:
77
dev:
8-
'@antfu/eslint-config': ^7.6.1
8+
'@antfu/eslint-config': ^7.7.3
99
'@types/estree': ^1.0.8
10-
'@types/node': ^25.3.3
10+
'@types/node': ^25.5.0
1111
'@types/picomatch': ^4.0.2
12-
'@vitest/coverage-v8': ^4.0.18
13-
bumpp: ^10.4.1
12+
'@vitest/coverage-v8': ^4.1.0
13+
bumpp: ^11.0.1
1414
chokidar: ^5.0.0
15-
eslint: ^10.0.2
15+
eslint: ^10.0.3
1616
typescript: ^5.9.3
1717
unbuild: ^3.6.1
1818
vue-tsc: ^3.2.5
1919
playground:
20-
'@vitejs/plugin-vue': ^6.0.4
21-
vite: ^7.3.1
20+
'@vitejs/plugin-vue': ^6.0.5
21+
vite: ^8.0.0
2222
vite-plugin-inspect: ^11.3.3
23-
vue: ^3.5.29
23+
vue: ^3.5.30
2424
prod:
2525
acorn: ^8.16.0
2626
escape-string-regexp: ^5.0.0
@@ -37,10 +37,10 @@ catalogs:
3737
unplugin: ^3.0.0
3838
unplugin-utils: ^0.3.1
3939
test:
40-
h3: ^1.15.5
40+
h3: ^1.15.6
4141
jquery: ^3.7.1
4242
lit: ^3.3.2
43-
vitest: ^4.0.18
43+
vitest: ^4.1.0
4444
onlyBuiltDependencies:
4545
- esbuild
4646
- unrs-resolver

‎src/addons/vue-directives.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function vueDirectivesAddon(
3232
const self = {
3333
name: VUE_DIRECTIVES_NAME,
3434
async transform(s, id) {
35-
if (!s.original.match(contextRE))
35+
if (!contextRE.test(s.original))
3636
return s
3737

3838
const matches = Array
@@ -64,7 +64,7 @@ export function vueDirectivesAddon(
6464

6565
// Remove resolveDirective import only if there are no more directives.
6666
// User may be using missing directives or globally registered directives.
67-
if (!s.toString().match(directiveRE))
67+
if (!directiveRE.test(s.toString()))
6868
s.replace(contextText, '')
6969

7070
for (const addon of this.addons) {

‎src/addons/vue-template.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function vueTemplateAddon(): Addon {
2828

2929
const tempName = `__unimport_${name}`
3030
s.overwrite(start, end, `(${JSON.stringify(name)} in _ctx ? _ctx.${name} : ${UNREF_KEY}(${tempName}))`)
31-
if (!targets.find(i => i.as === tempName)) {
31+
if (!targets.some(i => i.as === tempName)) {
3232
targets.push({
3333
...item,
3434
as: tempName,

‎src/detect-acorn.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function traveseScopes(ast: Node, additionalWalk?: ArgumentsType<typeof w
9595
const scope = scopesStack.pop()
9696
if (scope?.node !== node)
9797
throw new Error('Scope mismatch')
98-
scopeCurrent = scopesStack[scopesStack.length - 1]
98+
scopeCurrent = scopesStack.at(-1)!
9999
}
100100

101101
pushScope(undefined!)

‎src/node/scan-dirs.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export function normalizeScanDirs(dirs: (string | ScanDir)[], options?: ScanDirE
102102
const types = isString ? topLevelTypes : (dir.types ?? topLevelTypes)
103103

104104
// Ends with a extension, consider as a file
105-
if (glob.match(/\.\w+$/))
105+
if (/\.\w+$/.test(glob))
106106
return { glob, types }
107107

108108
// Otherwise, append the default file patterns `*.{mts,cts,ts,tsx,mjs,cjs,js,jsx}`
@@ -163,7 +163,7 @@ export function dedupeDtsExports(exports: Import[]) {
163163
if (i.declarationType === 'enum' || i.declarationType === 'const enum' || i.declarationType === 'class')
164164
return true
165165

166-
return !exports.find(e => e.as === i.as && e.name === i.name && !e.type)
166+
return !exports.some(e => e.as === i.as && e.name === i.name && !e.type)
167167
})
168168
}
169169

‎src/utils.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export function toExports(imports: Import[], fileDir?: string, includeType = fal
157157

158158
if (fileDir && isAbsolute(name)) {
159159
name = relative(fileDir, name)
160-
if (!name.match(/^[./]/))
160+
if (!/^[./]/.test(name))
161161
name = `./${name}`
162162
}
163163
const entries: string[] = []

‎test/cases.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Object.entries(options).forEach(([name, options]) => {
8888
continue
8989
if (filters.length && !filters.some(f => file.includes(f)))
9090
continue
91-
if (file.match(/\.output\./))
91+
if (/\.output\./.test(file))
9292
continue
9393

9494
it(basename(file), async () => {

‎test/share.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function resolverAddon(): Addon {
3838
async matchImports(names, matched) {
3939
const dynamic: Import[] = []
4040
for (const name of names) {
41-
if (!name.match(/^El[A-Z]/))
41+
if (!/^El[A-Z]/.test(name))
4242
continue
4343
dynamic.push({
4444
name,

0 commit comments

Comments
 (0)