Ghost/core/frontend
Fabien 'egg' O'Carroll fac62cd698
Fixed circular dependency warning for the proxy service (#12746)
no-issue

The handlebars template module is required by the proxy service, as part
of the definition of the proxy service's module.exports. By
destructuring the i18n property from the proxy service at the time the
template module is loaded, the i18n property was always undefined, as the
module.exports of the proxy service had not been set.

Bypassing the proxy, and requiring the i18n module directly eliminates the
circular dependency.


* Refactored handlebars template tests to use proxy

Since this module is intended to be used via the proxy, we should test
it in the same way. We have uncovered a circular dependency issue, which
would not be possible to catch in tests unless the tests were to go via
the proxy.

* Added breaking test for handlebars template function

This test highlights the issue caused by a circular dependency, we are
unable to throw an IncorrectUsageError because i18n is undefined.
2021-03-11 16:30:49 +00:00
..
apps Fixed AMP URLs not being transformed to absolute (#12737) 2021-03-06 09:43:50 +00:00
helpers Updated default accent color for content cta 2021-03-09 18:06:00 +05:30
meta Updated twitter/og structured data rules 2021-02-05 18:50:11 +13:00
services Fixed circular dependency warning for the proxy service (#12746) 2021-03-11 16:30:49 +00:00
views Updated unsubscribe copy 2019-11-26 11:03:14 +01:00