Skip to content

Commit 3c6ab75

Browse files
Merge pull request #63 from oslabs-beta/export_deps
refactor: how we import dependencies when importing Zoic
2 parents cae54da + b71ac9f commit 3c6ab75

File tree

11 files changed

+65
-340
lines changed

11 files changed

+65
-340
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.DS_Store
2-
src/tests/coverage_report/
2+
src/tests/coverage_report/
3+
deno.lock

deno.json

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
{
2-
"name": "@hankthetank27/zoic",
3-
"version": "1.0.6",
4-
"license": "MIT",
5-
"exports": "./zoic.ts",
6-
"imports": {
7-
"std/base64": "https://deno.land/[email protected]/encoding/base64.ts",
8-
"std/asserts": "https://deno.land/[email protected]/testing/asserts.ts",
9-
"std/bdd": "https://deno.land/[email protected]/testing/bdd.ts",
10-
"oak": "https://deno.land/x/[email protected]/mod.ts",
11-
"oak/application": "https://deno.land/x/[email protected]/application.ts",
12-
"redis": "https://deno.land/x/[email protected]/mod.ts",
13-
"redis/command": "https://deno.land/x/[email protected]/command.ts",
14-
"cors": "https://deno.land/x/[email protected]/mod.ts"
15-
}
16-
}
2+
"name": "Zoic",
3+
"version": "1.0.7",
4+
"description": "Caching middleware library for Oak",
5+
"exports": {
6+
".": "./zoic.ts"
7+
},
8+
"tasks": {
9+
"test": "deno test ./src/tests/ --allow-net --allow-import"
10+
},
11+
"imports": {}
12+
}

deno.lock

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

deps.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
export {
2+
assert,
3+
assertEquals,
4+
assertInstanceOf,
5+
assertThrows,
6+
assertRejects,
7+
assertExists
8+
} from "https://deno.land/[email protected]/testing/asserts.ts";
9+
export { decode as base64decode, encode as base64encode } from 'https://deno.land/[email protected]/encoding/base64.ts';
10+
export { Context, Application, Router } from "https://deno.land/x/[email protected]/mod.ts";
11+
export { connect } from "https://deno.land/x/[email protected]/mod.ts";
12+
export { oakCors } from "https://deno.land/x/[email protected]/mod.ts";
13+
export { describe, it } from "https://deno.land/[email protected]/testing/bdd.ts";
14+
15+
export type { ApplicationListenEvent } from "https://deno.land/x/[email protected]/application.ts";
16+
export type { Redis } from "https://deno.land/x/[email protected]/mod.ts";
17+

src/tests/doublyLinkedList_test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
import { assertEquals, assertExists } from "https://deno.land/[email protected]/testing/asserts.ts";
2-
import { describe, it } from "https://deno.land/[email protected]/testing/bdd.ts";
1+
import {
2+
assertEquals,
3+
assertExists,
4+
describe,
5+
it
6+
} from "../../deps.ts";
37
import { ValueDoublyLinkedList, FreqDoublyLinkedList } from '../doublyLinkedLists.ts';
48

59
describe("ValDoublyLinkedList tests", () => {

src/tests/lfu_test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
import { assertEquals, assert } from "https://deno.land/[email protected]/testing/asserts.ts";
2-
import { describe, it } from "https://deno.land/[email protected]/testing/bdd.ts";
1+
import {
2+
assertEquals,
3+
assert,
4+
describe,
5+
it
6+
} from "../../deps.ts";
37
import PerfMetrics from '../performanceMetrics.ts';
48
import LFU from '../lfu.ts'
59

src/tests/lru_test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
import { assertEquals, assert } from "std/asserts";
2-
import { describe, it } from "std/bdd";
1+
import {
2+
assertEquals,
3+
assert,
4+
describe,
5+
it
6+
} from "../../deps.ts";
37
import PerfMetrics from '../performanceMetrics.ts';
48
import LRU from '../lru.ts'
59

src/tests/performanceMetrics_test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
import { assertEquals, assertInstanceOf } from "std/asserts";
2-
import { Context } from "oak";
1+
import {
2+
assertEquals,
3+
assertInstanceOf,
4+
Context
5+
} from "../../deps.ts";
36
import Zoic from '../../zoic.ts';
47
import PerfMetrics from '../performanceMetrics.ts';
58
import { TestServer } from './test_server.ts';

src/tests/test_server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Application, Router } from "oak";
2-
import type { ApplicationListenEvent } from "oak/application";
1+
import { Application, Router } from "../../deps.ts";
2+
import type { ApplicationListenEvent } from "../../deps.ts";
33

44
// Test server setup utility with proper cleanup
55
export class TestServer {

src/tests/zoic_test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import {
44
assertEquals,
55
assertInstanceOf,
66
assertRejects,
7-
} from "std/asserts";
8-
import { Context } from "oak";
7+
Context
8+
} from "../../deps.ts";
99
import Zoic from "../../zoic.ts";
1010
import LRU from "../lru.ts";
1111
import LFU from "../lfu.ts";

0 commit comments

Comments
 (0)