From c0b183bd503aac094c01ffb04ce66cbe7fbfba20 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..76a6154 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", - ); + const diffFile = import.meta.resolve("./dev.patch"); + + if (Deno.env.has("FRSH_GQL_DEBUG")) { + console.debug(import.meta, { diffFile }); + } try { await Deno.stat(diffFile); diff --git a/deno.json b/deno.json index 4d8adec..05f6030 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@vicary/fresh-graphql", - "version": "0.2.1", + "version": "0.2.5", "exports": "./mod.ts", "lock": false, "nodeModulesDir": false