mozilla / mozjexl

Javascript Expression Language: Powerful context-based expression parser and evaluator
Other
52 stars 5 forks source link

Convert mozjexl output to an mjs module #33

Open Standard8 opened 1 year ago

Standard8 commented 1 year ago

This converts to use Rollup for generating the module. From what I can tell, it isn't currently easy to get Webpack to generate a library that's an ES module.

I've also done a general node_modules update as well whilst I'm here.

The new file isn't minified, though we can change that if we want to.

dmose commented 1 year ago

Thanks for this patch, and sorry for the long delay in getting to it! At a high level, this is great. There are a couple of things I'm concerned about:

1) I'd prefer not doing the eslint stuff and reformatting as part of this (or really at all, unless it moves into m-c), because a) I'd like to make it easier to pull changes in from upstream; there are multiple we might want. b) I don't want to bit-rot #25, though I don't know when someone will get back to that.

2) The switch to parcel adds some risk: https://phabricator.services.mozilla.com/D178187#6130439 has more details. I tried playing around with the webpack 3 in use here, and it wasn't obvious how to make it do the right thing, but I didn't spend a lot time on it. Upgrading to webpack 5 is possible, though I suspect it's similarly risky to switching to parcel, and then leaves us using something (webpack) with many more dependencies and harder-to-debug code.

Thoughts?