From 8590aa9cee9c63088ef8eac017d6325318aa9df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 18 Dec 2024 13:44:53 +0000 Subject: [PATCH] fix(ext/node): sort list of built-in modules alphabetically (#27410) --- Cargo.lock | 2 +- Cargo.toml | 2 +- ext/node/Cargo.toml | 2 +- ext/node/polyfill.rs | 9 ++++++++- tests/integration/lsp_tests.rs | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6cfb3779e4de79..7203286773f79e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1925,7 +1925,7 @@ dependencies = [ [[package]] name = "deno_node" -version = "0.120.0" +version = "0.121.0" dependencies = [ "aead-gcm-stream", "aes", diff --git a/Cargo.toml b/Cargo.toml index 0f52c28de6982e..b4041140546c22 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -83,7 +83,7 @@ deno_io = { version = "0.93.0", path = "./ext/io" } deno_kv = { version = "0.91.0", path = "./ext/kv" } deno_napi = { version = "0.114.0", path = "./ext/napi" } deno_net = { version = "0.175.0", path = "./ext/net" } -deno_node = { version = "0.120.0", path = "./ext/node" } +deno_node = { version = "0.121.0", path = "./ext/node" } deno_telemetry = { version = "0.5.0", path = "./ext/telemetry" } deno_tls = { version = "0.170.0", path = "./ext/tls" } deno_url = { version = "0.183.0", path = "./ext/url" } diff --git a/ext/node/Cargo.toml b/ext/node/Cargo.toml index 8ba1141ec1a963..127633a09b1014 100644 --- a/ext/node/Cargo.toml +++ b/ext/node/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_node" -version = "0.120.0" +version = "0.121.0" authors.workspace = true edition.workspace = true license.workspace = true diff --git a/ext/node/polyfill.rs b/ext/node/polyfill.rs index 762e32f7ba7241..42cc7949553a7d 100644 --- a/ext/node/polyfill.rs +++ b/ext/node/polyfill.rs @@ -67,9 +67,9 @@ generate_builtin_node_module_lists! { "process", "punycode", "querystring", - "repl", "readline", "readline/promises", + "repl", "stream", "stream/consumers", "stream/promises", @@ -90,3 +90,10 @@ generate_builtin_node_module_lists! { "worker_threads", "zlib", } + +#[test] +fn test_builtins_are_sorted() { + let mut builtins_list = SUPPORTED_BUILTIN_NODE_MODULES.to_vec(); + builtins_list.sort(); + assert_eq!(SUPPORTED_BUILTIN_NODE_MODULES, builtins_list); +} diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs index 568cad44b071e3..56c060d95803e0 100644 --- a/tests/integration/lsp_tests.rs +++ b/tests/integration/lsp_tests.rs @@ -8609,9 +8609,9 @@ fn lsp_completions_node_specifier() { "node:process", "node:punycode", "node:querystring", - "node:repl", "node:readline", "node:readline/promises", + "node:repl", "node:stream", "node:stream/consumers", "node:stream/promises",