From f924f06df77de4110cd9453e949080958fb32889 Mon Sep 17 00:00:00 2001 From: sigmaSd Date: Mon, 11 Dec 2023 22:56:06 +0100 Subject: [PATCH] fix deno task completion for jsonc --- share/completions/deno.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/completions/deno.fish b/share/completions/deno.fish index 1b1efceed..e5197f599 100644 --- a/share/completions/deno.fish +++ b/share/completions/deno.fish @@ -2,6 +2,7 @@ deno completions fish | source # complete deno task set searchForDenoFilesCode ' +import * as JSONC from "https://deno.land/std@0.208.0/jsonc/mod.ts"; // order matters const denoFile = ["deno.json", "deno.jsonc", "package.json"]; for (const file of denoFile) { @@ -10,7 +11,7 @@ for (const file of denoFile) { // file exists const props = file === "package.json" ? "scripts" : "tasks"; console.log( - Object.keys(JSON.parse(Deno.readTextFileSync(file))[props]).join("\n"), + Object.keys(JSONC.parse(Deno.readTextFileSync(file))[props]).join("\n"), ); break; } catch {}