From b038453976c8133f180c88142bc2605262b28234 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 | 15 ++++++--------- deno.json | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/cli.ts b/cli.ts index 517f11f..b0af5cd 100644 --- a/cli.ts +++ b/cli.ts @@ -1,11 +1,4 @@ -import { - assert, - colors, - dirname, - fromFileUrl, - log, - resolvePath, -} from "./deps.ts"; +import { assert, colors, dirname, log, resolvePath } from "./deps.ts"; log.setup({ handlers: { @@ -112,8 +105,12 @@ async function patchDev() { // Ensure file exists await Deno.stat("dev.ts"); + if (Deno.env.has("FRSH_GQL_DEBUG")) { + console.debug(import.meta.url); + } + const diffFile = resolvePath( - dirname(fromFileUrl(import.meta.url)), + dirname(new URL(import.meta.url).pathname), "dev.patch", ); diff --git a/deno.json b/deno.json index 4d8adec..112446d 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@vicary/fresh-graphql", - "version": "0.2.1", + "version": "0.2.2", "exports": "./mod.ts", "lock": false, "nodeModulesDir": false