Recently for release v7.4.0 v7.4.1 of the workbox packages, the JavaScript templating engine used in the workbox-build package was changed from lodash templating to eta templating.
Some of the benefits of eta are that it has a reduced dependency-set compared to lodash, and that the migration resolved an open bug in the v4.18.0 release of lodash.
I am relatively conservative about changing dependencies, and would like to suggest that we consider switching back to lodash templates. The reasons I have in mind are:
- Although
eta itself has a smaller dependency-set, lodash is already, and remains, a dependency (now transitive) of workbox-build -- so we have not reduced the installed dependency set; arguably we may have reduced (or at least changed) the runtime code paths, though.
- The error raised during use of v4.18.0 of
lodash was due to a faulty release, and that has been resolved with v4.18.1 -- it's not ideal that a release fault could occur, and I don't precisely understand what went wrong, but unless there is a significant known problem, I don't find that it's compelling enough to entirely replace the templating engine.
- The community size for
lodash and its templating engine are large -- this aids the ability to find, report and resolve problems.
- Although there have been some security issues with
lodash templating, those have been resolved and the maintainers seem responsive.
- One of the open issues in the
eta bugtracker makes me think that the way that it parses template files may be fragile:
However, the migration to eta did cause me to learn about the JavaScript with statement that is used by default in both the lodash templating and eta templating engines. It is deprecated: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/with
I would like to suggest that workbox consider changing back to use the lodash templating engine for workbox-build, albeit enabling the variable option at the same time to remove the dependency on the deprecated JavaScript with statement.
cc @rtritto @swissspidy in case you have any thoughts from involvement in this process.
Thanks!
Edit: fixup: this migration took place for v7.4.1 of workbox, not v7.4.0 as originally described here
Recently for release
v7.4.0v7.4.1 of theworkboxpackages, the JavaScript templating engine used in theworkbox-buildpackage was changed fromlodashtemplating toetatemplating.Some of the benefits of
etaare that it has a reduced dependency-set compared tolodash, and that the migration resolved an open bug in the v4.18.0 release oflodash.I am relatively conservative about changing dependencies, and would like to suggest that we consider switching back to
lodashtemplates. The reasons I have in mind are:etaitself has a smaller dependency-set,lodashis already, and remains, a dependency (now transitive) ofworkbox-build-- so we have not reduced the installed dependency set; arguably we may have reduced (or at least changed) the runtime code paths, though.lodashwas due to a faulty release, and that has been resolved with v4.18.1 -- it's not ideal that a release fault could occur, and I don't precisely understand what went wrong, but unless there is a significant known problem, I don't find that it's compelling enough to entirely replace the templating engine.lodashand its templating engine are large -- this aids the ability to find, report and resolve problems.lodashtemplating, those have been resolved and the maintainers seem responsive.etabugtracker makes me think that the way that it parses template files may be fragile:However, the migration to
etadid cause me to learn about the JavaScriptwithstatement that is used by default in both thelodashtemplating andetatemplating engines. It is deprecated: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/withI would like to suggest that
workboxconsider changing back to use thelodashtemplating engine forworkbox-build, albeit enabling thevariableoption at the same time to remove the dependency on the deprecated JavaScriptwithstatement.cc @rtritto @swissspidy in case you have any thoughts from involvement in this process.
Thanks!
Edit: fixup: this migration took place for v7.4.1 of
workbox, not v7.4.0 as originally described here