Since nodejs/node@08085c49b6, which will be part of Node.js v6.0, functions from the `path` core module (like `dirname`) will require their input to be a string. Currently, at some points in the code they might be called with `undefined`; This patch adds `… || ""` so that the input is always a string. For `path.dirname` in the babel-core file, this does not change behaviour, since `path.dirname(undefined) === path.dirname("") === "."` (where the first expression is only defined for Node.js ≤ v5.x). For `path.basename`, this changes the return value, since `path.basename(undefined) === "undefined"` (on Node.js ≤ v5.x), but `path.basename("") === ""`. However, it seems reasonable to assume that, due to the trailing expression in `path.basename(…) || "stdout"`, the current behaviour is not actually the intended one. There are possibly more places in the code base where similar changes may be neccessary; However, these suffice to make the tests pass and un-break the build of at least one external project when using the current Node.js master branch.
The compiler for writing next generation JavaScript.
Looking for support?
For questions and support please visit the discussion forum, Slack community, or StackOverflow.
Want to report a bug or request a feature?
Bugs and feature requests should be posted at phabricator.babeljs.io.
Want to report an issue with babeljs.io?
For documentation and website issues please visit the babel.github.io repo.
Description
Languages
JavaScript
99.5%
Makefile
0.3%
HTML
0.1%