refactor: Move Valibot to deps.ts
This commit is contained in:
parent
ff233ba289
commit
6f8c69524e
5 changed files with 22 additions and 6 deletions
|
@ -9,7 +9,6 @@
|
||||||
"@std/assert": "jsr:@std/assert@1.0.7",
|
"@std/assert": "jsr:@std/assert@1.0.7",
|
||||||
"@std/path": "jsr:@std/path@1.0.8",
|
"@std/path": "jsr:@std/path@1.0.8",
|
||||||
"@std/testing": "jsr:@std/testing@1.0.4",
|
"@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/"
|
"lume/": "https://deno.land/x/lume@v2.4.1/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
BIN
deno.lock
BIN
deno.lock
Binary file not shown.
17
deps.ts
Normal file
17
deps.ts
Normal file
|
@ -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";
|
2
mod.ts
2
mod.ts
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* 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 Site from "lume/core/site.ts";
|
||||||
import diagrams from "./resources/diagrams.json" with { type: "json" };
|
import diagrams from "./resources/diagrams.json" with { type: "json" };
|
||||||
import { deflateSync } from "node:zlib";
|
import { deflateSync } from "node:zlib";
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import mod from "../mod.ts";
|
import mod from "../mod.ts";
|
||||||
import { ValiError } from "@valibot/valibot";
|
import { valibot as v } from "../deps.ts";
|
||||||
import { assertExists, assertInstanceOf } from "@std/assert";
|
import { assertExists, assertInstanceOf } from "@std/assert";
|
||||||
import { assertSnapshot } from "@std/testing/snapshot";
|
import { assertSnapshot } from "@std/testing/snapshot";
|
||||||
import { getSite } from "./utils.ts";
|
import { getSite } from "./utils.ts";
|
||||||
|
@ -29,7 +29,7 @@ Deno.test("Error thrown on invalid options", async (t) => {
|
||||||
error = err;
|
error = err;
|
||||||
}
|
}
|
||||||
assertExists(error);
|
assertExists(error);
|
||||||
assertInstanceOf(error, ValiError);
|
assertInstanceOf(error, v.ValiError);
|
||||||
});
|
});
|
||||||
|
|
||||||
await t.step("Invalid enabledDiagrams", () => {
|
await t.step("Invalid enabledDiagrams", () => {
|
||||||
|
@ -40,7 +40,7 @@ Deno.test("Error thrown on invalid options", async (t) => {
|
||||||
error = err;
|
error = err;
|
||||||
}
|
}
|
||||||
assertExists(error);
|
assertExists(error);
|
||||||
assertInstanceOf(error, ValiError);
|
assertInstanceOf(error, v.ValiError);
|
||||||
});
|
});
|
||||||
|
|
||||||
await t.step("Invalid format", () => {
|
await t.step("Invalid format", () => {
|
||||||
|
@ -52,7 +52,7 @@ Deno.test("Error thrown on invalid options", async (t) => {
|
||||||
error = err;
|
error = err;
|
||||||
}
|
}
|
||||||
assertExists(error);
|
assertExists(error);
|
||||||
assertInstanceOf(error, ValiError);
|
assertInstanceOf(error, v.ValiError);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue