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

[Future] Support coffeescript v2 (requires NodeJS 6+) #70

Closed
AlCalzone opened this issue Feb 2, 2018 · 12 comments
Closed

[Future] Support coffeescript v2 (requires NodeJS 6+) #70

AlCalzone opened this issue Feb 2, 2018 · 12 comments

Comments

@AlCalzone
Copy link
Collaborator

AlCalzone commented Feb 2, 2018

Installing outputs the following warning:

npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)

However we cannot just switch the package name because https://github.com/alexgorbatchev/coffee-compiler also has the old module dependency.
Do you know if there's a possibility to tell NodeJS to actually load "coffeescript" when requiring "coffee-script"? If so, we could support CoffeeScript v2.

Of course we could just fork the coffee-compiler, change the dependency and use our fork - but I'm not sure if that's worth the effort.

@GermanBluefox
Copy link
Contributor

GermanBluefox commented Feb 2, 2018 via email

@Apollon77
Copy link
Contributor

Yes, you could use https://www.npmjs.com/package/mock-require ... I use this to moch ak´wy serialport with virtual-serialport in some tests for my libraries ... so it is meaned to be used for such, but should work here too.

var mock = require('mock-require');
mock('coffee-script', 'coffeescript');

... could work if you want to "force" it

@Apollon77
Copy link
Contributor

Do you asked the owner of coffee-compiler to update the dep or at least prepare an PR :-)) sometimes the easiest way

@AlCalzone
Copy link
Collaborator Author

That package was last updated 4-5 years ago, I didn't even bother ;)
Rewiring the require also wouldn't change anything because that package still has coffee-script as a dependency.
I guess I'll file this under never change a running system.

@WolfspiritM
Copy link
Contributor

Just saw that...I don't really care about coffeescript but:
I'm wondering...why even bothering using that old compiler at all?
According to the coffeescript docs the official coffeescript package can do pretty much the same...

let CoffeeScript = require('coffeescript');
let js = CoffeeScript.compile(obj.common.source, { sourceMap: false, bare: true });

Should be similar to:

mods['coffee-compiler'].fromSource(obj.common.source, {
sourceMap: false,
bare: true
}, function (err, js) {

Just not in an async way but I doubt that compiling the code can be done async anyway...

@AlCalzone
Copy link
Collaborator Author

Hmm, that looks very similar indeed. Not sure if the v1 version could not do that or why the additional package was necessary. Maybe I'll give it a 2nd look.

@AlCalzone
Copy link
Collaborator Author

coffeescript v2 requires at least NodeJS 6, so this is on hold until we drop support for NodeJS 4.

@AlCalzone AlCalzone changed the title coffee-script module has been renamed [Future] Support coffeescript v2 (requires NodeJS 6+) Feb 6, 2018
@AlCalzone
Copy link
Collaborator Author

Now that we have dropped support for NodeJS 4, do you guys think we should pursue this issue further?

@GermanBluefox
Copy link
Contributor

GermanBluefox commented Jun 10, 2018 via email

@Apollon77
Copy link
Contributor

Just to say it: did we really dropped Support officially? For latest repo I think yes ;-))
Stable we still need to communicate and such

@GermanBluefox
Copy link
Contributor

GermanBluefox commented Jun 10, 2018 via email

@GermanBluefox
Copy link
Contributor

I removed coffeescript

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

4 participants