Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"colors.js" adds non-function String#bold; breaks v0.25.1. #315

Closed
rwaldron opened this issue Feb 18, 2015 · 6 comments
Closed

"colors.js" adds non-function String#bold; breaks v0.25.1. #315

rwaldron opened this issue Feb 18, 2015 · 6 comments
Assignees

Comments

@rwaldron
Copy link
Contributor

a0e0544#commitcomment-9801840

@ljharb
Copy link
Collaborator

ljharb commented Feb 18, 2015

Thanks for the report! This definitely isn't meant to break. Can you provide some more info about what's breaking and what environment it's breaking on?

@ljharb
Copy link
Collaborator

ljharb commented Feb 18, 2015

My confusion here is that every key in a0e0544#diff-fbdfeb59ea7599799df83561186da7dfR2522 is installed on String.prototype in a0e0544#diff-fbdfeb59ea7599799df83561186da7dfR2521 - I wonder if arduinos have an Object.keys bug?

@ljharb
Copy link
Collaborator

ljharb commented Feb 18, 2015

OK, I think I figured it out. The npm module chalk unfortunately modifies String.prototype - which is not only a bad idea (for things that aren't shims), but also, it means that es6-shim is being required in after chalk is required, and usually the shim should be run first.

That said, I can certainly work around this.

@ljharb ljharb changed the title Regression in a0e0544eefd6b42b5e514584a4413033ed1c3219 "chalk" adds non-function String#bold; breaks v0.25.1. Feb 18, 2015
@ljharb ljharb self-assigned this Feb 18, 2015
@ljharb ljharb closed this as completed in b6ff7a0 Feb 18, 2015
@ljharb
Copy link
Collaborator

ljharb commented Feb 18, 2015

Fix will be published shortly - that said, I'd avoid using "colors.js" if at all possible in the future.

@olizilla
Copy link

for future archeologists, it's colors.js that's all up in the String.prototype, causing trouble, not chalk.

@ljharb ljharb changed the title "chalk" adds non-function String#bold; breaks v0.25.1. "colors.js" adds non-function String#bold; breaks v0.25.1. Feb 18, 2015
@ljharb
Copy link
Collaborator

ljharb commented Feb 18, 2015

@olizilla thanks, i've updated all my comments and the issue description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants