TomFrost / Jexl

Javascript Expression Language: Powerful context-based expression parser and evaluator
MIT License
561 stars 92 forks source link

Add an ES5 build #57

Closed czosel closed 3 years ago

czosel commented 5 years ago

Hi @TomFrost

I've been running into some issues with running Jexl 2.0 in older browsers that don't support ES6 yet (specifically IE 11). Many libraries are publishing transpiled (and often also bundled) code to npm. Would you be interested in providing something like that for Jexl as well?

I might be able to open a PR for this, but I figured I'd ask first if you're interested at all :wink:

akshaygolash commented 4 years ago

@czosel - I am facing the same issue here, are you planning to create a PR?

czosel commented 4 years ago

Hi @akshaygolash - I'm not planning on creating a PR for this right now, because I solved the issue differently already. As you can see, this issue is already quite old. I think I'm gonna go ahead and create a issue that asks directly if @TomFrost would accept help with the maintenance of this library - I think Jexl is a great library and it would be a pity if simple things like this issue stop people from using it.

Edit: Done, see #82

akshaygolash commented 4 years ago

@czosel - I agree with you 100%, Thanks for replying. Do you mind to share the approach you used to fix the issue?

The issue for my project is I am using Angular 9, and angular CLI expects all libraries to provide es5 build, and hence it is breaking in IE 11.

Any help is appreciated!

czosel commented 4 years ago

We're using Jexl with Ember.js, and the issue was fixed in the framework itself (ember-auto-import transpiles dependencies automatically, https://github.com/ef4/ember-auto-import/issues/41). Sorry I can't be of more help :wink:

akshaygolash commented 4 years ago

Oh, I see, Thank you for your input. Much appreciated.

akshaygolash commented 4 years ago

Thanks @TomFrost for your prompt response, Any idea what's the ETA for this enhancement? And thanks again for this awesome package!

TomFrost commented 4 years ago

Hi @akshaygolash! No promises, but I'm hoping to cut a release this week. If all goes well, I'll have this in it.

akshaygolash commented 4 years ago

Awesome, thanks! Much appreciated.

malka-ch commented 4 years ago

Any updates?

chaitanya-pagadala commented 4 years ago

Hi @TomFrost .

First of all, Thank you for the awesome library.

We have recently updated to version 2.2 and our application will not run on older browsers that do not support es2015.

Can you please let me know if we can expect a fix for this in the near future.

daniele-pecora commented 4 years ago

Exactly what I need. Would like to see the xorrespondibg pull request coming up soon 😀

kawazoe commented 4 years ago

While on the subject of builds, I would love to see a more versatile module format like UMD or just plain es6 modules without the CommonJS stuff in the way. This would be great for people using WebPack and Rollup since we could get tree-shaking working with this library.

daniele-pecora commented 4 years ago

@TomFrost Is this already part of any release now?

TomFrost commented 4 years ago

Hi everyone! I've been racing to try to complete the port to Typescript, as that will have to be compiled anyway. This isn't out yet, but is being actively worked on. If my timeline drags on, I'll release with @czosel's PR to tide folks over.

czosel commented 3 years ago

Hi @TomFrost, any updates on the typescript port? Might be worth sharing even something incomplete, to allow people to contribute?

TomFrost commented 3 years ago

Still tinkering on the Typescript side of things-- but a release is long overdue, so many thanks to @czosel's PR to add the ES5 build! That is now released in 2.3.0.

czosel commented 3 years ago

Awesome, thanks @TomFrost! :tada:

TomFrost commented 3 years ago

Nonono, thank you! 😉