Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
path: assert inputs are strings #5348
One final CI: https://ci.nodejs.org/job/node-test-pull-request/1951/
added a commit
this pull request
Mar 18, 2016
So it looks like the regression is some what similar to what we saw in #5244
Basically anyone who was passing null / undefined to path in the past would get an empty string back, now Node throws.
I have sent PR's to both eslint + stylus, but I can imagine that the pattern of passing undefined into a path function probably exists all over the place.
This is likely to be VERY breaking in the ecosystem (we only smoke test 48 modules, 2 of which were affected).
@nodejs/ctc assuming this is a change that we want to keep in v6, what is the best way to avoid a ton of breakages in the ecosystem?
so this is working as expected prior to v6. I still thinking that supplying '.' for undefined is the right thing to do. Perhaps with a deprecation message? This will be a bit out of left field for individuals moving to six with no notice, and we have no guarantee that some of the breaking modules are still maintained.
edit: I've played around with "fixing" this a little bit and I am left at a bit of an impasse. Obviously we don't want to break stuff, but being consistent on this is going to be hard. What do we do for
Perhaps we should only be returning an empty string or
Looking forward to hearing some more opinions