-
Notifications
You must be signed in to change notification settings - Fork 82
Bugfix/update ejs #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
Bugfix/update ejs #282
Conversation
|
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
|
@slnode test please |
|
@lkappeler thank you for the pull request. First of all, please sign our Contributor License Agreement: https://cla.strongloop.com/agreements/strongloop/loopback-sdk-angular |
lib/services.template.ejs
Outdated
| // angular.module('app', [lbServices]); | ||
| // | ||
| module.exports = <%-: moduleName | q %>; | ||
| module.exports = <%-: helpers.quotedString(moduleName) %>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to replace all occurences of <%-: with <%-. IIRC, the : suffix was enabling filters via the | operator. AFAICT, it's no longer available in the latest EJS version (see e.g. here).
Could you please try to make this change and see if it fixes the problem you are observing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have already tried that (#280 (comment)) without any changes in the behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message has now changed to Cannot generate services script: SyntaxError: missing ) after argument list while compiling ejs. The linter still doesn't give my any output.
In the documentation is described that the linter ignores other tags than:
EJS-Lint parses scriptlet tags (<%, %>, <%_, _%>, and -%>). It ignores all other tags (i.e. <%=).
3dce2d4 to
4901999
Compare
|
Looks like the new EJS is choking on the following syntax: <% } else { params.forEach(function(arg) { -%>I fixed the problem together with few others I discovered along the way, see Please let me know if you are ok with the result, so that I can clean up git history and proceed with landing this patch. Perhaps test the new version on your project, to make sure we are still generating a good client code? |
e4182ad to
9097bc3
Compare
|
Thanks!, the code looks fine to me. I'm quiet busy right not, will test it with our application as soon as I'll find some time. |
Get rid of warnings reported by nsp/snyk for a security vulnerability in the older version of ejs (note that we are not affected by it).
9097bc3 to
d37d9fe
Compare
|
Landed 🎉 Thank you for the contribution! ❤️ |
|
Released in |
|
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
Description
I tried to uptade ejs to version 2.5.7 to get rid of the security warnings mentioned in the connected issue.
Currently the tests are failing. The suggested linter does not give any hints.
Read the issue conversation for further information.
Checklist
guide