Skip to content

Commit 214975d

Browse files
authored
chore: inline ga4 module and remove raw GitHub import (#3733)
## Summary - Inlined the `$ga4` module (from `https://raw.githubusercontent.com/denoland/ga4/main/mod.ts`) into `www/utils/ga4.ts` - Replaced old `deno.land/std` URL imports with `@std/http` (`getCookies`, `STATUS_TEXT`) - Inlined the trivial `snakeCase` helper (was from `deno.land/x/case`) - Removed `$ga4` import map entry from `deno.json` The ga4 package was never published to jsr or npm, so inlining was the cleanest way to eliminate the last raw URL-based dependency.
1 parent 220368a commit 214975d

4 files changed

Lines changed: 414 additions & 34 deletions

File tree

deno.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
"mime-db": "npm:mime-db@^1.54.0",
6262
"preact": "npm:preact@^10.28.2",
6363
"preact-render-to-string": "npm:preact-render-to-string@^6.6.5",
64-
"$ga4": "https://raw.githubusercontent.com/denoland/ga4/main/mod.ts",
6564
"@opentelemetry/api": "npm:@opentelemetry/api@^1.9.0",
6665
"@preact/signals": "npm:@preact/signals@^2.5.1",
6766
"@std/encoding": "jsr:@std/encoding@1",

deno.lock

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

www/routes/_middleware.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Context } from "fresh";
2-
import type { Event } from "$ga4";
3-
import { GA4Report, isDocument, isServerError } from "$ga4";
2+
import type { Event } from "../utils/ga4.ts";
3+
import { GA4Report, isDocument, isServerError } from "../utils/ga4.ts";
44

55
const GA4_MEASUREMENT_ID = Deno.env.get("GA4_MEASUREMENT_ID");
66

0 commit comments

Comments
 (0)