Expose the names of a module's defined function via modulemeta

This reuses the existing `block_list_funcs` capability and adds an extra field on the `modulemeta` output, called `defs`, containing that list of functions.
This commit is contained in:
Alex Wilson authored and Nico Williams committed 2023-08-12 20:46:36 -05:00
1 parent fdab39bc7b
commit 65ed95c93a
2 files changed
+8 -3

No files matched your search

+7 -3
View File
@@ -1624,11 +1624,15 @@ jq: error: Import path must be constant at <top-level>, line 1:
modulemeta
"c"
{"whatever":null,"deps":[{"as":"foo","is_data":false,"relpath":"a"},{"search":"./","as":"d","is_data":false,"relpath":"d"},{"search":"./","as":"d2","is_data":false,"relpath":"d"},{"search":"./../lib/jq","as":"e","is_data":false,"relpath":"e"},{"search":"./../lib/jq","as":"f","is_data":false,"relpath":"f"},{"as":"d","is_data":true,"relpath":"data"}]}
{"whatever":null,"deps":[{"as":"foo","is_data":false,"relpath":"a"},{"search":"./","as":"d","is_data":false,"relpath":"d"},{"search":"./","as":"d2","is_data":false,"relpath":"d"},{"search":"./../lib/jq","as":"e","is_data":false,"relpath":"e"},{"search":"./../lib/jq","as":"f","is_data":false,"relpath":"f"},{"as":"d","is_data":true,"relpath":"data"}],"defs":["a/0","c/0"]}
modulemeta | .deps |= length
modulemeta | .deps | length
"c"
{"whatever":null,"deps":6}
6
modulemeta | .defs | length
"c"
2
%%FAIL IGNORE MSG
import "syntaxerror" as e; .