Skip to content

Commit b295f7e

Browse files
committed
refactor: remove ufo dependency
1 parent 8ec61f3 commit b295f7e

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
"consola": "^3.4.0",
3535
"pathe": "^2.0.3",
3636
"pkg-types": "^2.0.0",
37-
"tinyexec": "^0.3.2",
38-
"ufo": "^1.5.4"
37+
"tinyexec": "^0.3.2"
3938
},
4039
"devDependencies": {
4140
"@types/node": "^22.13.5",
@@ -48,6 +47,7 @@
4847
"prettier": "^3.5.2",
4948
"std-env": "^3.8.0",
5049
"typescript": "^5.7.3",
50+
"ufo": "^1.5.4",
5151
"unbuild": "^3.3.1",
5252
"vitest": "^3.0.7"
5353
},

pnpm-lock.yaml

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

src/_utils.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { createRequire } from "node:module";
22
import { normalize, resolve } from "pathe";
3-
import { withTrailingSlash } from "ufo";
43
import { x } from "tinyexec";
54
import type {
65
OperationOptions,
@@ -161,7 +160,9 @@ export function doesDependencyExist(
161160
"cwd" | "workspace"
162161
>,
163162
) {
164-
const require = createRequire(withTrailingSlash(options.cwd));
163+
const require = createRequire(
164+
options.cwd.endsWith("/") ? options.cwd : options.cwd + "/",
165+
);
165166

166167
try {
167168
const resolvedPath = require.resolve(name);

0 commit comments

Comments
 (0)