underscore-cli
underscore-cli copied to clipboard
text output format not working
--outfmt text appears to be broken because underscore.string version 3.2.3 added map function.
output is: Error formatting output data in mode 'text': undefined is not a function
If somebody needs to hotfix, you can do it by simply removing a join here: https://github.com/makevoid/underscore-cli/commit/e0115038177fcb8d90a2713a38678fdc1c19eba5
I suppose the "base" error is in underscore.strings
, from their docs they say the map function shouldn't be required when underscore.strings is mixed in underscore and the two function collide.
This code from u.strings ( https://github.com/epeli/underscore.string/blob/c1f7b1fa64bd6cecbe05689c05e66f7df68d8797/exports.js#L5 ) is checking for map
and should not include it but it seems to get mixed in anyway for some reason.
The package.json for underscore-cli is using "*" for underscore.string, which allows for broken compatibility (although in this case it probably would've broken anyway). We worked around this issue by adding a specific version of underscore.string to our package.json (not the underscore-cli package.json), which forces underscore-cli to use the working version.
Here is the version we are using: "underscore.string": "3.1.1"
Maybe it can be locked on master until the issue is fixed?
+1. just ran into this