diff --git a/deno.json b/deno.json index 9aa47df..6d7e24c 100644 --- a/deno.json +++ b/deno.json @@ -9,7 +9,6 @@ "@std/assert": "jsr:@std/assert@1.0.7", "@std/path": "jsr:@std/path@1.0.8", "@std/testing": "jsr:@std/testing@1.0.4", - "@valibot/valibot": "jsr:@valibot/valibot@0.42.1", "lume/": "https://deno.land/x/lume@v2.4.1/" } } diff --git a/deno.lock b/deno.lock index a6aa433..d45b9b2 100644 Binary files a/deno.lock and b/deno.lock differ diff --git a/deps.ts b/deps.ts new file mode 100644 index 0000000..7c7640f --- /dev/null +++ b/deps.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2024 Foster Hangdaan + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export * as valibot from "jsr:@valibot/valibot@0.42.1"; diff --git a/mod.ts b/mod.ts index 4a2c83c..a20f574 100644 --- a/mod.ts +++ b/mod.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import * as v from "@valibot/valibot"; +import { valibot as v } from "./deps.ts"; import Site from "lume/core/site.ts"; import diagrams from "./resources/diagrams.json" with { type: "json" }; import { deflateSync } from "node:zlib"; diff --git a/tests/mod.test.ts b/tests/mod.test.ts index cb44f94..a637d03 100644 --- a/tests/mod.test.ts +++ b/tests/mod.test.ts @@ -15,7 +15,7 @@ */ import mod from "../mod.ts"; -import { ValiError } from "@valibot/valibot"; +import { valibot as v } from "../deps.ts"; import { assertExists, assertInstanceOf } from "@std/assert"; import { assertSnapshot } from "@std/testing/snapshot"; import { getSite } from "./utils.ts"; @@ -29,7 +29,7 @@ Deno.test("Error thrown on invalid options", async (t) => { error = err; } assertExists(error); - assertInstanceOf(error, ValiError); + assertInstanceOf(error, v.ValiError); }); await t.step("Invalid enabledDiagrams", () => { @@ -40,7 +40,7 @@ Deno.test("Error thrown on invalid options", async (t) => { error = err; } assertExists(error); - assertInstanceOf(error, ValiError); + assertInstanceOf(error, v.ValiError); }); await t.step("Invalid format", () => { @@ -52,7 +52,7 @@ Deno.test("Error thrown on invalid options", async (t) => { error = err; } assertExists(error); - assertInstanceOf(error, ValiError); + assertInstanceOf(error, v.ValiError); }); });