diff --git a/.github/workflows/deno-ci.yml b/.github/workflows/deno-ci.yml index cf145ad..98bbf35 100644 --- a/.github/workflows/deno-ci.yml +++ b/.github/workflows/deno-ci.yml @@ -14,8 +14,7 @@ jobs: strategy: matrix: deno-version: - - v1.15 - - v1.16 + - v1.23 - canary fail-fast: false # run each branch to completion @@ -48,7 +47,7 @@ jobs: restore-keys: deno-https/v1- - name: Check entrypoint - run: time deno cache server.ts + run: time deno cache --check=all server.ts - name: Run any tests run: time deno test diff --git a/Dockerfile b/Dockerfile index 07cd07f..d6e7abc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM denoland/deno:alpine-1.16.4 +FROM denoland/deno:alpine-1.23.3 RUN apk add --no-cache graphviz ADD fonts/ /usr/share/fonts/truetype/ WORKDIR /src ADD deps.ts . -RUN deno cache deps.ts +RUN deno cache --check=all deps.ts ADD . . -RUN deno cache server.ts +RUN deno cache --check=all server.ts ENTRYPOINT ["deno","run","--allow-env","--allow-net=0.0.0.0,api.github.com,cdn.deno.land,registry.npmjs.org","--allow-run=deno,dot","--allow-read=.","server.ts"] diff --git a/lib/module-map.ts b/lib/module-map.ts index 4ecaecc..2d7827f 100644 --- a/lib/module-map.ts +++ b/lib/module-map.ts @@ -50,10 +50,10 @@ export class ModuleMap { return; } - const depEdges = info.dependencies.flatMap(x => [ + const depEdges = info.dependencies?.flatMap(x => [ x.code?.specifier ?? '', x.type?.specifier ?? '', - ].filter(x => x)); + ].filter(x => x)) ?? []; if (info.typesDependency?.dependency.specifier) { depEdges.push(info.typesDependency.dependency.specifier); } diff --git a/lib/types.ts b/lib/types.ts index dfe38c4..5f60d81 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -32,7 +32,7 @@ interface DenoModuleError { } export type DenoModule = { specifier: string; - dependencies: DenoDependency[]; + dependencies?: DenoDependency[]; typesDependency?: { specifier: string; dependency: { specifier: string }; // also the span diff --git a/server.ts b/server.ts index a569d39..0162d70 100755 --- a/server.ts +++ b/server.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env -S deno run --allow-read=. --allow-net=0.0.0.0 --allow-run=deno,dot --allow-env=PORT +#!/usr/bin/env -S deno run --check=all --allow-read=. --allow-net=0.0.0.0 --allow-run=deno,dot --allow-env=PORT import { http } from "./deps.ts"; import { serveFont, servePublic, serveTemplatedHtml } from './lib/request-handling.ts';