Skip to content

Commit f2e9d70

Browse files
authored
Use cross/dir instead (#29)
1 parent c92ada9 commit f2e9d70

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

denops/@ddc-file/util.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import * as windowsPath from "jsr:@std/path@^1.0.2/windows";
44
import * as posixPath from "jsr:@std/path@^1.0.2/posix";
55
import * as asserts from "jsr:@std/assert@^1.0.1";
66

7+
// TODO: Replace to AsyncIterator
78
import { asyncIteratorFrom as fromA } from "https://deno.land/x/iterator_helpers@v0.1.2/mod.ts";
89

910
const createVirtualDirReader: (

denops/@ddc-sources/file.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ import * as univPath from "jsr:@std/path@^1.0.2";
1515
import * as posix from "jsr:@std/path@^1.0.2/posix";
1616
import * as windows from "jsr:@std/path@^1.0.2/windows";
1717

18+
// TODO: Replace to AsyncIterator
1819
import {
1920
wrapAsyncIterator as wrapA,
2021
} from "https://deno.land/x/iterator_helpers@v0.1.2/mod.ts";
21-
import homeDir from "https://deno.land/x/dir@1.5.2/home_dir/mod.ts";
22+
import { dir } from "jsr:@cross/dir@^1.1.0";
2223

2324
type Params = {
2425
mode: "os" | "win32" | "posix";
@@ -112,7 +113,7 @@ export class Source extends BaseSource<Params> {
112113

113114
// e.g. '/home/ubuntu/config' for inputFileFull = '~/config'
114115
const inputFileFullExpanded = await (async () => {
115-
const home = homeDir();
116+
const home = await dir("home");
116117
const last = inputFileFull.endsWith(path.SEPARATOR) ? path.SEPARATOR : "";
117118
{
118119
const pat = `~${path.SEPARATOR}`;

0 commit comments

Comments
 (0)