Skip to content

Commit

Permalink
Fix faulty invocation of Deno.cwd and bump @autometrics/autometrics t…
Browse files Browse the repository at this point in the history
…o beta6
  • Loading branch information
brettimus committed Sep 7, 2023
1 parent 7b983aa commit 7bd73a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/autometrics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autometrics/autometrics",
"version": "0.7.0-beta5",
"version": "0.7.0-beta6",
"type": "module",
"description": "Easily add metrics to your system -- and actually understand them using automatically customized Prometheus queries",
"author": "Fiberplane <[email protected]>",
Expand Down
4 changes: 3 additions & 1 deletion packages/autometrics/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export function getModulePath(): string | undefined {
const runtime = getRuntime();
if (runtime === "browser") {
rootDir = "";
} else if (runtime === "deno") {
// HACK - Deno Deploy does not have access to `Deno.cwd`, so we need to test for it
//@ts-ignore
} else if (runtime === "deno" && typeof Deno?.cwd === "function") {
//@ts-ignore
rootDir = Deno.cwd();
} else if (runtime === "node") {
Expand Down

0 comments on commit 7bd73a9

Please sign in to comment.