Make maxInternalDepth and maxExternalDepth configurable.#116
Make maxInternalDepth and maxExternalDepth configurable.#116runem merged 5 commits intorunem:1.2.0from FelixSchuSi:1.2.0-traversal-depth-config
Conversation
InfinityI think using the string "Infinity" could become a bit inconvenient. What do you think about using NamingI actually really like the description you made for the configs :-) Here are some thoughts about the naming of the configs:
Here are some suggestions (unordered list) of what it could be called. What do you think?
DocumentationWhen you add documentation you will need to:
|
|
Thanks for the feedback! Using For the names of the configs i found |
|
I also like them. Let's go with those two then! |
|
It looks great now, - I'll merge this in a couple of hours! |
I made maxInternalDepth and maxExternalDepth configurable.
The values can now be set under the name "moduleTraversalDepthInternal" and "moduleTraversalDepthExternal" via CLI argument, tsconfig or VSCode setting.
The default values stayed the same ("moduleTraversalDepthInternal" defaults to Infinity and "moduleTraversalDepthExternal" defaults to one).
Handling the value Infinity in JSON is tricky since it is not supported by the JSON format.
I decided to allow string values and cast them to number when loading the config, so that the value Infinity can be represented with the string "Infinity".
I am not completely satisfied with the variable names and the descriptions.
Please tell me what you think about them.
Once we have agreed on the variable names I will add documentation.