supabase / cli

Supabase CLI. Manage postgres migrations, run Supabase locally, deploy edge functions. Postgres backups. Generating types from your database schema.
https://supabase.com/docs/reference/cli/about
MIT License
1.07k stars 208 forks source link

Deno `--unstable` is deprecated. Use granular flags instead. #2682

Closed oxcabe closed 1 month ago

oxcabe commented 1 month ago

Describe the bug From Deno - Unstable Feature Flags:

[!WARNING] --unstable is deprecated - use granular flags instead

The --unstable flag is no longer being used for new features, and will be removed in a future release. All unstable features that were available using this flag are now available as granular unstable flags, notably:

  • --unstable-kv
  • --unstable-cron Please use these feature flags instead moving forward.

To Reproduce Steps to reproduce the behavior:

  1. Run supabase init.
  2. Input "y" for the Generate VS Code settings for Deno? [y/N] prompt.
  3. Verify deno.unstable: true in .vscode/settings.json.

Expected behavior The VS Code configuration uses granular flags for Deno.

Proposed solution Replace the following line: https://github.com/supabase/cli/blob/230be7f40f251774b94a5ecc5b8025c4da22e58e/internal/init/templates/.vscode/settings.json#L6

with something similar to:

 "deno.unstable": [
  "bare-node-builtins",
  "byonm",
  "sloppy-imports",
  "unsafe-proto",
  "webgpu",
  "broadcast-channel",
  "worker-options",
  "cron",
  "kv",
  "ffi",
  "fs",
  "http",
  "net"
],

This array contains all current unstable flags featured on the Deno website, and it should match the previous boolean setting.

avallete commented 1 month ago

Thanks for reporting this! Your fix looks good, and if you'd like to open a PR, feel free to do so.