Skip to content

Commit 849e2b9

Browse files
authored
refactor: update to use @std/assert from jsr (#29)
1 parent cc8cd4c commit 849e2b9

16 files changed

Lines changed: 40 additions & 31 deletions

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v4
14-
- uses: denoland/setup-deno@v1
14+
- uses: denoland/setup-deno@v2
1515
with:
16-
deno-version: v1.x
16+
deno-version: v2.x
1717
- name: Run tests
1818
run: deno test --allow-env --allow-read=. --allow-net=api.github.com,0.0.0.0,localhost
1919
- name: Deploy to Deno Deploy

.vscode/settings.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

deno.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
{
2-
"importMap": "./import_map.json"
2+
"imports": {
3+
"@std/assert": "jsr:@std/assert@^1.0.12",
4+
"preact": "https://esm.sh/preact@10.15.1?pin=v135",
5+
"preact/": "https://esm.sh/preact@10.15.1&pin=v135/",
6+
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.1.0?pin=v135"
7+
}
38
}

deno.lock

Lines changed: 21 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deps.test.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

handleRequest.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { assertEquals } from "./deps.test.ts";
1+
import { assertEquals } from "@std/assert";
22
import { createRequestHandler } from "./handleRequest.ts";
33
import { RealClock } from "./utils/clock.ts";
44

5-
const connInfo: Deno.ServeHandlerInfo = {
5+
const connInfo: Deno.ServeHandlerInfo<Deno.NetAddr> = {
66
remoteAddr: {
77
transport: "tcp",
88
hostname: "127.0.0.1",

handleRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const contentTypes = {
1616
export function createRequestHandler(clock: Clock) {
1717
const { fetchCached } = createFetchCacher(clock);
1818
return {
19-
async handleRequest(request: Request, info: Deno.ServeHandlerInfo) {
19+
async handleRequest(request: Request, info: Deno.ServeHandlerInfo<Deno.NetAddr>) {
2020
const url = new URL(request.url);
2121
const newUrl = await resolvePluginOrSchemaUrl(url);
2222
if (newUrl != null) {

import_map.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

plugins.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assertEquals } from "./deps.test.ts";
1+
import { assertEquals } from "@std/assert";
22
import { tryResolveLatestJson } from "./plugins.ts";
33
import { getLatestReleaseInfo } from "./utils/github.ts";
44

utils/LazyExpirableValue.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assertEquals, assertRejects } from "../deps.test.ts";
1+
import { assertEquals, assertRejects } from "@std/assert";
22
import { LazyExpirableValue } from "./LazyExpirableValue.ts";
33

44
Deno.test("should work", async () => {

0 commit comments

Comments
 (0)