-
Notifications
You must be signed in to change notification settings - Fork 297
Description
Describe the bug
When deploying edge functions, the CLI outputs Deno 2 deprecation warnings about --import-map
and --decorator
flags. While deployments succeed, these warnings clutter the output and indicate the CLI is using deprecated Deno command-line flags.
To Reproduce
-
Create any edge function with a
deno.json
containing imports -
Configure
import_map
insupabase/config.toml
:[functions.awesome-function] enabled = true verify_jwt = false import_map = "./functions/awesome-function/deno.json" entrypoint = "./functions/awesome-function/index.ts"
-
Deploy the function:
supabase functions deploy awesome-function --no-verify-jwt
-
Observe deprecation warnings in output (see "Actual output", below)
Expected behavior
Edge functions should deploy without deprecation warnings (modern Deno 2 reads configuration from deno.json
files automatically).
Actual output
Bundling Function: awesome-function
Specifying import_map through flags is no longer supported. Please use deno.json instead.
Specifying decorator through flags is no longer supported. Please use deno.json instead.
Deployed Functions on project abcdefghijklmnopq: awesome-function
System information
Rerun the failing command with --create-ticket
flag.
- Ticket ID: (FYI: adding "--create-ticket" flag does not output ticket ID)
- Version of OS: macOS Tahoe 26.0.1
- Version of CLI: 2.50.2 (beta)
- Version of Docker: 28.4.0
- Versions of services:
SERVICE IMAGE | LOCAL | LINKED
------------------------|------------------------|------------
supabase/postgres | 17.6.1.005 | 17.6.1.005
supabase/gotrue | v2.179.0 | v2.179.0
postgrest/postgrest | v13.0.5 | v13.0.5
supabase/realtime | v2.52.0 | -
supabase/storage-api | v1.28.0 | -
supabase/edge-runtime | v1.69.12 | -
supabase/studio | 2025.10.06-sha-426fda2 | -
supabase/postgres-meta | v0.91.6 | -
supabase/logflare | 1.22.4 | -
supabase/supavisor | 2.7.1 | -
Root Cause
The issue originates from hardcoded flags in pkg/function/bundle.go
:
Lines 46-48:
BundleFlags = []string{
"--decorator", "tc39",
}
Line 57:
if len(importMap) > 0 {
args = append(args, "--import-map", importMap)
}
These flags are passed to edge-runtime, which passes them to Deno 2, triggering deprecation warnings.
Fix
Remove deprecated flags from pkg/function/bundle.go
since Deno 2 automatically reads configuration from deno.json
:
- Remove
--decorator tc39
fromBundleFlags
- Remove
--import-map
flag from bundling command
Backwards compatibility: Should be safe since edge functions already use deno.json files by default