-
Notifications
You must be signed in to change notification settings - Fork 4
CS2 Discussion: Project: Progress as of February 2017: 2.0.0-alpha1! #71
Comments
Any clarification for
|
The 99 versions are leftovers from the previous package, which was just a warning that you had misspelled CoffeeScript. |
Will it affect |
|
Great job everybody! I'm curious what new oportunities will CS2 bring around tooling (stuff like linting, auto-formatting, etc.) and how it could benefit from the babel & co. ecosystem. |
What are your guys thoughts on outputting something when people install |
@scottwarren Maybe after 2.0.0 final is released, that's a thought. |
@nickdima Basically none. CS2 uses the same architecture as CS1. |
awesome! well done guys, we're lucky to have you. Now, I guess I need to start a new project to test all this stuff out on! Hmmm... choices, choices... x |
I'm using CoffeeScript 2 with WebPack and Vue.js and it works great! (except for the spread operator) |
To use CS2 with webpack I simply had to create a symbolic link from |
@YamiOdymel Thanks! As for the spread operator, that seems like something that should be implemented as part of destructuring (#69) which I’ve started a branch for if you’d like to take a crack at it . . . 😉 |
Has anyone tried CS2 on an existing project? What changes, if any, did you need to make to your code? |
@GeoffreyBooth I was going to integrate it into an existing Rails app, but the coffee-script-source gem doesn’t have the alpha yet. I’d submit a PR, but it appears to be closed source? |
@joeldrapper I don’t know anything about that gem. We probably won’t be submitting CoffeeScript to upstream packages like that one until 2.0.0 final is released. Could you perhaps install the gem and then manually replace the CoffeeScript |
Yes! 2.0.0 is approaching! Thank you guys so much for giving coffeescript some much needed attention! I switched to CS2 on a few I do have to point out that it's extremely unfortunate that CS2 is going to be published to a different package name instead of using version semantics. That just means that there are 5,178 packages that may have been compatible with CS2, including IDE things like linters and such, but if you want to use them in your own CS2 you need to use a workaround like symlinking to This seems like a huge barrier to entry. Anyways, again, thank you guys so much! I love seeing coffeescript developing again! |
This also means that dependency management services like:
Will not be able to recognize that there is a new version of CoffeeScript out. |
The The thought behind not releasing 2 on the |
Thanks for the explanation @GeoffreyBooth. I understand the desire to reduce unexpected breaking changes Or is the intent here to avoid breaking changes even for those npm users which did not specify a version number in their dependencies? "devDependencies": {
"coffee-script": "*"
} |
@GeoffreyBooth — You can make the decision about how you'd like to handle it ... but I'd personally be fine with both |
FWIW, I do feel like it's somewhat expected that arbitrary upgrading of NPM packages will lead to breakage, especially to a new major version number -- that's why we have version-number-specific dependencies. And it seems there are some benefits to putting 2 on I should probably turn this into a separate issue, but can we have a tool (not sure if it belongs in |
I think that's called "CoffeeScript 1". |
Not quite. CS1 doesn’t support async/await and a few other features added in CS2. There is a place for a build chain that involves the CS2 compiler → Babel → ES3. There are so many ways to implement this, though, and I feel like most people would want to do it within the context of a full-featured tool like Gulp or Webpack. I think we should document at least the simplest way, if there’s some way of doing this as a command-line one-liner (i.e.
And that’s probably what we should do. I’m not opposed—but I’m a lot more worried about breaking people’s builds, until we can be confident that releasing 2.0.0 on |
What if we throw some deprecation warnings on the 1.x branches? That would
at least raise some awareness without directly breaking anything.
…On Feb 27, 2017 10:43 AM, "Geoffrey Booth" ***@***.***> wrote:
I think that’s called "CoffeeScript 1".
Not quite. CS1 don’t support async/await and a few other features added in
CS2. There is a place for a build chain that involves the CS2 compiler →
Babel → ES3. There are so many ways to implement this, though, and I feel
like most people would want to do it within the context of a full-featured
tool like Gulp or Webpack. I think we should document at least the simplest
way, if there’s some way of doing this as a command-line one-liner (i.e. coffee
-bpe foo.coffee > babel or something) and mention that it’s possible to
do using full-featured build tools. If people write guides on how to do it
via other ways, we can link to those guides.
I’d personally be fine with both coffee-script and coffeescript being
simple mirrors of each other. That seems a little conceptually simpler.
And that’s probably what we should do. I’m not opposed—*but* I’m a lot
more worried about breaking people’s builds, until we can be confident that
releasing 2.0.0 on coffee-script is safe. I understand that Node projects
should be fairly safe, since anyone who adds "coffee-script": "*" to
their package.json should’ve known better, but what about all these
non-Node downstream tools like the Ruby gem? Or even Node tools that
themselves include CoffeeScript, like coffeeify. I think if we can survey
the most popular ones and determine that either they used a fixed version
of CoffeeScript or they use safe version restrictions (i.e. not "*") then
sure, let’s make the packages mirrors of each other. But let’s do some
research first.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#71 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABy6x_VIcZJx1sbUJFMc0mVHybWvKqdKks5rgxlSgaJpZM4MIPjL>
.
|
Perhaps use coffeescript for CS2 right now, and defer the decision of what to do with coffee-script until bugs/tweaks/general response/learnings from CS2 have settled. That way it doesn't break the internet right now, and the decision can be made with more info at hand, also - as @mrmowgli suggests, it gives time for deprecation notice to be acted upon. |
Sweet. Can't wait to update the 60+ official DocPad repos over to it. /cc @sdomagala |
@MaxPleaner here are my webpack rules related to CoffeeScript. I'm using Vue. {
test: /\.vue$/,
loader: 'vue-loader',
options: {
postcss: cssUtils.postcss,
loaders: merge({js: 'babel-loader', coffee: ['babel-loader', 'coffee-loader']}, cssUtils.styleLoaders({
sourceMap: useCssSourceMap,
extract: env.prod
}))
}
},
{
test: /\.coffee$/,
loaders: ['babel-loader', 'coffee-loader'],
include: projectRoot,
exclude: /node_modules/
} Remember not to use eslint with CoffeeScript. And create a symbolic link to |
@MaxPleaner I'm actually downloaded the - var coffee = require("coffee-script");
+ var coffee = require("coffeescript"); and save it as resolveLoader: {
alias: {
'coffee-loader': path.join(__dirname, 'coffee2-loader'),
}
}, so I can use it as normal coffee loader in Vue.js: <script lang="coffee">
.... |
AWESOME you guys! What about decorators? Some libs are starting to depend on them somewhat. I realize it's basically a total syntax collision as a decorator Looks exactly like a this.function to coffeescript. Maybe there could be some special syntax to denote that it is a decorator, instead of the @ symbol, since we have already used that for class variables. |
Let’s discuss decorators in #9 |
Hrmmm. Is there a way to tag @next on the npm coffee-script repo? I'm trying to dig into coffeelint, but I realize there are some deep dependencies that I want to try and break. Didn't Geoffrey mention we can have tagged versions that wont get pulled up with npm upgrade? |
@mrmowgli yes, |
Happy to see some issues appearing in https://github.com/jashkenas/coffeescript! I mean, not that happy to see bugs, but at least it’s gratifying to see people using the new code 😄 I would consider only two features to-do before we can shift from alpha to beta:
Once these are in, the intended features of 2.0.0 will all be in, and we should be able to shift into beta because there shouldn’t be any further breaking changes (unless changes are forced on us in order to fix bugs). Then the beta period will be all about bugfixing and trying to get to 2.0.0. I’m hoping not to have too long of an alpha/beta period, to try to spur adoption of CS2. |
@GeoffreyBooth I'm sorry, I've spent two days on trying to find out how does the parser, lexer work (for example: [CS2] Compile all super calls to ES2015 super), but I still have no idea.. |
Before we add getters and setters it would be nice to see examples of how they're necessary & desirable in modern JS. They were always an intentional omission, despite popular support, from CoffeeScript. In my opinion, they're a "bad part" of JS. Previously, in JavaScript, the reader could tell when they were calling a function and when they were reading a property. It's one thing in languages like Ruby, where direct property accesses don't exist, and everything is a function call — but JavaScript isn't Ruby. Getters and setters just add a level mystery and surprise to potentially every bit of code, and don't allow you to do anything you couldn't already. |
@jashkenas Can we take that discussion to #17? I wrote about it here. |
I don't think that would be easy at all, unfortunately. We could do some shenanigans in @YamiOdymel my advice would be to not get too distracted by the parser and lexer, and focus on |
@YamiOdymel All of the destructuring action happens in |
I’ve started work on destructuring: jashkenas/coffeescript#4478 Help wanted! Please let me know if you’re interested and I’ll add you to the repo. The only other issue to address before we go to 2.0.0-beta is the decision made in #17 (comment), where what looks like the We’re very close to the finish line, but the core contributors to the CS2 effort don’t have as much free time as we used to. We could really use additional help to get 2.0.0 out the door. Don’t just lurk in this repo, read this and get hacking! 😄 Ask not what CoffeeScript can do for you . . . 🙋 |
Mini-update: The last two tasks for 2.0.0 are submitted as PRs for review and testing: If you have time please take a look, and/or try them out in your codebases. Once these land, we will be at 2.0.0-beta1. |
See #80. |
Migrated to jashkenas/coffeescript#4964 |
Hey everyone,
CoffeeScript 2.0.0-alpha1 is released! Install it via:
npm install coffeescript@next
You may notice that it’s not at
coffee-script
. The powers that be at NPM were kind enough to release thecoffeescript
package name to us. Since no one really spells CoffeeScript with a hyphen anymore, it seemed a better choice. It has both the old versions and 2.0.0-alpha1, and will be the home for future versions.coffee-script
will stay 1.x-only, in case anyone installscoffee-script
and expects a compiler that outputs ES3.Since the last update, as of 2017-02-21 the following has been merged into the jashkenas/coffeescript
2
branch:class
andsuper
keywords, thanks to @connec.As of December, we had accomplished:
And as of November, we had accomplished:
for…of
is implemented, thanks to @atg.There are still a handful of features yet to implement, including destructuring and getters/setters. Help with those is most welcome, but if you don’t have time for that, you could also help out by trying 2.0.0-alpha1 in your projects. Please review the breaking changes first, and if you think there’s a bug, please open an issue with “[CS2]“ in the title. Please don’t comment bug reports on this thread. Thanks!
The text was updated successfully, but these errors were encountered: