summaryrefslogtreecommitdiff
path: root/runtime/js
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-12-06 09:22:30 -0500
committerGitHub <noreply@github.com>2023-12-06 09:22:30 -0500
commit1ac370632fdac5b7bbab3a24045692d6b74551dd (patch)
tree18dd9c83e83d98b4639af1432d95d2c33940f636 /runtime/js
parent8c0fb9003d874fcbee0b1a6f6ee30dfb58c668bc (diff)
fix: display unstable flags at bottom of help text (#21468)
Moves the unstable flags to be at the bottom of the help text. They were previously all over the place for some reason.
Diffstat (limited to 'runtime/js')
-rw-r--r--runtime/js/90_deno_ns.js39
-rw-r--r--runtime/js/99_main.js4
2 files changed, 22 insertions, 21 deletions
diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js
index bd664d2ea..5ab56d8d7 100644
--- a/runtime/js/90_deno_ns.js
+++ b/runtime/js/90_deno_ns.js
@@ -159,8 +159,12 @@ const denoNsUnstableById = {
// BroadcastChannel is always available?
// 1: {},
- // FFI
2: {
+ cron: cron.cron,
+ },
+
+ // FFI
+ 3: {
dlopen: ffi.dlopen,
UnsafeCallback: ffi.UnsafeCallback,
UnsafePointer: ffi.UnsafePointer,
@@ -169,7 +173,7 @@ const denoNsUnstableById = {
},
// FS
- 3: {
+ 4: {
flock: fs.flock,
flockSync: fs.flockSync,
funlock: fs.funlock,
@@ -177,8 +181,17 @@ const denoNsUnstableById = {
umask: fs.umask,
},
+ // HTTP
+ 5: {
+ HttpClient: httpClient.HttpClient,
+ createHttpClient: httpClient.createHttpClient,
+ // TODO(bartlomieju): why is it needed?
+ http,
+ upgradeHttp: http.upgradeHttp,
+ },
+
// KV
- 4: {
+ 6: {
openKv: kv.openKv,
AtomicOperation: kv.AtomicOperation,
Kv: kv.Kv,
@@ -187,29 +200,17 @@ const denoNsUnstableById = {
},
// net
- 5: {
+ 7: {
listenDatagram: net.createListenDatagram(
ops.op_net_listen_udp,
ops.op_net_listen_unixpacket,
),
},
+ // Unsafe proto
+ // 8: {},
- // HTTP
- 6: {
- HttpClient: httpClient.HttpClient,
- createHttpClient: httpClient.createHttpClient,
- // TODO(bartlomieju): why is it needed?
- http,
- upgradeHttp: http.upgradeHttp,
- },
// Worker options
- // 7: {}
-
- 8: {
- cron: cron.cron,
- },
- // Unsafe proto
- // 9: {},
+ // 9: {}
};
// when editing this list, also update unstableDenoProps in cli/tsc/99_main_compiler.js
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index 67667427f..6e43da085 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -567,7 +567,7 @@ function bootstrapMainRuntime(runtimeOptions) {
}
}
- if (!ArrayPrototypeIncludes(unstableFeatures, /* unsafe-proto */ 9)) {
+ if (!ArrayPrototypeIncludes(unstableFeatures, /* unsafe-proto */ 8)) {
// Removes the `__proto__` for security reasons.
// https://tc39.es/ecma262/#sec-get-object.prototype.__proto__
delete Object.prototype.__proto__;
@@ -672,7 +672,7 @@ function bootstrapWorkerRuntime(
}
}
- if (!ArrayPrototypeIncludes(unstableFeatures, /* unsafe-proto */ 9)) {
+ if (!ArrayPrototypeIncludes(unstableFeatures, /* unsafe-proto */ 8)) {
// Removes the `__proto__` for security reasons.
// https://tc39.es/ecma262/#sec-get-object.prototype.__proto__
delete Object.prototype.__proto__;