-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{Type<type>} syntax fails on Node 12 #1643
Comments
ProblemThe source of the problem seems to be this line: https://github.com/jsdoc/jsdoc/blob/master/lib/jsdoc/tag/type.js#L200 The The input into the I guess the Confirming the suspicion in node.js REPL: node.js v12:
node.js v10:
Solution(At least for someone unfamiliar with the code and just playing around, not seeing the bigger picture, just trying to get this to run.) In https://github.com/jsdoc/jsdoc/blob/master/lib/jsdoc/tag/type.js#L200 change the 2nd argument |
@adroitwhiz, thanks for the bug report, and @lll000111, thanks for digging into the issue and identifying a fix. Working on this now. |
Also enables CI for Node.js 12, which I had neglected to do.
Also enables CI for Node.js 12, which I had neglected to do.
Fixed in 3.6.1, which I just released. |
* releases/3.6: (109 commits) Add 3.6.1 changelog. 3.6.1 Parse type applications correctly in Node.js 12. (jsdoc#1643) Update .gitignore. 3.6.0 Add 3.6.0 changelog. Update dependencies, plus the URLs for the GitHub repos and docs. update docs with new template (jsdoc#1604) switch to new-ish ECMAScript syntax update ESLint config migrate from `babylon` to `@babel/parser` Update ajv to the latest version 🚀 (jsdoc#1599) only run CI with Node.js versions that actually exist migrate from `markdown-it-named-headers` to `markdown-it-anchor` (jsdoc#1481) update dependencies and supported Node.js versions 3.5.5 changelog Prefer copyFileSync from here over native (jsdoc#1440) upgrade Babylon fix test breakage 3.5.4 changelog ... # Conflicts: # .gitignore # .travis.yml # CHANGES.md # LICENSE.md # README.md # cli.js # lib/jsdoc/fs.js # lib/jsdoc/path.js # lib/jsdoc/src/astbuilder.js # lib/jsdoc/src/handlers.js # lib/jsdoc/src/parser.js # lib/jsdoc/src/visitor.js # lib/jsdoc/src/walker.js # lib/jsdoc/util/logger.js # lib/jsdoc/util/markdown.js # lib/jsdoc/util/templateHelper.js # package.json # test/specs/documentation/alias.js # test/specs/documentation/anonymousclassparam.js # test/specs/documentation/arrowfunction.js # test/specs/documentation/classproperties.js # test/specs/documentation/this.js # test/specs/documentation/trailingcomment.js # test/specs/jsdoc/name.js # test/specs/jsdoc/path.js # test/specs/jsdoc/src/astnode.js # test/specs/jsdoc/src/visitor.js
* releases/3.6: (109 commits) Add 3.6.1 changelog. 3.6.1 Parse type applications correctly in Node.js 12. (jsdoc#1643) Update .gitignore. 3.6.0 Add 3.6.0 changelog. Update dependencies, plus the URLs for the GitHub repos and docs. update docs with new template (jsdoc#1604) switch to new-ish ECMAScript syntax update ESLint config migrate from `babylon` to `@babel/parser` Update ajv to the latest version 🚀 (jsdoc#1599) only run CI with Node.js versions that actually exist migrate from `markdown-it-named-headers` to `markdown-it-anchor` (jsdoc#1481) update dependencies and supported Node.js versions 3.5.5 changelog Prefer copyFileSync from here over native (jsdoc#1440) upgrade Babylon fix test breakage 3.5.4 changelog ... # Conflicts: # .gitignore # .travis.yml # CHANGES.md # LICENSE.md # README.md # cli.js # lib/jsdoc/fs.js # lib/jsdoc/path.js # lib/jsdoc/src/astbuilder.js # lib/jsdoc/src/handlers.js # lib/jsdoc/src/parser.js # lib/jsdoc/src/visitor.js # lib/jsdoc/src/walker.js # lib/jsdoc/util/logger.js # lib/jsdoc/util/markdown.js # lib/jsdoc/util/templateHelper.js # package.json # test/specs/documentation/alias.js # test/specs/documentation/anonymousclassparam.js # test/specs/documentation/arrowfunction.js # test/specs/documentation/classproperties.js # test/specs/documentation/this.js # test/specs/documentation/trailingcomment.js # test/specs/jsdoc/name.js # test/specs/jsdoc/path.js # test/specs/jsdoc/src/astnode.js # test/specs/jsdoc/src/visitor.js
In Node 12, bracketed type syntax like
Array<number>
orObject<string>
fails with a parsing error.Input code
JSDoc configuration
This occurs independent of config.
JSDoc debug output
Expected behavior
Parsing should work.
Current behavior
It doesn't, as shown above.
Your environment
The text was updated successfully, but these errors were encountered: