Skip to content

Commit 1176fef

Browse files
authored
Merge branch 'main' into unstable-kv
2 parents 5e006b9 + 06c0969 commit 1176fef

File tree

22 files changed

+44
-42
lines changed

22 files changed

+44
-42
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,8 @@ jobs:
3131
- name: Check formatting, linting, license headers, types and run tests
3232
run: deno task ok
3333

34-
- name: Create lcov file
35-
run: deno task cov:gen
36-
3734
- name: Upload coverage
3835
uses: codecov/codecov-action@v5
3936
with:
4037
name: ${{ matrix.os }}
41-
files: cov.lcov
38+
files: coverage/lcov.info

deno.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"check:license": "deno run --allow-read --allow-write tasks/check_license.ts",
1313
"check:types": "deno check main.ts && deno check dev.ts && deno check tasks/*.ts",
1414
"ok": "deno fmt --check && deno lint && deno task check:license --check && deno task check:types && deno task test",
15-
"cov:gen": "deno coverage coverage --lcov --exclude='.tsx' --output=cov.lcov",
1615
"update": "deno run -A -r https://fresh.deno.dev/update .",
1716
"build": "deno run -A dev.ts build",
1817
"preview": "deno run -A main.ts"
@@ -21,6 +20,14 @@
2120
"imports": {
2221
"@/": "./",
2322
"$fresh/": "https://raw.githubusercontent.com/denoland/fresh/60220dd33b5b0f6b5c72927c933dbc32a3c4734e/",
23+
"@std/assert": "jsr:@std/assert@^1.0.13",
24+
"@std/datetime": "jsr:@std/datetime@^0.225.5",
25+
"@std/front-matter": "jsr:@std/front-matter@^1.0.9",
26+
"@std/fs": "jsr:@std/fs@^1.0.18",
27+
"@std/http": "jsr:@std/http@^1.0.18",
28+
"@std/path": "jsr:@std/path@^1.1.0",
29+
"@std/testing": "jsr:@std/testing@^1.0.14",
30+
"@std/ulid": "jsr:@std/ulid@^1.0.0",
2431
"preact": "https://esm.sh/preact@10.19.2",
2532
"preact/": "https://esm.sh/preact@10.19.2/",
2633
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.2",
@@ -29,14 +36,12 @@
2936
"tailwindcss": "npm:tailwindcss@3.4.1",
3037
"tailwindcss/": "npm:/tailwindcss@3.4.1/",
3138
"tailwindcss/plugin": "npm:/tailwindcss@3.4.1/plugin.js",
32-
"$std/": "https://deno.land/std@0.208.0/",
3339
"stripe": "npm:/stripe@13.5.0",
3440
"kv_oauth/": "https://deno.land/x/deno_kv_oauth@v0.9.1/",
3541
"tabler_icons_tsx/": "https://deno.land/x/tabler_icons_tsx@0.0.4/tsx/",
3642
"fresh_charts/": "https://deno.land/x/fresh_charts@0.3.1/"
3743
},
38-
"exclude": ["coverage/", "_fresh/", "**/_fresh/*"],
39-
"lint": { "rules": { "tags": ["fresh", "recommended"] } },
44+
"lint": { "rules": { "tags": ["fresh", "recommended", "jsx", "react"] } },
4045
"unstable": [
4146
"kv"
4247
]

e2e_test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import {
2323
assertNotEquals,
2424
assertObjectMatch,
2525
assertStringIncludes,
26-
} from "$std/assert/mod.ts";
27-
import { isRedirectStatus, STATUS_CODE } from "$std/http/status.ts";
28-
import { resolvesNext, returnsNext, stub } from "$std/testing/mock.ts";
26+
} from "@std/assert";
27+
import { isRedirectStatus, STATUS_CODE } from "@std/http/status";
28+
import { resolvesNext, returnsNext, stub } from "@std/testing/mock";
2929
import Stripe from "stripe";
3030
import options from "./fresh.config.ts";
3131
import { _internals } from "./plugins/kv_oauth.ts";

islands/ItemsList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useEffect } from "preact/hooks";
44
import { type Item } from "@/utils/db.ts";
55
import IconInfo from "tabler_icons_tsx/info-circle.tsx";
66
import { fetchValues } from "@/utils/http.ts";
7-
import { decodeTime } from "$std/ulid/mod.ts";
7+
import { decodeTime } from "@std/ulid/decode-time";
88
import { timeAgo } from "@/utils/display.ts";
99
import GitHubAvatarImg from "@/components/GitHubAvatarImg.tsx";
1010

plugins/blog/mod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Plugin } from "$fresh/server.ts";
33
import BlogIndex from "./routes/blog/index.tsx";
44
import BlogSlug from "./routes/blog/[slug].tsx";
55
import Feed from "./routes/feed.ts";
6-
import { normalize } from "$std/url/normalize.ts";
6+
import { normalize } from "@std/path/normalize";
77

88
export function blog(): Plugin {
99
return {
@@ -19,6 +19,6 @@ export function blog(): Plugin {
1919
component: Feed,
2020
}],
2121
location: import.meta.url,
22-
projectLocation: normalize(import.meta.url + "../../../").href,
22+
projectLocation: normalize(import.meta.url + "../../../"),
2323
};
2424
}

plugins/blog/utils/posts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2023-2025 the Deno authors. All rights reserved. MIT license.
2-
import { extract } from "$std/front_matter/yaml.ts";
3-
import { join } from "$std/path/join.ts";
2+
import { extract } from "@std/front-matter/yaml";
3+
import { join } from "@std/path/join";
44

55
/**
66
* This code is based on the

plugins/blog/utils/posts_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2023-2025 the Deno authors. All rights reserved. MIT license.
22
import { getPost, getPosts } from "./posts.ts";
33

4-
import { assert, assertEquals } from "$std/assert/mod.ts";
4+
import { assert, assertEquals } from "@std/assert";
55

66
Deno.test("[blog] getPost()", async () => {
77
const post = await getPost("first-post");

plugins/error_handling.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import type { Plugin } from "$fresh/server.ts";
33
import type { State } from "@/plugins/session.ts";
44
import { BadRequestError, redirect, UnauthorizedError } from "@/utils/http.ts";
5-
import { STATUS_CODE, STATUS_TEXT } from "$std/http/status.ts";
5+
import { STATUS_CODE, STATUS_TEXT } from "@std/http/status";
66

77
/**
88
* Returns the HTTP status code corresponding to a given runtime error. By

routes/api/stripe-webhooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2023-2025 the Deno authors. All rights reserved. MIT license.
22
import { type Handlers } from "$fresh/server.ts";
3-
import { STATUS_CODE } from "$std/http/status.ts";
3+
import { STATUS_CODE } from "@std/http/status";
44
import { isStripeEnabled, stripe } from "@/utils/stripe.ts";
55
import Stripe from "stripe";
66
import { getUserByStripeCustomer, updateUser } from "@/utils/db.ts";

routes/api/vote.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2023-2025 the Deno authors. All rights reserved. MIT license.
22
import { type Handlers } from "$fresh/server.ts";
3-
import { STATUS_CODE } from "$std/http/status.ts";
3+
import { STATUS_CODE } from "@std/http/status";
44
import type { SignedInState } from "@/plugins/session.ts";
55
import { createVote } from "@/utils/db.ts";
66
import { BadRequestError } from "@/utils/http.ts";

0 commit comments

Comments
 (0)