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

Fix mustache support #332

Merged
merged 1 commit into from
Mar 15, 2020
Merged

Fix mustache support #332

merged 1 commit into from
Mar 15, 2020

Conversation

vladimyr
Copy link
Contributor

Use mustache.render() instead of mustache.to_html() that got removed as of mustache v4 (janl/mustache.js#735).

This closes #331

Use `mustache.render()` instead of `mustache.to_html()` that got
removed as of `mustache` v4.
@vladimyr vladimyr requested a review from doowb February 18, 2020 23:57
@marinko-peso
Copy link

@doowb any chance we can get this merged in and pushed to npm? Lib is effectively broken without this when people upgrade to latest mustache

@doowb
Copy link
Collaborator

doowb commented Feb 20, 2020

@vladimyr thanks for the PR. I'll review this over the weekend.

@vladimyr
Copy link
Contributor Author

Take your time 😉

@marinko-peso
Copy link

@doowb pinging so this doesn't get forgotten

@marinko-peso
Copy link

@doowb come out come out wherever you are 🤡

@marinko-peso
Copy link

For everyone wondering here, until this PR gets merged, you can fix it yourself for your project in a few easy steps.
Go in node_modules (don't worry you will only do this once) and find consolidate/lib/consolidate.js, go to line 1043 (exports.mustache.render) and just change method to_html inside that block to render.
After that run: npx patch-package consolidate
This will figure out what changed and create a patch (make sure to add that to git!).
As a dev dep install patch-package and make it run as a postinstall script in your package.json:
"postinstall": "patch-package"
Delete your node_modules and run a fresh npm install to see it in action. Patch will be run after install and update consolidate for you. When this gets merged and new version gets pushed to npm patch will let you know version changed and your patch might not be required anymore.

Hope it helps people!

@vladimyr
Copy link
Contributor Author

@doowb Any news on this one?

@doowb doowb merged commit 9f4e776 into tj:master Mar 15, 2020
@vladimyr vladimyr deleted the fix-mustache-suport branch March 15, 2020 21:10
@vladimyr
Copy link
Contributor Author

Thank you!

@vladimyr
Copy link
Contributor Author

@doowb Are there any plans for the new release?

@jdauphant
Copy link

Hey @tj , any plans for a release ? are you the only one that can do that ?
(maybe you can give the push right for the npm package to someone invested like @doowb )

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

Successfully merging this pull request may close these issues.

Mustache support is broken since mustache v4 release
4 participants