diff --git a/deno.json b/deno.json index 49405d6..c0d485e 100644 --- a/deno.json +++ b/deno.json @@ -1,10 +1,5 @@ { "tasks": { "build_npm": "deno run -A scripts/build_npm.ts" - }, - "imports": { - "ts-pattern": "npm:ts-pattern@5.0.5", - "iteruyo": "https://deno.land/x/iteruyo@v0.3.0/mod.ts", - "std/assert": "https://deno.land/std@0.201.0/assert/mod.ts" } } \ No newline at end of file diff --git a/deps.ts b/deps.ts new file mode 100644 index 0000000..2ba8fb3 --- /dev/null +++ b/deps.ts @@ -0,0 +1,9 @@ +export { + match, + P, +} from "npm:ts-pattern@5.0.5" +export { $ as Iter } from "https://deno.land/x/iteruyo@v0.3.0/mod.ts" +export { + assertEquals, + assertNotEquals, +} from "https://deno.land/std@0.201.0/assert/mod.ts" \ No newline at end of file diff --git a/src/expand.ts b/src/expand.ts index 98f3341..38ac9fe 100644 --- a/src/expand.ts +++ b/src/expand.ts @@ -1,10 +1,10 @@ import { Expr } from "./Expr.ts" import { call, expandable } from "./func/mod.ts" -import { match, P } from "ts-pattern" -import { $ as Iter } from "iteruyo" +import { match, P } from "../deps.ts" +import { Iter } from "../deps.ts" import { $, $a, $b, f } from "./util/mod.ts" -export * from "iteruyo" +export * from "../deps.ts" class LazyArray { memory: T[] = [] diff --git a/src/func/and.ts b/src/func/and.ts index 8e43e7e..88521af 100644 --- a/src/func/and.ts +++ b/src/func/and.ts @@ -1,6 +1,6 @@ import { Expr, any } from "../Expr.ts" -import { match } from "ts-pattern" +import { match } from "../../deps.ts" import { $_ } from "../util/mod.ts" export const and = (a: Expr, b: Expr): Expr => diff --git a/src/func/call.ts b/src/func/call.ts index 452cb16..e682363 100644 --- a/src/func/call.ts +++ b/src/func/call.ts @@ -9,8 +9,8 @@ import { div, } from "./math.ts" -import { match, P } from "ts-pattern" -import { f, $, $_, $a, $b } from "../util/mod.ts" +import { match, P } from "../../deps.ts" +import { $, $_, $a, $b } from "../util/mod.ts" export const call = (query: Expr, expr: Expr): Expr => { return match([query, expr]) diff --git a/src/func/join.ts b/src/func/join.ts index c585227..b519589 100644 --- a/src/func/join.ts +++ b/src/func/join.ts @@ -1,6 +1,6 @@ import { Expr } from "../Expr.ts" -import { match } from "ts-pattern" +import { match } from "../../deps.ts" import { f, str$a, str$b } from "../util/mod.ts" export const join = (a: Expr, b: Expr): Expr => diff --git a/src/func/math.ts b/src/func/math.ts index ad5ba3d..d9b6488 100644 --- a/src/func/math.ts +++ b/src/func/math.ts @@ -1,6 +1,6 @@ import { Expr } from "../Expr.ts" -import { match } from "ts-pattern" +import { match } from "../../deps.ts" import { num$a, num$b } from "../util/mod.ts" const math = diff --git a/src/func/or.ts b/src/func/or.ts index b8c5176..fd15780 100644 --- a/src/func/or.ts +++ b/src/func/or.ts @@ -1,6 +1,6 @@ import { Expr, any } from "../Expr.ts" -import { match } from "ts-pattern" +import { match } from "../../deps.ts" import { $_ } from "../util/mod.ts" export const or = (a: Expr, b: Expr): Expr => diff --git a/src/run.ts b/src/run.ts index 5ade280..c698fa9 100644 --- a/src/run.ts +++ b/src/run.ts @@ -1,7 +1,7 @@ import { Expr } from "./Expr.ts" import { and, call } from "./func/mod.ts" -import { match, P } from "ts-pattern" +import { match, P } from "../deps.ts" import { $, $a, $b } from "./util/mod.ts" export const run = (expr: Expr): Expr => { diff --git a/src/util/select.ts b/src/util/select.ts index 41b93c2..32b1610 100644 --- a/src/util/select.ts +++ b/src/util/select.ts @@ -1,4 +1,4 @@ -import { P } from "ts-pattern" +import { P } from "../../deps.ts" export const $ = P.select export const $_ = $() diff --git a/test/arrow.test.ts b/test/arrow.test.ts index 2ef79b9..1ad838c 100644 --- a/test/arrow.test.ts +++ b/test/arrow.test.ts @@ -1,7 +1,7 @@ import { assertEquals, assertNotEquals, -} from "std/assert" +} from "../deps.ts" import { call, any } from "../src/mod.ts" import { f } from "../src/util/mod.ts" diff --git a/test/call.test.ts b/test/call.test.ts index 0b5f229..406153f 100644 --- a/test/call.test.ts +++ b/test/call.test.ts @@ -1,7 +1,7 @@ import { assertEquals, assertNotEquals, -} from "std/assert" +} from "../deps.ts" import { call, any } from "../src/mod.ts" import { f } from "../src/util/mod.ts" diff --git a/test/expand.test.ts b/test/expand.test.ts index b7ec3a6..fddd589 100644 --- a/test/expand.test.ts +++ b/test/expand.test.ts @@ -1,6 +1,6 @@ -import { assertEquals } from "std/assert" +import { assertEquals } from "../deps.ts" -import { Expr, expand, $ as Iter, any } from "../src/mod.ts" +import { Expr, expand, Iter, any } from "../src/mod.ts" import { f } from "../src/util/mod.ts" Deno.test("Expand - Literal", () => {