deno
d380bea0 - feat(unstable): support DENO_COMPAT=1 via deno.json config file

Commit
176 days ago
feat(unstable): support DENO_COMPAT=1 via deno.json config file Adds a new `"node-compat"` unstable feature that can be set in `deno.json` to opt-in to the same set of features as the `DENO_COMPAT=1` environment variable. This makes node compatibility mode a per-project setting rather than a per-developer one, and (importantly for #30027) allows the LSP to pick it up from the project config. Setting `"unstable": ["node-compat"]` in `deno.json` enables: - bare-node-builtins - detect-cjs - sloppy-imports - node-globals These are the same features that `UnstableConfig::enable_node_compat()` turns on for the `DENO_COMPAT=1` env var. Closes denoland/orchid#379 Co-Authored-By: Divy Srivastava <me@littledivy.com>
Author
Parents
Loading