Comparing changes
Open a pull request
base repository: handlebars-lang/handlebars.js
base: v4.4.5
head repository: handlebars-lang/handlebars.js
compare: v4.5.0
- 12 commits
- 25 files changed
- 7 contributors
Commits on Oct 9, 2019
Commits on Oct 20, 2019
-
fix: prevent zero length tokens in raw-blocks (#1577)
This comment ensures that the lexer is not stuck on zero-length tokens, in raw-blocks like {{{{a}}}} {{{{/a}}}}
-
fix: non-eager matching raw-block-contents
In 4.4.4 the block-contents was matched with an eager match, which means that with multiple raw-blocks of the same kind, the block was spanned over the first ending-tag until the last one. This commit replaces this by a non-eager match. closes #1579
Commits on Oct 21, 2019
Commits on Oct 27, 2019
-
fix: add guard to if & unless helpers (#1549)
fixes #1548 - add a guard to show readable syntax error for if / unless helper - prevents against 3 different errors that can be generated by different systax errors
-
-
Add Handlebars.parseWithoutProcessing (#1584)
When authoring tooling that parses Handlebars files and emits Handlebars files, you often want to preserve the **exact** formatting of the input. The changes in this commit add a new method to the `Handlebars` namespace: `parseWithoutProcessing`. Unlike, `Handlebars.parse` (which will mutate the parsed AST to apply whitespace control) this method will parse the template and return it directly (**without** processing
😉 ). For example, parsing the following template: ```hbs {{#foo}} {{~bar~}} {{baz~}} {{/foo}} ``` Using `Handlebars.parse`, the AST returned would have truncated the following whitespace: * The whitespace prior to the `{{#foo}}` * The newline following `{{#foo}}` * The leading whitespace before `{{~bar~}}` * The whitespace between `{{~bar~}}` and `{{baz~}}` * The newline after `{{baz~}}` * The whitespace prior to the `{{/foo}}` When `Handlebars.parse` is used from `Handlebars.precompile` or `Handlebars.compile`, this whitespace stripping is **very** important (these behaviors are intentional, and generally lead to better rendered output). When the same template is parsed with `Handlebars.parseWithoutProcessing` none of those modifications to the AST are made. This enables "codemod tooling" (e.g. `prettier` and `ember-template-recast`) to preserve the **exact** initial formatting. Prior to these changes, those tools would have to _manually_ reconstruct the whitespace that is lost prior to emitting source.
Commits on Oct 28, 2019
-
Add missing types for the Exception class properties (#1583)
* Convert Exception to a class * Add node param type declaration * Test the types
-
Resolve deprecation warning message from eslint while running eslint (#…
…1586) * Resolve eslint deprecation warning There was a DeprecationWarning message from eslint saying that `ecmaFeatures` property has been deprecated. Moved it under the `parserOptions` as per recommended here - https://eslint.org/docs/user-guide/migrating-to-2.0.0. * Set escmaVersion = 6 * Use ES6 built-in global variables * Remove flags in favor of ecmaVersion
-
chore: add eslint-plugin-compat and eslint-plugin-es5
- tests are not compiled with babel and must thus be in es5 - we don't use polyfills, so we need to make sure no functions aren't used that are not supported by popular browsers. (like Object.assign in Safari and IE11) - Boths are errors that usually only appear when running tests in SauceLabs, which happens only on _after_ merging a PR.
-
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v4.4.5...v4.5.0