Fix compatibility issue with modules that have google/traceur-compiler as a dependency #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
browser-sync
andgulp-es6-module-transpiler
modules jackfranklin/gulp-load-plugins#11