Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(unstable): add Temporal API support #21738

Merged
merged 18 commits into from Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 19 additions & 5 deletions cli/main.rs
Expand Up @@ -315,22 +315,28 @@ pub(crate) static UNSTABLE_GRANULAR_FLAGS: &[(
"Enable unstable net APIs",
7,
),
(
"temporal",
"Enable unstable Temporal API",
// Not used in JS
8,
),
(
"unsafe-proto",
"Enable unsafe __proto__ support. This is a security risk.",
// This number is used directly in the JS code. Search
// for "unstableFeatures" to see where it's used.
8,
// for "unstableIds" to see where it's used.
9,
),
(
deno_runtime::deno_webgpu::UNSTABLE_FEATURE_NAME,
"Enable unstable `WebGPU` API",
9,
10,
),
(
deno_runtime::ops::worker_host::UNSTABLE_FEATURE_NAME,
"Enable unstable Web Worker APIs",
10,
11,
),
];

Expand Down Expand Up @@ -394,7 +400,15 @@ pub fn main() {
// Using same default as VSCode:
// https://github.com/microsoft/vscode/blob/48d4ba271686e8072fc6674137415bc80d936bc7/extensions/typescript-language-features/src/configuration/configuration.ts#L213-L214
DenoSubcommand::Lsp => vec!["--max-old-space-size=3072".to_string()],
_ => vec![],
_ => {
if flags.unstable
|| flags.unstable_features.contains(&"temporal".to_string())
{
vec!["--harmony-temporal".to_string()]
} else {
vec![]
}
}
};
init_v8_flags(&default_v8_flags, &flags.v8_flags, get_v8_flags_from_env());
deno_core::JsRuntime::init_platform(None);
Expand Down