From b81d3ab11b696d6c749a2356de0a42d65a153c00 Mon Sep 17 00:00:00 2001 From: 7ttp <117663341+7ttp@users.noreply.github.com> Date: Sun, 7 Dec 2025 20:25:26 +0530 Subject: [PATCH] fix(functions): resolve deno lint errors in generated edge function template the template generated by 'supabase functions new' produces deno lint errors on line 6 due to inline jsr: import without version specifier: import jsr:@supabase/functions-js/edge-runtime.d.ts this triggers two default deno lint rules: - no-import-prefix: inline jsr: dependency not allowed - no-unversioned-import: missing version in specifier fix moves the dependency declaration to deno.json with proper versioning and updates index.ts to use bare specifier import as recommended by deno. closes #4424 --- internal/functions/new/templates/deno.json | 4 +++- internal/functions/new/templates/index.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/functions/new/templates/deno.json b/internal/functions/new/templates/deno.json index f6ca8454c..758d0703d 100644 --- a/internal/functions/new/templates/deno.json +++ b/internal/functions/new/templates/deno.json @@ -1,3 +1,5 @@ { - "imports": {} + "imports": { + "@supabase/functions-js": "jsr:@supabase/functions-js@^2" + } } diff --git a/internal/functions/new/templates/index.ts b/internal/functions/new/templates/index.ts index c7f64fffa..dd1f7ce67 100644 --- a/internal/functions/new/templates/index.ts +++ b/internal/functions/new/templates/index.ts @@ -3,7 +3,7 @@ // This enables autocomplete, go to definition, etc. // Setup type definitions for built-in Supabase Runtime APIs -import "jsr:@supabase/functions-js/edge-runtime.d.ts" +import "@supabase/functions-js/edge-runtime.d.ts" console.log("Hello from Functions!")