- Make the parsedType property non-enumerable unless debug mode is enabled.
- Add a more appropriate test case.
- Remove the (incomplete) schema for parsed types.
We now allow a much larger range of characters in filenames. We also URL-encode HTML links when necessary, so that everything still works when you upload the files to a web server.
This change prevents a lot of clutter when using the `--explain` flag to log doclets to the console.
If the `--debug` flag is enabled, AST nodes are added as enumerable properties.
The issue in brief: Within an object literal, if a standalone comment was followed by a commented symbol, the symbol's comment would not be attached correctly.
The fix essentially reverts the changes for #565, which are no longer needed thanks to 50cd99fa2fca753fcf7c9ec3ecf70afd47168e94.
The fix also corrects the order in which we walk a MemberExpression's child nodes. Without this correction, comments would not be attached correctly inside CallExpression nodes.
For consistency with method parameters, this change extends our unfortunate practice of adding type properties to the parent of the `type` object, rather than the object itself.
Without the fix, we get the following when running ./jsdoc -T:
Failures:
jsdoc/src/filter Filter isIncluded
1) should be able to exclude descendants of excluded subdirectories
Message:
Expected 4 to be 2.
Stacktrace:
undefined
2) should be able to exclude descendants of excluded subdirectories
Message:
Expected 1 to be -1.
Stacktrace:
undefined
3) should be able to exclude descendants of excluded subdirectories
Message:
Expected 3 to be -1.
Stacktrace:
undefined
Finished in 6.696 seconds
849 tests, 2050 assertions, 3 failures
This test passes with the fix.
There were three separate problems here:
1. The visitor called `trackVars` at the wrong time for `AssignmentExpression` and `VariableDeclarator` nodes, which prevented JSDoc from setting the `funcscope` property correctly.
2. The `funcscope` property was being added to `VariableDeclarator` nodes. It should only be added to `AssignmentExpression` nodes.
3. We were trying to resolve the variable name `____` in `AssignmentExpression` nodes. This is a special value we add to the source code so that the `lends` tag will work, and it should never be resolved against the enclosing scope.
The previous, buggy behavior looked reasonable in most cases, but it didn't work for closures that contain multiple `lends` tags.