From 79f88f74e03456d8fc8416037fa6090f7c0c51b0 Mon Sep 17 00:00:00 2001 From: Vicary A Date: Wed, 13 Mar 2024 23:00:28 +0800 Subject: [PATCH] fix(cli): import.meta.url --- cli.ts | 18 ++++++------------ deno.json | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/cli.ts b/cli.ts index 517f11f..ffdba6a 100644 --- a/cli.ts +++ b/cli.ts @@ -1,11 +1,4 @@ -import { - assert, - colors, - dirname, - fromFileUrl, - log, - resolvePath, -} from "./deps.ts"; +import { assert, colors, log } from "./deps.ts"; log.setup({ handlers: { @@ -112,10 +105,11 @@ async function patchDev() { // Ensure file exists await Deno.stat("dev.ts"); - const diffFile = resolvePath( - dirname(fromFileUrl(import.meta.url)), - "dev.patch", - ); + if (Deno.env.has("FRSH_GQL_DEBUG")) { + console.debug(import.meta); + } + + const diffFile = import.meta.resolve("./dev.patch"); try { await Deno.stat(diffFile); diff --git a/deno.json b/deno.json index 4d8adec..1b74987 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@vicary/fresh-graphql", - "version": "0.2.1", + "version": "0.2.4", "exports": "./mod.ts", "lock": false, "nodeModulesDir": false