-
Notifications
You must be signed in to change notification settings - Fork 282
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
Hogan.js is unmaintained #435
Comments
👋 I understand that it is not being maintained anymore but it has been very stable and fits very well the use case. Do you have any alternatives we can use? Also AFAIK we have no active vulns https://github.com/rtfpessoa/diff2html/security/dependabot |
@rtfpessoa I'm currently developing Wontache, which can be thought of as a successor of hogan.js (although the code bases are not actually related). I haven't reached the 1.0.0 release yet, but it's fully tested, passes all the official Mustache specs (including the newest) and is even more accurate at whitespace handling than hogan.js. In my own testing, it also seems to be at least as fast as hogan.js, but you might want to try that for yourself on a feature branch. The API is slightly different, the compiler returns a function that you can then call with the data: import mustache from 'wontache';
const templateText = 'Interpolate {{variable}} here.';
const compiledTemplate = mustache(templateText);
const renderedOutput = compiledTemplate({variable: 'foo'});
// 'Interpolate foo here.' While I'm not proud enough yet to draw a lot of attention to Wontache, I would definitely welcome diff2html as a first serious outside user. |
👋 @jgonggrijp did a quick test and seems like it works. For me the most important things missing are:
Do you think these are things you will be interested in doing? |
@rtfpessoa Yes, the first and the last point are planned. Please clarify the middle point! |
Potentially relevant issue tickets, in case you want to track them:
|
Do you have any ideas for timelines here? |
As far as order is concerned, the development board conveys best how I prioritize the issues. I want to finish the evaluation release milestone this year if I can help it, and the official launch milestone as soon as possible after that. As far as calendar time is concerned, unfortunately I can spend at most two days a week on my open source libraries and I have to divide my attention between Wontache, Backbone and Underscore (I took over maintainance of the latter two from the original author). I get to it whenever I get to it, so I cannot promise any particular date. If you are seriously considering to use Wontache, please let me know which issues are the most important to you. The priorities are somewhat flexible; in fact, I already moved the WebPack plugin up because it seemed relevant to diff2html and I expect it to be quick to implement. (Also, please consider donating to my Patreon and recruiting other people to do so. Given substantial sponsorship, I might be able to increase my time investment in open source libraries such as Wontache.) By the way, you mentioned this earlier:
Please clarify. |
@rtfpessoa Would it be possible to publish the |
@t1m0thyj I just released version |
Thanks for the quick response! So far the beta version seems to be working well for us. In case anyone else wants to try it out in a TypeScript project, here's what I did to work around // Remove this file once wontache adds type definitions
declare module 'wontache' {
type CompiledTemplate = any;
type Partials = any;
} and added this to "files": [
"./__types__/wontache.d.ts"
] |
I created these more details typings https://github.com/rtfpessoa/diff2html/blob/use-wontache/typings/wontache/wontache.d.ts |
@rtfpessoa I just released Wontache version 0.2.0, which has a couple of new features and bugfixes, as well as a breaking change in the way precompiled templates are represented. Along with this new version, I released the new packages Update: added more links for convenience. |
twitter/hogan.js#272 (2 May 2021)
The last time a pull request was closed was 8 Jun 2019. The dependencies in hogan.js are becoming deprecated (twitter/hogan.js#270) and security vulnerabilities are being exposed (twitter/hogan.js#276).
The text was updated successfully, but these errors were encountered: