-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
CoffeeScript 2 #30
CoffeeScript 2 #30
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jalavosus That one is actually a bit tricky, because the loader should support coffeescript v1x && v2x and folks are normally able to via peerDependencies
, but since the package name changed it won't work
@@ -2,7 +2,7 @@ | |||
MIT License http://www.opensource.org/licenses/mit-license.php | |||
Author Tobias Koppers @sokra | |||
*/ | |||
var coffee = require("coffee-script"); | |||
var coffee = require("coffeescript"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe wrap in a try/catch
? 😛 I'm not sure...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need. Peer dep should force it. And it's better to fail hard in this case most likely.
@jalavosus - This is going to take some internal discussion on how we are going to handle this. Give us a day or two and we will get you sorted out one way or another. |
I'll take a look into the try-catch option when I get back to my computer. Can the package.json require both the old and new versions to be installed separately? |
@jalavosus It's safe to just go with |
If I read that right, this (ostensibly) means blindly using `coffeescript`
is fine, yeah?
On Mar 13, 2017 13:02, "Michael Ciniawsky" <[email protected]> wrote:
jashkenas/coffeescript#4462
<jashkenas/coffeescript#4462>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE3dsvm6EGZDDJwidvrBNzhHvkaPlCARks5rlXaugaJpZM4MRqca>
.
|
@jalavosus I'm waiting for final confirmation in jashkenas/coffeescript#4462, but yes setting |
package.json
Outdated
@@ -7,7 +7,7 @@ | |||
"loader-utils": "^1.0.2" | |||
}, | |||
"peerDependencies": { | |||
"coffee-script": "1.x" | |||
"coffeescript": "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The risk with this is that if they break their API in a major, the loader will break. So change to a range if you want to be careful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, we need to test for breaking Node API changes before release
{
"peerDependencies": {
"coffeescript": ">= 1.8.x"
}
}
Closes #33 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jalavosus Please fix the peerDependency
range and we are good to go
{
"peerDependencies": {
"coffeescript": ">= 1.8.x || >= 2.x"
}
}
Updated package.json, sorry for the holdup. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jalavosus Thx
coffee-loader already supports CoffeeScript 2. webpack-contrib/coffee-loader#30
Basic changes to (hopefully) support coffeescript 2.
Essentially hoping that it doesn't require much besides requiring "coffeescript" instead of "coffee-script" and package.json requiring "coffeescript" at any version.