Skip to content

Commit c92ada9

Browse files
authored
Update ddc and remove deps.ts (#28)
1 parent f39c4ed commit c92ada9

File tree

5 files changed

+42
-56
lines changed

5 files changed

+42
-56
lines changed

denops/@ddc-file/deps.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

denops/@ddc-file/internal_autoload_fn.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { Denops, fn } from "./deps.ts";
2-
export type { Denops };
3-
export { fn };
1+
import type { Denops } from "jsr:@denops/std@^7.0.1";
2+
import * as fn from "jsr:@denops/std@^7.0.1/function";
43

54
// deno-lint-ignore no-explicit-any
65
const createCaller = (name: string): any => {

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
import { asserts, fromA, path } from "./deps.ts";
21
import * as util from "./util.ts";
32

3+
import * as windowsPath from "jsr:@std/path@^1.0.2/windows";
4+
import * as posixPath from "jsr:@std/path@^1.0.2/posix";
5+
import * as asserts from "jsr:@std/assert@^1.0.1";
6+
7+
import { asyncIteratorFrom as fromA } from "https://deno.land/x/iterator_helpers@v0.1.2/mod.ts";
8+
49
const createVirtualDirReader: (
510
virtualStorage: Record<string, string[]>,
611
) => util.DirReader = (virtualStorage) => (abs: string) =>
@@ -21,7 +26,7 @@ Deno.test({
2126
0,
2227
"/a/b/c/d",
2328
["1", "2", "3"],
24-
path.posix,
29+
posixPath,
2530
reader,
2631
),
2732
[],
@@ -31,7 +36,7 @@ Deno.test({
3136
1,
3237
"/a/b/c/d",
3338
["1", "2", "3"],
34-
path.posix,
39+
posixPath,
3540
reader,
3641
),
3742
["/a/b/c/d"],
@@ -41,7 +46,7 @@ Deno.test({
4146
2,
4247
"/a/b/c/d",
4348
["1", "2", "3"],
44-
path.posix,
49+
posixPath,
4550
reader,
4651
),
4752
["/a/b/c/d", "/a/b"],
@@ -51,7 +56,7 @@ Deno.test({
5156
3,
5257
"/a/b/c/d",
5358
["1", "2", "3"],
54-
path.posix,
59+
posixPath,
5560
reader,
5661
),
5762
["/a/b/c/d", "/a/b", "/"],
@@ -61,7 +66,7 @@ Deno.test({
6166
4,
6267
"/a/b/c/d",
6368
["1", "2", "3"],
64-
path.posix,
69+
posixPath,
6570
reader,
6671
),
6772
["/a/b/c/d", "/a/b", "/"],
@@ -82,7 +87,7 @@ Deno.test({
8287
1,
8388
"C:\\a\\b",
8489
["1", "2", "3"],
85-
path.win32,
90+
windowsPath,
8691
reader,
8792
),
8893
["C:\\a\\b"],
@@ -92,7 +97,7 @@ Deno.test({
9297
3,
9398
"C:\\a\\b",
9499
["1", "2", "3"],
95-
path.win32,
100+
windowsPath,
96101
reader,
97102
),
98103
["C:\\a\\b", "C:\\"],
@@ -114,7 +119,7 @@ Deno.test({
114119
1,
115120
"\\\\dir\\to\\path",
116121
["1", "2", "3"],
117-
path.win32,
122+
windowsPath,
118123
reader,
119124
),
120125
["\\\\dir\\to\\path"],
@@ -124,7 +129,7 @@ Deno.test({
124129
3,
125130
"\\\\dir\\to\\path",
126131
["1", "2", "3"],
127-
path.win32,
132+
windowsPath,
128133
reader,
129134
),
130135
["\\\\dir\\to\\path"],

denops/@ddc-file/util.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import * as univPath from "jsr:@std/path@^1.0.2";
2+
import * as windowsPath from "jsr:@std/path@^1.0.2/windows";
3+
import * as posixPath from "jsr:@std/path@^1.0.2/posix";
4+
15
import {
2-
path as univPath,
3-
posix as posixPath,
4-
windows as windowsPath,
5-
wrapA,
6-
} from "./deps.ts";
6+
wrapAsyncIterator as wrapA,
7+
} from "https://deno.land/x/iterator_helpers@v0.1.2/mod.ts";
78

89
export type DirReader = (absPath: string) => AsyncIterator<string>;
910
export const defaultDirReader: DirReader = (absPath) =>

denops/@ddc-sources/file.ts

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
1-
import {
2-
BaseSource,
3-
fn,
4-
GatherArguments,
5-
GetCompletePositionArguments,
6-
homeDir,
7-
Item,
8-
path as univPath,
9-
posix,
10-
vars,
11-
windows,
12-
wrapA,
13-
} from "../@ddc-file/deps.ts";
141
import * as util from "../@ddc-file/util.ts";
152
import * as internal from "../@ddc-file/internal_autoload_fn.ts";
163

4+
import { BaseSource } from "jsr:@shougo/ddc-vim@^7.0.0/source";
5+
import type {
6+
GatherArguments,
7+
GetCompletePositionArguments,
8+
} from "jsr:@shougo/ddc-vim@^7.0.0/source";
9+
import type { Item } from "jsr:@shougo/ddc-vim@^7.0.0/types";
10+
11+
import * as fn from "jsr:@denops/std@^7.0.1/function";
12+
import * as vars from "jsr:@denops/std@^7.0.1/variable";
13+
14+
import * as univPath from "jsr:@std/path@^1.0.2";
15+
import * as posix from "jsr:@std/path@^1.0.2/posix";
16+
import * as windows from "jsr:@std/path@^1.0.2/windows";
17+
18+
import {
19+
wrapAsyncIterator as wrapA,
20+
} 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+
1723
type Params = {
1824
mode: "os" | "win32" | "posix";
1925
takeFileNum: number;

0 commit comments

Comments
 (0)