You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2025/11/18 17:35:52 UTC

(couchdb) branch allow-javascript-quickjs-in-ken created (now 241cb03b2)

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a change to branch allow-javascript-quickjs-in-ken
in repository https://gitbox.apache.org/repos/asf/couchdb.git


      at 241cb03b2 Allow javascript_quickjs in ken

This branch includes the following new commits:

     new 241cb03b2 Allow javascript_quickjs in ken

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(couchdb) 01/01: Allow javascript_quickjs in ken

Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch allow-javascript-quickjs-in-ken
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 241cb03b2be35d402de143ea27feb21e0f10a58e
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Tue Nov 18 12:32:31 2025 -0500

    Allow javascript_quickjs in ken
    
    Previously, ken only allowed languages defined via env vars which excluded
    javascript_quickjs.
---
 src/ken/src/ken_server.erl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/ken/src/ken_server.erl b/src/ken/src/ken_server.erl
index 1bc7faea1..c51ae4304 100644
--- a/src/ken/src/ken_server.erl
+++ b/src/ken/src/ken_server.erl
@@ -532,6 +532,8 @@ prune_worker_table(State) ->
     State#state{pruned_last = erlang:monotonic_time()}.
 
 allowed_languages() ->
+    % These are always available
+    BuiltIn = [<<"javascript">>, <<"javascript_quickjs">>, <<"query">>],
     Config =
         couch_proc_manager:get_servers_from_env("COUCHDB_QUERY_SERVER_") ++
             couch_proc_manager:get_servers_from_env("COUCHDB_NATIVE_QUERY_SERVER_"),
@@ -541,7 +543,7 @@ allowed_languages() ->
             true -> [<<"erlang">> | Allowed0];
             _Else -> Allowed0
         end,
-    [<<"query">> | Allowed].
+    lists:usort(BuiltIn ++ Allowed).
 
 config(Key, Default) ->
     config:get("ken", Key, Default).