feat(cli): add --unstable-node-globals flag (#26617)

This PR adds a new `--unstable-node-globals` flag to expose Node globals
by default.

Fixes https://github.com/denoland/deno/issues/26611

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
Marvin Hagemeister 2024-11-14 14:11:29 +01:00 committed by GitHub
parent 4e899d48cf
commit de34c7ed29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 75 additions and 21 deletions

View file

@ -99,24 +99,30 @@ pub static UNSTABLE_GRANULAR_FLAGS: &[UnstableGranularFlag] = &[
show_in_help: true,
id: 7,
},
UnstableGranularFlag {
name: "node-globals",
help_text: "Expose Node globals everywhere",
show_in_help: true,
id: 8,
},
UnstableGranularFlag {
name: "otel",
help_text: "Enable unstable OpenTelemetry features",
show_in_help: false,
id: 8,
id: 9,
},
// TODO(bartlomieju): consider removing it
UnstableGranularFlag {
name: ops::process::UNSTABLE_FEATURE_NAME,
help_text: "Enable unstable process APIs",
show_in_help: false,
id: 9,
id: 10,
},
UnstableGranularFlag {
name: "temporal",
help_text: "Enable unstable Temporal API",
show_in_help: true,
id: 10,
id: 11,
},
UnstableGranularFlag {
name: "unsafe-proto",
@ -124,19 +130,19 @@ pub static UNSTABLE_GRANULAR_FLAGS: &[UnstableGranularFlag] = &[
show_in_help: true,
// This number is used directly in the JS code. Search
// for "unstableIds" to see where it's used.
id: 11,
id: 12,
},
UnstableGranularFlag {
name: deno_webgpu::UNSTABLE_FEATURE_NAME,
help_text: "Enable unstable `WebGPU` APIs",
show_in_help: true,
id: 12,
id: 13,
},
UnstableGranularFlag {
name: ops::worker_host::UNSTABLE_FEATURE_NAME,
help_text: "Enable unstable Web Worker APIs",
show_in_help: true,
id: 13,
id: 14,
},
];