Skip to content

Commit

Permalink
bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
manyuanrong committed Apr 4, 2020
1 parent a3ed90a commit 43ace01
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { prepare } from "https://deno.land/x/[email protected]/mod.ts";
4 changes: 2 additions & 2 deletions test.deps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export { exists } from "https://deno.land/std@v0.38.0/fs/mod.ts";
export { exists } from "https://deno.land/std@v0.39.0/fs/mod.ts";
export {
assert,
assertEquals,
assertThrows
} from "https://deno.land/std@v0.38.0/testing/asserts.ts";
} from "https://deno.land/std@v0.39.0/testing/asserts.ts";
12 changes: 6 additions & 6 deletions ts/util.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { prepare } from "https://deno.land/x/[email protected]/mod.ts";
import { prepare } from "../deps.ts";
import { RELEASE_URL } from "../mod.ts";
import { CommandType } from "./types.ts";

Expand All @@ -24,12 +24,12 @@ export async function init(releaseUrl = RELEASE_URL) {
urls: {
mac: `${releaseUrl}/lib${PLUGIN_NAME}.dylib`,
win: `${releaseUrl}/${PLUGIN_NAME}.dll`,
linux: `${releaseUrl}/lib${PLUGIN_NAME}.so`
}
linux: `${releaseUrl}/lib${PLUGIN_NAME}.so`,
},
};

const Mongo = await prepare(options);
dispatcher = Mongo.ops["mongo_command"];
dispatcher = Mongo.ops["mongo_command"] as Deno.PluginOp;
dispatcher.setAsyncHandler((msg: Uint8Array) => {
const { command_id, data } = JSON.parse(decoder.decode(msg));
const resolver = pendingCommands.get(command_id);
Expand Down Expand Up @@ -57,13 +57,13 @@ export function dispatchAsync(
command: Command,
data?: ArrayBufferView
): Promise<unknown> {
return new Promise(resolve => {
return new Promise((resolve) => {
const commandId = nextCommandId++;
pendingCommands.set(commandId, resolve);
const control = encoder.encode(
JSON.stringify({
...command,
command_id: commandId
command_id: commandId,
})
);
if (!dispatcher) {
Expand Down

0 comments on commit 43ace01

Please sign in to comment.