diff --git a/.github/workflows/integrate.yml b/.github/workflows/integrate.yml index 269cccc..715526d 100644 --- a/.github/workflows/integrate.yml +++ b/.github/workflows/integrate.yml @@ -28,8 +28,5 @@ jobs: - name: Lint run: deno lint - - name: Test - run: deno test -A --no-check - - name: Check run: deno check src/**.ts diff --git a/deno.json b/deno.json index 5aa4a01..d031e9c 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@mxdvl/mononykus", - "version": "0.7.9", + "version": "0.8.0", "license": "MIT", "exports": "./src/build.ts", "tasks": { @@ -22,13 +22,11 @@ }, "imports": { "@luca/esbuild-deno-loader": "jsr:@luca/esbuild-deno-loader@^0.10.3", - "@std/assert": "jsr:@std/assert@^1.0.8", "@std/async": "jsr:@std/async@^1.0.9", "@std/cli": "jsr:@std/cli@^1.0.7", "@std/fs": "jsr:@std/fs@^1.0.6", "@std/http": "jsr:@std/http@^1.0.11", "@std/path": "jsr:@std/path@^1.0.8", - "@std/testing": "jsr:@std/testing@^1.0.5", "esbuild": "npm:esbuild@~0.24.0", "prettier": "npm:prettier@^3.0.2", "svelte": "npm:svelte@5.4.0" diff --git a/deno.lock b/deno.lock index 89859ef..74cd0a6 100644 --- a/deno.lock +++ b/deno.lock @@ -2,30 +2,21 @@ "version": "4", "specifiers": { "jsr:@luca/esbuild-deno-loader@~0.10.3": "0.10.3", - "jsr:@std/assert@^1.0.8": "1.0.8", "jsr:@std/assert@~0.213.1": "0.213.1", - "jsr:@std/async@^1.0.9": "1.0.9", "jsr:@std/cli@^1.0.6": "1.0.7", "jsr:@std/cli@^1.0.7": "1.0.7", - "jsr:@std/data-structures@^1.0.4": "1.0.4", "jsr:@std/encoding@0.213": "0.213.1", "jsr:@std/encoding@^1.0.5": "1.0.5", "jsr:@std/fmt@^1.0.3": "1.0.3", - "jsr:@std/fs@^1.0.0-rc.1": "1.0.6", - "jsr:@std/fs@^1.0.5": "1.0.6", "jsr:@std/fs@^1.0.6": "1.0.6", "jsr:@std/html@^1.0.3": "1.0.3", "jsr:@std/http@^1.0.11": "1.0.11", - "jsr:@std/internal@1": "1.0.5", - "jsr:@std/internal@^1.0.5": "1.0.5", - "jsr:@std/json@~0.213.1": "0.213.1", "jsr:@std/jsonc@0.213": "0.213.1", "jsr:@std/media-types@^1.1.0": "1.1.0", "jsr:@std/net@^1.0.4": "1.0.4", "jsr:@std/path@0.213": "0.213.1", "jsr:@std/path@^1.0.8": "1.0.8", "jsr:@std/streams@^1.0.8": "1.0.8", - "jsr:@std/testing@^1.0.5": "1.0.5", "npm:esbuild@0.24": "0.24.0", "npm:prettier@^3.0.2": "3.4.1", "npm:svelte@5.4.0": "5.4.0_acorn@8.14.0" @@ -42,21 +33,9 @@ "@std/assert@0.213.1": { "integrity": "24c28178b30c8e0782c18e8e94ea72b16282207569cdd10ffb9d1d26f2edebfe" }, - "@std/assert@1.0.8": { - "integrity": "ebe0bd7eb488ee39686f77003992f389a06c3da1bbd8022184804852b2fa641b", - "dependencies": [ - "jsr:@std/internal@^1.0.5" - ] - }, - "@std/async@1.0.9": { - "integrity": "c6472fd0623b3f3daae023cdf7ca5535e1b721dfbf376562c0c12b3fb4867f91" - }, "@std/cli@1.0.7": { "integrity": "98359df9df586a69015ba570305183b0cb9e7d53c05ea2016ef9a3e77e82c7cd" }, - "@std/data-structures@1.0.4": { - "integrity": "fa0e20c11eb9ba673417450915c750a0001405a784e2a4e0c3725031681684a0" - }, "@std/encoding@0.213.1": { "integrity": "fcbb6928713dde941a18ca5db88ca1544d0755ec8fb20fe61e2dc8144b390c62" }, @@ -88,17 +67,10 @@ "jsr:@std/streams" ] }, - "@std/internal@1.0.5": { - "integrity": "54a546004f769c1ac9e025abd15a76b6671ddc9687e2313b67376125650dc7ba" - }, - "@std/json@0.213.1": { - "integrity": "f572b1de605d07c4a5602445dac54bfc51b1fb87a3710a17aed2608bfca54e68" - }, "@std/jsonc@0.213.1": { "integrity": "5578f21aa583b7eb7317eed077ffcde47b294f1056bdbb9aacec407758637bfe", "dependencies": [ - "jsr:@std/assert@~0.213.1", - "jsr:@std/json" + "jsr:@std/assert" ] }, "@std/media-types@1.1.0": { @@ -110,7 +82,7 @@ "@std/path@0.213.1": { "integrity": "f187bf278a172752e02fcbacf6bd78a335ed320d080a7ed3a5a59c3e88abc673", "dependencies": [ - "jsr:@std/assert@~0.213.1" + "jsr:@std/assert" ] }, "@std/path@1.0.8": { @@ -118,16 +90,6 @@ }, "@std/streams@1.0.8": { "integrity": "b41332d93d2cf6a82fe4ac2153b930adf1a859392931e2a19d9fabfb6f154fb3" - }, - "@std/testing@1.0.5": { - "integrity": "6e693cbec94c81a1ad3df668685c7ba8e20742bb10305bc7137faa5cf16d2ec4", - "dependencies": [ - "jsr:@std/assert@^1.0.8", - "jsr:@std/data-structures", - "jsr:@std/fs@^1.0.5", - "jsr:@std/internal@^1.0.5", - "jsr:@std/path@^1.0.8" - ] } }, "npm": { @@ -334,13 +296,11 @@ "workspace": { "dependencies": [ "jsr:@luca/esbuild-deno-loader@~0.10.3", - "jsr:@std/assert@^1.0.8", "jsr:@std/async@^1.0.9", "jsr:@std/cli@^1.0.7", "jsr:@std/fs@^1.0.6", "jsr:@std/http@^1.0.11", "jsr:@std/path@^1.0.8", - "jsr:@std/testing@^1.0.5", "npm:esbuild@0.24", "npm:prettier@^3.0.2", "npm:svelte@5.4.0" diff --git a/src/build.test.ts b/src/build.test.ts deleted file mode 100644 index 012b1e8..0000000 --- a/src/build.test.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { assert } from "@std/assert"; -import { delay } from "@std/async"; -import { build, watch } from "./build.ts"; - -const base = "mononykus/"; -const site_dir = "src/_site"; - -Deno.test({ - name: "Able to build the current project", - async fn() { - await build({ base, site_dir }); - }, -}); - -Deno.test({ - name: "Able to develop the current project", - async fn() { - const controller = new AbortController(); - - const watcher = watch({ - site_dir: "src/_site", - base: "mononykus", - }, controller.signal); - - let port_is_open = false; - while (!port_is_open) { - await delay(12); - const response = await fetch("http://localhost:4507/mononykus/").catch( - () => ({ ok: false, body: { cancel: () => undefined } }), - ); - - await response.body?.cancel(); - port_is_open = response.ok; - } - - const response = await fetch("http://localhost:4507/mononykus/"); - - const html = await response.text(); - - controller.abort(); - await watcher; - - assert(html.startsWith( - "", - )); - assert(html.includes( - "