-
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
Prefer copyFileSync from here over native #1440
Conversation
b12f5e6
to
30955ee
Compare
Tests pass for me locally with node v4, v6 and v8. Not sure what's wrong in Travis CI. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good fix.
Thanks for the fix! I'll release this as JSDoc 3.5.5 shortly. |
(Also, not sure what's up with Babylon; I'll investigate that separately.) |
Just throwing this out there, I probably haven't thought it all the way through but ... Why not just always override all functions? It seems like this method of implementing some functions but then replacing them with In other words, move the part that re-exports all the fs functions to the top of the file, then add the jsdoc versions over them. Don't check if there is already a native version. |
* commit '4c7f9049a0e8c6d014e4d7dd1335de7314955493': 3.5.5 3.5.5 changelog Prefer copyFileSync from here over native (jsdoc#1440) start 3.5.5-dev # Conflicts: # package.json
* master: (95 commits) 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 prevent crash when an anonymous class is passed as a parameter (jsdoc#1416) hide the signature in the heading for classes with hidden constructors (jsdoc#1397) chore(package): update nyc to version 11.1.0 (jsdoc#1417) add `templates.useShortNamesInLinks` config option (jsdoc#738) allow users to specify a highlighter for Markdown code blocks (jsdoc#1412) document `longnamesToTree`, plus other doc improvements (jsdoc#43) move namespaces and interfaces up in the nav (jsdoc#1410) don't pretty-print code blocks that begin with "```plain" (jsdoc#1361) improve comment make the `exports` tag work correctly when combined with the `enum` tag (jsdoc#970) fix Node.js 4.x update tested Node.js versions use the markdown-it Markdown parser by default (jsdoc#1243) enable more Babylon options (jsdoc#1411) ... # Conflicts: # .travis.yml # README.md # lib/jsdoc/src/astbuilder.js # lib/jsdoc/src/visitor.js # lib/jsdoc/util/markdown.js # lib/jsdoc/util/templateHelper.js # package.json
* 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
lib/jsdoc/fs.js
always prefers native implementations over its overrides. With node v8.5 implementingcopyFile
andcopyFileSync
natively with a different API, building docs broke.I've made it so overrides can now easily be preferred by adding them to the
alwaysOverride
object.Fixes #1438.