Skip to content

Commit

Permalink
Replace linkedlist with x3-linkedlist (#609)
Browse files Browse the repository at this point in the history
  • Loading branch information
x3cion authored and pluma committed Oct 18, 2019
1 parent 176295a commit 8fae81e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"dependencies": {
"@types/node": "*",
"es6-error": "^4.0.1",
"linkedlist": "^1.0.1",
"x3-linkedlist": "1.0.0",
"multi-part": "^2.0.0",
"xhr": "^2.4.1"
},
Expand Down
5 changes: 2 additions & 3 deletions src/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import {
} from "./util/request";
import { sanitizeUrl } from "./util/sanitizeUrl";
import { Errback } from "./util/types";

const LinkedList = require("linkedlist/lib/linkedlist") as typeof Array;
import { LinkedList } from "x3-linkedlist";

const MIME_JSON = /\/(json|javascript)(\W|$)/;
const LEADER_ENDPOINT_HEADER = "x-arango-endpoint";
Expand Down Expand Up @@ -95,7 +94,7 @@ export class Connection {
private _shouldRetry: boolean;
private _maxRetries: number;
private _maxTasks: number;
private _queue: Task[] = new LinkedList();
private _queue = new LinkedList<Task>();
private _hosts: RequestFunction[] = [];
private _urls: string[] = [];
private _activeHost: number;
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5774,6 +5774,11 @@ write@^0.2.1:
dependencies:
mkdirp "^0.5.1"

[email protected]:
version "1.0.0"
resolved "https://registry.yarnpkg.com/x3-linkedlist/-/x3-linkedlist-1.0.0.tgz#f5a8c7e742cf3b31d7800e031ab15135387f85d3"
integrity sha512-8CwA4XCMtso4G6qJWCzqbWQ9YJjtRiD4rUHFJ77rlAXQUN38Ni9E84y4F9qt4ijxZhfpJVm9tRs8E2vdLC4ZqQ==

xhr@^2.4.1:
version "2.5.0"
resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.5.0.tgz#bed8d1676d5ca36108667692b74b316c496e49dd"
Expand Down

0 comments on commit 8fae81e

Please sign in to comment.