Closed jas closed 10 years ago
@jas to me it looks as terrible bug in traceur-compiler, have you opened issue over there?
I'm reluctant to accept patches which workaround issues of other third-party modules
That's understandable.
There may me a way to fix this in es6ify, which is the module that has traceur-compiler as a dependency, or es6-module-transpiler, which has es6ify as a dependency.
I actually ran into this issue when I tried to use cli-color and es6-module-transpiler together (I'm not directly using traceur-compiler, and it's 3 levels deep in dependencies, so I have very little control over all of this unfortunately).
I'll look into opening an issue on traceur-compiler. I've opened several issues on other repos (linked above). Hopefully I will be able to continue to use cli-color.
Thank you for taking the time to look at this pull request!
traceur-compiler adds a polyfill for
Object.defineProperty
, which breakscli-color
by causing the color functions on theclc
object to beundefined
.Example:
It appears that the polyfill doesn't properly return an object. This commit rearranges
cli-color
's use ofObject.defineProperty
slightly in order to fix this rather unfortunate compatibility issue.Object.defineProperties
isn't affected.I realize this is not an issue with
cli-color
in itself, but given how far down the dependency chain the real issue is, I'm hoping this change is trivial and will be acceptable here.I opened several issues on other repos as I searched to figure out what exactly was causing this. Here they are for reference: