Skip to content

Commit 91c919b

Browse files
authored
Merge pull request #15 from vim-denops/re-modernize
Re modernize
2 parents 1dab437 + 729457f commit 91c919b

File tree

9 files changed

+31
-75
lines changed

9 files changed

+31
-75
lines changed

deps.ts

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

deps_test.ts

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

example/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { using } from "https://deno.land/x/[email protected]/mod.ts";
12
import { Message, Session } from "../mod.ts";
2-
import { using } from "../deps_test.ts";
33

44
// NOTE:
55
// Do NOT use 'console.log()' while stdout is used to communicate with Vim

indexer.ts

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

indexer_test.ts

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

response_waiter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Deferred, deferred } from "./deps.ts";
1+
import { Deferred, deferred } from "https://deno.land/[email protected]/async/mod.ts";
22
import { Message, MessageId } from "./message.ts";
33

44
const DEFAULT_RESPONSE_TIMEOUT = 10000; // milliseconds

response_waiter_test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { assertEquals, assertRejects } from "./deps_test.ts";
1+
import {
2+
assertEquals,
3+
assertRejects,
4+
} from "https://deno.land/[email protected]/testing/asserts.ts";
25
import { Message, MessageId } from "./message.ts";
36
import { ResponseWaiter, TimeoutError } from "./response_waiter.ts";
47

session.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1-
import { Deferred, deferred, Disposable, JSONparser, streams } from "./deps.ts";
1+
import * as streams from "https://deno.land/[email protected]/streams/mod.ts";
2+
import {
3+
Deferred,
4+
deferred,
5+
} from "https://deno.land/[email protected]/async/deferred.ts";
6+
import type { Disposable } from "https://deno.land/x/[email protected]/mod.ts";
7+
import { Indexer } from "https://deno.land/x/[email protected]/mod.ts";
8+
// NOTE:
9+
// streamparser-json must be v0.0.5 because it automatically end-up parsing without separator after v0.0.5
10+
// https://github.com/juanjoDiaz/streamparser-json/commit/577e918b90c19d6758b87d41bdb6c5571a2c012d
11+
import JSONParser from "https://deno.land/x/[email protected]/jsonparse.ts#=";
212
import { isMessage, Message } from "./message.ts";
313
import * as command from "./command.ts";
4-
import { Indexer } from "./indexer.ts";
514
import { ResponseWaiter } from "./response_waiter.ts";
615

716
const MSGID_THRESHOLD = 2 ** 32;
@@ -84,7 +93,7 @@ export class Session implements Disposable {
8493
}
8594

8695
private async listen(): Promise<void> {
87-
const parser = new JSONparser();
96+
const parser = new JSONParser();
8897
parser.onValue = (data, _key, _parent, stack) => {
8998
if (stack.length > 0) {
9099
return;

session_test.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1-
import { JSONparser, streams } from "./deps.ts";
2-
import { assertEquals, assertRejects, delay, using } from "./deps_test.ts";
1+
import * as streams from "https://deno.land/[email protected]/streams/mod.ts";
2+
import {
3+
assertEquals,
4+
assertRejects,
5+
} from "https://deno.land/[email protected]/testing/asserts.ts";
6+
import { delay } from "https://deno.land/[email protected]/async/mod.ts";
7+
import { using } from "https://deno.land/x/[email protected]/mod.ts";
8+
import { Indexer } from "https://deno.land/x/[email protected]/mod.ts";
9+
// NOTE:
10+
// streamparser-json must be v0.0.5 because it automatically end-up parsing without separator after v0.0.5
11+
// https://github.com/juanjoDiaz/streamparser-json/commit/577e918b90c19d6758b87d41bdb6c5571a2c012d
12+
import JSONParser from "https://deno.land/x/[email protected]/jsonparse.ts#=";
313
import { Session, SessionClosedError } from "./session.ts";
4-
import { Indexer } from "./indexer.ts";
514
import * as command from "./command.ts";
615

716
const MSGID_THRESHOLD = 2 ** 32;
@@ -111,7 +120,7 @@ class Vim {
111120
}
112121

113122
private async listen(): Promise<void> {
114-
const parser = new JSONparser();
123+
const parser = new JSONParser();
115124
parser.onValue = (data, _key, _parent, stack) => {
116125
if (stack.length > 0) {
117126
return;

0 commit comments

Comments
 (0)