If you look at the changes between v1.3.0 and v2.0.0-alpha.1 Handlebars in accordance with the official release notes , you will see that these were two major changes that would break your patterns during the upgrade.
- The precompiler output has changed, which means that your precompiled 1.x templates will not be compatible with Runlebars 2.x, and 2.x runtime will not be compatible with old templates. You must update the precompiler, update the runtime, and update all templates.
- Particles no longer have access to the parent context (
../ ), but can now accept the hash as an argument and have access to the root context via the @root variable. So look at the partial ones to use ../ and change it to use local data passed to partial as an argument.
So, the main thing that you should pay attention to when upgrading version 2.x of Handlebars. There were some internal changes that affect the helperMissing , JavaScriptCompiler.compilerInfo , update AST and data frames . But all this makes sense only for users who use their own plugs or make some changes at runtime. Other changes were mostly fixes.
raidendev
source share