CoffeeScript 2#30
Conversation
There was a problem hiding this comment.
@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
| Author Tobias Koppers @sokra | ||
| */ | ||
| var coffee = require("coffee-script"); | ||
| var coffee = require("coffeescript"); |
There was a problem hiding this comment.
Maybe wrap in a try/catch ? 😛 I'm not sure...
There was a problem hiding this comment.
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" <notifications@github.com> 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 |
| }, | ||
| "peerDependencies": { | ||
| "coffee-script": "1.x" | ||
| "coffeescript": "*" |
There was a problem hiding this comment.
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.
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.
@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. |
michael-ciniawsky
left a comment
There was a problem hiding this comment.
@jalavosus Thx
coffee-loader already supports CoffeeScript 2. webpack/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.