Skip to content

Commit

Permalink
deps: replace resolve with mlly
Browse files Browse the repository at this point in the history
  • Loading branch information
KermanX committed Jun 24, 2024
1 parent 3e2c889 commit e5240f1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 22 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"local-pkg": "^0.5.0",
"magic-string": "^0.30.10",
"minimatch": "^9.0.4",
"resolve": "^1.22.8",
"mlly": "^1.7.1",
"unplugin": "^1.10.1"
},
"devDependencies": {
Expand All @@ -112,7 +112,6 @@
"@types/debug": "^4.1.12",
"@types/minimatch": "^5.1.2",
"@types/node": "^20.12.7",
"@types/resolve": "^1.20.6",
"bumpp": "^9.4.1",
"compare-versions": "^6.1.0",
"element-plus": "^2.7.2",
Expand Down
43 changes: 27 additions & 16 deletions pnpm-lock.yaml

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

6 changes: 2 additions & 4 deletions src/core/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { parse } from 'node:path'
import process from 'node:process'
import { minimatch } from 'minimatch'
import resolve from 'resolve'
import { resolvePathSync } from 'mlly'
import { slash, toArray } from '@antfu/utils'
import {
getPackageInfo,
Expand Down Expand Up @@ -223,7 +223,5 @@ export function shouldTransform(code: string) {
}

export function resolveImportPath(importName: string): string | undefined {
return resolve.sync(importName, {
preserveSymlinks: false,
})
return resolvePathSync(importName)
}

0 comments on commit e5240f1

Please sign in to comment.