vsivsi/meteor-file-collection

Upgrade to CoffeeScript 2.0 for latest Meteor compatibility (1.6.1)

deanmckee opened this issue · 8 comments

So it looks like the upgrade of the coffeescript from 1.0.17 to 1.12.3_1 after version 1.3.5 of this project has created an incompatibility with the latest Meteor (1.6.1). From what I can tell Meteor 1.6.1 uses a version of babel that is incompatible with this 1.12.3_1 version coffeescript. There is probably two options here:

  • Upgrade this project to use a newer Meteor/Babel compatible version of coffeescript (like a 2.0 version). This seems hard since there are some breaking changes with moving from coffeescript 1.x to 2.0.
  • Downgrade this project back to the last Meteor compatible coffeescript version (1.0.17).

I attempted the first option and ran into problems with your use of super that is now deprecated in coffeescript 2.0.

I ended up falling back to an older coffeescript ... 1.0.17 (the one you use in version 1.3.5) and things seem to be working for now.

Hi @deanmckee Thanks for reporting. I expected someone to notice this eventually!

My other main meteor project job-collection has the same issue, and a user over there has successfully ported it to Coffeescript 2 without too much effort and put together a nice PR that I hope to merge and publish very soon (I've been waiting to update both of these packages in one swoop, so you raising this is timely!) Would you be willing to do the same for this package using the work @mitar already did as a guide? The PR on the other project is here: vsivsi/meteor-job-collection#268

If you can help out with this it would be much appreciated, because frankly it will take me a long time to get around to doing this myself... if ever, given that I no longer actively use Meteor or this package.

Thank again.

I just submitted pr #172 which should do the trick for Meteor v1.6.1

I am moving on to upgrade to Meteor v1.6.2.beta. May require a tweak to the package.js file.

HI! Any news on this? I heavily depend on this Package. Thanks by the way ! And this is holding me from moving to 1.6.

Sorry I am nit knowledgeable in CoffeScript enough to help you with the PR.

Hi @juliomac, while waiting for this to get updated you can just use my package here.

package name is: vsivsi:file-collection@2.0.0
Clone it into your packages directory and it should just work and your app should use that version instead of the official version.

Many Thanks @brucejo75 !!! I will indeed !

@brucejo75 I've been following this thread for several months waiting for your pull request to be implemented. It's been long enough I'm not sure that is ever going to happen. Could you add a little color to how I could get your branch running on my system?

Essentially, with any meteor package you just need to create it in the packages sub directory.

So, for this package simply clone it into your package directory.
Then you can add it to your meteor project.

cd path/to/meteor/project
cd packages
git clone https://github.com/brucejo75/meteor-file-collection --recursive
cd ..
meteor add vsivsi:file-collection@2.0.0

General information on meteor packages:
https://dweldon.silvrback.com/local-packages
https://guide.meteor.com/writing-atmosphere-packages.html#local-packages

I've made a fork that works with all the latest updates and removes coffeescript, it's probably a mess, but I had no choice as my app depends on it.

https://github.com/thumptech/meteor-file-collection