Skip to content

Commit

Permalink
fix: Use deps.ts instead of import map (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikuroXina authored Nov 15, 2023
1 parent ab98eb7 commit 7d479b1
Show file tree
Hide file tree
Showing 23 changed files with 30 additions and 26 deletions.
5 changes: 1 addition & 4 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,5 @@
"tags": ["recommended"]
}
},
"lock": false,
"imports": {
"std/": "https://deno.land/std@0.206.0/"
}
"lock": false
}
8 changes: 8 additions & 0 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export {
assertEquals,
assertThrows,
} from "https://deno.land/std@0.206.0/assert/mod.ts";
export {
assertSpyCall,
spy,
} from "https://deno.land/std@0.206.0/testing/mock.ts";
2 changes: 1 addition & 1 deletion src/cat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { fromProjection as ordFromProjection } from "./type-class/ord.ts";
import { fromProjection as partialEqFromProjection } from "./type-class/partial-eq.ts";
import { fromProjection as partialOrdFromProjection } from "./type-class/partial-ord.ts";
import { monad as optionMonad, none, some } from "./option.ts";
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../deps.ts";

/**
* Contains a `ctx` and can be transformed into another one by some methods.
Expand Down
3 changes: 1 addition & 2 deletions src/cont.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import type { Apply2Only, Apply3Only, Get1, Hkt2, Hkt3 } from "./hkt.ts";
import * as Identity from "./identity.ts";
import type { MonadPromise } from "./promise/monad.ts";
import type { Monad } from "./type-class/monad.ts";
import { assertEquals } from "std/assert/mod.ts";
import { assertSpyCall, spy } from "std/testing/mock.ts";
import { assertEquals, assertSpyCall, spy } from "../deps.ts";

/**
* Monad transformer `ContT`, the generic form of `Cont`.
Expand Down
2 changes: 1 addition & 1 deletion src/free.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../deps.ts";
import { doVoidT } from "./cat.ts";
import {
eq,
Expand Down
2 changes: 1 addition & 1 deletion src/free.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
unwrap,
} from "./option.ts";
import { catT } from "./cat.ts";
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../deps.ts";

const pureNominal = Symbol("FreePure");
const nodeNominal = Symbol("FreeNode");
Expand Down
2 changes: 1 addition & 1 deletion src/func.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals, assertThrows } from "std/assert/mod.ts";
import { assertEquals, assertThrows } from "../deps.ts";
import type { Apply2Only, Hkt2 } from "./hkt.ts";
import type { MonadReader } from "./reader/monad.ts";
import { type AbelianGroup, abelSymbol } from "./type-class/abelian-group.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/list.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../deps.ts";
import * as Cat from "./cat.ts";
import type { Get1, Hkt1 } from "./hkt.ts";
import * as Option from "./option.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/number.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../deps.ts";
import { none, type Option, some } from "./option.ts";
import { equal, greater, less, type Ordering } from "./ordering.ts";
import {
Expand Down
2 changes: 1 addition & 1 deletion src/optical/lens.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../../deps.ts";
import { opticCat } from "../optical.ts";
import { key, nth } from "./lens.ts";

Expand Down
2 changes: 1 addition & 1 deletion src/optical/prism.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../../deps.ts";
import { opticCat } from "../optical.ts";
import { ifSome, none, type Option, some } from "../option.ts";
import { key } from "./lens.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/optical/setter.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../../deps.ts";
import { functor } from "../array.ts";
import { opticCat } from "../optical.ts";
import { key } from "./lens.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/optical/traversal.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { overCat } from "../optical.ts";
import { bitraversable, type Tuple } from "../tuple.ts";
import { both } from "./traversal.ts";
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../../deps.ts";

Deno.test("get length of string for each element of tuple", () => {
const tuple: Tuple<string, string> = ["hello", "world"];
Expand Down
2 changes: 1 addition & 1 deletion src/option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @packageDocumentation
*/
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../deps.ts";
import type { Get1, Hkt1 } from "./hkt.ts";
import type { Optic, OpticSimple } from "./optical.ts";
import { newPrism, newPrismSimple } from "./optical/prism.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/reader.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../deps.ts";
import type { Apply2Only, Get1, Hkt2, Hkt3 } from "./hkt.ts";
import { type IdentityHkt, monad as identityMonad } from "./identity.ts";
import type { Tuple } from "./tuple.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/result.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals, assertThrows } from "std/assert/mod.ts";
import { assertEquals, assertThrows } from "../deps.ts";
import type { Get1, Hkt2 } from "./hkt.ts";
import type { Optic } from "./optical.ts";
import { newPrism } from "./optical/prism.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/reverse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../deps.ts";
import type { Hkt1 } from "./hkt.ts";
import * as Number from "./number.ts";
import { map as optionMap, some } from "./option.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/seq/finger-tree.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../../deps.ts";
import { reduce as reduceArray } from "../array.ts";
import { flip, id } from "../func.ts";
import type { Get1, Hkt1 } from "../hkt.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/state.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../deps.ts";
import { cat } from "./cat.ts";
import type { Apply2Only } from "./hkt.ts";
import {
Expand Down
2 changes: 1 addition & 1 deletion src/store.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../deps.ts";
import { constant } from "./func.ts";
import {
filter,
Expand Down
2 changes: 1 addition & 1 deletion src/type-class/group.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals, assertThrows } from "std/assert/mod.ts";
import { assertEquals, assertThrows } from "../../deps.ts";
import { none, some } from "../option.ts";
import { type GroupExceptZero, powiEZ, subtractEZ } from "./group.ts";
import { semiGroupSymbol } from "./semi-group.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/writer.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../deps.ts";
import { cat, doVoidT } from "./cat.ts";
import type { Monoid } from "./type-class/monoid.ts";
import { semiGroupSymbol } from "./type-class/semi-group.ts";
Expand Down
2 changes: 1 addition & 1 deletion src/zipper.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { range } from "./list.ts";
import { none, some, unwrap } from "./option.ts";
import { end, fromList, left, right, start, top } from "./zipper.ts";
import { assertEquals } from "std/assert/mod.ts";
import { assertEquals } from "../deps.ts";

Deno.test("seeking", () => {
const zipper = unwrap(fromList(range(0, 8)));
Expand Down

0 comments on commit 7d479b1

Please sign in to comment.